{"abstract":"Adam second moment keeps a signed gradient.","category":"Optimizer update state","checks":6,"contract":"v_next=b2*v+(1-b2)*g*g.","contract_signature":"g, v, b2","evaluation_group":"optimizer-toy-adam-second-moment","failed_approach":"Taking the absolute gradient prevents negative state but still omits squaring.","family":"w3-optimizer-update-state-adam-second-moment","id":"FA-98971","implementations":{"attempt":{"sha256":"9ae5e90531a6c2e01921d98e8c793c05ab18cf09808fef954101e436e1438699","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(g, v, b2):\n    return b2*v+(1-b2)*abs(g)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('positive gradient',solve(4,0,0.5),8)\ncheck('negative gradient',solve(-4,0,0.5),8)\ncheck('prior state',solve(2,6,0.5),5)\ncheck('beta zero',solve(3,7,0),9)\ncheck('beta one',solve(-2,5,1),5)\ncheck('zero gradient decays',solve(0,8,0.25),2)\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":"3c3dca2a42a3575945d28da3e38304a19b4c5c94b160ac057754b07961760f3e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(g, v, b2):\n    return b2*v+(1-b2)*g\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('positive gradient',solve(4,0,0.5),8)\ncheck('negative gradient',solve(-4,0,0.5),8)\ncheck('prior state',solve(2,6,0.5),5)\ncheck('beta zero',solve(3,7,0),9)\ncheck('beta one',solve(-2,5,1),5)\ncheck('zero gradient decays',solve(0,8,0.25),2)\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-adam-second-moment","generated_at":"2026-09-30T16:48:19.000011+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 squared-gradient accumulator uses g rather than g squared.","sha256":"2b82518cab127119fbca44000b98dcc403d7e01e2178f98147d88b38c551c314","title":"Adam second moment keeps a signed gradient · 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.705,"exit_code":1,"observations":[{"actual":2.0,"check":"positive gradient","expected":8,"passed":false},{"actual":2.0,"check":"negative gradient","expected":8,"passed":false},{"actual":4.0,"check":"prior state","expected":5,"passed":false},{"actual":3,"check":"beta zero","expected":9,"passed":false},{"actual":5,"check":"beta one","expected":5,"passed":true},{"actual":2.0,"check":"zero gradient decays","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive gradient\", \"actual\": 2.0, \"expected\": 8, \"passed\": false}, {\"check\": \"negative gradient\", \"actual\": 2.0, \"expected\": 8, \"passed\": false}, {\"check\": \"prior state\", \"actual\": 4.0, \"expected\": 5, \"passed\": false}, {\"check\": \"beta zero\", \"actual\": 3, \"expected\": 9, \"passed\": false}, {\"check\": \"beta one\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"zero gradient decays\", \"actual\": 2.0, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":32.315,"exit_code":1,"observations":[{"actual":2.0,"check":"positive gradient","expected":8,"passed":false},{"actual":-2.0,"check":"negative gradient","expected":8,"passed":false},{"actual":4.0,"check":"prior state","expected":5,"passed":false},{"actual":3,"check":"beta zero","expected":9,"passed":false},{"actual":5,"check":"beta one","expected":5,"passed":true},{"actual":2.0,"check":"zero gradient decays","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive gradient\", \"actual\": 2.0, \"expected\": 8, \"passed\": false}, {\"check\": \"negative gradient\", \"actual\": -2.0, \"expected\": 8, \"passed\": false}, {\"check\": \"prior state\", \"actual\": 4.0, \"expected\": 5, \"passed\": false}, {\"check\": \"beta zero\", \"actual\": 3, \"expected\": 9, \"passed\": false}, {\"check\": \"beta one\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"zero gradient decays\", \"actual\": 2.0, \"expected\": 2, \"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."}}