FAILURE MAP
← Case archive

FA-99036 / Optimizer update state / Open access

Resetting optimizer state leaves stale moments · case 01

Resetting optimizer state leaves stale moments.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A new training phase reuses prior momentum after an explicit reset.

THE FAILURE

A new training phase reuses prior momentum after an explicit reset.

Unsuccessful approach: Clearing only the first moment leaves variance history from the previous phase.

Case contract

Given [p,m,v,g,reset], reset moments to zero when requested, then apply one SGD-momentum step with mu=.5 and lr=1; return [p_next,m_next,v].

Why this case matters

Optimizer implementations must associate each parameter with its own mathematically specified update state.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(p, m, v, g, reset):
    nm=0.5*m+g
    return [p-nm,nm,v]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reset clears both',solve(10,8,12,2,True),[8,2,0])
check('ordinary carry',solve(10,8,12,2,False),[4,6,12])
check('reset negative gradient',solve(3,4,9,-2,True),[5,-2,0])
check('reset zero gradient',solve(5,7,6,0,True),[5,0,0])
check('ordinary zero gradient',solve(5,4,6,0,False),[3,2,6])
check('reset singleton',solve(N,1,2,1,True),[N-1,1,0])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
reset clears both[4.0, 6.0, 12][8, 2, 0]Failed
ordinary carry[4.0, 6.0, 12][4, 6, 12]Passed
reset negative gradient[3.0, 0.0, 9][5, -2, 0]Failed
reset zero gradient[1.5, 3.5, 6][5, 0, 0]Failed
ordinary zero gradient[3.0, 2.0, 6][3, 2, 6]Passed
reset singleton[-0.5, 1.5, 2][0, 1, 0]Failed

SHA-256 / 3fe9441857c5efde6a76a8f08c4578630b3375d3c9955684bb93178748d38c70

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(p, m, v, g, reset):
    base=0 if reset else m; nm=0.5*base+g
    return [p-nm,nm,v]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reset clears both',solve(10,8,12,2,True),[8,2,0])
check('ordinary carry',solve(10,8,12,2,False),[4,6,12])
check('reset negative gradient',solve(3,4,9,-2,True),[5,-2,0])
check('reset zero gradient',solve(5,7,6,0,True),[5,0,0])
check('ordinary zero gradient',solve(5,4,6,0,False),[3,2,6])
check('reset singleton',solve(N,1,2,1,True),[N-1,1,0])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
reset clears both[8.0, 2.0, 12][8, 2, 0]Failed
ordinary carry[4.0, 6.0, 12][4, 6, 12]Passed
reset negative gradient[5.0, -2.0, 9][5, -2, 0]Failed
reset zero gradient[5.0, 0.0, 6][5, 0, 0]Failed
ordinary zero gradient[3.0, 2.0, 6][3, 2, 6]Passed
reset singleton[0.0, 1.0, 2][0, 1, 0]Failed

SHA-256 / 611815eafb300d56a210384cfcaee31d55d840093c8bf7f9e1c4c03db4eb2308

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

These are deterministic scalar or short-vector toy contracts, not claims about production optimizer APIs or training quality. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:19.455634+00:00.

Case digest / 421d339072ce80f6c9dbf27f9145a02269a8449041c6c47be59abd6497b030b0