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

通过伪代码提示实现大型语言模型的图推理

Graph Reasoning with Large Language Models via Pseudo-code Prompting

University of Ioannina(约阿尼纳大学);University of Peloponnese(伯罗奔尼撒大学);École Polytechnique(巴黎综合理工学院);IP Paris(巴黎理工学院);LIX(LIX实验室)

Konstantinos Skianis, Giannis Nikolentzos, Michalis Vazirgiannis

AI总结:

本文研究了通过伪代码指令提示提升大型语言模型解决图问题(如计算连通分量和最短路径)的推理能力,实验证明该方法普遍提升了所有测试模型的性能。

摘要:

大型语言模型(LLMs)近期在自然语言处理领域的各种推理任务中取得了显著成功。LLMs的这一成功也促使了它们被应用于图相关任务。在其他研究中,近期的工作探索了LLMs是否能解决图问题,例如计算图的连通分量数量或计算两个节点之间的最短路径距离。尽管LLMs具备初步的图推理能力,但它们在解决某些看似简单的问题时可能仍然存在困难。在本文中,我们研究了通过伪代码指令进行提示是否能提升LLMs在解决图问题时的性能。我们的实验表明,使用伪代码指令通常能提升所有被考虑的LLMs的性能。图、伪代码提示和评估代码均已公开。

英文摘要:

Large language models (LLMs) have recently achieved remarkable success in various reasoning tasks in the field of natural language processing. This success of LLMs has also motivated their use in graph-related tasks. Among others, recent work has explored whether LLMs can solve graph problems such as counting the number of connected components of a graph or computing the shortest path distance between two nodes. Although LLMs possess preliminary graph reasoning abilities, they might still struggle to solve some seemingly simple problems. In this paper, we investigate whether prompting via pseudo-code instructions can improve the performance of LLMs in solving graph problems. Our experiments demonstrate that using pseudo-code instructions generally improves the performance of all considered LLMs. The graphs, pseudo-code prompts, and evaluation code are publicly available.

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

↑