Are Large-Language Models Graph Algorithmic Reasoners?
Alexander K Taylor, Anthony Cuturrufo, Vishal Yathish, Mingyu Derek, Ma, Wei Wang

TL;DR
This paper introduces MAGMA, a benchmark for evaluating large language models on classical graph algorithms, revealing their current limitations and guiding future improvements in structured reasoning tasks.
Contribution
The paper presents MAGMA, the first comprehensive benchmark for assessing LLM performance on classical graph algorithms, highlighting their reasoning challenges and need for advanced prompting.
Findings
LLMs struggle with multi-step graph algorithms.
Performance varies significantly across different algorithms.
Advanced prompting improves LLM reasoning in graph tasks.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Advanced Graph Neural Networks · Semantic Web and Ontologies
