FA-99356 / Embedding vector normalization / Open access
Zero embeddings become a fabricated unit vector · case 01
Zero embeddings become a fabricated unit vector.
ROOT CAUSE
The zero norm fallback inserts a coordinate value that is not in the input direction.
THE FAILURE
The zero norm fallback inserts a coordinate value that is not in the input direction.
Unsuccessful approach: Replacing zero by a vector of ones still invents a direction.
Case contract
Normalize by L2 length while preserving input dimensionality; zero and empty inputs remain unchanged.
Why this case matters
A small embedding preparation contract can be checked without a model or retrieval system.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(v):
return [x/(sum(y*y for y in v)**0.5) for x in v] if any(v) else [1.0]*len(v)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero pair', solve([0,0]), [0,0])
check('empty', solve([]), [])
check('ordinary', solve([3,4]), [0.6,0.8])
check('signed zero', solve([0,0,0]), [0,0,0])
check('single zero', solve([0]), [0])
check('direction retained', solve([-N,N]), [-N/(2*N*N)**0.5,N/(2*N*N)**0.5])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| zero pair | [1.0, 1.0] | [0, 0] | Failed |
| empty | [] | [] | Passed |
| ordinary | [0.6, 0.8] | [0.6, 0.8] | Passed |
| signed zero | [1.0, 1.0, 1.0] | [0, 0, 0] | Failed |
| single zero | [1.0] | [0] | Failed |
| direction retained | [-0.7071067811865475, 0.7071067811865475] | [-0.7071067811865475, 0.7071067811865475] | Passed |
SHA-256 / 487fe7e5ef0c4837cded3768934a23b16146e613db7d06a1141b8f6281e34859
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(v):
return [x/(sum(y*y for y in v)**0.5) for x in v] if any(v) else ([0.0] if len(v)==1 else [1.0]*len(v))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero pair', solve([0,0]), [0,0])
check('empty', solve([]), [])
check('ordinary', solve([3,4]), [0.6,0.8])
check('signed zero', solve([0,0,0]), [0,0,0])
check('single zero', solve([0]), [0])
check('direction retained', solve([-N,N]), [-N/(2*N*N)**0.5,N/(2*N*N)**0.5])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| zero pair | [1.0, 1.0] | [0, 0] | Failed |
| empty | [] | [] | Passed |
| ordinary | [0.6, 0.8] | [0.6, 0.8] | Passed |
| signed zero | [1.0, 1.0, 1.0] | [0, 0, 0] | Failed |
| single zero | [0.0] | [0] | Passed |
| direction retained | [-0.7071067811865475, 0.7071067811865475] | [-0.7071067811865475, 0.7071067811865475] | Passed |
SHA-256 / 25634a07759f7c62cce526fb8c89ce681811db3439ba4fbfe59158dcc9b64f9d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:23.078999+00:00.
Case digest / 53670f3c5f6d552f3171057aa13cebe1b96a32515d14c3deb854fc8ae3e14c92