FAILURE MAP
← Case archive

FA-99021 / Optimizer update state / Open access

Missing gradient is confused with a zero gradient · case 01

Missing gradient is confused with a zero gradient.

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

ROOT CAUSE

An absent gradient decays moments as though an observed zero were supplied.

THE FAILURE

An absent gradient decays moments as though an observed zero were supplied.

Unsuccessful approach: Protecting the first moment for missing observations still decays the variance state on a skipped update.

Case contract

present=True denotes an observed zero gradient: halve m and v and leave p unchanged. present=False denotes no observation: preserve all three values.

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, present):
    nm=0.5*m; nv=0.5*v
    return [p,nm,nv]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('absent keeps moments',solve(3,4,8,False),[3,4,8])
check('present zero observation',solve(3,4,8,True),[3,2,4])
check('absent zero state',solve(0,0,0,False),[0,0,0])
check('absent negative parameter',solve(-N,2,6,False),[-N,2,6])
check('present singleton',solve(5,0,4,True),[5,0,2])
check('present nonzero',solve(1,-2,10,True),[1,-1,5])
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
absent keeps moments[3, 2.0, 4.0][3, 4, 8]Failed
present zero observation[3, 2.0, 4.0][3, 2, 4]Passed
absent zero state[0, 0.0, 0.0][0, 0, 0]Passed
absent negative parameter[-1, 1.0, 3.0][-1, 2, 6]Failed
present singleton[5, 0.0, 2.0][5, 0, 2]Passed
present nonzero[1, -1.0, 5.0][1, -1, 5]Passed

SHA-256 / c85cfff51163ecbec13d7bba4983fd63100e3bd38865f6fff14be8168953ecb3

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(p, m, v, present):
    return [p,m,0.5*v] if not present else [p,0.5*m,0.5*v]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('absent keeps moments',solve(3,4,8,False),[3,4,8])
check('present zero observation',solve(3,4,8,True),[3,2,4])
check('absent zero state',solve(0,0,0,False),[0,0,0])
check('absent negative parameter',solve(-N,2,6,False),[-N,2,6])
check('present singleton',solve(5,0,4,True),[5,0,2])
check('present nonzero',solve(1,-2,10,True),[1,-1,5])
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
absent keeps moments[3, 4, 4.0][3, 4, 8]Failed
present zero observation[3, 2.0, 4.0][3, 2, 4]Passed
absent zero state[0, 0, 0.0][0, 0, 0]Passed
absent negative parameter[-1, 2, 3.0][-1, 2, 6]Failed
present singleton[5, 0.0, 2.0][5, 0, 2]Passed
present nonzero[1, -1.0, 5.0][1, -1, 5]Passed

SHA-256 / 23efefa42b33d8ec1dd2fbb767f8f0ed61fbf10723d57d0d734d355f74b02954

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.455950+00:00.

Case digest / 36a004f3f7e700de77849efbda13e1c2ac7d1a627b603fc2338300e2c45fb4d5