Phase C · mechanistic interpretability

Interchange interventions / DAS

Geiger et al. 2021, 2023

← back to the method catalogue

What it does?

Distributed Alignment Search, or DAS, looks for a high-level concept inside the low-level state. It learns a rotation of the internal representation so that a chosen direction, or subspace, lines up with a supplied causal variable. It then tests the alignment by an interchange intervention: swap that subspace between two runs and check whether the output changes exactly as the concept would predict. The method is a leading tool for arguing that a network represents an abstract variable in a specific, possibly distributed, part of its activations. We apply it to the VCS by aligning a learned subspace of the state to a known game variable and measuring interchange accuracy against the true variable. On this transparent machine the alignment is exact: swapping the aligned subspace reproduces the concept's effect perfectly, while a mis-aligned control does not. There is an important caveat that the VCS makes explicit. The concept DAS aligns to is one we supplied from an external label, not one the method discovered. So a perfect interchange accuracy confirms an alignment to a given meaning; it does not show the method found the meaning on its own. DAS is thus a strong test of whether a supplied concept is causally real in the state, and a clean example of the difference between verifying a label and discovering one.

Interchange interventions / DAS result

Each point is one intervention site: its exact causal effect from the oracle (x) against the method's recovered/approximate effect (y). Points on the dashed diagonal mean the method recovered the true effect. interchange_accuracy_aligned = 1.000 — this example only (pong, state gameplay(seed=0,prefix=90)+15); the audit aggregate is below.

How it's scored

The score is the interchange accuracy of the aligned subspace against the true variable. We align a learned subspace of the state to a supplied concept, then swap that subspace between two runs and check whether the output changes exactly as the concept predicts; the fraction of correct interchanges is the accuracy. The grading is against the intervention oracle, and on this transparent machine the alignment is exact, so interchange accuracy is at the ceiling, while a mis-aligned control scores zero. Faithfulness for this method is that interchange accuracy. There is no sprite-position hard-case here, because DAS operates by intervention rather than by a gradient. The essential caveat the audit makes explicit is that the concept DAS aligns to is one we supplied from an external label, not one the method discovered. So a perfect interchange accuracy is guaranteed in advance: it confirms an alignment to a given meaning, and does not show the method found the meaning on its own. The grading is always against the oracle, never against another method. The audit box reports the measured triad. DAS is thus a clean example of the difference between verifying a supplied concept and discovering one, which only a machine with known ground truth can separate.

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.

How F, S, M are computed here

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.

AxisFormula (as computed) What it measuresMatches §3?
F
faithfulness
\(F = \mathrm{interchange\ accuracy} = 1\)Interchange accuracy of the SUPPLIED alignment: for each aligned cell, does swapping its value reproduce the predicted high-level outcome; 1.0 by construction on the VCS.◐ partial das.jl (F = clamp(iia_aligned)); metric_name interchange_accuracy_aligned. It IS a causal check (each interchange is a real do(cell:=source) bit-exact re-run, so single-cell interchange == the exact patch oracle), but F verifies a SUPPLIED/known-true alignment reproduces the abstraction (Geiger IIA) rather than scoring a method-discovered claim's agreement against {Delta_y(u)} -> '1.0 by construction'. The genuine discovery signal (alignment_accuracy, whether DAS recovers the right cell) is a separate extra field, not F. Record: extra.triad.F=1.0 (battery mean F=1.0, n=42).
how it's measured — call stack:
  1. F = clamp(interchange accuracy) into the triad; each interchange is a do(cell:=source) re-run — das.jl:638
  2. true causal effect Δy(u) by bit-exact re-run — oracle_intervene.jl:242
