arXiv:cs.LG· Dario Vajda·· 5 小时前AI 评分48
GTLM:让 LLM 原生处理图结构,统一文本与结构推理
Teaching LLMs to See Graphs: Unifying Text and Structural Reasoning
AI 导读
研究者提出 Graph Transformer Language Model(GTLM),通过向预训练 LLM 的注意力模块注入图感知注意力偏置,使其原生处理图拓扑,仅新增 0.015% 结构相关参数。GTLM 在 1k 至 64k tokens 范围内 needle-in-a-graph 准确率保持平稳,并在文本属性图、WebQSP 上的 GraphRAG 及分子基准上匹配或超越领域 SOTA。
正文
Abstract:Applying Large Language Models (LLMs) to graph-structured data usually involves multi-step pipelines in which textual node attributes are compressed into single tokens and further processed by GNNs, discarding most of their semantic content. We introduce the Graph Transformer Language Model (GTLM), which enables a pretrained LLM to process graph topology natively and removes this bottleneck entirely. GTLM injects graph-aware attention biases directly into the LLM's attention modules, adding only 0.015\% structure-related parameters relative to the base model. Training updates only the structural parameters together with a LoRA adapter on the base model. We prove that our bidirectional attention prefix is permutation-equivariant over nodes and that GTLM reduces exactly to the pretrained model when no graph is present. Having no global node ordering, GTLM shows no positional degradation and does not \textit{get lost in the middle}: needle-in-a-graph accuracy stays flat from 1k to 64k tokens and 4x past the training length, while an identically trained flat-text baseline collapses. Comprehensive evaluations show that a GTLM matches or exceeds domain-specific state-of-the-art models on text-attributed graph benchmarks, GraphRAG on WebQSP, and molecular benchmarks, while meaningfully improving over strong baselines on GraphQA. We further show that GTLM's attention heads implicitly learn to simulate message passing, explaining its strength on algorithmic tasks. Together, these results suggest that a minimally adapted pretrained LLM can serve as a general backbone for graph learning.
| Subjects: | Machine Learning (cs.LG) |
| Cite as: | arXiv:2605.10247 [cs.LG] |
| (or arXiv:2605.10247v2 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2605.10247 arXiv-issued DOI via DataCite |
Submission history
From: Dario Vajda [view email]
[v1]
Mon, 11 May 2026 09:19:55 UTC (691 KB)
[v2]
Fri, 2 Oct 2026 13:52:20 UTC (889 KB)
来源:arXiv:cs.LG · arxiv.org