{"abstract":"Square-root length pooling divides by squared token count.","category":"Embedding vector normalization","checks":6,"contract":"Return sum(vectors)/sqrt(token_count) coordinatewise; empty input returns empty.","contract_signature":"vectors","evaluation_group":"embedding-sqrt-length-sum-pooling","failed_approach":"A full mean removes length scaling entirely and is wrong for this pooling rule.","family":"w3-embedding-vector-normalization-sqrt-length-normalized-sum","id":"FA-99381","implementations":{"attempt":{"sha256":"ff9a4150f6489f308e837836e75ec0d6c600b59a5d5405289197f8768064b63b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors):\n    return [sum(v[j] for v in vectors)/len(vectors) for j in range(len(vectors[0]))] if vectors else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two tokens', solve([[N,0],[N,2*N]]), [2*N/2**0.5,2*N/2**0.5])\ncheck('four tokens', solve([[N],[N],[N],[N]]), [2*N])\ncheck('singleton', solve([[N,2*N]]), [N,2*N])\ncheck('empty', solve([]), [])\ncheck('cancellation', solve([[N],[-N]]), [0])\ncheck('three values', solve([[0,N],[0,N],[3*N,0]]), [3*N/3**0.5,2*N/3**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":"6a2c2d2359fee9376ea00ddfa0c8759ba58191c80636f37c0de0042e1a413857","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors):\n    return [sum(v[j] for v in vectors)/len(vectors)**2 for j in range(len(vectors[0]))] if vectors else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two tokens', solve([[N,0],[N,2*N]]), [2*N/2**0.5,2*N/2**0.5])\ncheck('four tokens', solve([[N],[N],[N],[N]]), [2*N])\ncheck('singleton', solve([[N,2*N]]), [N,2*N])\ncheck('empty', solve([]), [])\ncheck('cancellation', solve([[N],[-N]]), [0])\ncheck('three values', solve([[0,N],[0,N],[3*N,0]]), [3*N/3**0.5,2*N/3**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-sqrt-length-normalized-sum","generated_at":"2026-09-30T16:48:23.554817+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 token count is squared where its square root is required.","sha256":"80a2a1f33ebce8e51cee4fe798bda05fd9918a08336649118b43760872abfd5f","title":"Square-root length pooling divides by squared token count · 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":32.787,"exit_code":1,"observations":[{"actual":[1.0,1.0],"check":"two tokens","expected":[1.414213562373095,1.414213562373095],"passed":false},{"actual":[1.0],"check":"four tokens","expected":[2],"passed":false},{"actual":[1.0,2.0],"check":"singleton","expected":[1,2],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0.0],"check":"cancellation","expected":[0],"passed":true},{"actual":[1.0,0.6666666666666666],"check":"three values","expected":[1.7320508075688774,1.1547005383792517],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two tokens\", \"actual\": [1.0, 1.0], \"expected\": [1.414213562373095, 1.414213562373095], \"passed\": false}, {\"check\": \"four tokens\", \"actual\": [1.0], \"expected\": [2], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [1.0, 2.0], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cancellation\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"three values\", \"actual\": [1.0, 0.6666666666666666], \"expected\": [1.7320508075688774, 1.1547005383792517], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":30.429,"exit_code":1,"observations":[{"actual":[0.5,0.5],"check":"two tokens","expected":[1.414213562373095,1.414213562373095],"passed":false},{"actual":[0.25],"check":"four tokens","expected":[2],"passed":false},{"actual":[1.0,2.0],"check":"singleton","expected":[1,2],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0.0],"check":"cancellation","expected":[0],"passed":true},{"actual":[0.3333333333333333,0.2222222222222222],"check":"three values","expected":[1.7320508075688774,1.1547005383792517],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two tokens\", \"actual\": [0.5, 0.5], \"expected\": [1.414213562373095, 1.414213562373095], \"passed\": false}, {\"check\": \"four tokens\", \"actual\": [0.25], \"expected\": [2], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [1.0, 2.0], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cancellation\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"three values\", \"actual\": [0.3333333333333333, 0.2222222222222222], \"expected\": [1.7320508075688774, 1.1547005383792517], \"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."}}