FAILURE MAP
← Case archive

FA-98026 / Training label alignment / Open access

Ordinal labels use a single class bit instead of cumulative thresholds · case 01

Ordinal labels use a single class bit instead of cumulative thresholds.

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

ROOT CAUSE

An ordinal category is encoded as ordinary one-hot classification.

THE FAILURE

An ordinal category is encoded as ordinary one-hot classification.

Unsuccessful approach: Repeating one threshold bit across columns still loses which boundaries the class has crossed.

Case contract

For class index y and class_count C, return C-1 bits where bit j is 1 exactly when y>j; invalid y returns all zeros.

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, class_count):
    return [[int(j==y) for j in range(class_count-1)] for y in labels]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('upper ordinal class',solve([N],N+1),[[1]*N])
check('middle class',solve([1],4),[[1,0,0]])
check('lowest class',solve([0],N+1),[[0]*N])
check('empty labels',solve([],N),[])
check('one class has no thresholds',solve([0],1),[[]])
check('invalid class',solve([N+1],N+1),[[0]*N])
check('several labels',solve([0,2],3),[[0,0],[1,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
upper ordinal class[[0]][[1]]Failed
middle class[[0, 1, 0]][[1, 0, 0]]Failed
lowest class[[1]][[0]]Failed
empty labels[][]Passed
one class has no thresholds[[]][[]]Passed
invalid class[[0]][[0]]Passed
several labels[[1, 0], [0, 0]][[0, 0], [1, 1]]Failed

SHA-256 / 01e84244832b5a39c8b22e3210f59c0a671e3b7bb91e08b34d0edf73e4add9b6

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(labels, class_count):
    return [[int(y>0)]*(class_count-1) for y in labels]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('upper ordinal class',solve([N],N+1),[[1]*N])
check('middle class',solve([1],4),[[1,0,0]])
check('lowest class',solve([0],N+1),[[0]*N])
check('empty labels',solve([],N),[])
check('one class has no thresholds',solve([0],1),[[]])
check('invalid class',solve([N+1],N+1),[[0]*N])
check('several labels',solve([0,2],3),[[0,0],[1,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
upper ordinal class[[1]][[1]]Passed
middle class[[1, 1, 1]][[1, 0, 0]]Failed
lowest class[[0]][[0]]Passed
empty labels[][]Passed
one class has no thresholds[[]][[]]Passed
invalid class[[1]][[0]]Failed
several labels[[0, 0], [1, 1]][[0, 0], [1, 1]]Passed

SHA-256 / e5510980cbbf8f43a30364a2108f9e21ea3eaa89de2c6f8933a389ce48003568

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 indices are integers and class_count is positive. 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.407559+00:00.

Case digest / 04116bfe7645cbca829824d5f50e69f8e4b5f5d260e108fa4d6b9dba46dc83ee