Research plan · PLAN V8 · state 2026-11-09 · AMD MI300X · ICML 2027 → NeurIPS 2027

The afterlife of a loss spike: how Adam's memory writes lasting damage, and how to undo it.

When an LLM's loss spikes, every standard fix (clip, skip, reset, roll back) treats the optimizer as a black box. Optimizer Autopsy measures how much of a spike's lasting damage is carried by the weights versus Adam's m and v, and how fast it migrates between them. It then finds the coordinates that carry it and repairs only those. Every claim is checked against a bit-identical counterfactual replay.

Instrument built · Δ = 0 on CUDA and AMD Next chaos floor + spike-dose sweep Compute AMD MI300X · tiers T0–T4 Venues ICML 2027 · NeurIPS 2027

▶ Status, honestly

The fork-and-replay instrument (C1) is built. Its noop-vs-noop Δ == 0 gate holds on CUDA and, since 2026-10-27, on the AMD MI300X, in-process and across processes, through spike windows. The first AMD pilot was exploratory. Width-1 spikes left 0.0003–0.0117 nats of lasting damage, about the size of the 1-ulp chaos floor (≤ 0.003). In the one clear case, undoing m+v removed ~98% of it, and undoing v alone made it worse (n = 1). The next run measures that chaos floor and raises the spike dose until damage clears it. Every other number on this page is still a prediction or a pre-registered proposal, not a result. Full plan: PLAN_V8.md.

share of lasting Δ cut time τ after the spike (steps) → 100% 0 v-carried · decays ≈ β2^τ m-carried · ≈ √β1^τ (closed loop) w-carried · what remains undo / repair window SCHEMATIC OF THE HYPOTHESIS, NOT MEASURED DATA
The headline experiment: at each cut time τ, the 2³ cross-world hybrids (w, m, v) ∈ {spiked B0, clean B*}³ are trained to the end of the schedule. Their held-out losses split the lasting damage into w-, m- and v-carried shares. If the state shares are ≈ 0 beyond about 50 steps, that is the finding: "damage is weight-carried after k steps". It is a measured result either way.
00 · The paper in one page

Three contributions, measurement first, plus a released benchmark.

Headline to test: most of a loss spike's lasting damage is written after the spike step, by Adam's memory of it. On a large spike-dominated coordinate the momentum echo writes a fraction β1/√β2 ≈ 92% of the total drift (a corollary of Patitucci & Mokhtari 2026). The inflated v stalls ordinary learning, but it also keeps the echo bounded. So the sharp prediction is that cleaning v alone is worse than doing nothing. We measure the real shares by undoing the spike's contribution to m, v or both at increasing lags. Working title: "Most of a Loss Spike's Damage Is Done After the Spike: A Causal Autopsy of Adam's Memory." We claim the finding and the instrument. We claim neither determinism nor a root cause: the claim is that damage is carried in optimizer state.

C1 · MEASURE

Damage-migration curve

