FAILURE MAP
← Case archive

FA-98016 / Training label alignment / Open access

Sequence-level labels are taken from the first token · case 01

Sequence-level labels are taken from the first token.

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

ROOT CAUSE

The reducer assumes the first token carries the sequence-level class.

THE FAILURE

The reducer assumes the first token carries the sequence-level class.

Unsuccessful approach: Choosing the most frequent class repairs aggregation but breaks the specified smallest-class tie rule.

Case contract

For each sequence of token class IDs, return its most frequent class; ties choose the numerically smallest class. Empty sequences return -1.

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(sequences):
    return [x[0] if x else -1 for x in sequences]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('majority differs first',solve([[1,2,2]]),[2])
check('tie smallest',solve([[N,N+1]]),[N])
check('empty sequence',solve([[]]),[-1])
check('empty batch',solve([]),[])
check('singleton',solve([[N]]),[N])
check('later class wins',solve([[0,1,1,2,1]]),[1])
check('negative classes',solve([[-2,-1,-2]]),[-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 fixtureActualExpectedOutcome
majority differs first[1][2]Failed
tie smallest[1][1]Passed
empty sequence[-1][-1]Passed
empty batch[][]Passed
singleton[1][1]Passed
later class wins[0][1]Failed
negative classes[-2][-2]Passed

SHA-256 / af293d42e9c1cf72b6c92e04e5724a8b3a374edcfe5d4ebdc56027549216024f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(sequences):
    return [max(set(x),key=lambda y:(x.count(y),y)) if x else -1 for x in sequences]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('majority differs first',solve([[1,2,2]]),[2])
check('tie smallest',solve([[N,N+1]]),[N])
check('empty sequence',solve([[]]),[-1])
check('empty batch',solve([]),[])
check('singleton',solve([[N]]),[N])
check('later class wins',solve([[0,1,1,2,1]]),[1])
check('negative classes',solve([[-2,-1,-2]]),[-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 fixtureActualExpectedOutcome
majority differs first[2][2]Passed
tie smallest[2][1]Failed
empty sequence[-1][-1]Passed
empty batch[][]Passed
singleton[1][1]Passed
later class wins[1][1]Passed
negative classes[-2][-2]Passed

SHA-256 / 63536c4e4980f2277f2399eeaf5e131bc2d038f1a1b6a41958c4cc642b1f37bb

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

Token labels are integers; majority ties use ascending numeric order. 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.407844+00:00.

Case digest / 3d08867b13fc63888f4750db8ce99c5046f8c44ac3a3c34abb7baee52c86095f