Towards Automated Circuit Discovery for Mechanistic Interpretability

Through considerable effort and intuition, several recent works have reverse-engineered nontrivial behaviors of transformer models. This paper systematizes the mechanistic interpretability process they followed. First, researchers choose a metric and dataset that elicit the desired model behavior. Then, they apply activation patching to find which abstract neural network units are involved in the behavior. By varying the dataset, metric, and units under investigation, researchers can understand the functionality of each component. We automate one of the process' steps: to identify the circuit that implements the specified behavior in the model's computational graph. We propose several algorithms and reproduce previous interpretability results to validate them. For example, the ACDC algorithm rediscovered 5/5 of the component types in a circuit in GPT-2 Small that computes the Greater-Than operation. ACDC selected 68 of the 32,000 edges in GPT-2 Small, all of which were manually found by previous work. Our code is available at https://github.com/ArthurConmy/Automatic-Circuit-Discovery.

Paper

Similar papers

Peer review

Reviewer aEyk9/10 · confidence 4/52023-07-01

Summary

This paper first presents an overview and a useful distillation of existing mechanistic interpratility work on discovering interpretable circuits in transformer models. They say most existing work happens in 3 steps: 1. Observe a behavior (or task) that a neural network displays, then create a dataset to measure this behavior 2. Define the scope of interpretation: Do we want to look at which attention heads, mlp layers or individual neurons are important. 3. Perform a search with patching experiments to remove as many unnecessary components as possible They then propose an algorithm ACDC to automate step 3 of this process, which has typically required extensive manual effort by researchers. They evaluate this extensively by applying it on existing circuits found by researchers, finding that it can discover existing circuits with good accuracy and outperform baselines.

Strengths

- Very important/impactful problem - Good survey of existing work in a very new topic, bringing important clarity/systemization to the workflow of these otherwise individual findings. - Clear writing - Extensive and comprehensive evaluation - Good performance with the automated method - Proposed systemization and automated method to discover circuits will likely greatly improve the speed at which new discoveries can be made in this field, making it easier for new researchers to approach.

Weaknesses

- Choice of threshold parameter tau seems inconsistent/varies by task. Unclear how I would choose tau when applying this method on a new task. - Does not address how to come up with the task and dataset for step 1 which may be the hardest part of the workflow

Questions

- How did you choose tau for different experiments?

Rating

9: Very Strong Accept: Technically flawless paper with groundbreaking impact on at least one area of AI/ML and excellent impact on multiple areas of AI/ML, with flawless evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

4 excellent

Limitations

Yes, very good discussion.

Reviewer pJGB7/10 · confidence 4/52023-07-05

Summary

This paper introduces a method for pruning nodes in a computation graph that is meant to be used in the context of mechanistic interpretability, i.e., to find sub-graphs that explain/reproduce certain behavior of the overall graph while being much smaller.

Strengths

- The problem is well-motivated, and the method's description is easy to understand. - The proposed method is compared against baselines in the form of existing pruning methods that got adapted to the context of mechanistic interpretability.

Weaknesses

- While the authors mention that there is early evidence that their method can produce new insights, I believe these should be highlighted more prominently. The practical relevance of this approach can be better shown by applying this method to a new setting, producing mechanistical interpretability hypotheses for some network(s), and then verifying these post-hoc.

Questions

- L63: This sentence can be ambiguous for readers unfamiliar with this topic: Do the authors mean that one creates a dataset to train a new model that one can analyze? - L93: Add a reference to explain what is meant by "tracr". - L125ff: It can be a bit confusing that the authors here mention that they automate all but the last steps in this work, while before and after, they say they only want to automate the third step. - L133f: What happens if the network implements a mechanism using redundant features and an or-operation? Then the detected circuit will only include one of the two valid sub-circuits (as only removing one does not impact the model much, but removing both drastically impacts it). Depending on what one is interested in investigating, this might not be an issue, but this should be discussed. - L133f: Is this guaranteed to find the sparsest graph, or can premature pruning of connections at the end prevent the pruning of other connections that, all things considered, contain much more connections/components? For example, think about a situation where two parallel branches have different purposes but are restricted to the dataset in question, they behave identically. Both of them can be pruned away, but if the size of the branches differs, it matters which one is removed. - Figure 4: What does this figure tell us? Adding a small description of what is shown here and a conclusion will make this more accessible to readers. - L315f: Can the authors propose any reasonable strategy for automatically tuning/setting this hyperparameter?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

The authors addressed most limitations in the main part of the paper, except that point raised in the Questions section.

