Papers › Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small

Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small

1 Nov 2022arXiv:2211.00593archive 2025-07-28

Kevin Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, Jacob Steinhardt

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2211.00593")

Code

Syntology Ran 0 of 13 code samples harvested from 1 repository linked to this paper; 13 have no recorded run.

By repository: community (archive-listed): 13 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

redwoodresearch/easy-transformer officialmentioned in paperpytorchMIT report
FlyingPumba/circuits-benchmark mentioned on GitHubjaxMIT report
callummcdougall/arena_3.0 mentioned on GitHubjax report
flyingpumba/interpbench mentioned on GitHubjaxMIT report
openai/transformer-debugger mentioned on GitHubpytorchMIT report
openmoss/language-model-saes mentioned on GitHubjax report
technion-cs-nlp/peap mentioned on GitHubjaxMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 0 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from openai/transformer-debugger. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

async_exponential_backoff openai/transformer-debugger/neuron_explainer/api_client.py community (archive-listed) unverified MIT (permissive) · 37ed7c090dd47a16 · report
causal_attn_mask openai/transformer-debugger/neuron_explainer/models/transformer.py community (archive-listed) unverified MIT (permissive) · 7a5b341cfbfce5c4 · report
file_exists openai/transformer-debugger/neuron_explainer/file_utils.py community (archive-listed) unverified MIT (permissive) · 3bf23c5e5bb20c36 · report
get_corresponding_object openai/transformer-debugger/neuron_explainer/activation_server/interactive_model.py community (archive-listed) unverified MIT (permissive) · 35ca65faef55b637 · report
get_dimension_index_of_weight_location_type openai/transformer-debugger/neuron_explainer/models/model_component_registry.py community (archive-listed) unverified MIT (permissive) · 817bdde39fefce9d · report
get_standard_model_spec openai/transformer-debugger/neuron_explainer/models/model_registry.py community (archive-listed) unverified MIT (permissive) · be193c0532e4250d · report
grad_hook_wrapper openai/transformer-debugger/neuron_explainer/models/hooks.py community (archive-listed) unverified MIT (permissive) · cbf09830a05cc1ec · report
is_api_error openai/transformer-debugger/neuron_explainer/api_client.py community (archive-listed) unverified MIT (permissive) · 0d9b56dd70f4d1e7 · report
list_autoencoder_names openai/transformer-debugger/neuron_explainer/models/model_registry.py community (archive-listed) unverified MIT (permissive) · 0bafca70b42d4ed7 · report
read_single_async openai/transformer-debugger/neuron_explainer/file_utils.py community (archive-listed) unverified MIT (permissive) · 5e57cfebe2fb8845 · report
safe_div openai/transformer-debugger/neuron_explainer/models/transformer.py community (archive-listed) unverified MIT (permissive) · 16add703a8e2471b · report
split_heads openai/transformer-debugger/neuron_explainer/models/transformer.py community (archive-listed) unverified MIT (permissive) · 3ef93b73d7c3c9ea · report
to_camel openai/transformer-debugger/neuron_explainer/pydantic/camel_case_base_model.py community (archive-listed) unverified MIT (permissive) · 286523200b9c09a1 · report

Tasks

Language ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDiscriminative Fine-TuningDropoutGPT-2Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections