{"abstract":"Centered accumulator values are left at the wrong scale.","category":"Model quantization arithmetic","checks":6,"contract":"Subtract integer input zero point before applying multiplier and right shift, rounding once to nearest-even. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.","contract_signature":"codes, zero, multiplier, shift","evaluation_group":"quant-integer_requant","failed_approach":"The attempted code restores the right shift but subtracts the input zero point after rescaling, so the zero point is treated as output units.","family":"w3-model-quantization-arithmetic-zero-point-subtract-order","id":"FA-98696","implementations":{"attempt":{"sha256":"9977a383bfb2e55dc11893985ceec8892164b35d25b1157aa141f6b7dfa5f6eb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, zero, multiplier, shift):\n    return [round(q*multiplier/(1<<shift))-zero for q in codes]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('offset then scale',solve([N+3],N,3,1),[4])\ncheck('at zero',solve([N],N,3,2),[0])\ncheck('below zero',solve([N-2],N,3,1),[-3])\ncheck('empty',solve([],N,3,1),[])\ncheck('nonunit multiplier',solve([N+2],N,5,1),[5])\ncheck('single code',solve([N+1],N,1,0),[1])\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":"b78470ce68d8489fde0ae5c28ea1d82bfab5b8849e71f05aafe357f4e71545de","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, zero, multiplier, shift):\n    return [round((q-zero)*multiplier)-shift for q in codes]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('offset then scale',solve([N+3],N,3,1),[4])\ncheck('at zero',solve([N],N,3,2),[0])\ncheck('below zero',solve([N-2],N,3,1),[-3])\ncheck('empty',solve([],N,3,1),[])\ncheck('nonunit multiplier',solve([N+2],N,5,1),[5])\ncheck('single code',solve([N+1],N,1,0),[1])\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":"Toy scalar/list arithmetic only; it does not model a production quantizer, hardware instruction, or accuracy/performance gain. 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-model-quantization-arithmetic-zero-point-subtract-order","generated_at":"2026-09-30T16:48:15.842605+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic model isolates one quantization arithmetic contract from tensor storage and runtime kernels.","root_cause":"The broken path multiplies the centered code but subtracts the shift count instead of dividing by 2**shift.","sha256":"9b7746db814943fd19bccce2c844c7fbbfe85f287bf060af5286d20384154657","title":"Quantization: Input zero point correction skips right-shift rescaling · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":30.329,"exit_code":1,"observations":[{"actual":[5],"check":"offset then scale","expected":[4],"passed":false},{"actual":[0],"check":"at zero","expected":[0],"passed":true},{"actual":[-3],"check":"below zero","expected":[-3],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[7],"check":"nonunit multiplier","expected":[5],"passed":false},{"actual":[1],"check":"single code","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset then scale\", \"actual\": [5], \"expected\": [4], \"passed\": false}, {\"check\": \"at zero\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"below zero\", \"actual\": [-3], \"expected\": [-3], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"nonunit multiplier\", \"actual\": [7], \"expected\": [5], \"passed\": false}, {\"check\": \"single code\", \"actual\": [1], \"expected\": [1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.515,"exit_code":1,"observations":[{"actual":[8],"check":"offset then scale","expected":[4],"passed":false},{"actual":[-2],"check":"at zero","expected":[0],"passed":false},{"actual":[-7],"check":"below zero","expected":[-3],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[9],"check":"nonunit multiplier","expected":[5],"passed":false},{"actual":[1],"check":"single code","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset then scale\", \"actual\": [8], \"expected\": [4], \"passed\": false}, {\"check\": \"at zero\", \"actual\": [-2], \"expected\": [0], \"passed\": false}, {\"check\": \"below zero\", \"actual\": [-7], \"expected\": [-3], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"nonunit multiplier\", \"actual\": [9], \"expected\": [5], \"passed\": false}, {\"check\": \"single code\", \"actual\": [1], \"expected\": [1], \"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."}}