{"abstract":"Momentum state stores the descent direction rather than gradient history.","category":"Optimizer update state","checks":6,"contract":"State stores gradient-direction velocity; update p-lr*v_next.","contract_signature":"p, g, v, lr, mu","evaluation_group":"optimizer-toy-momentum-sign","failed_approach":"Adding the signed velocity to the parameter repairs a fresh-buffer step but still stores gradient history under the opposite sign convention.","family":"w3-optimizer-update-state-momentum-sign","id":"FA-98961","implementations":{"attempt":{"sha256":"e8b163e63cbdbc11a0a13643d33c735f462aaa1d8f32bfcf669d8c8161e71b6b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(p, g, v, lr, mu):\n    nv=mu*v-g\n    return [p+lr*nv,nv]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('positive input',solve(5,2,0,1,0.5),[3,2])\ncheck('negative input',solve(5,-2,0,1,0.5),[7,-2])\ncheck('old positive state',solve(10,1,4,1,0.5),[7,3])\ncheck('old negative state',solve(10,1,-4,1,0.5),[11,-1])\ncheck('zero gradient',solve(3,0,8,1,0.5),[-1,4])\ncheck('zero rate still evolves state',solve(2,-3,6,0,0.5),[2,0])\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":"d2df2770bc5c6acd98cbf483542579d34a73eaf13226618e00112c25cf04f6f9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(p, g, v, lr, mu):\n    nv=mu*v-g\n    return [p-lr*nv,nv]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('positive input',solve(5,2,0,1,0.5),[3,2])\ncheck('negative input',solve(5,-2,0,1,0.5),[7,-2])\ncheck('old positive state',solve(10,1,4,1,0.5),[7,3])\ncheck('old negative state',solve(10,1,-4,1,0.5),[11,-1])\ncheck('zero gradient',solve(3,0,8,1,0.5),[-1,4])\ncheck('zero rate still evolves state',solve(2,-3,6,0,0.5),[2,0])\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-momentum-sign","generated_at":"2026-09-30T16:48:19.000023+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 velocity sign convention is inconsistent with the parameter subtraction.","sha256":"71ce066a05189eaf19705d2d18bb82dcb382cc39efe6b829b6c9074f68ff6800","title":"Momentum state stores the descent direction rather than gradient history · 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.49,"exit_code":1,"observations":[{"actual":[3.0,-2.0],"check":"positive input","expected":[3,2],"passed":false},{"actual":[7.0,2.0],"check":"negative input","expected":[7,-2],"passed":false},{"actual":[11.0,1.0],"check":"old positive state","expected":[7,3],"passed":false},{"actual":[7.0,-3.0],"check":"old negative state","expected":[11,-1],"passed":false},{"actual":[7.0,4.0],"check":"zero gradient","expected":[-1,4],"passed":false},{"actual":[2.0,6.0],"check":"zero rate still evolves state","expected":[2,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive input\", \"actual\": [3.0, -2.0], \"expected\": [3, 2], \"passed\": false}, {\"check\": \"negative input\", \"actual\": [7.0, 2.0], \"expected\": [7, -2], \"passed\": false}, {\"check\": \"old positive state\", \"actual\": [11.0, 1.0], \"expected\": [7, 3], \"passed\": false}, {\"check\": \"old negative state\", \"actual\": [7.0, -3.0], \"expected\": [11, -1], \"passed\": false}, {\"check\": \"zero gradient\", \"actual\": [7.0, 4.0], \"expected\": [-1, 4], \"passed\": false}, {\"check\": \"zero rate still evolves state\", \"actual\": [2.0, 6.0], \"expected\": [2, 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":33.654,"exit_code":1,"observations":[{"actual":[7.0,-2.0],"check":"positive input","expected":[3,2],"passed":false},{"actual":[3.0,2.0],"check":"negative input","expected":[7,-2],"passed":false},{"actual":[9.0,1.0],"check":"old positive state","expected":[7,3],"passed":false},{"actual":[13.0,-3.0],"check":"old negative state","expected":[11,-1],"passed":false},{"actual":[-1.0,4.0],"check":"zero gradient","expected":[-1,4],"passed":true},{"actual":[2.0,6.0],"check":"zero rate still evolves state","expected":[2,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive input\", \"actual\": [7.0, -2.0], \"expected\": [3, 2], \"passed\": false}, {\"check\": \"negative input\", \"actual\": [3.0, 2.0], \"expected\": [7, -2], \"passed\": false}, {\"check\": \"old positive state\", \"actual\": [9.0, 1.0], \"expected\": [7, 3], \"passed\": false}, {\"check\": \"old negative state\", \"actual\": [13.0, -3.0], \"expected\": [11, -1], \"passed\": false}, {\"check\": \"zero gradient\", \"actual\": [-1.0, 4.0], \"expected\": [-1, 4], \"passed\": true}, {\"check\": \"zero rate still evolves state\", \"actual\": [2.0, 6.0], \"expected\": [2, 0], \"passed\": false}], \"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."}}