mlsanityData to 7 Oct 2026

Efficient Automated Circuit Discovery in Transformers using Contextual Decomposition

arXiv 2407.00886 ↗First posted 1 Jul 2024cs.AI cs.CL cs.LGcited by 23

Not on the map. Why?

Abstract (arXiv)

Automated mechanistic interpretation research has attracted great interest due to its potential to scale explanations of neural network internals to large models. Existing automated circuit discovery work relies on activation patching or its approximations to identify subgraphs in models for specific tasks (circuits). They often suffer from slow runtime, approximation errors, and specific requirements of metrics, such as non-zero gradients. In this work, we introduce contextual decomposition for transformers (CD-T) to build interpretable circuits in large language models. CD-T can produce circuits of arbitrary level of abstraction, and is the first able to produce circuits as fine-grained as attention heads at specific sequence positions efficiently. CD-T consists of a set of mathematical equations to isolate contribution of model features. Through recursively computing contribution of all nodes in a computational graph of a model using CD-T followed by pruning, we are able to reduce circuit discovery runtime from hours to seconds compared to state-of-the-art baselines. On three standard circuit evaluation datasets (indirect object identification, greater-than comparisons, and docstring completion), we demonstrate that CD-T outperforms ACDC and EAP by better recovering the manual circuits with an average of 97% ROC AUC under low runtimes. In addition, we provide evidence that faithfulness of CD-T circuits is not due to random chance by showing our circuits are 80% more faithful than random circuits of up to 60% of the original model size. Finally, we show CD-T circuits are able to perfectly replicate original models' behavior (faithfulness = 1) using fewer nodes than the baselines for all tasks. Our results underscore the great promise of CD-T for efficient automated mechanistic interpretability, paving the way for new insights into the workings of large language models.

Key facts. Cited by 23 papers in the map (data through 7 Oct 2026). Builds on 25 of its 36 references that are in the map. First posted on arXiv 1 Jul 2024.

Builds on

25 of 36 references.

References · 25

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  5. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  6. 2022Toy Models of Superpositioncited by 928
  7. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  8. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
  9. 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Modelscited by 412
  10. 2021Causal Abstractions of Neural Networkscited by 401
  11. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
  12. 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 183
13 more
  1. 2023Localizing Model Behavior with Path Patchingcited by 182
  2. 2024Have Faith in Faithfulness: Going Beyond Circuit Overlap When Finding Model Mechanismscited by 144
  3. 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 126
  4. 2020CausaLM: Causal Model Explanation Through Counterfactual Language Modelscited by 117
  5. 2022Causal Machine Learning: A Survey and Open Problemscited by 107
  6. 2023How do Language Models Bind Entities in Context?cited by 102
  7. 2023Tracr: Compiled Transformers as a Laboratory for Interpretabilitycited by 99
  8. 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysiscited by 88
  9. 2018Beyond Word Importance: Contextual Decomposition to Extract Interactions from LSTMscited by 67
  10. 2018Hierarchical interpretations for neural network predictionscited by 66
  11. 2024Dictionary Learning Improves Patch-Free Circuit Discovery in Mechanistic Interpretability: A Case Study on Othello-GPTcited by 27
  12. 2019Analysing Neural Language Models: Contextual Decomposition Reveals Default Reasoning in Number and Gender Assignmentcited by 20
  13. 2024Sparse Autoencoders Enable Scalable and Reliable Circuit Identification in Language Modelscited by 13

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 12; 2026: 11.

23 papers.

Sort:

By area:

  1. 2025Training Language Models to Explain Their Own Computationscited by 27
  2. 2025ProxySPEX: Inference-Efficient Interpretability via Sparse Feature Interactions in LLMscited by 16
  3. 2025SPEX: Scaling Feature Interaction Explanations for LLMscited by 12
  4. 2025The Atlas of In-Context Learning: How Attention Heads Shape In-Context Retrieval Augmentationcited by 11
  5. 2026Formal Mechanistic Interpretability: Automated Circuit Discovery with Provable Guaranteescited by 10
  6. 2025An explainable transformer circuit for compositional generalizationcited by 8
  7. 2025Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gatescited by 8
  8. 2025Sparse Feature Coactivation Reveals Causal Semantic Modules in Large Language Modelscited by 6
  9. 2025Unboxing the Black Box: Mechanistic Interpretability for Algorithmic Understanding of Neural Networkscited by 6
  10. 2025Beyond Components: Singular Vector-Based Interpretability of Transformer Circuitscited by 6
  11. 2026Conditional Co-Ablation: Recovering Self-Repair Backups in Transformer Circuitscited by 6
  12. 2026Measuring Affinity between Attention-Head Weight Subspaces via the Projection Kernelcited by 5
11 more
  1. 2026Do Language Models Track Entities Across State Changes?cited by 5
  2. 2025Discovering Transformer Circuits via a Hybrid Attribution and Pruning Frameworkcited by 4
  3. 2025Discursive Circuits: How Do Language Models Understand Discourse Relations?cited by 3
  4. 2026Interpreting and Steering State-Space Models via Activation Subspace Bottleneckscited by 3
  5. 2026Seeing Through Circuits: Faithful Mechanistic Interpretability for Vision Transformerscited by 1
  6. 2026Mechanistic Interpretability for Neural Networks: Circuits, Sparse Features and Symbolic Reasoningcited by 1
  7. 2025Anatomy of an Idiom: Tracing Non-Compositionality in Language Modelscited by 0
  8. 2026Beyond Transfer Accuracy: Mechanism-Guided Controlled Adaptation for Low-Resource Languagescited by 0
  9. 2026CircuitKIT : Circuit Discovery, Evaluation, and Application Toolkit for Mechanistic Interpretabilitycited by 0
  10. 2026Circuit Condensation: Post-Training that Concentrates a Behavior's Causal Circuitcited by 0
  11. 2026CircuitLens: Reasoning Circuits as Data Selection Signals for Reinforcement Learning with Verifiable Rewardscited by 0