{"abstract":"Batch centering subtracts a row average.","category":"Embedding vector normalization","checks":6,"contract":"For a rectangular matrix subtract each feature mean; preserve shape and return empty for no rows.","contract_signature":"rows","evaluation_group":"embedding-batch-feature-centering","failed_approach":"Subtracting one global scalar mean centers neither feature independently.","family":"w3-embedding-vector-normalization-batch-centering","id":"FA-99406","implementations":{"attempt":{"sha256":"6f02687aadf5a204791b9f92e388f7e24949eab54e5025ea52b0b89b545e69f9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    mean=sum(x for row in rows for x in row)/(sum(len(row) for row in rows)) if rows and any(rows) else 0\n    return [[x-mean for x in row] for row in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('independent feature offsets', solve([[0,10],[2,14]]), [[-1,-2],[1,2]])\ncheck('three rows', solve([[0,0],[N,0],[0,N]]), [[-N/3,-N/3],[N-N/3,-N/3],[-N/3,N-N/3]])\ncheck('singleton', solve([[N,2*N]]), [[0,0]])\ncheck('empty batch', solve([]), [])\ncheck('one feature', solve([[1],[3],[5]]), [[-2],[0],[2]])\ncheck('constant features', solve([[N,N],[N,N]]), [[0,0],[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":"a1ca0d420fc0600ce391643e34e09e1706ef579e910cc1c5dca2b491e700b054","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return [[x-sum(row)/len(row) for x in row] for row in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('independent feature offsets', solve([[0,10],[2,14]]), [[-1,-2],[1,2]])\ncheck('three rows', solve([[0,0],[N,0],[0,N]]), [[-N/3,-N/3],[N-N/3,-N/3],[-N/3,N-N/3]])\ncheck('singleton', solve([[N,2*N]]), [[0,0]])\ncheck('empty batch', solve([]), [])\ncheck('one feature', solve([[1],[3],[5]]), [[-2],[0],[2]])\ncheck('constant features', solve([[N,N],[N,N]]), [[0,0],[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-batch-centering","generated_at":"2026-09-30T16:48:24.023892+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":"Each sample has its own average removed instead of each feature sharing a batch mean.","sha256":"bbfdb81bf2561d78982d606424853c336b68cbb2d269aa107230db51ace106e3","title":"Batch centering subtracts a row average · 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.448,"exit_code":1,"observations":[{"actual":[[-6.5,3.5],[-4.5,7.5]],"check":"independent feature offsets","expected":[[-1,-2],[1,2]],"passed":false},{"actual":[[-0.3333333333333333,-0.3333333333333333],[0.6666666666666667,-0.3333333333333333],[-0.3333333333333333,0.6666666666666667]],"check":"three rows","expected":[[-0.3333333333333333,-0.3333333333333333],[0.6666666666666667,-0.3333333333333333],[-0.3333333333333333,0.6666666666666667]],"passed":true},{"actual":[[-0.5,0.5]],"check":"singleton","expected":[[0,0]],"passed":false},{"actual":[],"check":"empty batch","expected":[],"passed":true},{"actual":[[-2.0],[0.0],[2.0]],"check":"one feature","expected":[[-2],[0],[2]],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0]],"check":"constant features","expected":[[0,0],[0,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"independent feature offsets\", \"actual\": [[-6.5, 3.5], [-4.5, 7.5]], \"expected\": [[-1, -2], [1, 2]], \"passed\": false}, {\"check\": \"three rows\", \"actual\": [[-0.3333333333333333, -0.3333333333333333], [0.6666666666666667, -0.3333333333333333], [-0.3333333333333333, 0.6666666666666667]], \"expected\": [[-0.3333333333333333, -0.3333333333333333], [0.6666666666666667, -0.3333333333333333], [-0.3333333333333333, 0.6666666666666667]], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[-0.5, 0.5]], \"expected\": [[0, 0]], \"passed\": false}, {\"check\": \"empty batch\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one feature\", \"actual\": [[-2.0], [0.0], [2.0]], \"expected\": [[-2], [0], [2]], \"passed\": true}, {\"check\": \"constant features\", \"actual\": [[0.0, 0.0], [0.0, 0.0]], \"expected\": [[0, 0], [0, 0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.179,"exit_code":1,"observations":[{"actual":[[-5.0,5.0],[-6.0,6.0]],"check":"independent feature offsets","expected":[[-1,-2],[1,2]],"passed":false},{"actual":[[0.0,0.0],[0.5,-0.5],[-0.5,0.5]],"check":"three rows","expected":[[-0.3333333333333333,-0.3333333333333333],[0.6666666666666667,-0.3333333333333333],[-0.3333333333333333,0.6666666666666667]],"passed":false},{"actual":[[-0.5,0.5]],"check":"singleton","expected":[[0,0]],"passed":false},{"actual":[],"check":"empty batch","expected":[],"passed":true},{"actual":[[0.0],[0.0],[0.0]],"check":"one feature","expected":[[-2],[0],[2]],"passed":false},{"actual":[[0.0,0.0],[0.0,0.0]],"check":"constant features","expected":[[0,0],[0,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"independent feature offsets\", \"actual\": [[-5.0, 5.0], [-6.0, 6.0]], \"expected\": [[-1, -2], [1, 2]], \"passed\": false}, {\"check\": \"three rows\", \"actual\": [[0.0, 0.0], [0.5, -0.5], [-0.5, 0.5]], \"expected\": [[-0.3333333333333333, -0.3333333333333333], [0.6666666666666667, -0.3333333333333333], [-0.3333333333333333, 0.6666666666666667]], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [[-0.5, 0.5]], \"expected\": [[0, 0]], \"passed\": false}, {\"check\": \"empty batch\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one feature\", \"actual\": [[0.0], [0.0], [0.0]], \"expected\": [[-2], [0], [2]], \"passed\": false}, {\"check\": \"constant features\", \"actual\": [[0.0, 0.0], [0.0, 0.0]], \"expected\": [[0, 0], [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."}}