FA-98316 / Autoregressive target shifting / Open access
Ignored targets remain in the loss denominator · case 01
Ignored targets remain in the loss denominator.
ROOT CAUSE
The denominator is inferred from sequence length without applying the target supervision mask.
THE FAILURE
The denominator is inferred from sequence length without applying the target supervision mask.
Unsuccessful approach: Subtracting one from the number of valid labels fails when ignore markers occur in the context.
Case contract
Count true mask entries whose indexes correspond to labels[1:]; absent mask positions count as false.
Why this case matters
A small deterministic token-stream contract makes next-token alignment errors inspectable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(labels, mask):
return max(0,len(labels)-1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('context only',solve([9],[]),0)
check('one target',solve([9,4],[1]),1)
check('ignored context',solve([None,4,5],[1,1]),2)
check('ignored target mask',solve([9,4,5],[0,1]),1)
check('empty',solve([],[]),0)
check('mask excess',solve([1,2],[1,1,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| context only | 0 | 0 | Passed |
| one target | 1 | 1 | Passed |
| ignored context | 2 | 2 | Passed |
| ignored target mask | 2 | 1 | Failed |
| empty | 0 | 0 | Passed |
| mask excess | 1 | 1 | Passed |
SHA-256 / 0180e61b18b7aff3b89f74e6862faf275d6a6c354a98bba901ae76bdc61619e7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(labels, mask):
return max(0,sum(x is not None for x in labels)-1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('context only',solve([9],[]),0)
check('one target',solve([9,4],[1]),1)
check('ignored context',solve([None,4,5],[1,1]),2)
check('ignored target mask',solve([9,4,5],[0,1]),1)
check('empty',solve([],[]),0)
check('mask excess',solve([1,2],[1,1,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| context only | 0 | 0 | Passed |
| one target | 1 | 1 | Passed |
| ignored context | 1 | 2 | Failed |
| ignored target mask | 2 | 1 | Failed |
| empty | 0 | 0 | Passed |
| mask excess | 1 | 1 | Passed |
SHA-256 / c015f2f63a84f552ff40e32e833761d66f64ead16d2c196b6d1fb69112d378b3
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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
Inputs are toy integer token sequences; this contract says nothing about model quality, batching, sampling, or production training frameworks. 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:11.499935+00:00.
Case digest / 54cb9323cb72000ea592dde40e0b2a0f4ddd004e91be4455bac90b871b575d7b