Anonymous code release accompanying the ICML 2026 Mechanistic Interpretability Workshop submission.
This repository contains the code to reproduce every figure, table, and load-bearing number in the paper.
Cached intermediate CSVs (~322 MB) will be released alongside the camera-ready / non-anonymous version of the paper. They are not included here because anonymous review platforms (anonymous.4open.science, etc.) are optimised for browsing source files, not for hosting hundreds of megabytes of patching outputs. The code in this repository is sufficient to re-derive every CSV from the public model checkpoints.
A self-contained, anonymized, version-pinned set of scripts that:
requirements.txt.attn_implementation="eager" (no FlashAttention required).allenai/Olmo-3-1025-7Ballenai/Olmo-3-7B-RL-Zero-Math (revisions: step_200, step_1000, step_1900)--revision choices)allenai/OLMo-2-1124-7B (cross-model temporal replication)deepseek-ai/deepseek-math-7b-base, Qwen/Qwen2.5-Math-7B (cross-architecture)pip install -r requirements.txt
# Run head patching on OLMo-3 base for 3-digit arithmetic.
# Produces a CSV with greedy and distributional recovery per (layer, head).
python scripts/phase1_circuits/head_patching_dist.py \
--checkpoint base \
--device cuda:0 \
-n 200 \
--output head_patching_dist_base.csv
reproduce_all.sh exists as a tier-2 smoke-test pipeline (regenerates figures from cached CSVs + diff against committed PDF text-extracts), but it requires the cached CSVs that will ship with the camera-ready. Until then, run individual scripts directly.
release/
├── README.md this file
├── provenance.csv every paper claim → CSV → script → notes
├── requirements.txt pinned Python deps
├── reproduce_all.sh smoke-test pipeline (needs cached CSVs)
├── expected_checksums.txt SHA256 of every CSV (for camera-ready verification)
├── figures/ regenerated PDFs land here at run time
└── scripts/
├── phase0_behavioral/ pass@k evaluation, Figure 1
├── phase1_circuits/ head patching (greedy + distributional), value norms
├── phase2_cross_task/ GSM8K / MATH500 single-token patching, multi-step
├── phase2_ghost/ cross-architecture replication, threshold sweep,
│ cross-model base→RL patching, master figure script
├── phase2_transplant/ weight transplant, weight-diff geometry,
│ noise fragility, verifier reranking
├── phase2_verification/ answer-token patching, verification heads
└── analysis/ bootstrap CIs, permutation null, HHI filter,
value-norm scan
| Paper element | Script |
|---|---|
| Figure 1 (reliability gap) | scripts/phase0_behavioral/eval_olmo3_sweep.py → plot_figure1_olmo3.py |
| Figure 2 (ghost heads) | scripts/phase1_circuits/head_patching_dist.py × 4 ckpts → phase2_ghost/generate_paper_figures.py (figure2_ghost_heads) |
| Figure 3 (14-checkpoint trajectory) | scripts/phase1_circuits/head_patching_dist.py × 14 ckpts → phase2_ghost/figure_ghost_trajectory.py |
| Figure 4 (answer-token patching) | scripts/phase2_verification/verification_patching_temporal.py → figure_atp_v2.py |
| Table 1 (cross-task HHI + filter) | scripts/analysis/hhi_signal_quality_recompute.py |
| Table 3 (ghost trajectory) | scripts/phase1_circuits/head_patching_dist.py × 14 ckpts |
| Table 4 (cross-arch ghost heads) | scripts/phase2_ghost/crossmodel_ghost_heads.py |
| Table 5 (seven MI tools) | aggregated from individual probes (Appendices B, G, I, J) |
| Appendix B (transplant) | scripts/phase2_transplant/weight_transplant_test.py |
| Appendix C (multi-step) | scripts/phase2_cross_task/multistep_arithmetic.py |
| Appendix G/H (weight-diff geometry) | scripts/phase2_transplant/crossmodel_weight_diff.py |
| Appendix I (noise fragility) | scripts/phase2_transplant/noise_fragility_tasks.py |
| Appendix J (verifier reranking) | scripts/phase2_transplant/rl_verify_experiment.py |
| Appendix N (threshold sweep) | scripts/phase2_ghost/ghost_threshold_sensitivity.py |
| Appendix O (cross-model perm null) | scripts/phase2_ghost/crossmodel_head_patching_base_rl.py → analysis/permutation_null_L31H13.py |
| Appendix P (L29.H5 paired bootstrap) | scripts/analysis/bootstrap_l29h5_dose_response.py |
| Appendix Q (value-norm vs GhostScore) | scripts/phase1_circuits/head_value_norms.py → analysis/value_norm_vs_ghostscore.py |
A complete one-line-per-claim audit is in provenance.csv.
--device cuda:N it defaults to cuda:0 and accepts an override.Anonymous code release accompanying the ICML 2026 Mechanistic Interpretability Workshop submission.
This repository contains the code to reproduce every figure, table, and load-bearing number in the paper.
Cached intermediate CSVs (~322 MB) will be released alongside the camera-ready / non-anonymous version of the paper. They are not included here because anonymous review platforms (anonymous.4open.science, etc.) are optimised for browsing source files, not for hosting hundreds of megabytes of patching outputs. The code in this repository is sufficient to re-derive every CSV from the public model checkpoints.
A self-contained, anonymized, version-pinned set of scripts that:
requirements.txt.attn_implementation="eager" (no FlashAttention required).allenai/Olmo-3-1025-7Ballenai/Olmo-3-7B-RL-Zero-Math (revisions: step_200, step_1000, step_1900)--revision choices)allenai/OLMo-2-1124-7B (cross-model temporal replication)deepseek-ai/deepseek-math-7b-base, Qwen/Qwen2.5-Math-7B (cross-architecture)pip install -r requirements.txt
# Run head patching on OLMo-3 base for 3-digit arithmetic.
# Produces a CSV with greedy and distributional recovery per (layer, head).
python scripts/phase1_circuits/head_patching_dist.py \
--checkpoint base \
--device cuda:0 \
-n 200 \
--output head_patching_dist_base.csv
reproduce_all.sh exists as a tier-2 smoke-test pipeline (regenerates figures from cached CSVs + diff against committed PDF text-extracts), but it requires the cached CSVs that will ship with the camera-ready. Until then, run individual scripts directly.
release/
├── README.md this file
├── provenance.csv every paper claim → CSV → script → notes
├── requirements.txt pinned Python deps
├── reproduce_all.sh smoke-test pipeline (needs cached CSVs)
├── expected_checksums.txt SHA256 of every CSV (for camera-ready verification)
├── figures/ regenerated PDFs land here at run time
└── scripts/
├── phase0_behavioral/ pass@k evaluation, Figure 1
├── phase1_circuits/ head patching (greedy + distributional), value norms
├── phase2_cross_task/ GSM8K / MATH500 single-token patching, multi-step
├── phase2_ghost/ cross-architecture replication, threshold sweep,
│ cross-model base→RL patching, master figure script
├── phase2_transplant/ weight transplant, weight-diff geometry,
│ noise fragility, verifier reranking
├── phase2_verification/ answer-token patching, verification heads
└── analysis/ bootstrap CIs, permutation null, HHI filter,
value-norm scan
| Paper element | Script |
|---|---|
| Figure 1 (reliability gap) | scripts/phase0_behavioral/eval_olmo3_sweep.py → plot_figure1_olmo3.py |
| Figure 2 (ghost heads) | scripts/phase1_circuits/head_patching_dist.py × 4 ckpts → phase2_ghost/generate_paper_figures.py (figure2_ghost_heads) |
| Figure 3 (14-checkpoint trajectory) | scripts/phase1_circuits/head_patching_dist.py × 14 ckpts → phase2_ghost/figure_ghost_trajectory.py |
| Figure 4 (answer-token patching) | scripts/phase2_verification/verification_patching_temporal.py → figure_atp_v2.py |
| Table 1 (cross-task HHI + filter) | scripts/analysis/hhi_signal_quality_recompute.py |
| Table 3 (ghost trajectory) | scripts/phase1_circuits/head_patching_dist.py × 14 ckpts |
| Table 4 (cross-arch ghost heads) | scripts/phase2_ghost/crossmodel_ghost_heads.py |
| Table 5 (seven MI tools) | aggregated from individual probes (Appendices B, G, I, J) |
| Appendix B (transplant) | scripts/phase2_transplant/weight_transplant_test.py |
| Appendix C (multi-step) | scripts/phase2_cross_task/multistep_arithmetic.py |
| Appendix G/H (weight-diff geometry) | scripts/phase2_transplant/crossmodel_weight_diff.py |
| Appendix I (noise fragility) | scripts/phase2_transplant/noise_fragility_tasks.py |
| Appendix J (verifier reranking) | scripts/phase2_transplant/rl_verify_experiment.py |
| Appendix N (threshold sweep) | scripts/phase2_ghost/ghost_threshold_sensitivity.py |
| Appendix O (cross-model perm null) | scripts/phase2_ghost/crossmodel_head_patching_base_rl.py → analysis/permutation_null_L31H13.py |
| Appendix P (L29.H5 paired bootstrap) | scripts/analysis/bootstrap_l29h5_dose_response.py |
| Appendix Q (value-norm vs GhostScore) | scripts/phase1_circuits/head_value_norms.py → analysis/value_norm_vs_ghostscore.py |
A complete one-line-per-claim audit is in provenance.csv.
--device cuda:N it defaults to cuda:0 and accepts an override.