[Paper Review] Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small
The paper presents a mechanistic, end-to-end circuit that explains how GPT-2 small implements indirect object identification (IOI) via 26 attention heads organized into seven head classes, validated with causal interventions and three faithfulness-based criteria.
Research in mechanistic interpretability seeks to explain behaviors of machine learning models in terms of their internal components. However, most previous work either focuses on simple behaviors in small models, or describes complicated behaviors in larger models with broad strokes. In this work, we bridge this gap by presenting an explanation for how GPT-2 small performs a natural language task called indirect object identification (IOI). Our explanation encompasses 26 attention heads grouped into 7 main classes, which we discovered using a combination of interpretability approaches relying on causal interventions. To our knowledge, this investigation is the largest end-to-end attempt at reverse-engineering a natural behavior "in the wild" in a language model. We evaluate the reliability of our explanation using three quantitative criteria--faithfulness, completeness and minimality. Though these criteria support our explanation, they also point to remaining gaps in our understanding. Our work provides evidence that a mechanistic understanding of large ML models is feasible, opening opportunities to scale our understanding to both larger models and more complex tasks.
Motivation & Objective
- Explain how GPT-2 small performs indirect object identification (IOI) at the circuit level.
- Identify a human-interpretable subgraph (circuit) responsible for IOI in GPT-2 small.
- Develop and apply causal intervention techniques to validate circuit explanations.
- Assess the faithfulness, completeness, and minimality of the proposed circuit.
- Highlight challenges and insights for scalable mechanistic interpretability in language models.
Proposed method
- Use circuit analysis to isolate a subgraph (circuit) responsible for IOI in GPT-2 small.
- Employ path patching to measure direct vs. indirect influence of attention heads on logits.
- Classify heads into seven categories and characterize their roles in the IOI algorithm.
- Apply mean ablations (instead of zero ablations) and a modified p_IOI distribution (p_ABC) for knockouts.
- Validate circuit behavior against the full model using a defined performance metric F(C).
- Introduce faithfulness, completeness, and minimality criteria to assess circuit explanations.
Experimental results
Research questions
- RQ1What subgraph of GPT-2 small computes the IOI task?
- RQ2Which attention heads implement the IOI algorithm and how do they interact?
- RQ3Can causal interventions (path patching and knockouts) demonstrate that the circuit is faithful and near-complete to the model’s IOI behavior?
- RQ4What are the limitations and potential redundancies in the identified circuit?
- RQ5How do the proposed validation criteria (faithfulness, completeness, minimality) perform on this end-to-end mechanistic explanation?
Key findings
- A circuit of 26 attention heads (1.1% of head–token pairs) implements IOI in GPT-2 small.
- The circuit organizes into seven head classes, including Name Mover Heads, S-Inhibition Heads, Duplicate Token Heads, Induction Heads, Previous Token Heads, Backup Name Mover Heads, and Negative Name Mover Heads.
- Path patching shows which heads directly affect logits and reveals both direct and indirect influences in the information flow.
- Name Mover Heads copy IO/ S tokens to the output but can be complemented by Backup Name Mover Heads under knockout conditions, indicating redundancy.
- S-Inhibition Heads modulate Name Mover Heads’ attention by using token and position signals, biasing attention toward IO over S1.
- The circuit achieves about 87% of the full model’s IOI performance (F(C) ≈ 0.46 difference from F(M) relative to F(M) = 3.56).
- The study finds instances of redundant components and complex interactions that challenge simplistic interpretations, highlighting gaps that remain in mechanistic understanding.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.