{"abstract":"AMSGrad forgets the historical maximum variance.","category":"Optimizer update state","checks":6,"contract":"Return [max(old_max,vhat), lr*mhat/(sqrt(maximum)+eps)].","contract_signature":"m, v, oldmax, lr, b1, b2, t, eps","evaluation_group":"optimizer-toy-amsgrad-maximum","failed_approach":"Taking max of raw variance fixes monotonicity but mixes corrected and uncorrected scales.","family":"w3-optimizer-update-state-amsgrad-maximum","id":"FA-98986","implementations":{"attempt":{"sha256":"23d4f528690fde8c2066979fa026dd170a1bf8ac94a2bec05b7baea42b369e0a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(m, v, oldmax, lr, b1, b2, t, eps):\n    mh=m/(1-b1**t); vh=v/(1-b2**t); vmax=max(oldmax,v)\n    return [vmax,lr*mh/(vmax**0.5+eps)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new maximum',solve(2,2,0,1,0.5,0.5,1,0),[4,2])\ncheck('retain historical',solve(1,1,9,1,0.5,0.5,1,0),[9,2/3])\ncheck('equal maximum',solve(1,2,4,1,0.5,0.5,1,0),[4,1])\ncheck('zero numerator',solve(0,2,0,1,0.5,0.5,1,1),[4,0])\ncheck('later corrected variance',solve(1,3,1,1,0.5,0.5,2,0),[4,2/3])\ncheck('epsilon denominator',solve(1,2,0,2,0.5,0.5,1,1),[4,4/3])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"5d0e6d3527d77e3deca5f29bfba61fee132ee96e88aceac8b3291f40fb62b8b5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(m, v, oldmax, lr, b1, b2, t, eps):\n    mh=m/(1-b1**t); vh=v/(1-b2**t)\n    return [vh,lr*mh/(vh**0.5+eps)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new maximum',solve(2,2,0,1,0.5,0.5,1,0),[4,2])\ncheck('retain historical',solve(1,1,9,1,0.5,0.5,1,0),[9,2/3])\ncheck('equal maximum',solve(1,2,4,1,0.5,0.5,1,0),[4,1])\ncheck('zero numerator',solve(0,2,0,1,0.5,0.5,1,1),[4,0])\ncheck('later corrected variance',solve(1,3,1,1,0.5,0.5,2,0),[4,2/3])\ncheck('epsilon denominator',solve(1,2,0,2,0.5,0.5,1,1),[4,4/3])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-optimizer-update-state-amsgrad-maximum","generated_at":"2026-09-30T16:48:19.000054+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Optimizer implementations must associate each parameter with its own mathematically specified update state.","root_cause":"The denominator uses only the current second-moment estimate.","sha256":"b022592da996708feab20a6af90b92b8c960000b129d27658ce56c7c09886bc1","title":"AMSGrad forgets the historical maximum variance · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":30.673,"exit_code":1,"observations":[{"actual":[2,2.82842712474619],"check":"new maximum","expected":[4,2],"passed":false},{"actual":[9,0.6666666666666666],"check":"retain historical","expected":[9,0.6666666666666666],"passed":true},{"actual":[4,1.0],"check":"equal maximum","expected":[4,1],"passed":true},{"actual":[2,0.0],"check":"zero numerator","expected":[4,0],"passed":false},{"actual":[3,0.769800358919501],"check":"later corrected variance","expected":[4,0.6666666666666666],"passed":false},{"actual":[2,1.6568542494923804],"check":"epsilon denominator","expected":[4,1.3333333333333333],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new maximum\", \"actual\": [2, 2.82842712474619], \"expected\": [4, 2], \"passed\": false}, {\"check\": \"retain historical\", \"actual\": [9, 0.6666666666666666], \"expected\": [9, 0.6666666666666666], \"passed\": true}, {\"check\": \"equal maximum\", \"actual\": [4, 1.0], \"expected\": [4, 1], \"passed\": true}, {\"check\": \"zero numerator\", \"actual\": [2, 0.0], \"expected\": [4, 0], \"passed\": false}, {\"check\": \"later corrected variance\", \"actual\": [3, 0.769800358919501], \"expected\": [4, 0.6666666666666666], \"passed\": false}, {\"check\": \"epsilon denominator\", \"actual\": [2, 1.6568542494923804], \"expected\": [4, 1.3333333333333333], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":32.1,"exit_code":1,"observations":[{"actual":[4.0,2.0],"check":"new maximum","expected":[4,2],"passed":true},{"actual":[2.0,1.414213562373095],"check":"retain historical","expected":[9,0.6666666666666666],"passed":false},{"actual":[4.0,1.0],"check":"equal maximum","expected":[4,1],"passed":true},{"actual":[4.0,0.0],"check":"zero numerator","expected":[4,0],"passed":true},{"actual":[4.0,0.6666666666666666],"check":"later corrected variance","expected":[4,0.6666666666666666],"passed":true},{"actual":[4.0,1.3333333333333333],"check":"epsilon denominator","expected":[4,1.3333333333333333],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new maximum\", \"actual\": [4.0, 2.0], \"expected\": [4, 2], \"passed\": true}, {\"check\": \"retain historical\", \"actual\": [2.0, 1.414213562373095], \"expected\": [9, 0.6666666666666666], \"passed\": false}, {\"check\": \"equal maximum\", \"actual\": [4.0, 1.0], \"expected\": [4, 1], \"passed\": true}, {\"check\": \"zero numerator\", \"actual\": [4.0, 0.0], \"expected\": [4, 0], \"passed\": true}, {\"check\": \"later corrected variance\", \"actual\": [4.0, 0.6666666666666666], \"expected\": [4, 0.6666666666666666], \"passed\": true}, {\"check\": \"epsilon denominator\", \"actual\": [4.0, 1.3333333333333333], \"expected\": [4, 1.3333333333333333], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}