arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.10386cs.LG
收藏

图的丰富多彩对话:用于大语言模型的人类可解释图编码

Colorful Talks with Graphs: Human-Interpretable Graph Encodings for Large Language Models

University of Illinois Chicago(伊利诺伊大学香槟分校)

Angelo Zangari, Peyman Baghershahi, Sourav Medya

AI总结:

本文提出一种将图结构直接注入自然语言提示的编码策略,通过将图结构转换为人类可理解的颜色标记,提升大语言模型处理图任务的能力,实验显示在合成和真实数据集上均取得显著改进。

摘要:

图问题对大语言模型(LLMs)来说本质上具有挑战性。尽管LLMs在处理无结构文本方面表现出色,但图任务需要推理显式结构、置换不变性和计算复杂的关系,这与基于文本的模型表示不匹配。我们的工作探讨了如何在这些障碍下有效应用LLMs到图问题。我们引入了一种人类可解释的结构编码策略,用于图到文本翻译,将图结构直接注入自然语言提示。我们的方法涉及计算Weisfeiler-Lehman(WL)相似类的变体,并将其映射到人类似颜色标记而不是数字标签。关键见解是语义有意义且人类可解释的线索可能比模糊的符号编码更有效地被LLMs处理。在多个算法和预测图任务上的实验结果表明,我们的方法在合成和真实世界数据集上均取得了显著改进。通过捕捉局部和全局范围的依赖关系,我们的方法增强了LLM在需要推理全局图结构的图任务上的性能。

英文摘要:

Graph problems are fundamentally challenging for large language models (LLMs). While LLMs excel at processing unstructured text, graph tasks require reasoning over explicit structure, permutation invariance, and computationally complex relationships, creating a mismatch with the representations of text-based models. Our work investigates how LLMs can be effectively applied to graph problems despite these barriers. We introduce a human-interpretable structural encoding strategy for graph-to-text translation that injects graph structure directly into natural language prompts. Our method involves computing a variant of Weisfeiler-Lehman (WL) similarity classes and maps them to human-like color tokens rather than numeric labels. The key insight is that semantically meaningful and human-interpretable cues may be more effectively processed by LLMs than opaque symbolic encoding. Experimental results on multiple algorithmic and predictive graph tasks show the considerable improvements by our method on both synthetic and real-world datasets. By capturing both local and global-range dependencies, our method enhances LLM performance especially on graph tasks that require reasoning over global graph structure.

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

↑