让大模型原生理解图结构,用极少量参数实现文本与图推理统一。
Teaching LLMs to See Graphs: Unifying Text and Structural Reasoning

- 在大模型注意力机制中注入图感知偏置,避免传统编码瓶颈。
- 10亿参数的GTLM性能媲美70亿参数的顶尖模型,图问答任务显著领先。
- 无需额外训练即可模拟消息传递,适合算法推理和图增强检索场景。
将大型语言模型(LLM)用于处理图结构数据是当前研究热点,但现有先进方法通常依赖多步流水线,通过图神经网络(GNN)编码器将丰富的文本属性压缩为单一标记,造成显著语义瓶颈。本文提出图变换器语言模型(GTLM),一种新架构,使预训练的LLM能原生处理图拓扑结构,完全消除该压缩瓶颈。GTLM极具参数效率:仅通过向LLM注意力模块注入图感知注意力偏置,新增参数占比仅为基模型的0.015%。我们从理论上证明,双向注意力前缀保持节点排列等变性,同时与预训练基模型完全后向兼容。大量实验表明,10亿参数的GTLM在标准文本属性图基准测试中表现匹敌甚至超越70亿参数的先进模型,且在GraphQA任务上显著优于基线。最后,我们发现GTLM注意力头隐式学习模拟消息传递过程,解释了其在算法任务中的卓越表现。这一范式转变使大模型具备真正的算法推理能力,并为下一代GraphRAG与关系深度学习提供可扩展基础。
原文摘要 · Abstract (English)
Using Large Language Models (LLMs) to process graph-structured data is an active research area, yet current state-of-the-art approaches typically rely on multi-step pipelines with Graph Neural Network (GNN) encoders that compress rich textual attributes into solitary tokens, creating a significant semantic bottleneck. In this paper, we introduce the Graph Transformer Language Model (GTLM), a novel architecture that enables pretrained LLMs to natively process graph topologies while entirely eliminating this compressive bottleneck. GTLM is exceptionally parameter-efficient: by injecting graph-aware attention biases directly into the LLM's attention modules, it introduces only 0.015% additional parameters relative to the base model. We theoretically prove that our bidirectional attention prefix preserves node permutation equivariance while maintaining exact backward compatibility with the pretrained base model. Extensive evaluations demonstrate that a 1B-parameter GTLM matches or exceeds the performance of 7B-parameter state-of-the-art models on standard Text-Attributed Graph benchmarks, while significantly surpassing baselines on GraphQA. Finally, we demonstrate that GTLM attention heads implicitly learn to simulate message passing, explaining its superior performance on algorithmic tasks. This paradigm shift enables true algorithmic reasoning within LLMs and provides a scalable foundation for next-generation GraphRAG and relational deep learning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。