Can Language Models Solve Graph Problems in Natural Language?
Heng Wang, Shangbin Feng, Tianxing He, Zhaoxuan Tan, Xiaochuang Han, Yulia Tsvetkov
摘要
Large language models (LLMs) are increasingly adopted for a variety of tasks with implicit graphical structures, such as planning in robotics, multi-hop question answering or knowledge probing, structured commonsense reasoning, and more. While LLMs have advanced the state-of-the-art on these tasks with structure implications, whether LLMs could explicitly process textual descriptions of graphs and structures, map them to grounded conceptual spaces, and perform structured operations remains underexplored. To this end, we propose NLGraph (Natural Language Graph), a comprehensive benchmark of graph-based problem solving designed in natural language. NLGraph contains 29,370 problems, covering eight graph reasoning tasks with varying complexity from simple tasks such as connectivity and shortest path up to complex problems such as maximum flow and simulating graph neural networks. We evaluate LLMs (GPT-3/4) with various prompting approaches on the NLGraph benchmark and find that 1) language models do demonstrate preliminary graph reasoning abilities, 2) the benefit of advanced prompting and in-context learning diminishes on more complex graph problems, while 3) LLMs are also (un)surprisingly brittle in the face of spurious correlations in graph and problem settings. We then propose Build-a-Graph Prompting and Algorithmic Prompting, two instruction-based approaches to enhance LLMs in solving natural language graph problems. Build-a-Graph and Algorithmic prompting improve the performance of LLMs on NLGraph by 3.07% to 16.85% across multiple tasks and settings, while how to solve the most complicated graph reasoning tasks in our setup with language models remains an open research question. The NLGraph benchmark and evaluation code are available at https://github.com/Arthur-Heng/NLGraph .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 123 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- One For All: Towards Training One Graph Model For All Classification Tasks 引用了 Language Models are Few-Shot Learners
- Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents 引用了 Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners 引用了 Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models are Zero-Shot Reasoners 引用了 Training language models to follow instructions with human feedback
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering 引用了 One For All: Towards Training One Graph Model For All Classification Tasks
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering 引用了 Large Language Models are Zero-Shot Reasoners
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering 引用了 Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering 引用了 Talk like a Graph: Encoding Graphs for Large Language Models
- Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning 引用了 Language Models are Few-Shot Learners
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
- GFT: Graph Foundation Model with Transferable Tree Vocabulary 引用了 One For All: Towards Training One Graph Model For All Classification Tasks
- GFT: Graph Foundation Model with Transferable Tree Vocabulary 引用了 Talk like a Graph: Encoding Graphs for Large Language Models
- Talk like a Graph: Encoding Graphs for Large Language Models 引用了 Large Language Models are Zero-Shot Reasoners
- Talk like a Graph: Encoding Graphs for Large Language Models 引用了 Language Models are Few-Shot Learners
- Talk like a Graph: Encoding Graphs for Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Talk like a Graph: Encoding Graphs for Large Language Models 引用了 Training language models to follow instructions with human feedback
引用它的顶会 Paper123
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question AnsweringXiaoxin He, Yijun Tian, Yifei Sun, Nitesh V. Chawla 等NeurIPS 2024 · 384 次引用
- One For All: Towards Training One Graph Model For All Classification TasksHao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang 等ICLR 2024 · 253 次引用
- Talk like a Graph: Encoding Graphs for Large Language ModelsBahare Fatemi, Jonathan Halcrow, Bryan PerozziICLR 2024 · 194 次引用
- Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation LearningXiaoxin He, Xavier Bresson, Thomas Laurent, Adam Perold 等ICLR 2024 · 151 次引用
- GFT: Graph Foundation Model with Transferable Tree VocabularyZehong Wang, Zheyuan Zhang, Nitesh V. Chawla, Chuxu Zhang 等NeurIPS 2024 · 108 次引用
它引用的 Paper23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
- Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied AgentsWenlong Huang, Pieter Abbeel, Deepak Pathak, Igor MordatchICML 2022 · 1,539 次引用
相关 Paper
- Evaluating LLMs on Large-Scale Graph Property Estimation via Random WalksSunil Kumar Maurya, Xin LiuACL 2026
- Can Graph Descriptive Order Affect Solving Graph Problems with LLMs?Yuyao Ge, Shenghua Liu, Baolong Bi, Yiwei Wang 等ACL 2025
- Beyond Graphs: Can Large Language Models Comprehend Hypergraphs?Yifan Feng, Chengwu Yang, Xingliang Hou, Shaoyi Du 等ICLR 2025
- Structure Guided Prompt: Instructing Large Language Model in Multi-Step Reasoning by Exploring Graph Structure of the TextKewei Cheng, Nesreen K. Ahmed, Theodore L. Willke, Yizhou SunEMNLP 2024 · 6 次引用
- Graph Neural Prompting with Large Language ModelsYijun Tian, Huan Song, Zichen Wang, Haozhu Wang 等AAAI 2024 · 90 次引用
