FA-98861 / Gradient accumulation weighting / Open access
A flushed partial window is divided by configured capacity · case 01
A flushed partial window is divided by configured capacity.
ROOT CAUSE
The configured capacity is used as if every flushed window were full.
THE FAILURE
The configured capacity is used as if every flushed window were full.
Unsuccessful approach: Capping the count at capacity under-normalizes when a window has accumulated more examples than its nominal threshold.
Case contract
gradient_sum is the sum for examples seen in a window; examples is the actual count and capacity is only the maximum. Normalize by actual examples.
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(gradient_sum, examples, capacity):
return gradient_sum / max(1,capacity)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one of capacity three',solve(6*N,N,3),6)
check('full window',solve(12*N,2*N,2),6)
check('empty flush',solve(0,0,4),0)
check('capacity one',solve(7*N,N,1),7)
check('two examples partial',solve(8*N,2*N,5),4)
check('single capacity',solve(9*N,3*N,1),3)
check('zero sum',solve(0,3*N,4),0)
check('count after threshold',solve(12*N,4*N,3),3)
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 |
|---|---|---|---|
| one of capacity three | 2.0 | 6 | Failed |
| full window | 6.0 | 6 | Passed |
| empty flush | 0.0 | 0 | Passed |
| capacity one | 7.0 | 7 | Passed |
| two examples partial | 1.6 | 4 | Failed |
| single capacity | 9.0 | 3 | Failed |
| zero sum | 0.0 | 0 | Passed |
| count after threshold | 4.0 | 3 | Failed |
SHA-256 / d4ee4ff2778d926619cb0a37c049a788c9f59d270be169f2acc900e818bf619b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(gradient_sum, examples, capacity):
denominator=max(1,min(examples,capacity))
return gradient_sum / denominator
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one of capacity three',solve(6*N,N,3),6)
check('full window',solve(12*N,2*N,2),6)
check('empty flush',solve(0,0,4),0)
check('capacity one',solve(7*N,N,1),7)
check('two examples partial',solve(8*N,2*N,5),4)
check('single capacity',solve(9*N,3*N,1),3)
check('zero sum',solve(0,3*N,4),0)
check('count after threshold',solve(12*N,4*N,3),3)
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 |
|---|---|---|---|
| one of capacity three | 6.0 | 6 | Passed |
| full window | 6.0 | 6 | Passed |
| empty flush | 0.0 | 0 | Passed |
| capacity one | 7.0 | 7 | Passed |
| two examples partial | 4.0 | 4 | Passed |
| single capacity | 9.0 | 3 | Failed |
| zero sum | 0.0 | 0 | Passed |
| count after threshold | 4.0 | 3 | Failed |
SHA-256 / ee6a4ee5679030524aa4135999322f469ab52a30e45525a22b1af1929e614084
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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:17.605270+00:00.
Case digest / 24bee2db1a44e9897548e6f864f96b0fd85aa2993f95e9a074ba50ffc5aa486c