FA-98311 / Autoregressive target shifting / Open access
Loss denominator counts inputs instead of supervised targets · case 01
Loss denominator counts inputs instead of supervised targets.
ROOT CAUSE
A trailing context token without a target is included in the normalization count.
THE FAILURE
A trailing context token without a target is included in the normalization count.
Unsuccessful approach: Counting all mask entries adds the context-only mask at index zero.
Case contract
For labels and an aligned mask, count true mask entries at target indexes labels[1:]. Short masks contribute only where present.
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 sum(x is not None for x in labels)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('trailing context excluded',solve([1,2,3],[1,1,1]),2)
check('ignored target',solve([1,2,3,4],[1,0,1]),1)
check('no mask',solve([1,2],[]),0)
check('singleton',solve([1],[1]),0)
check('empty',solve([],[]),0)
check('short mask',solve([1,2,3],[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 |
|---|---|---|---|
| trailing context excluded | 3 | 2 | Failed |
| ignored target | 4 | 1 | Failed |
| no mask | 2 | 0 | Failed |
| singleton | 1 | 0 | Failed |
| empty | 0 | 0 | Passed |
| short mask | 3 | 1 | Failed |
SHA-256 / 63e5fba09d28039f950798bcf084ff316d58194b329e822b7f669505a06509dc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(labels, mask):
return sum(bool(mask[i]) for i in range(min(len(mask),len(labels))))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('trailing context excluded',solve([1,2,3],[1,1,1]),2)
check('ignored target',solve([1,2,3,4],[1,0,1]),1)
check('no mask',solve([1,2],[]),0)
check('singleton',solve([1],[1]),0)
check('empty',solve([],[]),0)
check('short mask',solve([1,2,3],[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 |
|---|---|---|---|
| trailing context excluded | 3 | 2 | Failed |
| ignored target | 2 | 1 | Failed |
| no mask | 0 | 0 | Passed |
| singleton | 1 | 0 | Failed |
| empty | 0 | 0 | Passed |
| short mask | 2 | 1 | Failed |
SHA-256 / 04d0d29c205f8b00a41ea44801d129a5845fb2c3b3eedb23e2fffb874f3dff76
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.499170+00:00.
Case digest / 801441e0b8de2ccbaeda7efc2c88e156ed62f18023f06d998ae0be3115607b3f