Emergence of Minimal Circuits for Indirect Object Identification in Attention-Only Transformers
Rabin Adhikari

TL;DR
This paper demonstrates that small, attention-only transformers can develop minimal, interpretable circuits for coreference tasks, revealing fundamental mechanisms of reasoning in models.
Contribution
It introduces a minimal transformer architecture that achieves perfect coreference resolution and analyzes its specialized attention heads, advancing understanding of transformer interpretability.
Findings
Single-layer, two-head transformer achieves perfect IOI accuracy.
Attention heads specialize into additive and contrastive subcircuits.
Two-layer, one-head model replicates performance via cross-layer interactions.
Abstract
Mechanistic interpretability aims to reverse-engineer large language models (LLMs) into human-understandable computational circuits. However, the complexity of pretrained models often obscures the minimal mechanisms required for specific reasoning tasks. In this work, we train small, attention-only transformers from scratch on a symbolic version of the Indirect Object Identification (IOI) task -- a benchmark for studying coreference -- like reasoning in transformers. Surprisingly, a single-layer model with only two attention heads achieves perfect IOI accuracy, despite lacking MLPs and normalization layers. Through residual stream decomposition, spectral analysis, and embedding interventions, we find that the two heads specialize into additive and contrastive subcircuits that jointly implement IOI resolution. Furthermore, we show that a two-layer, one-head model achieves similar…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
