FA-99401 / Embedding vector normalization / Open access
Batch normalization scales by the entire batch norm · case 01
Batch normalization scales by the entire batch norm.
ROOT CAUSE
All rows share one global scale and individual rows retain different lengths.
THE FAILURE
All rows share one global scale and individual rows retain different lengths.
Unsuccessful approach: Normalizing by L1 length per row still fails the Euclidean unit contract.
Case contract
Return same-shaped rows independently L2-normalized; zero rows stay zero; empty batch stays empty.
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(rows):
length=sum(x*x for row in rows for x in row)**0.5
return [[x/length for x in row] for row in rows] if length else [list(r) for r in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('different lengths', solve([[3,4],[N,0]]), [[0.6,0.8],[1.0,0.0]])
check('zero row', solve([[0,0],[0,N]]), [[0,0],[0.0,1.0]])
check('empty batch', solve([]), [])
check('empty row', solve([[]]), [[]])
check('single row', solve([[N,N]]), [[N/(2*N*N)**0.5,N/(2*N*N)**0.5]])
check('negative row', solve([[-3,4],[0,0]]), [[-0.6,0.8],[0,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 |
|---|---|---|---|
| different lengths | [[0.5883484054145521, 0.7844645405527362], [0.19611613513818404, 0.0]] | [[0.6, 0.8], [1.0, 0.0]] | Failed |
| zero row | [[0.0, 0.0], [0.0, 1.0]] | [[0, 0], [0.0, 1.0]] | Passed |
| empty batch | [] | [] | Passed |
| empty row | [[]] | [[]] | Passed |
| single row | [[0.7071067811865475, 0.7071067811865475]] | [[0.7071067811865475, 0.7071067811865475]] | Passed |
| negative row | [[-0.6, 0.8], [0.0, 0.0]] | [[-0.6, 0.8], [0, 0]] | Passed |
SHA-256 / cc1a98a85709bf9ea27377c1ae77af076c2283b1e250f06dc04daf3686dc52a8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [[x/sum(abs(y) for y in row) for x in row] if any(row) else list(row) for row in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('different lengths', solve([[3,4],[N,0]]), [[0.6,0.8],[1.0,0.0]])
check('zero row', solve([[0,0],[0,N]]), [[0,0],[0.0,1.0]])
check('empty batch', solve([]), [])
check('empty row', solve([[]]), [[]])
check('single row', solve([[N,N]]), [[N/(2*N*N)**0.5,N/(2*N*N)**0.5]])
check('negative row', solve([[-3,4],[0,0]]), [[-0.6,0.8],[0,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 |
|---|---|---|---|
| different lengths | [[0.42857142857142855, 0.5714285714285714], [1.0, 0.0]] | [[0.6, 0.8], [1.0, 0.0]] | Failed |
| zero row | [[0, 0], [0.0, 1.0]] | [[0, 0], [0.0, 1.0]] | Passed |
| empty batch | [] | [] | Passed |
| empty row | [[]] | [[]] | Passed |
| single row | [[0.5, 0.5]] | [[0.7071067811865475, 0.7071067811865475]] | Failed |
| negative row | [[-0.42857142857142855, 0.5714285714285714], [0, 0]] | [[-0.6, 0.8], [0, 0]] | Failed |
SHA-256 / 1b244bb7cc4c94d33a56c65e74d09b87fdb2fd7d8150d62962dbf00d3a98025f
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:24.023532+00:00.
Case digest / 6f53fc70ca93b604c9051a1a6e6cc7a8dd46c7498f2d85ddcc6ec93161bb31fb