FAILURE MAP
← Case archive

FA-98981 / Optimizer update state / Open access

Adam epsilon is scaled by the second-moment correction · case 01

Adam epsilon is scaled by the second-moment correction.

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

ROOT CAUSE

The denominator divides epsilon by the second-moment correction factor, changing its configured magnitude.

THE FAILURE

The denominator divides epsilon by the second-moment correction factor, changing its configured magnitude.

Unsuccessful approach: Moving epsilon inside sqrt(vhat+eps) changes its units and the update magnitude.

Case contract

Return lr*mhat/(sqrt(vhat)+eps), where mhat=m/(1-b1**t), vhat=v/(1-b2**t).

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(m, v, lr, b1, b2, t, eps):
    mh=m/(1-b1**t); vh=v/(1-b2**t)
    return lr*mh/(vh**0.5+eps/(1-b2**t))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unit corrected root',solve(1,2,1,0.5,0.5,1,1),2/3)
check('epsilon matters',solve(2,8,1,0.5,0.5,1,1),4/5)
check('zero epsilon',solve(1,8,0.5,0.5,0.5,1,0),0.25)
check('rate scales result',solve(1,2,2,0.5,0.5,1,1),4/3)
check('zero first moment',solve(0,2,3,0.5,0.5,1,0.25),0)
check('later step',solve(2,3,1,0.5,0.5,2,1),(8/3)/3)
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
unit corrected root0.50.6666666666666666Failed
epsilon matters0.66666666666666660.8Failed
zero epsilon0.250.25Passed
rate scales result1.01.3333333333333333Failed
zero first moment0.00Passed
later step0.80.8888888888888888Failed

SHA-256 / fbbfc1574a2f08dd2e809b0130d3f001c9f624427117fa9b5c29ec44f5b30cac

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(m, v, lr, b1, b2, t, eps):
    mh=m/(1-b1**t); vh=v/(1-b2**t)
    return lr*mh/((vh+eps)**0.5)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unit corrected root',solve(1,2,1,0.5,0.5,1,1),2/3)
check('epsilon matters',solve(2,8,1,0.5,0.5,1,1),4/5)
check('zero epsilon',solve(1,8,0.5,0.5,0.5,1,0),0.25)
check('rate scales result',solve(1,2,2,0.5,0.5,1,1),4/3)
check('zero first moment',solve(0,2,3,0.5,0.5,1,0.25),0)
check('later step',solve(2,3,1,0.5,0.5,2,1),(8/3)/3)
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
unit corrected root0.89442719099991590.6666666666666666Failed
epsilon matters0.97014250014533190.8Failed
zero epsilon0.250.25Passed
rate scales result1.78885438199983171.3333333333333333Failed
zero first moment0.00Passed
later step1.19256958799988770.8888888888888888Failed

SHA-256 / 73fffa5702539e2197e5e27273c163dcd6eb293ca27bd2ddc3eeaddfaf93a5dc

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

Case digest / acda12c2c8c815918a9e4a180c7ce1eb06a2d5731f2860b0af89c413f5fed12d