A 2³ (and 2⁴, adding Adam's step counter) cross-world factorial over (w, m, v) at cut times τ ∈ {1, 10, 30, 60, 150, 400}. A β1 × β2 cross identifies which memory carries the damage, and a poisoned-state transplant measures a dose-response. Placebo replicates (1-ulp) bound chaotic sensitivity.

C2 · LOCALIZE

Signed, support-limited, causal

A group-testing oracle finds the minimal state support whose repair recovers the run. Cheap signed predictors are scored against it: attribution patching over (m, v), two-sided innovation tests, Bai's λ_grad by group, and a jump-robust "shadow v". Over- vs under-preconditioning is tracked as a sign.

C3 · REPAIR

Undo it, certify it

A state-only retroactive deletion removes the spike window's direct contribution from m and v; the weights are untouched. A stability-certified restoration makes the smallest log-space move of v on the localized support that puts λ_grad(Ĥ) under (1−δ)·2/η. Scored by gap closed against the best non-oracle baseline.

P3 · RELEASE

SpikeState + toolkit

≥ 200 spike instances with (w, m, v, v̄) snapshots, clean twins, oracle damage maps and a leaderboard. Plus the counterfactual fork engine, an undo-log optimizer wrapper and an optimizer-state integrity scanner.

SCALE

Does it transfer?

Three levels. L0: β-set rates hold at any scale. L1: amplitudes should collapse under μP. L2: finite-size effects are measured. A scaling law is fitted on small configs and must predict held-out rungs before they run. Real trunks are borrowed from released Pythia and OPEN-1B optimizer states.

⚠ Route, don't kill

The gates decide what runs first. They never delete an idea. A null state-share becomes the "weight-carried" paper. If a simple band-clamp matches our repair, it becomes the practical recommendation. If ROCm can't reach Δ = 0, the fork-free detector and online undo lead.

01 · Method

Fork, cut, hybridize, localize, repair, replay.

Every branch (ours and every baseline) forks from the same snapshot, so two trajectories differ only by the edit under test. The clean counterfactual B* keeps the data stream aligned. The effect is always Δ = val_loss(branch) − val_loss(B*) on held-out batches that are disjoint from every probe.

Spike sourceTypeGround truthRole
corrupt_batch, repeat_ngramdata-drivennonecore
lr_bump (multiplies the schedule)LR-drivennonecore; undo is predicted to fail here (H6)
v_inflate + inert decoys + m-only plantsplantedexactlocalizer benchmark
sdc_grad · v_bitflip · m_bitflipsilent data corruptionexactreliability arm: undo fixes gradient faults; the parity residual catches v-flips
Data-selected v-inflation · ordering-attack windowdata-realizable plantsknown supportbridges planted and natural
Natural stress presets · bf16 flash-attention explosion · OPEN-1B natural spikesnaturalnonelocalization and detection (no B* for causal contrasts)

Baselines (each tuned on seed 0 only)

Rollback-and-skip (PaLM) · Adam-MR · bias-correct full reset · v-only reset · v ← v̄ · OLMo 6σ skip · skip-step (OPEN-1B rule) · ZClip · AdaGC · SPAM · GradientStabilizer · StableAdamW · band-clamp v ← clip(v, a·v̄, b·v̄) · random edit matched in support and energy · magnitude-only localizer. Merged so far (PR #14): SPAM, ZClip, AdaGC, skip-step, v-only reset, v ← v̄.

02 · What's new, fact-checked

Narrower than the first draft, and defensible.

Two fact-check passes re-read every cited claim at the source. An adversarial kill-search then tried to find prior art for every "new" claim. The honest result: every component has precedent. What is new is the study, the first time-resolved causal (w, m, v) decomposition of LLM loss-spike damage, and the results it produces. "New" means not found in the logged searches.

ClaimVerdictClosest prior work
Damage-migration curve for spikes (w/m/v shares vs time, β-identified)PARTIAL · headlineXu 2026 (state transplants) · Chimera 2026 · Guo 2026 · Ibrahim 2024 ("state washes out" at β2 = 0.95, which we pre-register as the null to beat)
Dose–response of spike-poisoned state on clean weightsPARTIALXu 2026 (m alone carries a trait) · "Newer Is Not Always Better" (ICLR 2027 submission: moment transplants and history coverage, 34M–7B)
"Poisoned v is protective" (cleaning v alone is worse than nothing)out-of-sample testHistory-coverage theory in "Newer Is Not Always Better"; boundary condition from Asadi 2023
Lasting-damage mediation (vs immediate spike control)PARTIAL"Understanding and Mitigating AdamW Loss Spikes" (ICLR 2027 submission: onset capture and replay, 355M)
Signed localization in m/v vs a causal group-testing oraclePARTIALSPAM (one-sided g²/v test) · AtP* · ACDC · per-layer reset oracles
Stability-certified restoration of vPARTIALBiswas 2026 (toy task: clearing excess v on affected rows ≈ full reset) · GI-Adam (v at init)
Window deletion from Adam's moments (undo log)PARTIALSWIFT, TPDS 2024 (one-step inversion) · Stewart 2026 (memory-only deletion, L-BFGS)
Direct fault injection into m/v (v up-flips freeze, down-flips spike)PARTIAL · injection map looks newAltenbernd 2026 (gradient SDC → v→∞) · LayerCheck 2026 (per-layer restore)
Held-out-rung prediction of damage sharesPARTIALWortsman 2023 small-scale proxies · CompleteP 2025
SpikeState (curated spike instances with w, m, v, v̄, twins, oracle maps)NEW (low confidence)Pythia / OPEN-1B released states (no spike curation)
Bitwise-deterministic replayNOT OURSNVIDIA Megatron Core (2026) · OPEN-1B (2026)
Spike mechanism (v decouples from g²; λ_grad > 2/η)NOT OURSBai et al., ICML 2026
03 · The math that makes predictions

Closed forms we will test, not assume.

These are derivations [I], checked by hand. Each becomes a pre-registered test. Defaults are (β1, β2) = (0.9, 0.95).

Damage and its decomposition
Δ_X(h) = L_val(X, t1+h) − L_val(B*, t1+h) # held-out, end of schedule Θ^{abc} = (w^a, m^b, v^c, k), a,b,c ∈ {B0, B*} # 2³ cross-world hybrids φ_state = ½[D(011) + D(111) − D(100)] # Shapley share of (m,v)
Honest-Adam feasibility (every real state satisfies it)
|m_i| ≤ C·√v_i, C = (1−β1) / √(1−β2) / √(1 − β1²/β2) = 1.165
Anti-windup invariance: why clipping only softens spikes
update/η on a spike-dominated coordinate = (1−β1)/√(1−β2) · (β1/√β2)^k = 0.447 · 0.9234^k total drift → D = (1−β1) / [√(1−β2) · (1 − β1/√β2)] · η = 5.84η · 10.47η · 31.8η (β2 = .95 · .99 · .999) # a saturating limit as G/ḡ → ∞: clipping a large spike barely changes D (smaller spikes drift less)
Which memory carries it? (the identification problem)
v excess decays as β2^τ → half-life 13.5 steps at β2 = 0.95 closed-loop (w, m) modes decay at √β1 → half-life 13.2 steps at β1 = 0.9 # 2.7% apart # so V8 crosses β1 × β2: (.9,.95) (.9,.99) (.9,.999) (.8,.95) (.95,.95)
Planted-poison recovery law
k½ = ln((κ−1)/3) / (−ln β2) ≈ 158 steps (κ = 10⁴, β2 = 0.95)
Repairs
undo: m −= Σ_{s∈W} (1−β1) β1^{t1−s} g_s v −= Σ_{s∈W} (1−β2) β2^{t1−s} (g_s² − v̄), v ≥ 0 # weights untouched; no ÷β error growth restore: v_S(α) = v_S^{1−α} · T_S^α, largest α with λ_grad(Ĥ) ≤ (1−δ)·2/η # Bai's Ĥ (threshold 2/η); raw D⁻¹H is 38/η
Matching rungs (scale protocol)
16,384 tokens per optimizer step inside every fork window; otherwise β2* = β2^(B*/B) # Marek 2025
04 · Program and compute

Five tiers, each a complete unit, from 5 to 2,000 GPU-hours.

These are MI300X-hours, estimated before step_timer ran on AMD (2026-10-27). The real budget is 20 hours in total, about 3 used, so T2 and above do not fit as listed. One 192 GB MI300X holds fp32 weights, gradients, m and v up to about 7B parameters, so forks stay single-GPU and avoid multi-GPU reduction-order nondeterminism. Only fork-vs-fork determinism matters, so trunks may use many GPUs.

TierWhatGPU-hPaper
T0AMD bring-up · pinned ROCm image · cross-process Δ = 0 gate through a spike window · step_timer3–5all
T1Minimal viable experiment: damage migration on 12 proxy instances (~370 forks)1–2go/no-go
T2Realistic proxy + mid rung · β cross · localizers + oracle · repairs + strong baselines · SDC arm · 124M n = 5 · Pythia-160M borrowed trunk50–80P1 · ICML 2027
T3Pythia ladder 410M → 2.8B · μP collapse · held-out-rung prediction · OPEN-1B released states (use depends on its skip protocol) · Adam-mini / Muon / Adafactor · SpikeState200–450P2 · NeurIPS 2027 · P3 datasets track
T4Own instrumented 1B trunks on an 8× node · Pythia-6.9B on one card · RL fine-tuning and ViT transfer500–2,000follow-ups
05 · Calendar

Thirteen weeks to ICML 2027, then NeurIPS 2027.

Venue dates are unofficial until the calls for papers are published. The later compute weeks must fit the 20-hour GPU budget, so some will drop. The working week-by-week schedule through Dec 31 is in PLAN V8 §11.2.

WEEKS 1–2

Instrument you can trust, then the headline

Week 1from Oct 26
  • AMD determinism gate (cross-process, through a spike window) and step_timer.
  • Instrument fixes: held-out Δ, a non-degenerate cheap fix, lr_bump multiplying the schedule, disjoint eval batches, stamped results.
  • Commit the pre-registration thresholds. Push the spike pipeline PR. Email EleutherAI. Open one OPEN-1B shard on the GPU host.
Week 2MVE
  • Damage-migration MVE: harness sanity (planted v), headline (state share CI excludes 0?), placebo spread.
WEEKS 3–10

The ICML core

Weeks 3–4
  • Realistic proxy + mid rung, QK-Norm and untied variants, β cross, SDC recipes, stress re-search.
Weeks 5–6
  • Oracle + localizers (gate: AUROC ≥ 0.7 vs the oracle). Pythia converter + optimizer-state census.
Weeks 7–8
  • Repairs + full baseline battery (primary: non-inferiority vs the best baseline). Scaling-law fit on small configs.
Weeks 9–10
  • 124M n = 5 at matched tokens and the Pythia-160M borrowed trunk. Does the held-out rung land inside the predicted interval?
WEEKS 11–13 · FEB–MAY

Write, submit, scale

Weeks 11–13to ~Jan 22
  • ICML 2027 submission (P1).
Feb–May 2027
  • Tier 3 scale-up → NeurIPS 2027 main (P2) and the datasets/benchmarks track (P3, SpikeState).
06 · Idea portfolio

About 140 ideas, all kept and labelled honestly.

The full table with verdicts and tiers is in PLAN V8 Appendix A. They come from two research waves that borrowed from causal inference, estimation theory, finance, data assimilation, reliability engineering, security and scaling theory. A few highlights:

MECHANISM

Protection law

A spike's v-excess may protect its own damage from being overwritten. Restoration works by removing that protection (after Biswas 2026). It predicts which spikes self-heal.

ESTIMATION

Shadow v

A bipower-variation copy of v (from finance) that a single jump barely moves. Its jump share localizes with zero forks and zero logs, and fails by design at width ≥ 2.

RELIABILITY

Bit-flip map

A flip that inflates v is silent: the coordinate freezes with no loss spike, permanently if v becomes ∞. A flip that shrinks v, or any flip in m, spikes at once. Undo fixes gradient faults; a parity residual catches state faults.

FORENSICS

Recover the offending tokens

Δlog v on embedding rows between two snapshots may reveal which tokens caused the spike, with no data logs. It is also a privacy note for anyone releasing optimizer states.

SCALE

A law that predicts

Fit on five small configs, then predict the mid rung and 124M before running them. Under μP the amplitudes should collapse; under SP the exponent is the finding.

SECURITY

Spikes as attacks on state

v too large freezes, v too small destabilizes, a poisoned m steers. An integrity scanner checks shipped optimizer.pt files against honest-Adam invariants.

07 · Pre-attacked

What could sink this, and where each risk routes.

Marin 32B says the opposite: a direct counter-case

Marin's retrospective inferred, by elimination, that its spikes were "rooted in the model's attention stack rather than in optimizer state". An optimizer-state rebuild relapsed. Route: our factorial measures exactly this split, and the QK-Norm arm reports it either way. We claim "carried in", never "caused by".

ROCm may not reach bitwise Δ = 0

On ROCm, use_deterministic_algorithms doesn't reach hipBLASLt, and torch 2.10's AOTriton attention backward ignores the deterministic flag. Route: env vars in the launcher, math-backend attention, torch 2.13 if needed, then the pre-registered tolerance. If all of those fail, the fork-free detector and online undo lead.

The state share could be ≈ 0 after ~50 steps

At β2 = 0.95, v forgets in about 100 steps. Route: that is H2's prediction, and the result is "weight-carried after k steps", with the undo log as the in-window remedy.

A dumb clamp might match the clever repair

If v ← clip(v, a·v̄, b·v̄) matches certified restoration, localization adds nothing. Route: it is a required baseline. If it wins, it becomes the practical recommendation and localization becomes analysis.

"A 3-layer toy at step 160"

Route: a realistic proxy, a mid rung, 124M n = 5, borrowed Pythia and OPEN-1B states, and a scaling law that predicts held-out rungs. Molybog's small-scale caveat is quoted and answered, not hidden.

The undo log isn't new

Correct for the mechanism: SWIFT (TPDS 2024) inverts Adam one step back. Route: it is cited as the ancestor. Ours is the retroactive window, state only, the forward form with no error growth, and the direct/indirect path split.

08 · Read these first

Reading list (every entry verified at the source)

Full verified BibTeX: master-research/references.bib.

09 · Team

Who's building it

AreaOwnerState
Instrument (C1), spike pipeline, autopsy codeJasrajbuilt; Δ = 0 on CUDA and the MI300X · 3 spike recipes and the core undo battery ran in the pilot
BaselinesEddieSPAM · ZClip · AdaGC · skip-step · v-resets merged (PR #14); rollback-and-skip in PR #20 (lands after PR #18); not yet GPU-run
HVP (curvature)Avyanktoy double-backward HVP in PR #15 (needs fixes)
Localizer (C2) · statsAvyank (proposed)localizer unbuilt; output contract defined in PLAN V8 §6.4; stats.py written, more tests to come
Attribution (necessity and sufficiency)Arya (proposed)unbuilt; analysis/attribution.py holds the Gate B verdict and the TODOs
Repair (C3)Eddie (proposed)unbuilt (RML undo covers part of C3)
TheoryJasraj (interim, proposed)unbuilt
Figures and paperEknoornot started; figure list in PLAN V8 §2.6
ComputeAMD MI300X (via Avneh)T0 ✓ and an exploratory T1 pilot (2026-10-27); prereg-v2 dose sweep next