Uncovering Graph Reasoning in Decoder-only Transformers with Circuit Tracing

Xinnan Dai, Chung-Hsiang Lo, Kai Guo, Shenglai Zeng, Dongsheng Luo +1 more
9/24/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Transformer-based LLMs demonstrate strong performance on graph reasoning tasks, yet their internal mechanisms remain underexplored. To uncover these reasoning process mechanisms in a fundamental and unified view, we set the basic decoder-only transformers and explain them using the circuit-tracer framework. Through this lens, we visualize reasoning traces and identify two core mechanisms in graph reasoning: token merging and structural memorization, which underlie both path reasoning and substructure extraction tasks. We further quantify these behaviors and analyze how they are influenced by graph density and model size. Our study provides a unified interpretability framework for understanding structural reasoning in decoder-only Transformers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dai2025uncovering,
  title  = {Uncovering Graph Reasoning in Decoder-only Transformers with Circuit Tracing},
  author = {Xinnan Dai and Chung-Hsiang Lo and Kai Guo and Shenglai Zeng and Dongsheng Luo and Jiliang Tang},
  year   = {2025},
  eprint = {2509.20336},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.20336v1}
}

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/2509.20336.svg)](https://codeofpaper.com/paper/2509.20336)

Discussion