Phase B · attribution / XAI

Extremal / meaningful perturbation

Fong & Vedaldi 2017; Fong et al. 2019

← back to the method catalogue

What it does?

Extremal, or meaningful, perturbation learns the smallest mask that most changes the output. Rather than sliding a fixed occluder, it optimises a soft mask over the inputs, searching for the smallest region whose removal most disrupts the output, subject to a bound on the mask's area. The learned mask is read as the explanation: the compact set of inputs the output really depends on. For images this yields a tight, optimised heat-map instead of a brute-force sweep. The method was designed to answer a specific criticism, that hand-placed occluders are arbitrary and can push the input off the data manifold. By optimising a bounded, smooth mask of real occlusion re-runs, it stays closer to valid interventions. We apply it to the VCS by optimising an area-limited mask over the candidate causes, each mask entry a genuine occlude-and-re-run, and comparing the learned mask to the true minimal cause set. Because every step is a real intervention, it works on a sprite's position where gradients fail, and it partly overlaps the true causes. Its faithfulness is moderate: the optimisation finds a compact set that is on the right track but does not exactly match the oracle's minimal set. It is a strong, on-manifold member of the intervention family and a fair test of whether optimising the mask beats simply sliding one.

Extremal / meaningful perturbation result

Top row (image domain, as in Paper 1): the game frame, then the oracle's true causal region and this method's attributed region — each painted onto the frame through the screen footprint of the RAM cells it implicates (brighter = more important). A faithful method's heat matches the oracle's. Bottom: per-cell importance — oracle (green) vs method (blue) — and the deletion/insertion faithfulness curves (perturb the ranked causes and watch the output move). Note: the image-domain overlay footprints are illustrative, computed on the pre-redesign boot frame; the bars, curves and all reported numbers come from the re-run records on the shared gameplay states. pearson_corr_with_oracle = 0.469 — this example only (pong, state f90+15); the audit aggregate is below.

Reading this example's causal region

This example explains the content of RAM $36 (byte 54) — the most causally-active concept byte at this state. Its strongest true-causes are: RAM $36 (the play area — ball / paddles); RAM $31 (17% of its footprint sits in the score band, the rest in the play area). The score digits appear in the region because RAM $31 reaches them: perturbing it over the 30-frame NOOP window changes the game outcome, and hence the score — a downstream effect, not direct rendering.

How it's scored

The score is the Pearson correlation of the learned mask with the oracle's exact causal map, together with the mask's overlap, measured as intersection-over-union, against the true minimal cause set. The grading is always against the intervention oracle. Every entry of the mask is a real occlude-and-re-run, so the method is a valid intervention and works even on a sprite's position, where the gradient family scores zero. That is why there is no position-collapse here. Its faithfulness is moderate rather than high: the area-bounded optimisation finds a compact set that partly overlaps the true causes but does not exactly match the oracle's minimal set, so both the correlation and the mask overlap are partial. Minimality is central to this method, because it explicitly seeks the smallest disruptive mask, so the score rewards a mask that is both on-target and small. The grading never compares the mask to another method's mask, only to the oracle's minimal set. The audit box reports the measured all-regime faithfulness across the 42 scored games, so the number reflects the whole scored set rather than the single game where the optimised mask happens to line up best with the true causes.

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_phaseB.json.

AxisFormula (as computed) What it measuresMatches §3?
F
faithfulness
\(F = \rho_{\mathrm{Pearson}}\!\left(\mathrm{attr},\ |\Delta y(u)|\right)\)Raw Pearson correlation between the method's per-cause attribution magnitudes and the oracle's true absolute causal effects |Delta_y(u)|, scored separately for the content and position output regimes.✓ matches perturbation.jl: extremal-perturbation mask per cause, F = pearson(attr, oracle_abs_delta); triad_extra_dict(f.pearson, attr, f.oracle_abs_delta). Record: out/perturbation_air_raid_content.json (metric_name=pearson_corr_with_oracle, value=0.55). Scorer pilot_ig_vs_oracle.jl pearson() (raw Statistics.cor, zero-variance->0); F = pearson(attr, oracle_abs_delta) where oracle_abs_delta = abs.(cmap.delta) (true |Delta_y| per cause). Also reports spearman, precision@k, deletion/insertion AUC (paper's auxiliary F metrics). Per-regime split: separate *_content.json and *_position.json records, each carrying its own extra.triad.{F,S,M}.
how it's measured — call stack:
  1. per-cause extremal-perturbation mask attribution — perturbation.jl:373
  2. raw Pearson of attribution vs oracle |Δy(u)| — pilot_ig_vs_oracle.jl:173
  3. assemble the F∧S∧M triad record — perturbation.jl:654
  4. 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]\)Fit Delta_y = a*attr + b on a calibration half of the do(u) causes, predict the disjoint held-out half, and report the fraction of held-out causes whose predicted output lands within an epsilon band of the oracle's bit-exact re-run.✓ matches common/triad_sm.jl sufficiency_score() (interleaved calib/held split by seed, least-squares 1-D fit Delta_y~a*attr+b on calib, epsilon = max(0.5, 0.10*heldout_spread)); assembled in triad_extra_dict(). The new §3 (sec:triad) admits the fraction-within-tolerance [0,1] special case of the held-out predictive test, which this held-out do(u) fit-then-predict estimator satisfies, so it matches. (Detail: epsilon is a self-scaled band 0.10*spread; the [-1,1] correlation form is available but this method reports the [0,1] hit fraction.)
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 F∧S∧M triad record (calls sufficiency_score) — triad_sm.jl:173
  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\}\)Ratio of the number of oracle causal movers (causes with nonzero true Delta_y) to the number of cells the method names above 1e-6 of its own max attribution; null when the oracle finds no mover or the method names nothing.✓ matches common/triad_sm.jl minimality_score() with name_frac=1e-6, mover_floor=0.0; the above-threshold named set is used (topk kept but not passed), see triad_extra_dict(). This is the paper's M = |U*|/|U_hat| in (0,1] (standardized everywhere), so it matches the new §3. (Detail: |U*| is taken as all oracle movers with Delta_y>0, an upper bound on the strictly-smallest reproducing subset, so M can be optimistic.)
