FAILURE MAP
← Case archive

FA-97961 / Training label alignment / Open access

A class-column reorder silently relabels target vectors · case 01

A class-column reorder silently relabels target vectors.

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

ROOT CAUSE

Scores are projected using numeric offsets while the destination class names have another order.

THE FAILURE

Scores are projected using numeric offsets while the destination class names have another order.

Unsuccessful approach: Copying the first columns to the new vector width preserves shape but changes class meaning.

Case contract

Project each score row from source_classes order to target_classes order by class name; missing target classes receive 0.

Why this case matters

A small deterministic training-data operation makes label ownership and ordering explicit.

1 / The failure

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

N = 1
observations = []
def solve(scores, source_classes, target_classes):
    return [row[:len(target_classes)] for row in scores]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('swap named columns',solve([[N,N+1]],['cat','dog'],['dog','cat']),[[N+1,N]])
check('new class zero',solve([[2,3]],['a','b'],['c','a']),[[0,2]])
check('empty rows',solve([],['a'],['a','b']),[])
check('single retained class',solve([[N]],['x'],['x']),[[N]])
check('drop extra class',solve([[1,2,3]],['a','b','c'],['c']),[[3]])
check('empty targets',solve([[1]],['a'],[]),[[]])
check('multiple rows',solve([[1,2],[3,4]],['x','y'],['y']),[[2],[4]])
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
swap named columns[[1, 2]][[2, 1]]Failed
new class zero[[2, 3]][[0, 2]]Failed
empty rows[][]Passed
single retained class[[1]][[1]]Passed
drop extra class[[1]][[3]]Failed
empty targets[[]][[]]Passed
multiple rows[[1], [3]][[2], [4]]Failed

SHA-256 / 4f601a3e9c88d1d6c6f98c3a448eb21378b546fbbb28f80a52095f35cc2d78d0

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(scores, source_classes, target_classes):
    return [row+[0]*max(0,len(target_classes)-len(row)) for row in scores]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('swap named columns',solve([[N,N+1]],['cat','dog'],['dog','cat']),[[N+1,N]])
check('new class zero',solve([[2,3]],['a','b'],['c','a']),[[0,2]])
check('empty rows',solve([],['a'],['a','b']),[])
check('single retained class',solve([[N]],['x'],['x']),[[N]])
check('drop extra class',solve([[1,2,3]],['a','b','c'],['c']),[[3]])
check('empty targets',solve([[1]],['a'],[]),[[]])
check('multiple rows',solve([[1,2],[3,4]],['x','y'],['y']),[[2],[4]])
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
swap named columns[[1, 2]][[2, 1]]Failed
new class zero[[2, 3]][[0, 2]]Failed
empty rows[][]Passed
single retained class[[1]][[1]]Passed
drop extra class[[1, 2, 3]][[3]]Failed
empty targets[[1]][[]]Failed
multiple rows[[1, 2], [3, 4]][[2], [4]]Failed

SHA-256 / 57416a63e3b9bf18924a9da1e472f24fa5d840d902863f19010c18f4a36d8378

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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

Class names are unique; each score row matches source_classes width. 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:07.975853+00:00.

Case digest / e2b1adf8d2ca301b9ffec151e58cba2ef1b2e1c34c87c3659c5bc3b64aab917e