FA-98911 / Gradient accumulation weighting / Open access
Flush emits a normalized result without clearing its accumulator · case 01
Flush emits a normalized result without clearing its accumulator.
ROOT CAUSE
The broken flush returns the normalized value but leaves all accumulated state available for accidental reuse.
THE FAILURE
The broken flush returns the normalized value but leaves all accumulated state available for accidental reuse.
Unsuccessful approach: Clearing only the count leaves a stale numerator in the next window.
Case contract
Given [sum,count], flush returns [mean, [0,0]]. Empty state has mean zero; all state is cleared for the next window.
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(state):
return [state[0] / state[1] if state[1] else 0,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('flush populated',solve([12*N,3*N]),[4, [0,0]])
check('flush singleton',solve([5*N,N]),[5,[0,0]])
check('flush empty',solve([0,0]),[0,[0,0]])
check('flush zero numerator',solve([0,3*N]),[0,[0,0]])
check('flush unequal',solve([14*N,4*N]),[3.5,[0,0]])
check('flush unit',solve([9*N,3*N]),[3,[0,0]])
check('flush larger',solve([20*N,4*N]),[5,[0,0]])
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 |
|---|---|---|---|
| flush populated | [4.0, [12, 3]] | [4, [0, 0]] | Failed |
| flush singleton | [5.0, [5, 1]] | [5, [0, 0]] | Failed |
| flush empty | [0, [0, 0]] | [0, [0, 0]] | Passed |
| flush zero numerator | [0.0, [0, 3]] | [0, [0, 0]] | Failed |
| flush unequal | [3.5, [14, 4]] | [3.5, [0, 0]] | Failed |
| flush unit | [3.0, [9, 3]] | [3, [0, 0]] | Failed |
| flush larger | [5.0, [20, 4]] | [5, [0, 0]] | Failed |
SHA-256 / 206854cb1254f931634f1e8dbe241f04e43b1590b1ce817f175564f2e6df9e04
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(state):
return [state[0] / state[1] if state[1] else 0,[state[0],0]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('flush populated',solve([12*N,3*N]),[4, [0,0]])
check('flush singleton',solve([5*N,N]),[5,[0,0]])
check('flush empty',solve([0,0]),[0,[0,0]])
check('flush zero numerator',solve([0,3*N]),[0,[0,0]])
check('flush unequal',solve([14*N,4*N]),[3.5,[0,0]])
check('flush unit',solve([9*N,3*N]),[3,[0,0]])
check('flush larger',solve([20*N,4*N]),[5,[0,0]])
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 |
|---|---|---|---|
| flush populated | [4.0, [12, 0]] | [4, [0, 0]] | Failed |
| flush singleton | [5.0, [5, 0]] | [5, [0, 0]] | Failed |
| flush empty | [0, [0, 0]] | [0, [0, 0]] | Passed |
| flush zero numerator | [0.0, [0, 0]] | [0, [0, 0]] | Passed |
| flush unequal | [3.5, [14, 0]] | [3.5, [0, 0]] | Failed |
| flush unit | [3.0, [9, 0]] | [3, [0, 0]] | Failed |
| flush larger | [5.0, [20, 0]] | [5, [0, 0]] | Failed |
SHA-256 / 06e32d6575c3134824c5813e92cf5f661d485837b9573089d1b6d45e5811715c
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.065606+00:00.
Case digest / ef84bb13f12366c2f3388b0d6fe0e740a606b21a1830f524a13810a27dc77318