how it's measured — call stack:
  1. minimality_score: |U*| oracle movers / |U_hat| named cells — triad_sm.jl:57
  2. assemble the triad record (calls minimality_score) — triad_sm.jl:178
  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 (84 committed §R records), not the single example shown above. Tradition: intervention. The example figure (Pong) is one of those records.

0.461F — faithfulness vs oracle (mean over 42 games, ±0.059 CI95)
0.630S — sufficiency: held-out predictive (n/a where the paper does not define this axis)
0.969M — minimality: true-minimal-set / named-set (n/a otherwise)
84committed 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, and the content vs position split). Click a header to sort. Every number is read from site_data.json (methods.perturbation.per_game).

GameF (all)content-Fposition-FSMNote
Fishing Derby0.8120.7880.8360.8501.000holds up on position
Phoenix0.7820.9960.5690.5381.000
Demon Attack0.7070.9610.4540.8750.875
Beam Rider0.7060.4990.9120.8331.000holds up on position
Montezuma's Revenge0.7010.9350.4680.9061.000
Krull0.6950.9360.4550.5001.000
Riverraid0.6470.9370.3580.8701.000
Bowling0.6370.7600.5130.8811.000
Name This Game0.6290.5280.7290.6671.000holds up on position
Pacman0.6140.5220.7050.5561.000holds up on position
Boxing0.5950.5820.6090.7501.000holds up on position
Alien0.5810.5210.6410.7141.000holds up on position
Air Raid0.5660.5470.5840.5711.000holds up on position
Space Invaders0.5570.6790.4350.9170.833
Q*bert0.5540.9350.1730.4761.000
Freeway0.5190.4890.5500.5001.000holds up on position
Frostbite0.4930.5600.4250.1251.000
Ice Hockey0.4800.5120.4470.4550.875
Carnival0.4720.9450.0000.5001.000position gradient vanishes
Tennis0.4700.9400.0000.4691.000position gradient vanishes
Kangaroo0.4670.9340.0000.4691.000position gradient vanishes
Bank Heist0.4670.6960.2370.8331.000
Gopher0.4650.5310.4000.9291.000
Ms. Pac-Man0.4520.5770.3260.4751.000
Pong0.4020.4690.3350.3890.875
Jamesbond0.4020.4890.3140.8930.964
Atlantis0.3930.5270.2600.4000.875
Double Dunk0.3690.4750.2630.8461.000
Private Eye0.3520.5150.1880.9601.000
Pitfall0.3410.4790.2020.8820.875
Kung-Fu Master0.3360.4820.1900.8000.958
Road Runner0.3200.0000.6410.4471.000holds up on position
Centipede0.3140.6280.0000.4500.875position gradient vanishes
Assault0.3110.4410.1810.9050.917
Breakout0.2990.4880.1090.5501.000
Video Pinball0.2760.3520.1990.5001.000
Yars' Revenge0.2600.5200.0000.4641.000position gradient vanishes
Chopper Command0.2520.0000.5030.4521.000holds up on position
Venture0.2430.4860.0000.4741.000position gradient vanishes
Berzerk0.2140.4280.0000.4810.833position gradient vanishes
Seaquest0.1450.0000.2890.4791.000
Hero0.0440.0000.0870.4171.000no true-cause signal

Call stack — how it runs on jutari / jaxtari

The path from this method's runner (main) into the bit-exact VCS substrate, and the computation it involves. Every step links to the exact source on main. From callstack_phaseB.json.

Applied on the substrate

  1. env reset + per-frame step of the bit-exact VCS (masked re-runs step the horizon) — env_reset! / env_step! jutari
  2. shared gameplay-state testbed — build_shared_testbed jutari

The computation (intervention path)

  1. value of a masked coalition: occlude every masked cause (do-intervention), step the horizon, read |output delta| vs intact — masked_abs_dy runner
  2. the mask operator = the oracle's occlude! (RAM/TIA -> 0, joystick masked = NOOP) — occlude! -> intervene_ram! / intervene_tia! jutari intervene_ram! jutari_oracle.jl:174, intervene_tia! jutari_oracle.jl:185
  3. extremal-perturbation search: grow the smallest mask that maximally shifts the output, then attribute per cause — extremal_mask runner
  4. snapshot RAM+screen after each masked re-run — snapshot jutari

Scored against the exact intervention oracle Δy(u): run_intervention.

Implementation
tools/xai_study/phaseB_attribution/perturbation.jl
Reference
Fong & Vedaldi 2017; Fong et al. 2019
Record
perturbation_pong_content.json
All records
phaseB_attribution/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.