{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/interpretability-in-the-wild-a-circuit-for","title":"Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small","arxiv_id":"2211.00593","date":"2022-11-01","proceeding":null,"authors":["Kevin Wang","Alexandre Variengien","Arthur Conmy","Buck Shlegeris","Jacob Steinhardt"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2211.00593v1","url_pdf":"https://arxiv.org/pdf/2211.00593v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/redwoodresearch/easy-transformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/FlyingPumba/circuits-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/callummcdougall/arena_3.0","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/flyingpumba/interpbench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/openai/transformer-debugger","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/openmoss/language-model-saes","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}},{"paper_slug":"interpretability-in-the-wild-a-circuit-for","repo_url":"https://github.com/technion-cs-nlp/peap","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-2","method_name":"GPT-2"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2211.00593","atlas_url":"https://app.syntology.ai/?focus=2211.00593","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.00593"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/redwoodresearch/Easy-Transformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/FlyingPumba/circuits-benchmark","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/openmoss/language-model-saes","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/callummcdougall/arena_3.0","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/redwoodresearch/easy-transformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/openai/transformer-debugger","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/flyingpumba/interpbench","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/technion-cs-nlp/peap","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":4},"by_repo_kind":{"listed":{"samples":13,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"37ed7c090dd47a16","entry":"async_exponential_backoff","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/api_client.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/api_client.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"37ed7c090dd47a16"}},{"code_sha256_prefix":"7a5b341cfbfce5c4","entry":"causal_attn_mask","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/transformer.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7a5b341cfbfce5c4"}},{"code_sha256_prefix":"3bf23c5e5bb20c36","entry":"file_exists","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/file_utils.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/file_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3bf23c5e5bb20c36"}},{"code_sha256_prefix":"cbf09830a05cc1ec","entry":"grad_hook_wrapper","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/hooks.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/hooks.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cbf09830a05cc1ec"}},{"code_sha256_prefix":"0d9b56dd70f4d1e7","entry":"is_api_error","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/api_client.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/api_client.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d9b56dd70f4d1e7"}},{"code_sha256_prefix":"5e57cfebe2fb8845","entry":"read_single_async","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/file_utils.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/file_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e57cfebe2fb8845"}},{"code_sha256_prefix":"16add703a8e2471b","entry":"safe_div","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/transformer.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16add703a8e2471b"}},{"code_sha256_prefix":"3ef93b73d7c3c9ea","entry":"split_heads","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/transformer.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ef93b73d7c3c9ea"}},{"code_sha256_prefix":"286523200b9c09a1","entry":"to_camel","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/pydantic/camel_case_base_model.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/pydantic/camel_case_base_model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"286523200b9c09a1"}},{"code_sha256_prefix":"35ca65faef55b637","entry":"get_corresponding_object","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/activation_server/interactive_model.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/activation_server/interactive_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35ca65faef55b637"}},{"code_sha256_prefix":"817bdde39fefce9d","entry":"get_dimension_index_of_weight_location_type","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/model_component_registry.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/model_component_registry.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"817bdde39fefce9d"}},{"code_sha256_prefix":"be193c0532e4250d","entry":"get_standard_model_spec","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/model_registry.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/model_registry.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"be193c0532e4250d"}},{"code_sha256_prefix":"0bafca70b42d4ed7","entry":"list_autoencoder_names","repo":"openai/transformer-debugger","repo_kind":"listed","path":"neuron_explainer/models/model_registry.py","file_url":"https://github.com/openai/transformer-debugger/blob/HEAD/neuron_explainer/models/model_registry.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0bafca70b42d4ed7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}