Conmy et al. 2023
ACDC automates circuit discovery. Instead of a human proposing a circuit and patching it by hand, ACDC starts from the full computational graph and prunes edges one at a time. It removes an edge by resample-ablation, replacing the signal on that edge with a resampled value, and keeps the edge only if removing it hurts performance beyond a threshold. Sweeping the threshold traces out a family of candidate circuits. The output is a minimal subgraph that, in principle, carries the computation, found automatically. This is one of the main tools for scaling mechanistic interpretability beyond hand analysis. We apply it to the VCS by pruning the candidate data-flow graph and comparing the discovered circuit to the true routine over a threshold sweep. The VCS gives ACDC an unusually fair test, because we have the exact wiring and can also run a positive control that prunes under exhaustive exact interventions. Against that control ACDC's shortfall is a real property of single-shot discovery, not a broken scorer. It recovers a fraction of the true edges: its precision is reasonable but its recall is limited, because dependencies re-derived through other cells survive the resample and are pruned away. On one game it recovers a perfect, minimal circuit that nonetheless fails to regenerate the behaviour, which is one of the paper's key separations between a correct graph and a working computation.
Two adjacency matrices over the candidate RAM cells: the true data-flow graph and the graph this method recovered. A bright cell (row = cause, column = effect) is an edge; the difference between the two panels is the error. discovered_circuit_best_F1_vs_true_dataflow = 0.154 — this example only (pong, state gameplay(seed=0,prefix=90)+15); the audit aggregate is below.
New to explainable AI? This block explains the method as it is used on neural networks, then how we run the very same method on an Atari 2600, where — unlike for a network — we know the right answer. Every implementation step links to the code. See also the XAI primer for the shared vocabulary.
A trained network is a huge web of computations. Mechanistic interpretability hopes that a specific behaviour, such as “complete the name in this sentence”, is carried by a small sub-web of that computation. That sub-web is called a circuit. For years, people found circuits by hand: guess a component, knock it out, look at the output, repeat. That is slow and depends on the researcher's intuition.
ACDC automates the search. Draw the whole model as a graph: nodes are components (attention heads, MLP blocks), and an edge means “this node's output is an input to that node”. Then walk over the edges and cut each one in turn. If cutting an edge barely changes the model's output, the edge is not needed and is pruned for good. If it changes the output by more than a threshold \(\tau\), it stays. What survives is the discovered circuit. Turning the dial \(\tau\) gives a whole family of circuits, from tiny (large \(\tau\)) to almost the full model (small \(\tau\)).
“Cutting” an edge does not mean setting it to zero. Zero is often an input the model has never seen. ACDC instead uses resample ablation: the signal on the edge is replaced by the value it takes on a corrupted input (for example, the same sentence with a different name). Let \(G\) be the full model, \(H\) the current candidate circuit, and \(H \setminus e\) the circuit with edge \(e\) cut. ACDC measures how far the output distribution moves, with the Kullback–Leibler divergence \(D_{\mathrm{KL}}\) (a standard distance between two probability distributions), and prunes \(e\) if
\[ D_{\mathrm{KL}}\big(G \,\|\, H\setminus e\big) \;-\; D_{\mathrm{KL}}\big(G \,\|\, H\big) \;<\; \tau . \]Edges are visited from the output backwards, and every prune is kept, so later decisions are made on an already-thinned graph.
Toy example. A network has input \(x\), two hidden units \(A\) and \(B\), and output \(y\). The four edges are \(x\!\to\!A\), \(x\!\to\!B\), \(A\!\to\!y\), \(B\!\to\!y\). Resample-ablating each one moves the output by 1.4 (for \(A\!\to\!y\)), 0.02 (\(B\!\to\!y\)), 1.0 (\(x\!\to\!A\)) and 0.5 (\(x\!\to\!B\)). With \(\tau = 0.1\), \(B\!\to\!y\) is pruned. Now \(B\) feeds nothing, so cutting \(x\!\to\!B\) changes nothing either, and it is pruned too. The circuit is \(x \to A \to y\). Note how the second decision depended on the first: that is the iterative part.
| The model's computational graph | The data flow between candidate RAM cells of the cartridge program. For Pong these are the 8 cells the labelling step named: the two scores, the paddle and ball positions. |
|---|---|
| A node (attention head, MLP) | One candidate RAM byte, e.g. RAM[49] = ball x. |
| An edge \(i \to j\) | “The value of cell \(i\) at frame \(f^*\) influences the value of cell \(j\) 15 frames later”. This is a total effect over the horizon, not one direct wire. |
| Corrupted input / resample ablation | Overwrite cell \(i\) at \(f^*\) with a corrupted value (from a donor run if it differs, else the clean value + 17), then re-run the real ROM. |
| Output metric (KL divergence) | The absolute change of child cell \(j\)'s byte after the horizon: \(|y_j(\text{ablated}) - y_j(\text{clean})|\). |
| The true circuit (unknown for a network) | The exhaustive data-flow graph: edge \(i\to j\) exists iff setting cell \(i\) to 0, base+17 or base+37 changes cell \(j\) on the bit-exact re-run. |
On a language model nobody knows the “real” circuit, so ACDC can only be judged against
other human guesses. On the VCS the program's data flow can be measured exactly, because
jutari re-runs the ROM bit-for-bit. Our runner acdc.jl does the following:
Where we differ from the original. Our ACDC is single-shot: one ablation per source, then pure thresholding. It does not prune iteratively, so it skips the “dangling node” step of the toy example. The metric is a byte difference, not a KL divergence. And an edge is a total effect over 15 frames, because RAM cells interact through many CPU instructions, not through one weight. These choices make it cheap and comparable with the oracle. They also explain a typical failure: a single corrupted value can miss edges that only fire for other values, which costs recall.
XAI the interpretability method substrate the bit-exact emulator it runs on (jutari, Julia).
acdc.jl:417 — The method: one resample-ablation and real-ROM re-run per source cell fills a row of \(E[i,j]\).acdc.jl:404 — Chooses the corrupted value: the donor's byte if it differs, else base+17.acdc.jl:442 — The keep rule: edge \(i\to j\) survives iff its effect exceeds \(\tau\).acdc.jl:482 — The threshold schedule: one \(\tau\) between each pair of distinct effect sizes.acdc.jl:362 — The ground-truth circuit: exhaustive interventions {0, base+17, base+37} on each cell.acdc.jl:546 — Sufficiency check: scrub all non-circuit sources at once and count preserved cells.acdc.jl:647 — One game end to end: bit-exact check, checkpoint, truth, ACDC, sweep, positive control, triad.shared_testbed_impl.jl:115 — The shared gameplay state every method sits on (seeded actions, \(f^*\)=90, 15-frame horizon).StellaEnvironment.jl:259 — One video frame of the bit-exact machine; every re-run in ACDC is a loop of these.oracle_intervene.jl:242 — The exact intervention oracle used to build the shared state and its cause-density gate.The figure shows the threshold sweep: precision and recall of the discovered edges against the true data-flow graph as \(\tau\) falls. A perfect method would hit the top-right corner at some \(\tau\); the positive control does exactly that. Expect ACDC's curve to sit lower. Precision is usually decent, because an edge with a visible effect under one corruption is usually real. Recall is the weak side: an edge that only shows up for a different value, or that the program re-derives from another cell, looks dead under a single resample and gets pruned. Read the scrubbing-preserved number beside it: a circuit can score a good F1 and still fail to reproduce the behaviour on its own.
julia --project=jutari tools/xai_study/phaseC_mechanistic/acdc.jl --games core
Writes acdc_<game>.{json,npz} and acdc_core_summary.json into tools/xai_study/phaseC_mechanistic/out/. Add --selftest to run the positive control on the pilot game without writing anything.
Read next: Causal scrubbing · Path patching / IOI circuit · Activation patching / causal mediation · A1 · Connectomics / data-flow graph
The score is the best F1 of the auto-discovered circuit against the true data-flow over a threshold sweep. ACDC prunes edges by resample-ablation, keeping an edge only if removing it hurts performance beyond the current threshold, and sweeping the threshold traces a family of candidate circuits from which we take the best F1 against the true routine. The grading is always against the intervention oracle's true wiring. Faithfulness for this method is that best F1, and it is partial: precision is reasonable but recall is limited, because dependencies re-derived through other cells survive the resample and get pruned away. A positive control runs the identical pruning under exhaustive exact interventions and reaches a perfect F1 on every game, so the shortfall is a real measurement of single-shot discovery, not a broken scorer. There is no sprite-position hard-case here; the output is a circuit. One of the paper's key separations comes from this method: on one game ACDC recovers a perfect, minimal circuit that nonetheless fails to regenerate the behaviour under held-out interventions, so sufficiency drops well below faithfulness. The grading is always against the oracle. The audit box reports the measured triad, so you can see faithfulness beside a lower sufficiency on the same discovered graph.
The score is measured against the §1 intervention oracle — never against another interpretability method. F (faithful) is always vs the oracle; see the execution stack. How each of F / S / M is actually computed for this method (and whether it matches the paper) is in the box just below; the numbers are in the In the audit box under it.
The exact formula this method uses for each score, read from its runner, and
whether it matches the paper's §3 (F ∧ S ∧ M triad) definition.
From the committed audit
fsm_math_phaseC.json.
| Axis | Formula (as computed) | What it measures | Matches §3? |
|---|---|---|---|
| F faithfulness | \(F = F_1^{\mathrm{edge}}(\hat{E}, E^{\star})\) | Best-τ F1 of the ACDC-discovered inter-cell edge set against the exhaustive-oracle true data-flow graph. | ✓ matches acdc.jl (F = best_score.f1); true graph = exhaustive do-set 0/base+17/base+37 over the candidate cells. This is exactly the paper's circuit-discovery F = edge F1 vs the true data-flow graph. Record: extra.triad.F and top-level value (e.g. acdc_pong.json F=0.154; battery mean F=0.625, n=35). how it's measured — call stack:
|
| S sufficiency | \(S = \dfrac{\#\{\text{clean readouts preserved under scrub}\}}{\#\ \text{readouts}} \in [0,1]\) | Fraction of the clean readouts the discovered circuit alone reproduces when everything outside it is resample-ablated (bit-exact re-run). | ✓ matches acdc.jl (S = scrub_preserved). A held-out-flavoured sufficiency on bit-exact re-runs; the new §3 (sec:triad) admits the fraction-within-tolerance [0,1] special case of the held-out predictive test, and this preservation fraction is that form, so it satisfies §3. Record: extra.triad.S (acdc_pong.json S=0.625). how it's measured — call stack:
|
| M minimality | \(M = |U^{\star}| / |\hat{U}| = |E^{\star}| / |\hat{E}| \in (0,1]\) | True-graph edge count over the number of discovered edges (edge-level |U*|/|U_hat|). | ✓ matches acdc.jl now emits M = |true edges|/|discovered edges|, the paper's M = |U*|/|U_hat| at the edge level (as path_patching does). Record: extra.triad.M with M_note '|U*|=12 true edges / |U_hat|=1 discovered edges (best-F1 tau)' (acdc_pong.json M=1.0). Replaced the former edge-precision (1 - FP/n_disc). how it's measured — call stack:
|
✓ matches = the same quantity as §3; ◐ partial = the same kind of estimator but a differing detail; ✗ does not match = a different quantity (see the note). Definitions: F = agreement with the oracle's true causal effects Δy(u); S = held-out predictive score in [−1, 1]; M = |U*|/|Û| (true-minimal-set size / named-set size).
This is the method's entry in the actual cross-method audit — scored on the paper's correctness triad, each axis a mean over 38 of the 44 scored games (38 committed §R records), not the single example shown above. Tradition: causal. The example figure (Pong) is one of those records.
F faithfulness (scored vs the oracle for every method) · S sufficiency (held-out predictive score in [−1, 1]; a negative value means the explanation predicts held-out interventions worse than the unperturbed baseline; reported for the predictive methods across all three phases where the calibration/held-out split is defined) · M minimality (true-minimal-set / named-set; where the method names a cause set) — n/a otherwise, per the paper's F ∧ S ∧ M triad.
Source: leaderboard.json · the whole leaderboard is on the
methods page and the
Paper 2 audit.
This method's faithfulness on each of the 38 scored games (all-regime F; this method has no content-vs-position split (see the note below)). Click a header to
sort. Every number is read from site_data.json
(methods.acdc.per_game).
content-F and position-F are n/a for this method. The content-vs-position split applies only to pixel-attribution methods — those that produce an attribution map over the framebuffer, whose score can be read separately on the smooth content outputs and the discrete position outputs (where the naive gradient is provably zero). This method does not attribute to a pixel output; it is graded by its own fidelity metric (discovered_circuit_best_F1_vs_true_dataflow), reported as the F column, so there is no content or position regime to separate.
M is n/a on 3 of these games. Minimality is M = |U*|/|Û|, the size of the true minimal cause set over the size of the set the method actually names. On a game where the method names nothing (|Û| = 0 — it discovers no circuit, its attribution map is all-zero, or it decodes no cell), that ratio is undefined, so M is left blank rather than scored. The aggregate M is the mean over the 35 games where the method did name a cause set.
| Game | F (all) | content-F | position-F | S | M | Note |
|---|---|---|---|---|---|---|
| Alien | 1.000 | n/a | n/a | 0.167 | 1.000 | recovers the true causes |
| Hero | 1.000 | n/a | n/a | 0.294 | 1.000 | recovers the true causes |
| Jamesbond | 1.000 | n/a | n/a | 0.385 | 1.000 | recovers the true causes |
| Phoenix | 1.000 | n/a | n/a | 0.083 | 1.000 | recovers the true causes |
| Q*bert | 1.000 | n/a | n/a | 0.100 | 1.000 | recovers the true causes |
| Tennis | 1.000 | n/a | n/a | 0.333 | 1.000 | recovers the true causes |
| Video Pinball | 1.000 | n/a | n/a | 0.286 | 1.000 | recovers the true causes |
| Venture | 0.961 | n/a | n/a | 0.444 | 1.000 | recovers the true causes |
| Yars' Revenge | 0.941 | n/a | n/a | 0.385 | 1.000 | recovers the true causes |
| Road Runner | 0.923 | n/a | n/a | 0.333 | 1.000 | recovers the true causes |
| Montezuma's Revenge | 0.889 | n/a | n/a | 0.333 | 1.000 | recovers the true causes |
| Seaquest | 0.880 | n/a | n/a | 0.217 | 1.000 | recovers the true causes |
| Boxing | 0.867 | n/a | n/a | 0.727 | 1.000 | recovers the true causes |
| Centipede | 0.800 | n/a | n/a | 0.444 | 1.000 | |
| Enduro | 0.800 | n/a | n/a | 0.667 | 1.000 | |
| Krull | 0.800 | n/a | n/a | 0.080 | 1.000 | |
| Skiing | 0.800 | n/a | n/a | 0.333 | 1.000 | |
| Riverraid | 0.688 | n/a | n/a | 0.227 | 1.000 | |
| Air Raid | 0.667 | n/a | n/a | 0.231 | 1.000 | |
| Atlantis | 0.667 | n/a | n/a | 0.111 | 1.000 | |
| Bowling | 0.667 | n/a | n/a | 0.050 | 1.000 | |
| Double Dunk | 0.667 | n/a | n/a | 0.250 | 1.000 | |
| Frostbite | 0.667 | n/a | n/a | 0.421 | 1.000 | |
| Demon Attack | 0.615 | n/a | n/a | 0.467 | 1.000 | |
| Berzerk | 0.562 | n/a | n/a | 0.269 | 1.000 | |
| Chopper Command | 0.545 | n/a | n/a | 0.800 | 1.000 | |
| Space Invaders | 0.500 | n/a | n/a | 0.529 | 1.000 | |
| Assault | 0.429 | n/a | n/a | 0.450 | 1.000 | |
| Ice Hockey | 0.429 | n/a | n/a | 0.200 | 1.000 | |
| Asterix | 0.400 | n/a | n/a | 0.222 | 1.000 | |
| Carnival | 0.364 | n/a | n/a | 0.222 | 1.000 | |
| Private Eye | 0.364 | n/a | n/a | 0.167 | 1.000 | |
| Pitfall | 0.308 | n/a | n/a | 0.438 | 1.000 | |
| Breakout | 0.286 | n/a | n/a | 0.333 | 1.000 | |
| Pong | 0.154 | n/a | n/a | 0.625 | 1.000 | |
| Kangaroo | 0.000 | n/a | n/a | 0.133 | n/a | no true-cause signal |
| Ms. Pac-Man | 0.000 | n/a | n/a | 0.053 | n/a | no true-cause signal |
| Pacman | 0.000 | n/a | n/a | 0.125 | n/a | no true-cause signal |
The path from this method's runner (run_game) into the bit-exact VCS substrate, and the
computation it involves. Every step links to the exact source on main. From
callstack_phaseC.json.
env_reset!(env; boot_noop_steps = 60, boot_reset_steps = 4) jutarienv_step!(env::StellaEnvironment, action::Integer) jutaribuild_shared_testbed(game; ... run_intervention = O.run_intervention, soft_ram_peek = soft_ram_peek, ...) via build_acdc_shared_state runnersnapshot(env::StellaEnvironment, frame::Integer) jutariresample_value(clean_val::Int, donor_val::Int) runneracdc_edge_effects(checkpoint, tail, cands, at_target, corrupt_at_target) -> intervene_continue -> intervene_ram! runner intervene_continue @ acdc.jl:290 -> intervene_ram! @ acdc.jl:274; base = continue_from(checkpoint, tail) @ acdc.jl:281discovered_at(E::Matrix{Float64}, tau::Float64) runnertau_sweep(E::Matrix{Float64}) runnerScored against the exact intervention oracle Δy(u): run_intervention(checkpoint, actions, target_frame, horizon, cause).
The figure is generated from the committed record by
docs/gen_method_figures.py; the game frame
and each RAM cell's screen footprint are produced by
render_scenes.jl /
cell_footprints.jl.