TL;DR
This primer provides a unified technical roadmap to interpretability research in generative, decoder-only Transformer language models (LLMs). It formalizes the tools used to locate responsible components and decode hidden representations, while cataloging the fundamental circuits and internal behaviors—such as induction heads, factual recall pipelines, and attention sinks—discovered to date.
What Problem Does This Paper Address?
As decoder-only Transformer models have scaled, research aimed at reverse-engineering their internal computations (mechanistic interpretability) has grown rapidly, leading to fragmented terminology, disparate techniques, and isolated findings. The paper addresses this lack of cohesion by providing a mathematically unified overview that connects behavior localization, representation decoding, and known emergent circuits.
Methods
As a survey and primer, the paper introduces a unified mathematical notation centered on the residual stream perspective (decomposing the model into a linear communication channel updated additively by components):
- Behavior Localization:
- Input Attribution: Gradient-based methods (e.g., Integrated Gradients), perturbation/ablation methods, and context-mixing analyses that trace intermediate token-to-token information flow.
- Component Importance: Direct Logit Attribution (DLA) and Direct Logit Difference Attribution (DLDA), which exploit the linearity of the unembedding layer to measure how much individual heads or feed-forward network (FFN) neurons shift next-token logits.
- Causal Interventions & Circuit Discovery: Activation patching (swapping activations between clean and corrupted inputs), path/edge patching, and gradient approximations (Edge Attribution Patching / EAP, $\text{AtP}^*$) to isolate minimal computational subgraphs (circuits).
- Information Decoding:
- Probing & Concept Erasure: Supervised linear/structural probes and linear subspace interventions (activation steering and concept removal).
- Sparse Autoencoders (SAEs) & Gated SAEs (GSAEs): Unsupervised dictionary learning to extract sparse, monosemantic feature directions out of polysemantic activations caused by superposition.
- Vocabulary Space Projections: Logit Lens and Tuned Lens (projecting intermediate residual states through the unembedding matrix), matrix SVD decompositions, logit spectroscopy, and Patchscopes.
Datasets
Because this paper is a primer and survey, the authors do not introduce a new dataset. They survey experiments evaluated across diverse benchmarks and synthetic tasks, including:
- Algorithmic & Syntactic Benchmarks: Indirect Object Identification (IOI), greater-than sequence prediction, Python docstring completion, and grammar agreement tasks.
- Factual & Knowledge Recall: Subject-relation-attribute $(s, r, a)$ tuple benchmarks and factual recall under context competition (e.g., memorized vs. counterfactual in-context prompts).
- Hallucination & Interpretability Benchmarks: ERASER, HalOmi (machine translation hallucination detection), and Needle-in-a-Haystack tests.
Key Insights and Ideas
- The Ensemble View: Residual connections allow Transformers to behave like ensembles of relatively shallow paths, meaning individual attention heads and FFNs write directly to the residual stream without destroying prior representations.
- Attention vs. FFN Specialization: Attention heads act primarily as routers/transporters—reading information at one position via Query-Key (QK) circuits and moving/transforming it via Output-Value (OV) circuits. FFNs act as non-linear key-value memories that detect patterns and project factual or linguistic associations.
- Overcoming Superposition via SAEs: Because models pack more features than available dimensions (superposition), individual neurons are often polysemantic. Overcomplete SAEs successfully extract tens of thousands of monosemantic features from only hundreds of neurons.
- Universal Architectural Mechanisms:
- Induction Heads: A two-head circuit (Previous Token Head + Induction Head) that enables in-context learning by detecting and completing repeated patterns ($[A][B] \dots [A] \to [B]$).
- Copy Suppression: Specialized heads that downweight tokens already confident in the residual stream to prevent degenerative repetition and improve calibration.
- Attention Sinks: Early tokens (like
[BOS]) act as dumping grounds for unneeded attention mass by writing into "dark subspaces" orthogonal to next-token predictions. - Factual Recall Architecture: Recalling facts (e.g., "LeBron James plays...") follows a multi-stage pipeline: lower FFNs enrich the subject token, early attention heads route the relation, and upper-layer attention heads extract the final attribute.
Key Results
- Circuit Sparsity: Discovered circuits are remarkably compact; in GPT-2 Small, tasks like IOI and greater-than prediction rely on a tiny fraction of the model’s attention heads.
- Feature Recoverability in SAEs: Studies on 1- to 2-layer models and GPT-2 show that SAEs reveal up to 76% non-dead features with over 80% monosemantic interpretability, whereas only ~10% of raw attention heads are monosemantic.
- Self-Repair Dynamics: When critical circuit components are ablated, models demonstrate "self-repair" (e.g., downstream copy-suppression heads deactivate to restore the lost signal), highlighting dynamic compensatory behavior.
Limitations and Future Work
- Ecological Validity & Second-Order Effects: Causal interventions (such as zero or Gaussian noise ablation) often push models out-of-distribution, inducing artifacts or triggering self-repair mechanisms that obscure true causal roles.
- SAE Reconstruction Errors: Learned dictionaries still leave 1–15% of activation variance unexplained, which can introduce systematic errors into downstream circuit discovery.
- Scalability to Real-World Settings: Most mechanistic insights are derived on simplified, templated prompts in small models (e.g., GPT-2). Extending these methods to complex, open-ended reasoning in frontier LLMs remains computationally expensive.
- Translating Insights to Action: The field must transition from descriptive toy analyses to actionable safety engineering—such as reliable model editing, targeted unlearning, and verifiable hallucination mitigation.
Summary updated