Reviewer Zemb7/10 · confidence 5/52023-07-07

Summary

This paper proposes an approach for the automatic discovery of circuits (ACDC) in artificial neural networks (applied to transformer-based LLMs), which works by recursively constructing a subgraph of "important" nodes identified through the patching of model activations on datapoints relevant to a specific task (the choice of which is, in general, non-trivial). The authors demonstrate, through many experiments, that ACDC is mostly able to faithfully recover circuits which were manually identified by previous researchers on a variety of tasks (notably Python docstrings, IOI and induction heads), thus automating a highly labor-intensive part of the circuit discovery process. Additionally, they explore choices of patching value, target metric and threshold value, whilst also demonstrating that other comparable methods for distillation/subgraph isolation are not as well-behaved as ACDC. In addition to the paper, the authors also release an open-source implementation of ACDC which has already been applied to some success by other mechanistic interpretability researchers already.

Strengths

The methodology for automatic circuit discovery proposed by the paper extends previous approaches for activation patching to automate otherwise labor-intensive mechanistic interpretability work. This in of itself is not a significant novelty, but the paper's strength lies in a thorough experimental investigation of the benefits of ACDC over other subgraph discovery methods, coupled with new methodological insights on how best to perform activation patching. In particular, they provide two novel findings: 1) KL Divergence is more well-behaved than logit differences when performing activation patching for circuit discovery, and 2) Zero patching, whilst significantly OOD, is often more effective than patching corrupted activations. The presentation of the paper is very good, with a coherent narrative for the experimental investigations and clear figures supporting all claims. Additionally, the supplementary materials provide further interesting discussion and results, which given the exploratory nature of circuit discovery is highly valuable. Lastly, the release of the accompanying ACDC algorithm for use by the community is a significant contribution in of itself, as demonstrated by the fact that other members of the MechInt community have already applied ACDC for their own research.

Weaknesses

No major weaknesses were identified. There are a fair number of minor phrasing issues outlined in the following nitpicks section. In the related work section, explicitly stating how path patching varies procedurally from ACDC might be worthwhile. Additionally, a discussion of how ACDC varies from Causal Scrubbing in its patching methodology may be useful. ## Nitpicks * 3: makes it **too** costly" * 27: circuits **as** subgraphs * 32: "with which to extract" or "for extracting" * 32: remove "that automates part of it" * 85: The choice of phrasing - "clearly defined behaviour" makes this sentence almost tautological. Perhaps an explicit mention of simplicity would be suitable here. Researchers unfamiliar with MechInt may consider e.g. "Writing python code" clearly defined or "writing python docstrings" too broadly defined. * 91: "**Tasks** 1 and 3" inside the parentheses * 94: from **each task, which** researchers * 98: **as** a computational graph * 101: "on the level of detail of _their_ explanations of model behaviour* subject unclear and wording confusing * 125: such as -> for example (as subject of "such as" could be "tasks"). "predict correct gender predictions" remove last predictions? * 223: It seems the discussion of zero ablations takes place in Section 5 and Appendices F.2, rather than Appendix D. * 233: "we explain how compare to" -> "we compare to" * 236: "experiments use the same modifications to SP and HISP *as*" * 308 "is known*, and through comparison with previous*..." * 310: not clear what "outline of a subgraph" means vs. just "a subgraph" * 318: "work; a novel contribution" or "work - a novel contribution". * 320: "*within* the community"

Questions

The following questions are not crucial to the narrative of the paper, nor potential critiques of completeness. 1. Have you thought of automated ways to trade-off circuit faithfulness versus sparsity, without re-running ACDC with different values of $\tau$? 2. In general, how sensitive is ACDC to the choice of clean and corrupted datapoints. E.g. for the IOI task does ACDC provide considerably different circuits if very few examples are provided, vs. many? What about paraphrasing or noise injection as in ROME (this is probably very task dependent)? 3. When modifying Subnetwork Pruning you discuss interpolating the mask values - should we expect that linearly interpolating between a clean and corrupted activation is principled (i.e. does not potentially shift the representation to something meaningful but distinct)? 4. Are all values of SP masks 0, or 1 by the end of SP training? If not, then for the sake of counting subgraph edges, what is considered an "unmasked node"? 5. Given the unexpected utility of using zero ablations, would the authors suggest trying this whenever utilizing ACDC? 6. Could the authors expand on how the _locally significant changes_ alternative to detecting salient parts of the subgraph would avoid potential sensitivity to the form of patching? Presumably, some perturbation would be required to measure "effects" and it is not immediately clear what this perturbation is, if not an activation patch.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

