What is a circuit in mechanistic interpretability?
Author: Mehdi Sadriu, independent educator. Last reviewed: 25 November 2026. How we check claims: methodology.
A circuit is not 'heads that sit near each other'. It is a small set of components — usually attention heads and MLPs connected through the residual stream — that is sufficient for a behaviour, and whose removal breaks that behaviour. Olah et al. (2020) stated the agenda; Wang et al. (2022) is the classic GPT-2 small case; Conmy et al. (2023) automates candidate search.
In one paragraph. Circuit: subgraph C such that patching/knockout experiments attribute a target behaviour mainly to C on a defined prompt family.
- Duplicate-name heads notice that a name already appeared.
- S-inhibition heads suppress the subject name in the residual stream.
- Name-mover heads copy the remaining name (the indirect object) to the output.
The claim is not 'these heads sit near each other'. The claim is: this set is sufficient for this template in GPT-2 small, tested with path patching and knockouts. Nearby templates can fail.
What is the IOI example?
Wang et al. (2022) study prompts like 'When Mary and John went to the store, John gave a drink to ___'. GPT-2 small completes 'Mary'. They find duplicate-token heads, S-inhibition heads that suppress the subject, and name-mover heads that copy the other name. Path patching and knockouts, not a diagram alone, are the evidence.
What is automated discovery?
Conmy et al. (2023) iteratively knock out edges that do not affect a chosen metric, yielding a candidate graph. Marks et al. (2024) state circuits in SAE features rather than in whole neurons. Ameisen et al. / Anthropic (2025) scale attribution-style graphs to a large model. Automation finds candidates; humans still check faithfulness.
Where does it fail?
A circuit for one template can fail on a nearby template. Completeness is hard: you may have the main path and miss a backup (hydra). Most fully traced circuits are still in small models or on narrow tasks. That is a fact about the literature, not an insult to it.
What is the math?
Think of the transformer as a computation graph G = (nodes, edges) where nodes are (layer, head/MLP, position) activations. A circuit is a subgraph C ⊆ G. Faithfulness: replacing edges outside C with baselines should preserve the metric; ablating C should destroy it. ACDC is a greedy search over edges with a threshold on that metric (Conmy et al., 2023).
Worked example
Name-mover heads copy 'Mary' via OV; S-inhibition heads write a direction that reduces 'John' at the output. If you knock out name-movers, the model often names John (or another remaining name). If you path-patch only those heads from a clean run, Mary returns. That pair of results is the circuit claim for this template in GPT-2 small (Wang et al., 2022).
Check your understanding
Five questions. Answers are in the disclosure under each item, so this page still works if JavaScript is off.
Further reading
- Zoom In: An Introduction to Circuits — Olah et al. (2020). Distill.
- Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small — Wang et al. (2022). arXiv.
- Towards Automated Circuit Discovery for Mechanistic Interpretability — Conmy et al. (2023). NeurIPS.
- Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models — Marks et al. (2024). arXiv.
- Circuit Tracing: Revealing Computational Graphs in Language Models — Ameisen et al. / Anthropic (2025). Transformer Circuits.