Prevailing methods for integrating graphs into Language Models (LMs) typically rely on a segregated architecture: external Graph Neural Networks (GNNs) encode structural topology, while LMs process textual semantics. We argue this approach is suboptimal for text-graphs: it creates a conceptually disjointed interaction paradigm. By segregating structural encoding from semantic processing, these systems must perform a complex implicit alignment between abstract graph tokens and concrete textual elements. Challenging the necessity of external encoders, we propose NAG (Native Architecture for Graphs), a unified framework that internalizes graph processing within the LM's native manifold. Instead of bridging disparate embedding spaces, NAG repurposes the self-attention mechanism to enforce topological dependencies and recalibrates positional IDs to ensure structural equivalence. This allows the model to harness its intrinsic linguistic capability to simultaneously comprehend node and edge content alongside structural topology. We introduce two efficient implementations: NAG-Zero for absolute preservation of the base model's linguistic capabilities, and NAG-LoRA for enhanced structural adaptation. Experiments across diverse graph tasks validate that NAG achieves robust graph comprehension without the overhead of external encoders, offering a simpler, more coherent paradigm for text-graph modeling.
翻译:当前将图集成到语言模型(LMs)的主流方法通常依赖于一种分离式架构:外部图神经网络(GNNs)编码结构拓扑,而LMs处理文本语义。我们认为这种方法对于文本-图并非最优:它创建了一种概念上割裂的交互范式。通过将结构编码与语义处理分离,这些系统必须在抽象的图标记与具体的文本元素之间执行复杂的隐式对齐。为了挑战外部编码器的必要性,我们提出了NAG(Native Architecture for Graphs),一个将图处理内化于LM原生流形内的统一框架。NAG并非桥接不同的嵌入空间,而是重新利用自注意力机制来强制执行拓扑依赖,并重新校准位置ID以确保结构等价性。这使得模型能够利用其固有的语言能力,同时理解节点与边的内容以及结构拓扑。我们引入了两种高效实现:NAG-Zero用于绝对保留基础模型的语言能力,以及NAG-LoRA用于增强的结构适应。在多种图任务上的实验验证了NAG无需外部编码器的开销即可实现稳健的图理解,为文本-图建模提供了一个更简单、更连贯的范式。