{"abstract":"Per-channel zero points broadcast by row.","category":"Model quantization arithmetic","checks":6,"contract":"Rows contain values and columns are channels. Quantize each value with its column scale and zero offset (value-zero)/scale. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.","contract_signature":"rows, scales, zeros","evaluation_group":"quant-per_channel_zero_offset","failed_approach":"The attempted code selects zero points by row index while scales use columns; it repairs only fixtures where row and channel offsets coincide.","family":"w3-model-quantization-arithmetic-per-channel-zero","id":"FA-98656","implementations":{"attempt":{"sha256":"16738e00296afa20a375a0807ec166fbdc669aa3fbd05b225f613e69a13d2731","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, scales, zeros):\n    return [[round((v-zeros[min(i,len(zeros)-1)])/scales[j]) for j,v in enumerate(row)] for i,row in enumerate(rows)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('distinct channel offsets',solve([[5,12],[7,18]],[2,3],[1,3]),[[2,3],[3,5]])\ncheck('one row',solve([[3,9]],[1,2],[1,3]),[[2,3]])\ncheck('empty',solve([],[],[]),[])\ncheck('zero residual',solve([[4,6]],[2,3],[4,6]),[[0,0]])\ncheck('negative residual',solve([[0,0]],[2,4],[2,4]),[[-1,-1]])\ncheck('single column',solve([[7],[9]],[2],[3]),[[2],[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":"fe8edb0621973f8d984e8a811377633824b9a30fb21b35efa1d4998aa7e493af","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, scales, zeros):\n    return [[round((v-zeros[0])/scales[j]) for j,v in enumerate(row)] for row in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('distinct channel offsets',solve([[5,12],[7,18]],[2,3],[1,3]),[[2,3],[3,5]])\ncheck('one row',solve([[3,9]],[1,2],[1,3]),[[2,3]])\ncheck('empty',solve([],[],[]),[])\ncheck('zero residual',solve([[4,6]],[2,3],[4,6]),[[0,0]])\ncheck('negative residual',solve([[0,0]],[2,4],[2,4]),[[-1,-1]])\ncheck('single column',solve([[7],[9]],[2],[3]),[[2],[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":"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-per-channel-zero","generated_at":"2026-09-30T16:48:15.403520+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":"Rows contain values and columns are channels. Quantize each value with its column scale and zero offset (value-zero)/scale.","sha256":"79ea53e28c4b90b34ab722457ab95f53bbf33878b136dc81ac679c8a6d2f11bf","title":"Quantization: Per-channel zero points broadcast by row · 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":28.26,"exit_code":1,"observations":[{"actual":[[2,4],[2,5]],"check":"distinct channel offsets","expected":[[2,3],[3,5]],"passed":false},{"actual":[[2,4]],"check":"one row","expected":[[2,3]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,1]],"check":"zero residual","expected":[[0,0]],"passed":false},{"actual":[[-1,0]],"check":"negative residual","expected":[[-1,-1]],"passed":false},{"actual":[[2],[3]],"check":"single column","expected":[[2],[3]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"distinct channel offsets\", \"actual\": [[2, 4], [2, 5]], \"expected\": [[2, 3], [3, 5]], \"passed\": false}, {\"check\": \"one row\", \"actual\": [[2, 4]], \"expected\": [[2, 3]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero residual\", \"actual\": [[0, 1]], \"expected\": [[0, 0]], \"passed\": false}, {\"check\": \"negative residual\", \"actual\": [[-1, 0]], \"expected\": [[-1, -1]], \"passed\": false}, {\"check\": \"single column\", \"actual\": [[2], [3]], \"expected\": [[2], [3]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.127,"exit_code":1,"observations":[{"actual":[[2,4],[3,6]],"check":"distinct channel offsets","expected":[[2,3],[3,5]],"passed":false},{"actual":[[2,4]],"check":"one row","expected":[[2,3]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,1]],"check":"zero residual","expected":[[0,0]],"passed":false},{"actual":[[-1,0]],"check":"negative residual","expected":[[-1,-1]],"passed":false},{"actual":[[2],[3]],"check":"single column","expected":[[2],[3]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"distinct channel offsets\", \"actual\": [[2, 4], [3, 6]], \"expected\": [[2, 3], [3, 5]], \"passed\": false}, {\"check\": \"one row\", \"actual\": [[2, 4]], \"expected\": [[2, 3]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero residual\", \"actual\": [[0, 1]], \"expected\": [[0, 0]], \"passed\": false}, {\"check\": \"negative residual\", \"actual\": [[-1, 0]], \"expected\": [[-1, -1]], \"passed\": false}, {\"check\": \"single column\", \"actual\": [[2], [3]], \"expected\": [[2], [3]], \"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."}}