{"abstract":"Weighted centering subtracts an unweighted mean.","category":"Embedding vector normalization","checks":6,"contract":"Return vectors centered by their weighted coordinate mean; zero total weight returns copies unchanged.","contract_signature":"vectors, weights","evaluation_group":"embedding-weighted-centering","failed_approach":"Using only the first row as the center leaves the weighted centroid offset.","family":"w3-embedding-vector-normalization-weighted-centering","id":"FA-99416","implementations":{"attempt":{"sha256":"43215510a39edc360bc0dede86ee5239dbdf47ee60a0a567bc72b467f287b29b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors, weights):\n    m=[vectors[0][j] for j in range(len(vectors[0]))] if vectors else []\n    return [[x-m[j] for j,x in enumerate(v)] for v in vectors]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal weights', solve([[0,N],[2*N,3*N]],[3,1]), [[-N/2,-N/2],[3*N/2,3*N/2]])\ncheck('equal weights', solve([[0],[2*N]],[1,1]), [[-N],[N]])\ncheck('zero total', solve([[N],[2*N]],[0,0]), [[N],[2*N]])\ncheck('empty', solve([],[]), [])\ncheck('single vector', solve([[N,N]],[N]), [[0,0]])\ncheck('ignored row weight', solve([[N],[0]],[0,1]), [[N],[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":"9e74cfd86ceb8948888947ba9e08af9a5697596f009692900b7e397553d9b27e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors, weights):\n    m=[sum(v[j] for v in vectors)/len(vectors) for j in range(len(vectors[0]))] if vectors else []\n    return [[x-m[j] for j,x in enumerate(v)] for v in vectors]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal weights', solve([[0,N],[2*N,3*N]],[3,1]), [[-N/2,-N/2],[3*N/2,3*N/2]])\ncheck('equal weights', solve([[0],[2*N]],[1,1]), [[-N],[N]])\ncheck('zero total', solve([[N],[2*N]],[0,0]), [[N],[2*N]])\ncheck('empty', solve([],[]), [])\ncheck('single vector', solve([[N,N]],[N]), [[0,0]])\ncheck('ignored row weight', solve([[N],[0]],[0,1]), [[N],[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-weighted-centering","generated_at":"2026-09-30T16:48:24.023786+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":"The center ignores token or sample weights even though the downstream operation is weighted.","sha256":"d9cd56203412bff332b44370c8c39cb112b9e639dbf12d7a5f5adbab802f6f7d","title":"Weighted centering subtracts an unweighted mean · 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.514,"exit_code":1,"observations":[{"actual":[[0,0],[2,2]],"check":"unequal weights","expected":[[-0.5,-0.5],[1.5,1.5]],"passed":false},{"actual":[[0],[2]],"check":"equal weights","expected":[[-1],[1]],"passed":false},{"actual":[[0],[1]],"check":"zero total","expected":[[1],[2]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,0]],"check":"single vector","expected":[[0,0]],"passed":true},{"actual":[[0],[-1]],"check":"ignored row weight","expected":[[1],[0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal weights\", \"actual\": [[0, 0], [2, 2]], \"expected\": [[-0.5, -0.5], [1.5, 1.5]], \"passed\": false}, {\"check\": \"equal weights\", \"actual\": [[0], [2]], \"expected\": [[-1], [1]], \"passed\": false}, {\"check\": \"zero total\", \"actual\": [[0], [1]], \"expected\": [[1], [2]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single vector\", \"actual\": [[0, 0]], \"expected\": [[0, 0]], \"passed\": true}, {\"check\": \"ignored row weight\", \"actual\": [[0], [-1]], \"expected\": [[1], [0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.143,"exit_code":1,"observations":[{"actual":[[-1.0,-1.0],[1.0,1.0]],"check":"unequal weights","expected":[[-0.5,-0.5],[1.5,1.5]],"passed":false},{"actual":[[-1.0],[1.0]],"check":"equal weights","expected":[[-1],[1]],"passed":true},{"actual":[[-0.5],[0.5]],"check":"zero total","expected":[[1],[2]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0.0,0.0]],"check":"single vector","expected":[[0,0]],"passed":true},{"actual":[[0.5],[-0.5]],"check":"ignored row weight","expected":[[1],[0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal weights\", \"actual\": [[-1.0, -1.0], [1.0, 1.0]], \"expected\": [[-0.5, -0.5], [1.5, 1.5]], \"passed\": false}, {\"check\": \"equal weights\", \"actual\": [[-1.0], [1.0]], \"expected\": [[-1], [1]], \"passed\": true}, {\"check\": \"zero total\", \"actual\": [[-0.5], [0.5]], \"expected\": [[1], [2]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single vector\", \"actual\": [[0.0, 0.0]], \"expected\": [[0, 0]], \"passed\": true}, {\"check\": \"ignored row weight\", \"actual\": [[0.5], [-0.5]], \"expected\": [[1], [0]], \"passed\": false}], \"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."}}