FAILURE MAP
← Case archive

FA-99436 / Embedding vector normalization / Open access

Projection removal subtracts the reference direction unchanged · case 01

Projection removal subtracts the reference direction unchanged.

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

ROOT CAUSE

The reference axis is subtracted once instead of removing each vector's projection onto that axis.

THE FAILURE

The reference axis is subtracted once instead of removing each vector's projection onto that axis.

Unsuccessful approach: Using dot(vector,axis) directly as the projection coefficient only works when the axis is unit length.

Case contract

For each embedding vector, remove its orthogonal projection onto a shared axis. A zero axis leaves vectors unchanged; an empty batch 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(vectors, axis):
    return [[x-a for x,a in zip(v,axis)] for v in vectors]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unit axis', solve([[3,4],[1,-2]],[1,0]), [[0,4],[0,-2]])
check('nonunit axis', solve([[3,4]],[2,0]), [[0,4]])
check('diagonal projection', solve([[3,1]],[1,1]), [[1,-1]])
check('zero axis', solve([[N,2*N]],[0,0]), [[N,2*N]])
check('empty batch', solve([], [1,0]), [])
check('scaled axis and row', solve([[2*N,N]],[N,0]), [[0,N]])
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
unit axis[[2, 4], [0, -2]][[0, 4], [0, -2]]Failed
nonunit axis[[1, 4]][[0, 4]]Failed
diagonal projection[[2, 0]][[1, -1]]Failed
zero axis[[1, 2]][[1, 2]]Passed
empty batch[][]Passed
scaled axis and row[[1, 1]][[0, 1]]Failed

SHA-256 / f133db033afa7f617df313143edd4ff3909976824b2a69c7a3985d3f27b31653

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(vectors, axis):
    return [[x-sum(p*q for p,q in zip(v,axis))*a for x,a in zip(v,axis)] for v in vectors] if any(axis) else [list(v) for v in vectors]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unit axis', solve([[3,4],[1,-2]],[1,0]), [[0,4],[0,-2]])
check('nonunit axis', solve([[3,4]],[2,0]), [[0,4]])
check('diagonal projection', solve([[3,1]],[1,1]), [[1,-1]])
check('zero axis', solve([[N,2*N]],[0,0]), [[N,2*N]])
check('empty batch', solve([], [1,0]), [])
check('scaled axis and row', solve([[2*N,N]],[N,0]), [[0,N]])
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
unit axis[[0, 4], [0, -2]][[0, 4], [0, -2]]Passed
nonunit axis[[-9, 4]][[0, 4]]Failed
diagonal projection[[-1, -3]][[1, -1]]Failed
zero axis[[1, 2]][[1, 2]]Passed
empty batch[][]Passed
scaled axis and row[[0, 1]][[0, 1]]Passed

SHA-256 / 2458807bfcf3ce6f721b0c26ff17866abec203d7790079f2588e5b94e322e997

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

Case digest / 8ef5de4ebb617d4ef68b18cbc24f238eee0b39bc5654db00a5d425b12432c6d9