{"abstract":"Masked mean pooling counts masked positions.","category":"Embedding vector normalization","checks":6,"contract":"Return the coordinate mean over vectors with truthy mask values; no included vector returns an empty list.","contract_signature":"vectors, mask","evaluation_group":"embedding-masked-mean-pooling","failed_approach":"Dividing by the feature width confuses dimensions with included tokens.","family":"w3-embedding-vector-normalization-masked-mean-pooling","id":"FA-99371","implementations":{"attempt":{"sha256":"fd22d7fc91e0222f849574bee12a6d733cd7d53138852c03b812ae51e9065b4c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors, mask):\n    return [sum(v[j] for v,m in zip(vectors,mask) if m)/len(vectors[0]) 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('one kept', solve([[N,2*N],[3*N,4*N]],[1,0]), [N,2*N])\ncheck('both kept', solve([[0,N],[2*N,3*N]],[1,1]), [N,2*N])\ncheck('none kept', solve([[N]],[0]), [])\ncheck('empty', solve([],[]), [])\ncheck('middle kept', solve([[0,0],[N,2*N],[4*N,6*N]],[0,1,0]), [N,2*N])\ncheck('zero values', solve([[0,N],[N,0]],[1,0]), [0,N])\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":"d17a73271f3e5cfb2d277f101ecbf698b724e45c1f66bf54fe99a846c215e6a2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vectors, mask):\n    return [sum(v[j] for v,m in zip(vectors,mask) if m)/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('one kept', solve([[N,2*N],[3*N,4*N]],[1,0]), [N,2*N])\ncheck('both kept', solve([[0,N],[2*N,3*N]],[1,1]), [N,2*N])\ncheck('none kept', solve([[N]],[0]), [])\ncheck('empty', solve([],[]), [])\ncheck('middle kept', solve([[0,0],[N,2*N],[4*N,6*N]],[0,1,0]), [N,2*N])\ncheck('zero values', solve([[0,N],[N,0]],[1,0]), [0,N])\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-masked-mean-pooling","generated_at":"2026-09-30T16:48:23.554941+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 denominator uses every input position even though masked vectors contribute nothing.","sha256":"5b53dea5f76c9571b81744fd492da53cf1133e04186ea64051616feaedead276","title":"Masked mean pooling counts masked positions · 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":31.959,"exit_code":1,"observations":[{"actual":[0.5,1.0],"check":"one kept","expected":[1,2],"passed":false},{"actual":[1.0,2.0],"check":"both kept","expected":[1,2],"passed":true},{"actual":[0.0],"check":"none kept","expected":[],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0.5,1.0],"check":"middle kept","expected":[1,2],"passed":false},{"actual":[0.0,0.5],"check":"zero values","expected":[0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one kept\", \"actual\": [0.5, 1.0], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"both kept\", \"actual\": [1.0, 2.0], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"none kept\", \"actual\": [0.0], \"expected\": [], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"middle kept\", \"actual\": [0.5, 1.0], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"zero values\", \"actual\": [0.0, 0.5], \"expected\": [0, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":30.693,"exit_code":1,"observations":[{"actual":[0.5,1.0],"check":"one kept","expected":[1,2],"passed":false},{"actual":[1.0,2.0],"check":"both kept","expected":[1,2],"passed":true},{"actual":[0.0],"check":"none kept","expected":[],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0.3333333333333333,0.6666666666666666],"check":"middle kept","expected":[1,2],"passed":false},{"actual":[0.0,0.5],"check":"zero values","expected":[0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one kept\", \"actual\": [0.5, 1.0], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"both kept\", \"actual\": [1.0, 2.0], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"none kept\", \"actual\": [0.0], \"expected\": [], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"middle kept\", \"actual\": [0.3333333333333333, 0.6666666666666666], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"zero values\", \"actual\": [0.0, 0.5], \"expected\": [0, 1], \"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."}}