{"abstract":"Vector centering divides by the signed coordinate sum.","category":"Embedding vector normalization","checks":6,"contract":"Return the L2-unit vector of v minus its scalar coordinate mean; a constant or empty vector returns empty.","contract_signature":"v","evaluation_group":"embedding-mean-centered-unit-vector","failed_approach":"Subtracting the first coordinate instead of the mean only works for select symmetric fixtures.","family":"w3-embedding-vector-normalization-centering-before-unit","id":"FA-99361","implementations":{"attempt":{"sha256":"7868bfd8918fe897a6489c6f2c7bd5bd8d53381739fef440dd5ca8c323ab6895","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v):\n    r=[x-v[0] for x in v] if len(v)>1 else []\n    length=sum(y*y for y in r)**0.5\n    return [x/length for x in r] if length else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('asymmetric centered', solve([0,0,3]), [-1/(6**0.5),-1/(6**0.5),2/(6**0.5)])\ncheck('offset invariant', solve([N,N+1,N+2]), [-1/(2**0.5),0.0,1/(2**0.5)])\ncheck('constant', solve([N,N,N]), [])\ncheck('empty', solve([]), [])\ncheck('two coordinates', solve([0,2]), [-0.7071067811865475,0.7071067811865475])\ncheck('negative shift', solve([-3,-3,0]), [-1/(6**0.5),-1/(6**0.5),2/(6**0.5)])\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":"4a7262f5cb156ed19a8e853b6a5dd88bce6b7609633b4b411279097f10a9aaa9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v):\n    length=sum(x*x for x in v)**0.5\n    u=[x/length for x in v] if length else []\n    return [x-sum(u)/len(u) for x in u] if u else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('asymmetric centered', solve([0,0,3]), [-1/(6**0.5),-1/(6**0.5),2/(6**0.5)])\ncheck('offset invariant', solve([N,N+1,N+2]), [-1/(2**0.5),0.0,1/(2**0.5)])\ncheck('constant', solve([N,N,N]), [])\ncheck('empty', solve([]), [])\ncheck('two coordinates', solve([0,2]), [-0.7071067811865475,0.7071067811865475])\ncheck('negative shift', solve([-3,-3,0]), [-1/(6**0.5),-1/(6**0.5),2/(6**0.5)])\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-centering-before-unit","generated_at":"2026-09-30T16:48:23.555236+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 vector is divided by its signed coordinate sum without removing its coordinate mean.","sha256":"00b3e2d51faa1153115cfa5027612e06fa0f8b6826ab5b3a0bdc2563a0799ae4","title":"Vector centering divides by the signed coordinate sum · 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":33.116,"exit_code":1,"observations":[{"actual":[0.0,0.0,1.0],"check":"asymmetric centered","expected":[-0.4082482904638631,-0.4082482904638631,0.8164965809277261],"passed":false},{"actual":[0.0,0.4472135954999579,0.8944271909999159],"check":"offset invariant","expected":[-0.7071067811865475,0.0,0.7071067811865475],"passed":false},{"actual":[],"check":"constant","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0.0,1.0],"check":"two coordinates","expected":[-0.7071067811865475,0.7071067811865475],"passed":false},{"actual":[0.0,0.0,1.0],"check":"negative shift","expected":[-0.4082482904638631,-0.4082482904638631,0.8164965809277261],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"asymmetric centered\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [-0.4082482904638631, -0.4082482904638631, 0.8164965809277261], \"passed\": false}, {\"check\": \"offset invariant\", \"actual\": [0.0, 0.4472135954999579, 0.8944271909999159], \"expected\": [-0.7071067811865475, 0.0, 0.7071067811865475], \"passed\": false}, {\"check\": \"constant\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"two coordinates\", \"actual\": [0.0, 1.0], \"expected\": [-0.7071067811865475, 0.7071067811865475], \"passed\": false}, {\"check\": \"negative shift\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [-0.4082482904638631, -0.4082482904638631, 0.8164965809277261], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":31.117,"exit_code":1,"observations":[{"actual":[-0.3333333333333333,-0.3333333333333333,0.6666666666666667],"check":"asymmetric centered","expected":[-0.4082482904638631,-0.4082482904638631,0.8164965809277261],"passed":false},{"actual":[-0.2672612419124244,0.0,0.2672612419124244],"check":"offset invariant","expected":[-0.7071067811865475,0.0,0.7071067811865475],"passed":false},{"actual":[0.0,0.0,0.0],"check":"constant","expected":[],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[-0.5,0.5],"check":"two coordinates","expected":[-0.7071067811865475,0.7071067811865475],"passed":false},{"actual":[-0.23570226039551584,-0.23570226039551584,0.47140452079103173],"check":"negative shift","expected":[-0.4082482904638631,-0.4082482904638631,0.8164965809277261],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"asymmetric centered\", \"actual\": [-0.3333333333333333, -0.3333333333333333, 0.6666666666666667], \"expected\": [-0.4082482904638631, -0.4082482904638631, 0.8164965809277261], \"passed\": false}, {\"check\": \"offset invariant\", \"actual\": [-0.2672612419124244, 0.0, 0.2672612419124244], \"expected\": [-0.7071067811865475, 0.0, 0.7071067811865475], \"passed\": false}, {\"check\": \"constant\", \"actual\": [0.0, 0.0, 0.0], \"expected\": [], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"two coordinates\", \"actual\": [-0.5, 0.5], \"expected\": [-0.7071067811865475, 0.7071067811865475], \"passed\": false}, {\"check\": \"negative shift\", \"actual\": [-0.23570226039551584, -0.23570226039551584, 0.47140452079103173], \"expected\": [-0.4082482904638631, -0.4082482904638631, 0.8164965809277261], \"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."}}