arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.27439cs.LGcs.AI
收藏

用可学习图位置编码扩展语言模型中的图推理能力

Scaling Graph Reasoning in Language Models with Learnable Graph Positional Encodings

University of Pennsylvania(宾夕法尼亚大学)

Javier Porras-Valenzuela, Arush Arora, Alejandro Ribeiro

AI总结:

该研究提出可学习图位置编码与后融合模块,结合GNN和图Transformer计算编码,微调LRM的LoRA适配器,提升了语言模型在图推理任务上的规模泛化与鲁棒性。

摘要:

解决图上的推理任务通常需要为语言推理模型(LRM)提供图的序列化描述,该方法会使输入长度随边数增长,限制了可解决问题的规模;此外,即使图能适配上下文,性能也会随图规模增大而急剧下降。我们提出通过为LRM添加可扩展且置换等变的图位置编码来解决该问题,这些编码会调节注意力对数,另有一个后融合式模块将结构信息融入隐藏状态。我们使用GNN后接图Transformer计算这些位置编码,无需序列化邻接关系,将上下文负担降至O(N)。我们使用图论求解器生成的最优解联合微调位置编码器和LRM的LoRA适配器,形成计算高效的方法。在小图上训练后,模型在最多含1000个节点的图的图论任务上表现出更好的规模泛化能力,生成的token比传统LRM更少;此外,模型对节点重标记保持鲁棒性,在图论基准上的评估也显示其在小图上的性能得以保留。

英文摘要:

Solving reasoning tasks supported on graphs typically requires providing a Language Reasoning Model (LRM) with a serialized description of the graph. This approach results in the input length growing with the number of edges, which limits the size of the problems that can be solved. Furthermore, even when graphs fit in context, performance sharply decays as the graphs grow. We propose to address this by augmenting LRMs with scalable and permutation equivariant graph positional encodings that modulate attention logits. An additional post-fusion-style module incorporates structural information into hidden states. We compute these positional encodings using a GNN followed by a Graph Transformer. This eliminates the need for serialized adjacencies, reducing the context burden to $O(N)$. We jointly fine-tune the positional encoder and the LRM LoRA adapters using optimal solutions generated by graph-theoretic solvers, resulting in a computationally efficient method. Trained on small graphs, the model exhibits improved size-generalization across graph-theoretic tasks on graphs with up to 1,000 nodes, and produces fewer tokens than a conventional LRM. Additionally, we observe that our model remains robust to node relabelings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