Limitations are addressed, or explored through supplemental experiments.

Reviewer 6BEj6/10 · confidence 3/52023-07-11

Summary

The paper is a fresh take on mechanistic interpretability, focusing on the automation of the interpretability task, demonstrating it on attention based models. The method, ACDC, finds the pareto optimal subgraphs of the network, thus bringing down the number of connections to highlight the role each unit plays in the predictions of the model. The authors present extensive experiments and analysis on various tasks, including the interesting IOI and Greater-Than, with further insight on the performance trends in the supplementary work. On providing an idea of the workflow in the domain, they introduce their algorithm focusing on iteratively chipping away at the computational graph, creating a sparse graph while retaining the good performance on the specified task and metric. They do mention the limiting prowess of the algorithm, that is the handicap of not identifying all the abstract units and sensitivity to hyper-params, while also not being automated end to end for a complete interpretability framework setup. Overall the algorithm is a good starting point to build on automating scalable interpretability.

Strengths

- Neat presentation, with well organized sections and appropriate background information. - Clean and crisp algorithm, that is easy to understand and yet highly effective in its job. - Experiments are well defined, tasks, metrics and objectives are comprehensively made clear. - Comprehensive ablations and detailed supplementary work to support the claims made and make sense of the findings, special kudos for the highly effective plots and task-wise analysis. - Frank and clear understanding of the shortcomings and strengths of the algorithm make this method a clear one to build on top of, prompting further interesting work in a highly important domain. P.S. A playful modification to the title could be to make it AC⚡DC to make it a play on the famous music band.

Weaknesses

- Distinction from previous work is not very clear. Especially as compared to HISP, the top k heads are analogous to retaining only the influential heads in ACDC. While I agree that the algorithm in itself is distinct, the inspiration from previous works should be made clear. I would suggest adding a subsection to compare the circuits derived from the two methods for further comparison in the approaches (akin to Figure 6), and explicitly highlighting the specific fail cases for HISP that ACDC works for could be a great insight. - While section 5 is helpful in answering questions about the effectiveness of ACDC, Line 253 as pointed out by the authors raises questions. In my opinion more work in establishing KLD as a faithful proxy must be undertaken. - While Appendix K and H are helpful to establish the “correctness” of the subgraph recovered, unless one knows the true minimal graph, it is difficult to compare and decide which of the methods is “more correct”.

Questions

- See weaknesses. - While Figure 16 (Typo in the Greater Than graph with a $\mu$ perhaps?) and 17 differ significantly on the performance on the reset network and the trained network, for the SP and HISP networks, the ACDC points are invisible in Figure 16 subplots for Tracr (Reverse), Tracr (Proportion), Greater Than, I’m assuming the scale of the graph points to them being in this range, but perhaps consider replotting with the ACDC method points being visible. - Line 313: As the authors correctly point out, the issue of missing certain units must be investigated and probed further. Highlighting taskwise the missing sections and what they could correspond to could help draw patterns on the way ACDC works and alleviate weaknesses in further work to build on top of this. - Likewise the final hyperparameters used and ablations on the variance in the performance as one tweaks these hyperparams could be useful to note the sensitivity and brittleness of the algorithm. For a $\delta$ change in a hyperparam how does the method performance vary? I am open to increasing the score on further clarifying discussion with fellow reviewers and authors.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

N/A

Reviewer aEyk2023-08-12

Thanks for the response! This mostly addresses my concerns, and after reading the other reviews I found no significant concerns and would like to stand by my original score.

Reviewer Zemb2023-08-14

Dear Authors, Thank you for your comprehensive response to my questions. * The provided summary of Causal Scrubbing vs ACDC is very clear, and appreciated * The discussion of the sensitivity with respect to the datapoint choices is convincing and I don't think further evaluation is necessary. The relative stability of the results is reassuring * As linear interpolation on SP does indeed yield good results, your confidence in its validity does seem well-placed, as it is difficult to imagine how undesirable "semantically meaningful" interpolations (which I had worried about) wouldn't manifest without also decreasing performance * It is good to know that zero ablations aren't as effective as I had mistakenly concluded! * This is clear now - it seems I had some initial confusion about "metric" vs. patching when reading this section, though It seems quite clear Given the scope of ACDC's application, I retain the current rating and recommend this paper for acceptance as a sound and meaningful contribution to the field of Mechansitic Interpretability.

Program Chairsdecision2023-09-21

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC