GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs

Zixiang Xu, Yanbo Wang, Chenxi Wang, Lang Gao, Zirui Song +4 more
9/10/2026
4 citations
cs.AI

Official code: xzx34/GTA (1 star, Python, MIT, last commit 2026-09-20).

Abstract

Large Language Models (LLMs) are increasingly asked to reason over structured data such as graphs, yet how reliably they can carry out multi-step graph algorithms in language remains unclear. Existing evaluations tend to use simple tasks on small graphs, to score code generation rather than reasoning over the graph itself, or to fix a single input format.

Show full abstract

We introduce Graph Theory Bench (GT Bench), a benchmark covering 24 classical graph problems in 44 task-structure settings, with over 100,000 examples across four representations: natural language, structured language, adjacency list, and adjacency matrix. Evaluating eight LLMs on GT Bench shows that accuracy is strongly tied to the input representation, that the best representation shifts with graph density, size, and topology as well as with the model, and that this sensitivity persists, attenuated, in the strongest reasoning models. Building on these observations, we propose the Graph Theory Agent (GTA), which pairs a preference-trained representation selector with plan-and-decompose scaffolding around a frozen executor LLM. GTA lifts Phi-4 from 53.5% to 69.1% on the benchmark's easy split and from 33.0% to 41.5% on its hard split, outperforming eight prompting and agent baselines, and transfers without retraining to GraCoRe and NLGraph. Code for benchmark generation and evaluation: https://github.com/xzx34/GTA. The project homepage is available at https://xzx34.github.io/gta/.

View on arXivView PDF

Code Implementations(1)

xzx34/GTAOfficial100%
MIT

GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs

10PythonApr 16, 20252 months agoMIT
benchmarkgraph-algorithmsgraph-reasoningllm

Similar Papers

Cite this paper

@article{xu2026gta,
  title  = {GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs},
  author = {Zixiang Xu and Yanbo Wang and Chenxi Wang and Lang Gao and Zirui Song and Yue Huang and Zhaorun Chen and Xiangliang Zhang and Xiuying Chen},
  year   = {2026},
  eprint = {2609.12265},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.12265v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.12265.svg)](https://codeofpaper.com/paper/2609.12265)

Discussion