arXiv:2409.17906cs.LG2024-09被引 8

用伪代码提示提升大模型的图推理能力

Graph Reasoning with Large Language Models via Pseudo-code Prompting

  • 用伪代码作为提示引导大模型解决图问题
  • 所有测试模型性能均显著提升
  • 适合研究大模型推理与程序生成的学者

大语言模型(LLMs)在自然语言处理的各类推理任务中取得显著成功,这一进展也推动其应用于图相关任务。近期研究探索了大模型是否能解决连通分量计数、两点间最短路径等图问题。尽管大模型具备初步图推理能力,但仍难以解决一些看似简单的问题。本文探究通过伪代码指令提示能否提升大模型解决图问题的表现。实验表明,使用伪代码提示可普遍提升所有测试大模型的性能。相关图数据、伪代码提示及评估代码均已公开。

原文摘要 · Abstract (English)

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.

图神经网络大模型推理伪代码提示程序生成

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