mlsanityData to 14 Oct 2026

Are Large-Language Models Graph Algorithmic Reasoners?

arXiv 2410.22597 ↗First posted 29 Oct 2024cs.LG cs.AIcited by 5

On the map: LLM reasoning → Knowledge- and tool-augmented reasoning

Abstract (arXiv)

We seek to address a core challenge facing current Large Language Models (LLMs). LLMs have demonstrated superior performance in many tasks, yet continue to struggle with reasoning problems on explicit graphs that require multiple steps. To address this gap, we introduce a novel benchmark designed to evaluate LLM performance on classical algorithmic reasoning tasks on explicit graphs. Our benchmark encompasses five fundamental algorithms: Breadth-First Search (BFS) and Depth-First Search (DFS) for connectivity, Dijkstra's algorithm and Floyd-Warshall algorithm for all nodes shortest path, and Prim's Minimum Spanning Tree (MST-Prim's) algorithm. Through extensive experimentation, we assess the capabilities of state-of-the-art LLMs in executing these algorithms step-by-step and systematically evaluate their performance at each stage. Our findings highlight the persistent challenges LLMs face in this domain and underscore the necessity for advanced prompting techniques and algorithmic instruction to enhance their graph reasoning abilities. This work presents MAGMA, the first comprehensive benchmark focused on LLMs completing classical graph algorithms, and provides a critical step toward understanding and improving their structured problem-solving skills.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 30 of its 40 references that are in the map. First posted on arXiv 29 Oct 2024.

Builds on

30 of 40 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024Can Graph Descriptive Order Affect Solving Graph Problems with LLMs?11 Feb
  2. 2024Can LLMs perform structured graph reasoning?2 Feb
  3. 2023GraphText: Graph Reasoning in Text Space2 Oct
  4. 2023Can Language Models Solve Graph Problems in Natural Language?17 May

Other references · 26

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2017Neural Message Passing for Quantum Chemistrycited by 3,487
  4. 2023Mistral 7Bcited by 3,164
  5. 2018Relational inductive biases, deep learning, and graph networkscited by 1,360
  6. 2015Gated Graph Sequence Neural Networkscited by 796
  7. 2018Attention, Learn to Solve Routing Problems!cited by 656
  8. 2016Neural Combinatorial Optimization with Reinforcement Learningcited by 608
  9. 2017Representation Learning on Graphs: Methods and Applicationscited by 457
  10. 2023Exploring the Potential of Large Language Models (LLMs) in Learning on Graphscited by 274
  11. 2023Specializing Smaller Language Models towards Multi-Step Reasoningcited by 251
  12. 2023GPT4Graph: Can Large Language Models Understand Graph Structured Data ? An Empirical Evaluation and Benchmarkingcited by 210
14 more
  1. 2018Learning a SAT Solver from Single-Bit Supervisioncited by 200
  2. 2019What Can Neural Networks Reason About?cited by 159
  3. 2015Neural Programmer-Interpreterscited by 101
  4. 2021Neural Algorithmic Reasoningcited by 94
  5. 2023A Survey of Graph Meets Large Language Model: Progress and Future Directionscited by 85
  6. 2024Demystifying Chains, Trees, and Graphs of Thoughtscited by 63
  7. 2022A Generalist Neural Algorithmic Learnercited by 59
  8. 2023LLM4DyG: Can Large Language Models Solve Spatial-Temporal Problems on Dynamic Graphs?cited by 40
  9. 2018Inference in Probabilistic Graphical Models by Graph Neural Networkscited by 38
  10. 2023Evaluating Large Language Models on Graphs: Performance Insights and Comparative Analysiscited by 35
  11. 2024The CLRS-Text Algorithmic Reasoning Language Benchmarkcited by 28
  12. 2021Neural Algorithmic Reasoners are Implicit Plannerscited by 21
  13. 2023Dual Algorithmic Reasoningcited by 21
  14. 2024Benchmarking ChatGPT on Algorithmic Reasoningcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 3.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Rethinking and Benchmarking Large Language Models for Graph Reasoning
  2. 2026Are Large Language Models Suitable for Graph Computation? Progress and Prospects
  3. 2024Revisiting the Graph Reasoning Ability of Large Language Models: Case Studies in Translation, Connectivity and Shortest Path
  4. 2026Evaluating LLMs on Large-Scale Graph Property Estimation via Random Walks
  5. 2024Graph Reasoning with Large Language Models via Pseudo-code Prompting
  6. 2024GraphArena: Evaluating and Exploring Large Language Models on Graph Computation
  7. 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs
  8. 2025Exploring Graph Learning Tasks with Pure LLMs: A Comprehensive Benchmark and Investigation