{"abstract":"Batch normalization scales by the entire batch norm.","category":"Embedding vector normalization","checks":6,"contract":"Return same-shaped rows independently L2-normalized; zero rows stay zero; empty batch stays empty.","contract_signature":"rows","evaluation_group":"embedding-rowwise-l2-unit","failed_approach":"Normalizing by L1 length per row still fails the Euclidean unit contract.","family":"w3-embedding-vector-normalization-row-wise-unit","id":"FA-99401","implementations":{"attempt":{"sha256":"1b244bb7cc4c94d33a56c65e74d09b87fdb2fd7d8150d62962dbf00d3a98025f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return [[x/sum(abs(y) for y in row) for x in row] if any(row) else list(row) for row in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('different lengths', solve([[3,4],[N,0]]), [[0.6,0.8],[1.0,0.0]])\ncheck('zero row', solve([[0,0],[0,N]]), [[0,0],[0.0,1.0]])\ncheck('empty batch', solve([]), [])\ncheck('empty row', solve([[]]), [[]])\ncheck('single row', solve([[N,N]]), [[N/(2*N*N)**0.5,N/(2*N*N)**0.5]])\ncheck('negative row', solve([[-3,4],[0,0]]), [[-0.6,0.8],[0,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":"cc1a98a85709bf9ea27377c1ae77af076c2283b1e250f06dc04daf3686dc52a8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    length=sum(x*x for row in rows for x in row)**0.5\n    return [[x/length for x in row] for row in rows] if length else [list(r) for r in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('different lengths', solve([[3,4],[N,0]]), [[0.6,0.8],[1.0,0.0]])\ncheck('zero row', solve([[0,0],[0,N]]), [[0,0],[0.0,1.0]])\ncheck('empty batch', solve([]), [])\ncheck('empty row', solve([[]]), [[]])\ncheck('single row', solve([[N,N]]), [[N/(2*N*N)**0.5,N/(2*N*N)**0.5]])\ncheck('negative row', solve([[-3,4],[0,0]]), [[-0.6,0.8],[0,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":"Inputs are finite toy vectors or token rows; this contract makes no claim about model quality or production embedding behavior. 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-embedding-vector-normalization-row-wise-unit","generated_at":"2026-09-30T16:48:24.023532+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small embedding preparation contract can be checked without a model or retrieval system.","root_cause":"All rows share one global scale and individual rows retain different lengths.","sha256":"6f53fc70ca93b604c9051a1a6e6cc7a8dd46c7498f2d85ddcc6ec93161bb31fb","title":"Batch normalization scales by the entire batch norm · 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":29.994,"exit_code":1,"observations":[{"actual":[[0.42857142857142855,0.5714285714285714],[1.0,0.0]],"check":"different lengths","expected":[[0.6,0.8],[1.0,0.0]],"passed":false},{"actual":[[0,0],[0.0,1.0]],"check":"zero row","expected":[[0,0],[0.0,1.0]],"passed":true},{"actual":[],"check":"empty batch","expected":[],"passed":true},{"actual":[[]],"check":"empty row","expected":[[]],"passed":true},{"actual":[[0.5,0.5]],"check":"single row","expected":[[0.7071067811865475,0.7071067811865475]],"passed":false},{"actual":[[-0.42857142857142855,0.5714285714285714],[0,0]],"check":"negative row","expected":[[-0.6,0.8],[0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different lengths\", \"actual\": [[0.42857142857142855, 0.5714285714285714], [1.0, 0.0]], \"expected\": [[0.6, 0.8], [1.0, 0.0]], \"passed\": false}, {\"check\": \"zero row\", \"actual\": [[0, 0], [0.0, 1.0]], \"expected\": [[0, 0], [0.0, 1.0]], \"passed\": true}, {\"check\": \"empty batch\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"single row\", \"actual\": [[0.5, 0.5]], \"expected\": [[0.7071067811865475, 0.7071067811865475]], \"passed\": false}, {\"check\": \"negative row\", \"actual\": [[-0.42857142857142855, 0.5714285714285714], [0, 0]], \"expected\": [[-0.6, 0.8], [0, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.901,"exit_code":1,"observations":[{"actual":[[0.5883484054145521,0.7844645405527362],[0.19611613513818404,0.0]],"check":"different lengths","expected":[[0.6,0.8],[1.0,0.0]],"passed":false},{"actual":[[0.0,0.0],[0.0,1.0]],"check":"zero row","expected":[[0,0],[0.0,1.0]],"passed":true},{"actual":[],"check":"empty batch","expected":[],"passed":true},{"actual":[[]],"check":"empty row","expected":[[]],"passed":true},{"actual":[[0.7071067811865475,0.7071067811865475]],"check":"single row","expected":[[0.7071067811865475,0.7071067811865475]],"passed":true},{"actual":[[-0.6,0.8],[0.0,0.0]],"check":"negative row","expected":[[-0.6,0.8],[0,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different lengths\", \"actual\": [[0.5883484054145521, 0.7844645405527362], [0.19611613513818404, 0.0]], \"expected\": [[0.6, 0.8], [1.0, 0.0]], \"passed\": false}, {\"check\": \"zero row\", \"actual\": [[0.0, 0.0], [0.0, 1.0]], \"expected\": [[0, 0], [0.0, 1.0]], \"passed\": true}, {\"check\": \"empty batch\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"single row\", \"actual\": [[0.7071067811865475, 0.7071067811865475]], \"expected\": [[0.7071067811865475, 0.7071067811865475]], \"passed\": true}, {\"check\": \"negative row\", \"actual\": [[-0.6, 0.8], [0.0, 0.0]], \"expected\": [[-0.6, 0.8], [0, 0]], \"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."}}