形式化并缓解大语言模型注意力中的结构失真以实现零样本图推理
Formalizing and Mitigating Structural Distortion in LLM Attention for Graph Reasoning
AI总结:
本文形式化了大语言模型处理文本属性图时因图线性化导致的结构失真机制,并提出轻量级推理时修改方法GaLA,通过校正注意力偏差提升零样本图推理性能。
摘要:
大语言模型(LLM)在文本属性图(TAG)推理中展现出潜力。然而,将LLM应用于图需要将其结构线性化为序列,这引入了根源于图带宽问题的失真。虽然这种失真已被证明会降低性能,但通常归因于提示设计或模型规模,其潜在机制尚不清楚。在这项工作中,我们展示了旋转位置嵌入如何将图线性化为带宽相关的注意力衰减,抑制了序列化序列中被强制分隔开的图相邻节点之间的注意力。这将基于LLM的图推理的焦点从提示工程和规模缩放转向纠正注意力错位。受此分析启发,我们提出了图对齐语言注意力(GaLA),一种轻量级的、推理时修改LLM的方法。GaLA将注意力偏向图相邻节点,同时保留LLM的序列归纳偏差。在TAG基准测试中,GaLA以可忽略的开销提升了性能,表明失真是基于LLM的图推理中可纠正的瓶颈。
英文摘要:
Large Language Models (LLMs) have shown promise for reasoning over Text-Attributed Graphs (TAGs). However, applying LLMs to graphs requires linearizing their structure into sequences, introducing distortion rooted in the graph bandwidth problem. While this distortion has been shown to degrade performance, it is often attributed to prompt design or model scale, leaving the underlying mechanism unclear. In this work, we show \textit{how} rotary positional embeddings turn graph linearization into bandwidth-dependent attention decay, suppressing attention between graph-adjacent nodes that are forced far apart in the serialized sequence. This shifts the focus of LLM-based graph reasoning from prompt engineering and scaling toward correcting attention misalignment. Motivated by this analysis, we propose \textbf{G}raph-\textbf{a}ligned \textbf{L}anguage \textbf{A}ttention (\textbf{GaLA}), a lightweight, inference-time modification for LLMs. GaLA biases attention toward graph-adjacent nodes while preserving the LLM's sequential inductive biases. Across TAG benchmarks, GaLA improves performance with negligible overhead, demonstrating that distortion is a correctable bottleneck in LLM-based graph reasoning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。