FA-98906 / Gradient accumulation weighting / Open access
Resumed accumulation restores the numerator but loses count · case 01
Resumed accumulation restores the numerator but loses count.
ROOT CAUSE
The broken restore adds the new numerator but replaces the saved count.
THE FAILURE
The broken restore adds the new numerator but replaces the saved count.
Unsuccessful approach: Adding the saved count twice overstates the resumed window size.
Case contract
A checkpoint stores [sum,count]. Resume by adding the incoming sum and count exactly once to the saved values.
Why this case matters
A deterministic toy model isolates one local accumulation contract.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(saved, incoming_sum, incoming_count):
return [saved[0]+incoming_sum,incoming_count]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume two steps',solve([2*N,N],12*N,3*N),[14*N,4*N])
check('resume one step',solve([5*N,N],7*N,N),[12*N,2*N])
check('no incoming data',solve([4*N,2*N],0,0),[4*N,2*N])
check('empty checkpoint',solve([0,0],6*N,2*N),[6*N,2*N])
check('different sizes',solve([3*N,4*N],9*N,3*N),[12*N,7*N])
check('zero gradient',solve([8*N,4*N],0,N),[8*N,5*N])
check('third segment',solve([N,2],8*N,4*N),[9*N,4*N+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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| resume two steps | [14, 3] | [14, 4] | Failed |
| resume one step | [12, 1] | [12, 2] | Failed |
| no incoming data | [4, 0] | [4, 2] | Failed |
| empty checkpoint | [6, 2] | [6, 2] | Passed |
| different sizes | [12, 3] | [12, 7] | Failed |
| zero gradient | [8, 1] | [8, 5] | Failed |
| third segment | [9, 4] | [9, 6] | Failed |
SHA-256 / 5ba574de911cc053f89a5593007d26caaa8e8b0f12053a8db7d7d8ee39569f7e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(saved, incoming_sum, incoming_count):
return [saved[0]+incoming_sum,saved[1]+max(saved[1],incoming_count)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume two steps',solve([2*N,N],12*N,3*N),[14*N,4*N])
check('resume one step',solve([5*N,N],7*N,N),[12*N,2*N])
check('no incoming data',solve([4*N,2*N],0,0),[4*N,2*N])
check('empty checkpoint',solve([0,0],6*N,2*N),[6*N,2*N])
check('different sizes',solve([3*N,4*N],9*N,3*N),[12*N,7*N])
check('zero gradient',solve([8*N,4*N],0,N),[8*N,5*N])
check('third segment',solve([N,2],8*N,4*N),[9*N,4*N+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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| resume two steps | [14, 4] | [14, 4] | Passed |
| resume one step | [12, 2] | [12, 2] | Passed |
| no incoming data | [4, 4] | [4, 2] | Failed |
| empty checkpoint | [6, 2] | [6, 2] | Passed |
| different sizes | [12, 8] | [12, 7] | Failed |
| zero gradient | [8, 8] | [8, 5] | Failed |
| third segment | [9, 6] | [9, 6] | Passed |
SHA-256 / cdc7b14d4bb743f665afc473b36edb2d626b2a4b3c3a0bfd346810700e7aed71
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
Inputs are scalar or short-list summaries and do not model autodiff, devices, or an optimizer. 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:18.065856+00:00.
Case digest / 9b2a819578d686c534d37a85a8f77071765dc8c8516f2b550638d5f5c735ffa2