用一个特殊标记显式表达图结构,让大模型更准确理解图数据。
<SOG_k>: One LLM Token for Explicit Graph Structural Understanding
- 引入特殊标记<SOG_k>,将图拓扑映射为单一可选令牌。
- 在五个图级别基准上提升9.9%至41.4%,兼具可解释性与一致性。
- 适用于全局与局部结构理解,适合图神经网络与大模型融合场景。
大型语言模型在非结构化数据理解方面潜力巨大,但在处理图数据时仍面临结构幻觉问题。现有方法要么将图转化为自然语言,导致令牌消耗过多且注意力分散;要么将图转为可训练的连续嵌入(即软提示),但与原始文本令牌严重错位。为此,我们提出在统一令牌空间中引入一个特殊标记<SOG_k>,以完整表征图的结构信息,实现显式的拓扑输入与结构信息共享。具体而言,设计一种拓扑感知的结构分词器,将每种图拓扑映射为高度选择性的单个令牌。随后构建混合结构问答语料库,对齐新结构令牌与现有文本令牌。该方法使大模型能以简洁准确的方式理解、生成和推理图结构。在五个图级别基准上的大量实验表明,本方法相比基线性能提升9.9%至41.4%,同时具备可解释性与一致性。此外,该方法可灵活扩展至节点级任务,支持全局与局部结构理解。代码已公开于 https://github.com/Jingyao-Wu/SOG。
原文摘要 · Abstract (English)
Large language models show great potential in unstructured data understanding, but still face significant challenges with graphs due to their structural hallucination. Existing approaches mainly either verbalize graphs into natural language, which leads to excessive token consumption and scattered attention, or transform graphs into trainable continuous embeddings (i.e., soft prompt), but exhibit severe misalignment with original text tokens. To solve this problem, we propose to incorporate one special token <SOG_k> to fully represent the Structure Of Graph within a unified token space, facilitating explicit topology input and structural information sharing. Specifically, we propose a topology-aware structural tokenizer that maps each graph topology into a highly selective single token. Afterwards, we construct a set of hybrid structure Question-Answering corpora to align new structural tokens with existing text tokens. With this approach, <SOG_k> empowers LLMs to understand, generate, and reason in a concise and accurate manner. Extensive experiments on five graph-level benchmarks demonstrate the superiority of our method, achieving a performance improvement of 9.9% to 41.4% compared to the baselines while exhibiting interpretability and consistency. Furthermore, our method provides a flexible extension to node-level tasks, enabling both global and local structural understanding. The codebase is publicly available at https://github.com/Jingyao-Wu/SOG.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。