S
sufficiency
\(S = \dfrac{\#\{\,u_{\mathrm{held}}:\ |\hat{y}-y|\le\varepsilon\,\}}{|\mathrm{held\text{-}out}|}\in[0,1]\)Shared held-out predictive sufficiency estimator over the interchange effects.✓ matches common/triad_sm.jl sufficiency_score via triad_extra_dict (das.jl, effect vs exact_effect). Paper-conform. Record: extra.triad.S=1.0 (battery mean S=1.0, n=42).
how it's measured — call stack:
  1. sufficiency_score: fit Δy=a·attr+b on a calib half, predict held-out within ε — triad_sm.jl:111
  2. assemble the triad via triad_extra_dict — das.jl:638
  3. true causal effect Δy(u) by bit-exact re-run — oracle_intervene.jl:242
M
minimality
\(M = |U^{\star}| / |\hat{U}| \in (0,1]\quad U^{\star}=\{u:\Delta y(u)>0\},\ \hat{U}=\{u:|\mathrm{attr}(u)|>\tau\}\)True minimal cause set over method-named set.✓ matches common/triad_sm.jl minimality_score. Paper-conform. Record: extra.triad.M (pong |U*|=5/|U_hat|=5, M=1.0; battery mean M=0.890, n=42).
how it's measured — call stack:
  1. minimality_score: |U*| oracle movers / |U_hat| named cells — triad_sm.jl:57
  2. assemble the triad via triad_extra_dict — das.jl:638
  3. true causal effect Δy(u) by bit-exact re-run — oracle_intervene.jl:242

✓ 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).

In the audit

This is the method's entry in the actual cross-method audit — scored on the paper's correctness triad, each axis a mean over all 42 scored games (42 committed §R records), not the single example shown above. Tradition: causal. The example figure (Pong) is one of those records.

1.000F — faithfulness vs oracle (mean over 42 games, ±0.000 CI95)
1.000S — sufficiency: held-out predictive (n/a where the paper does not define this axis)
0.889M — minimality: true-minimal-set / named-set (n/a otherwise)
42committed records aggregated
0.00human-plausibility proxy

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.

Results per game

This method's faithfulness on each of the 42 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.das.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 (interchange_accuracy_aligned), reported as the F column, so there is no content or position regime to separate.

GameF (all)content-Fposition-FSMNote
Air Raid1.000n/an/a1.0001.000recovers the true causes
Alien1.000n/an/a1.0000.857recovers the true causes
Assault1.000n/an/a1.0000.875recovers the true causes
Atlantis1.000n/an/a1.0000.889recovers the true causes
Bank Heist1.000n/an/a1.0001.000recovers the true causes
Beam Rider1.000n/an/a1.0001.000recovers the true causes
Berzerk1.000n/an/a1.0000.902recovers the true causes
Bowling1.000n/an/a1.0000.909recovers the true causes
Boxing1.000n/an/a1.0000.650recovers the true causes
Breakout1.000n/an/a1.0001.000recovers the true causes
Carnival1.000n/an/a1.0000.895recovers the true causes
Centipede1.000n/an/a1.0000.900recovers the true causes
Chopper Command1.000n/an/a1.0000.647recovers the true causes
Demon Attack1.000n/an/a1.0000.857recovers the true causes
Double Dunk1.000n/an/a1.0000.895recovers the true causes
Fishing Derby1.000n/an/a1.0001.000recovers the true causes
Freeway1.000n/an/a1.0001.000recovers the true causes
Frostbite1.000n/an/a1.0000.593recovers the true causes
Gopher1.000n/an/a1.0001.000recovers the true causes
Hero1.000n/an/a1.0000.833recovers the true causes
Ice Hockey1.000n/an/a1.0001.000recovers the true causes
Jamesbond1.000n/an/a1.0000.769recovers the true causes
Kangaroo1.000n/an/a1.0000.769recovers the true causes
Krull1.000n/an/a1.0000.929recovers the true causes
Kung-Fu Master1.000n/an/a1.0001.000recovers the true causes
Montezuma's Revenge1.000n/an/a1.0000.731recovers the true causes
Ms. Pac-Man1.000n/an/a1.0001.000recovers the true causes
Name This Game1.000n/an/a1.0001.000recovers the true causes
Pacman1.000n/an/a1.0001.000recovers the true causes
Phoenix1.000n/an/a1.0001.000recovers the true causes
Pitfall1.000n/an/a1.0000.923recovers the true causes
Pong1.000n/an/a1.0001.000recovers the true causes
Private Eye1.000n/an/a1.0000.917recovers the true causes
Q*bert1.000n/an/a1.0000.950recovers the true causes
Riverraid1.000n/an/a1.0000.774recovers the true causes
Road Runner1.000n/an/a1.0000.750recovers the true causes
Seaquest1.000n/an/a1.0000.970recovers the true causes
Space Invaders1.000n/an/a1.0000.867recovers the true causes
Tennis1.000n/an/a1.0000.708recovers the true causes
Venture1.000n/an/a1.0000.727recovers the true causes
Video Pinball1.000n/an/a1.0001.000recovers the true causes
Yars' Revenge1.000n/an/a1.0000.875recovers the true causes

Call stack — how it runs on jutari / jaxtari

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.

Applied on the substrate

  1. Boot the real ROM with the xitari-parity reset (60 NOOP + 4 RESET) — env_reset!(env; boot_noop_steps = 60, boot_reset_steps = 4) jutari
  2. Deterministically step the emulator one action per env-frame — env_step!(env::StellaEnvironment, action::Integer) jutari
  3. Assemble the shared gameplay-state testbed (checkpoint at f*, causes, shared screen output, cause-density gate) — build_shared_testbed(game; ... intervene_ram = intervene_ram!, run_intervention = run_intervention, soft_ram_peek = soft_ram_peek, ...) runner
  4. Freeze byte-exact RAM + screen out of the env at a frame — snapshot(env::StellaEnvironment, frame::Integer) jutari

The computation

  1. Define the abstract variables (concept-labelled RAM cells) the DAS alignment maps onto — build_variables(cand_indices_concepts) runner
  2. Interchange intervention: write the source-run cell value(s) into a deepcopy of the base checkpoint, continue the tail, snapshot (the DAS interchange / resample re-run measuring alignment-cell effect on each variable readout) — interchange(base_ckpt, tail, kind, sites, values) -> intervene_ram!/intervene_tia!; env_step! runner intervene_ram! @ das.jl:256, intervene_tia! @ :258, env_step! @ :263

Scored against the exact intervention oracle Δy(u): run_intervention(checkpoint, actions, target_frame, horizon, cause).

Implementation
tools/xai_study/phaseC_mechanistic/das.jl
Reference
Geiger et al. 2021, 2023
Record
das_pong.json
All records
phaseC_mechanistic/out

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.