arXiv:2410.10743cs.AI2024-10中稿 · CIKM 2025被引 5

用锚点编码让大模型高效理解图结构数据

From Anchors to Answers: A Novel Node Tokenizer for Integrating Graph Structure into Large Language Models

  • 以关键节点为锚点,用相对位置编码表示图结构
  • 在多种图任务中表现优于现有方法,计算开销小
  • 适合需要图推理的LLM应用,如知识图谱问答

尽管大型语言模型(LLMs)在自然语言任务中表现出色,但有效处理和推理图结构数据仍是重大挑战。现有方法或把图转为冗长文本,消耗大量计算资源;或使用复杂的图神经网络作为分词器,带来显著训练开销。为此,我们提出NT-LLM框架,采用基于锚点的位置编码方案来表示图结构。通过选择参考节点作为锚点,编码每个节点相对于这些锚点的位置,以捕捉关键拓扑信息,且无需高昂计算成本。我们识别并解决了图中离散跳数距离与嵌入空间连续距离之间的本质不匹配问题,通过引入保持排序的位置编码预训练目标,使NT-LLM在从基础结构分析到复杂推理等多种图任务中均取得优异表现。全面评估表明,这一轻量级但强大的方法显著提升了LLMs对图结构信息的理解与推理能力,为语言模型的图应用提供了高效解决方案。

原文摘要 · Abstract (English)

Enabling large language models (LLMs) to effectively process and reason with graph-structured data remains a significant challenge despite their remarkable success in natural language tasks. Current approaches either convert graph structures into verbose textual descriptions, consuming substantial computational resources, or employ complex graph neural networks as tokenizers, which introduce significant training overhead. To bridge this gap, we present NT-LLM, a novel framework with an anchor-based positional encoding scheme for graph representation. Our approach strategically selects reference nodes as anchors and encodes each node's position relative to these anchors, capturing essential topological information without the computational burden of existing methods. Notably, we identify and address a fundamental issue: the inherent misalignment between discrete hop-based distances in graphs and continuous distances in embedding spaces. By implementing a rank-preserving objective for positional encoding pretraining, NT-LLM achieves superior performance across diverse graph tasks ranging from basic structural analysis to complex reasoning scenarios. Our comprehensive evaluation demonstrates that this lightweight yet powerful approach effectively enhances LLMs' ability to understand and reason with graph-structured information, offering an efficient solution for graph-based applications of language models.

图神经网络大模型位置编码图结构

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。