FA-98006 / Training label alignment / Open access
Vocabulary construction counts repeated labels as separate classes · case 01
Vocabulary construction counts repeated labels as separate classes.
ROOT CAUSE
The vocabulary is collected from a sequence without deduplicating class identities.
THE FAILURE
The vocabulary is collected from a sequence without deduplicating class identities.
Unsuccessful approach: Sorting unique labels gives stable IDs but violates the required first-seen class order.
Case contract
Return [vocabulary,indices], where vocabulary lists distinct labels in first-seen order and indices encode input labels.
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(labels):
return [list(labels),list(range(len(labels)))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat shares index',solve(['b','a','b']),[['b','a'],[0,1,0]])
check('empty',solve([]),[[],[]])
check('single',solve(['x']),[['x'],[0]])
check('first seen differs lexical',solve(['z','a','z']),[['z','a'],[0,1,0]])
check('zero-like labels',solve([0,1,0]),[[0,1],[0,1,0]])
check('all same',solve(['q']*N),[['q'],[0]*N])
check('distinct sequence',solve(['c','b','a']),[['c','b','a'],[0,1,2]])
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 |
|---|---|---|---|
| repeat shares index | [['b', 'a', 'b'], [0, 1, 2]] | [['b', 'a'], [0, 1, 0]] | Failed |
| empty | [[], []] | [[], []] | Passed |
| single | [['x'], [0]] | [['x'], [0]] | Passed |
| first seen differs lexical | [['z', 'a', 'z'], [0, 1, 2]] | [['z', 'a'], [0, 1, 0]] | Failed |
| zero-like labels | [[0, 1, 0], [0, 1, 2]] | [[0, 1], [0, 1, 0]] | Failed |
| all same | [['q'], [0]] | [['q'], [0]] | Passed |
| distinct sequence | [['c', 'b', 'a'], [0, 1, 2]] | [['c', 'b', 'a'], [0, 1, 2]] | Passed |
SHA-256 / 6023ca2baf02c2ddc84470a3edc3b5aed240502981631ff7bc205360bd0b0b68
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(labels):
v=sorted(set(labels))
return [v,[v.index(x) for x in labels]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat shares index',solve(['b','a','b']),[['b','a'],[0,1,0]])
check('empty',solve([]),[[],[]])
check('single',solve(['x']),[['x'],[0]])
check('first seen differs lexical',solve(['z','a','z']),[['z','a'],[0,1,0]])
check('zero-like labels',solve([0,1,0]),[[0,1],[0,1,0]])
check('all same',solve(['q']*N),[['q'],[0]*N])
check('distinct sequence',solve(['c','b','a']),[['c','b','a'],[0,1,2]])
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 |
|---|---|---|---|
| repeat shares index | [['a', 'b'], [1, 0, 1]] | [['b', 'a'], [0, 1, 0]] | Failed |
| empty | [[], []] | [[], []] | Passed |
| single | [['x'], [0]] | [['x'], [0]] | Passed |
| first seen differs lexical | [['a', 'z'], [1, 0, 1]] | [['z', 'a'], [0, 1, 0]] | Failed |
| zero-like labels | [[0, 1], [0, 1, 0]] | [[0, 1], [0, 1, 0]] | Passed |
| all same | [['q'], [0]] | [['q'], [0]] | Passed |
| distinct sequence | [['a', 'b', 'c'], [2, 1, 0]] | [['c', 'b', 'a'], [0, 1, 2]] | Failed |
SHA-256 / f895ffa386e0e2537de244768039b7486b751f6c6ba52ee8224851a7a7da9cd3
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
Labels are hashable and equality-comparable; vocabulary order is first occurrence. 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:08.408670+00:00.
Case digest / 1fa88219d66df816a1689128e62784882f863848ae0669e59f82649d81499d15