FAILURE MAP
← Case archive

FA-98031 / Training label alignment / Open access

Smoothed targets depend on classes observed in the batch · case 01

Smoothed targets depend on classes observed in the batch.

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

ROOT CAUSE

Class width and smoothing denominator are inferred from distinct minibatch labels instead of the declared class count.

THE FAILURE

Class width and smoothing denominator are inferred from distinct minibatch labels instead of the declared class count.

Unsuccessful approach: Keeping the declared width but leaving every off-class entry at zero removes the smoothing mass.

Case contract

For each valid class index y, emit length-C target with confidence at y and equal remaining mass across other C-1 classes. For C=1 emit [1]; invalid y emits 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, confidence):
    return [[confidence if j==y else (1-confidence)/(max(1,len(set(labels))-1)) for j in range(max(1,len(set(labels))))] for y in labels]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('declared classes beyond batch',solve([0],N+2,0.8),[[0.8]+[round(0.2/(N+1),12)]*(N+1)])
check('two classes',solve([1],2,0.6),[ [0.4,0.6] ])
check('single class',solve([0],1,0.2),[[1.0]])
check('empty batch',solve([],N,0.8),[])
check('invalid index',solve([N],N,0.7),[[0]*N])
check('second row',solve([0,2],3,0.5),[[0.5,0.25,0.25],[0.25,0.25,0.5]])
check('three class mass',solve([0],3,0.9),[[0.9,0.05,0.05]])
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
declared classes beyond batch[[0.8]][[0.8, 0.1, 0.1]]Failed
two classes[[0.4]][[0.4, 0.6]]Failed
single class[[0.2]][[1.0]]Failed
empty batch[][]Passed
invalid index[[0.30000000000000004]][[0]]Failed
second row[[0.5, 0.5], [0.5, 0.5]][[0.5, 0.25, 0.25], [0.25, 0.25, 0.5]]Failed
three class mass[[0.9]][[0.9, 0.05, 0.05]]Failed

SHA-256 / 2f887358fe60030b9bd7ca9aa2c09d21d9649a33258a31aba11a35b136eea4df

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(labels, class_count, confidence):
    return [[confidence if j==y else 0 for j in range(class_count)] for y in labels]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('declared classes beyond batch',solve([0],N+2,0.8),[[0.8]+[round(0.2/(N+1),12)]*(N+1)])
check('two classes',solve([1],2,0.6),[ [0.4,0.6] ])
check('single class',solve([0],1,0.2),[[1.0]])
check('empty batch',solve([],N,0.8),[])
check('invalid index',solve([N],N,0.7),[[0]*N])
check('second row',solve([0,2],3,0.5),[[0.5,0.25,0.25],[0.25,0.25,0.5]])
check('three class mass',solve([0],3,0.9),[[0.9,0.05,0.05]])
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
declared classes beyond batch[[0.8, 0, 0]][[0.8, 0.1, 0.1]]Failed
two classes[[0, 0.6]][[0.4, 0.6]]Failed
single class[[0.2]][[1.0]]Failed
empty batch[][]Passed
invalid index[[0]][[0]]Passed
second row[[0.5, 0, 0], [0, 0, 0.5]][[0.5, 0.25, 0.25], [0.25, 0.25, 0.5]]Failed
three class mass[[0.9, 0, 0]][[0.9, 0.05, 0.05]]Failed

SHA-256 / e918f384d01ef92b54a42de1a4fa959014d0e9961c3acb8c62c2be075f7837dd

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

Confidence is between zero and one; 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.407445+00:00.

Case digest / 3231575205b0cc25620e62a3ac2483ffbaec092ec799dea09d15d0cc9b286883