{"abstract":"The output zero point changes with the requantization multiplier.","category":"Model quantization arithmetic","checks":6,"contract":"Requantize centered input codes by multiplier/2**shift, then add output zero point in output-code units. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.","contract_signature":"codes, in_zero, multiplier, shift, out_zero","evaluation_group":"quant-integer_requant","failed_approach":"The attempted code moves output offset outside the multiplier but still divides the output zero point by the accumulator shift; it must be added in output-code units afterward.","family":"w3-model-quantization-arithmetic-requant-output-offset","id":"FA-98701","implementations":{"attempt":{"sha256":"3f5c83900ca634b0e88d7121a77bd06e1fe02b85ec12a840fe99d37075fbbe04","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, in_zero, multiplier, shift, out_zero):\n    return [round((q-in_zero)*multiplier/(1<<shift)+out_zero/(1<<shift)) for q in codes]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('offset outside scale',solve([N+2],N,2,1,3),[5])\ncheck('input zero',solve([N],N,2,1,3),[3])\ncheck('negative centered value',solve([N-1],N,2,1,3),[2])\ncheck('empty',solve([],N,2,1,3),[])\ncheck('unit shift',solve([N+1],N,3,0,-2),[1])\ncheck('two codes',solve([N,N+2],N,2,1,0),[0,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":"10f412b03b9923a4005dcf72f490268f4d97bcd53a7de5766ea0413435e5afc8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, in_zero, multiplier, shift, out_zero):\n    return [round((q-in_zero+out_zero)*multiplier/(1<<shift)) for q in codes]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('offset outside scale',solve([N+2],N,2,1,3),[5])\ncheck('input zero',solve([N],N,2,1,3),[3])\ncheck('negative centered value',solve([N-1],N,2,1,3),[2])\ncheck('empty',solve([],N,2,1,3),[])\ncheck('unit shift',solve([N+1],N,3,0,-2),[1])\ncheck('two codes',solve([N,N+2],N,2,1,0),[0,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":"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-requant-output-offset","generated_at":"2026-09-30T16:48:15.842390+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 implementation adds output zero point to the centered input before multiplying and shifting it.","sha256":"ae830906da248c6d0f1417f3218e231c38f5e4bd2bf044b5e2042db64491b27a","title":"Quantization: Output zero point is scaled with the accumulator · 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.313,"exit_code":1,"observations":[{"actual":[4],"check":"offset outside scale","expected":[5],"passed":false},{"actual":[2],"check":"input zero","expected":[3],"passed":false},{"actual":[0],"check":"negative centered value","expected":[2],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1],"check":"unit shift","expected":[1],"passed":true},{"actual":[0,2],"check":"two codes","expected":[0,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset outside scale\", \"actual\": [4], \"expected\": [5], \"passed\": false}, {\"check\": \"input zero\", \"actual\": [2], \"expected\": [3], \"passed\": false}, {\"check\": \"negative centered value\", \"actual\": [0], \"expected\": [2], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unit shift\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"two codes\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.196,"exit_code":1,"observations":[{"actual":[5],"check":"offset outside scale","expected":[5],"passed":true},{"actual":[3],"check":"input zero","expected":[3],"passed":true},{"actual":[2],"check":"negative centered value","expected":[2],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[-3],"check":"unit shift","expected":[1],"passed":false},{"actual":[0,2],"check":"two codes","expected":[0,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset outside scale\", \"actual\": [5], \"expected\": [5], \"passed\": true}, {\"check\": \"input zero\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"negative centered value\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unit shift\", \"actual\": [-3], \"expected\": [1], \"passed\": false}, {\"check\": \"two codes\", \"actual\": [0, 2], \"expected\": [0, 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."}}