FA-99341 / Embedding vector normalization / Open access
L2 normalization uses the squared magnitude as divisor · case 01
L2 normalization uses the squared magnitude as divisor.
ROOT CAUSE
The squared norm is used directly rather than its square root.
THE FAILURE
The squared norm is used directly rather than its square root.
Unsuccessful approach: Dividing by the L1 length still produces a vector with the wrong Euclidean unit length.
Case contract
For a finite nonzero vector, return its Euclidean unit vector; an empty or zero vector returns an empty list.
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) for x in v] if v and any(v) else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('3-4 length', solve([3,4]), [0.6,0.8])
check('scaled diagonal', solve([N,N]), [N/(2*N*N)**0.5,N/(2*N*N)**0.5])
check('negative coordinate', solve([-3,4]), [-0.6,0.8])
check('zero', solve([0,0]), [])
check('empty', solve([]), [])
check('single coordinate', solve([N]), [1.0])
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 |
|---|---|---|---|
| 3-4 length | [0.12, 0.16] | [0.6, 0.8] | Failed |
| scaled diagonal | [0.5, 0.5] | [0.7071067811865475, 0.7071067811865475] | Failed |
| negative coordinate | [-0.12, 0.16] | [-0.6, 0.8] | Failed |
| zero | [] | [] | Passed |
| empty | [] | [] | Passed |
| single coordinate | [1.0] | [1.0] | Passed |
SHA-256 / c7fc63dabecce2f16b2619cf1564166b0e9bee0c5a57e6e6dc6e8063cd2c607f
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(abs(y) for y in v) for x in v] if v and any(v) else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('3-4 length', solve([3,4]), [0.6,0.8])
check('scaled diagonal', solve([N,N]), [N/(2*N*N)**0.5,N/(2*N*N)**0.5])
check('negative coordinate', solve([-3,4]), [-0.6,0.8])
check('zero', solve([0,0]), [])
check('empty', solve([]), [])
check('single coordinate', solve([N]), [1.0])
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 |
|---|---|---|---|
| 3-4 length | [0.42857142857142855, 0.5714285714285714] | [0.6, 0.8] | Failed |
| scaled diagonal | [0.5, 0.5] | [0.7071067811865475, 0.7071067811865475] | Failed |
| negative coordinate | [-0.42857142857142855, 0.5714285714285714] | [-0.6, 0.8] | Failed |
| zero | [] | [] | Passed |
| empty | [] | [] | Passed |
| single coordinate | [1.0] | [1.0] | Passed |
SHA-256 / 811c07bd6330b606625ceb71f1c33021cc6fba28087e146d356e27535352e08e
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.079300+00:00.
Case digest / 2be253de7c752468ffb75ce988d1c263f33f94f9aefd0074cbacb9be63ff8c2d