FAILURE MAP
← Case archive

FA-97976 / Training label alignment / Open access

Multi-label annotations are returned without vocabulary encoding · case 01

Multi-label annotations are returned without vocabulary encoding.

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

ROOT CAUSE

The encoder returns annotation lists verbatim instead of fixed-width vocabulary vectors.

THE FAILURE

The encoder returns annotation lists verbatim instead of fixed-width vocabulary vectors.

Unsuccessful approach: Dropping absent classes to compact the vector loses the required zero positions.

Case contract

Encode each set of labels as a binary vector in vocabulary order; unknown labels are ignored.

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(annotations, vocabulary):
    return [list(row) for row in annotations]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('annotation order irrelevant',solve([['b','a']],['b','a']),[[1,1]])
check('absent class zero',solve([['c']],['a','b','c']),[[0,0,1]])
check('empty annotation',solve([[]],['x']),[[0]])
check('empty batch',solve([],['x']),[])
check('unknown ignored',solve([['x','q']],['q','x']),[[1,1]])
check('vocabulary order',solve([['a']],['z','a']),[[0,1]])
check('duplicate annotation',solve([['x','x']],['x']),[[1]])
check('variant label with absent class',solve([['class'+str(N)]],['other','class'+str(N)]),[[0,1]])
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
annotation order irrelevant[['b', 'a']][[1, 1]]Failed
absent class zero[['c']][[0, 0, 1]]Failed
empty annotation[[]][[0]]Failed
empty batch[][]Passed
unknown ignored[['x', 'q']][[1, 1]]Failed
vocabulary order[['a']][[0, 1]]Failed
duplicate annotation[['x', 'x']][[1]]Failed
variant label with absent class[['class1']][[0, 1]]Failed

SHA-256 / 755c25d8ec3d7dc1ab3832dc25390b6cb25b44fe82043ebeb3109dd1ed52e9ed

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(annotations, vocabulary):
    return [[int(c in row) for c in vocabulary if c in row] for row in annotations]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('annotation order irrelevant',solve([['b','a']],['b','a']),[[1,1]])
check('absent class zero',solve([['c']],['a','b','c']),[[0,0,1]])
check('empty annotation',solve([[]],['x']),[[0]])
check('empty batch',solve([],['x']),[])
check('unknown ignored',solve([['x','q']],['q','x']),[[1,1]])
check('vocabulary order',solve([['a']],['z','a']),[[0,1]])
check('duplicate annotation',solve([['x','x']],['x']),[[1]])
check('variant label with absent class',solve([['class'+str(N)]],['other','class'+str(N)]),[[0,1]])
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
annotation order irrelevant[[1, 1]][[1, 1]]Passed
absent class zero[[1]][[0, 0, 1]]Failed
empty annotation[[]][[0]]Failed
empty batch[][]Passed
unknown ignored[[1, 1]][[1, 1]]Passed
vocabulary order[[1]][[0, 1]]Failed
duplicate annotation[[1]][[1]]Passed
variant label with absent class[[1]][[0, 1]]Failed

SHA-256 / a7d753400ea87b49b4f15610357bad4f231363e85799ecfcba0d92e59355f222

HELD IN THE MEMBER ARCHIVE

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

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

Annotations are collections of hashable class names; vocabulary names are unique. 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.978098+00:00.

Case digest / b28a7a2d9dbf40ff12bf91d597c765eb95fcdba6b884e80ebd14587d0ce55ec3