FAILURE MAP
← Case archive

FA-99346 / Embedding vector normalization / Open access

L1 normalization divides by the largest coordinate · case 01

L1 normalization divides by the largest coordinate.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The maximum coordinate magnitude is substituted for the sum of magnitudes.

THE FAILURE

The maximum coordinate magnitude is substituted for the sum of magnitudes.

Unsuccessful approach: The Euclidean length divisor is also wrong for an L1 contract.

Case contract

Return the signed vector divided by its L1 norm; empty or all-zero input returns 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(v):
    return [x/max(map(abs,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('unequal magnitudes', solve([N,2*N]), [1/3,2/3])
check('signed entries', solve([-2,1]), [-2/3,1/3])
check('one value', solve([N]), [1.0])
check('zero', solve([0,0]), [])
check('empty', solve([]), [])
check('mixed zero', solve([0,-N,0]), [0.0,-1.0,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 fixtureActualExpectedOutcome
unequal magnitudes[0.5, 1.0][0.3333333333333333, 0.6666666666666666]Failed
signed entries[-1.0, 0.5][-0.6666666666666666, 0.3333333333333333]Failed
one value[1.0][1.0]Passed
zero[][]Passed
empty[][]Passed
mixed zero[0.0, -1.0, 0.0][0.0, -1.0, 0.0]Passed

SHA-256 / 96ac588fbc9caf3138c082e76147d4ed6faf46a572aea42874fba1146f10f66a

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 v and any(v) else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unequal magnitudes', solve([N,2*N]), [1/3,2/3])
check('signed entries', solve([-2,1]), [-2/3,1/3])
check('one value', solve([N]), [1.0])
check('zero', solve([0,0]), [])
check('empty', solve([]), [])
check('mixed zero', solve([0,-N,0]), [0.0,-1.0,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 fixtureActualExpectedOutcome
unequal magnitudes[0.4472135954999579, 0.8944271909999159][0.3333333333333333, 0.6666666666666666]Failed
signed entries[-0.8944271909999159, 0.4472135954999579][-0.6666666666666666, 0.3333333333333333]Failed
one value[1.0][1.0]Passed
zero[][]Passed
empty[][]Passed
mixed zero[0.0, -1.0, 0.0][0.0, -1.0, 0.0]Passed

SHA-256 / 6967303a0b7a280541bcd6b1956bc2590b5f6849c768bd0e34b22be0fbb9f92a

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.079375+00:00.

Case digest / b76ecffb78edde317ffb0a8af85397e3687264d1b1531bad88294c3b54d5dae8