{"abstract":"Per-channel scales follow the wrong axis.","category":"Model quantization arithmetic","checks":6,"contract":"Each row represents one output channel and each column an input value; divide column j by scales[j], round-to-even. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.","contract_signature":"rows, scales","evaluation_group":"quant-per_channel_scale_axis","failed_approach":"The attempted code uses the row index for scale selection instead of the column index; it fails for multi-column rows and does not select a scale per value.","family":"w3-model-quantization-arithmetic-channel-axis","id":"FA-98651","implementations":{"attempt":{"sha256":"284b1c367ea5848abbd4764000bde4fabb4e7cb18f2e01d5439183f8938a0173","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, scales):\n    return [[round(v/scales[min(i,len(scales)-1)]) for v in 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('two channels',solve([[2*N,6*N],[4*N,8*N]], [2,4]),[[N,round(3*N/2)],[2*N,2*N]])\ncheck('one row',solve([[6*N,8*N]],[2,4]),[[3*N,2*N]])\ncheck('empty rows',solve([], [2,4]),[])\ncheck('one column',solve([[6*N],[8*N]],[2]),[[3*N],[4*N]])\ncheck('varying scales',solve([[4,12],[8,16]],[4,2]),[[1,6],[2,8]])\ncheck('unit scales',solve([[N,N+1]],[1,1]),[[N,N+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":"9f335ec30efdc01f56f34abbb87543cca54656f424b49d0e9377a0c86b1e22ed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, scales):\n    return [[round(v/scales[0]) for v in row] for row in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two channels',solve([[2*N,6*N],[4*N,8*N]], [2,4]),[[N,round(3*N/2)],[2*N,2*N]])\ncheck('one row',solve([[6*N,8*N]],[2,4]),[[3*N,2*N]])\ncheck('empty rows',solve([], [2,4]),[])\ncheck('one column',solve([[6*N],[8*N]],[2]),[[3*N],[4*N]])\ncheck('varying scales',solve([[4,12],[8,16]],[4,2]),[[1,6],[2,8]])\ncheck('unit scales',solve([[N,N+1]],[1,1]),[[N,N+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-channel-axis","generated_at":"2026-09-30T16:48:15.403463+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":"Each row represents one output channel and each column an input value; divide column j by scales[j], round-to-even.","sha256":"865492820648892d180b1532c4aa8a9976862e474841284ac76ea4529bc33a0e","title":"Quantization: Per-channel scales follow the wrong axis · 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":28.716,"exit_code":1,"observations":[{"actual":[[1,3],[1,2]],"check":"two channels","expected":[[1,2],[2,2]],"passed":false},{"actual":[[3,4]],"check":"one row","expected":[[3,2]],"passed":false},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[[3],[4]],"check":"one column","expected":[[3],[4]],"passed":true},{"actual":[[1,3],[4,8]],"check":"varying scales","expected":[[1,6],[2,8]],"passed":false},{"actual":[[1,2]],"check":"unit scales","expected":[[1,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two channels\", \"actual\": [[1, 3], [1, 2]], \"expected\": [[1, 2], [2, 2]], \"passed\": false}, {\"check\": \"one row\", \"actual\": [[3, 4]], \"expected\": [[3, 2]], \"passed\": false}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one column\", \"actual\": [[3], [4]], \"expected\": [[3], [4]], \"passed\": true}, {\"check\": \"varying scales\", \"actual\": [[1, 3], [4, 8]], \"expected\": [[1, 6], [2, 8]], \"passed\": false}, {\"check\": \"unit scales\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.894,"exit_code":1,"observations":[{"actual":[[1,3],[2,4]],"check":"two channels","expected":[[1,2],[2,2]],"passed":false},{"actual":[[3,4]],"check":"one row","expected":[[3,2]],"passed":false},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[[3],[4]],"check":"one column","expected":[[3],[4]],"passed":true},{"actual":[[1,3],[2,4]],"check":"varying scales","expected":[[1,6],[2,8]],"passed":false},{"actual":[[1,2]],"check":"unit scales","expected":[[1,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two channels\", \"actual\": [[1, 3], [2, 4]], \"expected\": [[1, 2], [2, 2]], \"passed\": false}, {\"check\": \"one row\", \"actual\": [[3, 4]], \"expected\": [[3, 2]], \"passed\": false}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one column\", \"actual\": [[3], [4]], \"expected\": [[3], [4]], \"passed\": true}, {\"check\": \"varying scales\", \"actual\": [[1, 3], [2, 4]], \"expected\": [[1, 6], [2, 8]], \"passed\": false}, {\"check\": \"unit scales\", \"actual\": [[1, 2]], \"expected\": [[1, 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."}}