FA-98881 / Gradient accumulation weighting / Open access
Vector coordinates use the number of microbatches as denominator · case 01
Vector coordinates use the number of microbatches as denominator.
ROOT CAUSE
The broken path divides vector coordinates by microbatch count rather than example count.
THE FAILURE
The broken path divides vector coordinates by microbatch count rather than example count.
Unsuccessful approach: Averaging per-microbatch coordinate means retains unequal batch weighting.
Case contract
Equal-width vectors contain coordinatewise summed gradients. Divide every coordinate by the same total example count; empty input returns [].
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_vectors, example_counts):
return [sum(row[j] for row in gradient_vectors) / max(1,len(gradient_vectors)) for j in range(len(gradient_vectors[0]))] if gradient_vectors else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('two coordinates',solve([[2*N,4*N],[12*N,8*N]],[N,3*N]),[3.5,3])
check('single vector',solve([[5*N,7*N]],[N]),[5,7])
check('empty',solve([],[]),[])
check('zero coordinate',solve([[0,2*N],[8*N,4*N]],[N,3*N]),[2,1.5])
check('one coordinate',solve([[8*N],[2*N]],[4,1]),[2*N])
check('three vectors',solve([[N],[6*N],[8*N]],[1,2,4]),[15*N/7])
check('unequal counts',solve([[4*N,8*N],[2*N,4*N]],[2,1]),[2*N,4*N])
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 |
|---|---|---|---|
| two coordinates | [7.0, 6.0] | [3.5, 3] | Failed |
| single vector | [5.0, 7.0] | [5, 7] | Passed |
| empty | [] | [] | Passed |
| zero coordinate | [4.0, 3.0] | [2, 1.5] | Failed |
| one coordinate | [5.0] | [2] | Failed |
| three vectors | [5.0] | [2.142857142857143] | Failed |
| unequal counts | [3.0, 6.0] | [2, 4] | Failed |
SHA-256 / 0de61ef73302eb69bc85d14c95311e01fe5dade73c5ac9aa7e0bdaeb7fdd0a56
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(gradient_vectors, example_counts):
return [sum(row[j] / c for row,c in zip(gradient_vectors,example_counts)) / max(1,len(gradient_vectors)) for j in range(len(gradient_vectors[0]))] if gradient_vectors else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('two coordinates',solve([[2*N,4*N],[12*N,8*N]],[N,3*N]),[3.5,3])
check('single vector',solve([[5*N,7*N]],[N]),[5,7])
check('empty',solve([],[]),[])
check('zero coordinate',solve([[0,2*N],[8*N,4*N]],[N,3*N]),[2,1.5])
check('one coordinate',solve([[8*N],[2*N]],[4,1]),[2*N])
check('three vectors',solve([[N],[6*N],[8*N]],[1,2,4]),[15*N/7])
check('unequal counts',solve([[4*N,8*N],[2*N,4*N]],[2,1]),[2*N,4*N])
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 |
|---|---|---|---|
| two coordinates | [3.0, 3.333333333333333] | [3.5, 3] | Failed |
| single vector | [5.0, 7.0] | [5, 7] | Passed |
| empty | [] | [] | Passed |
| zero coordinate | [1.3333333333333333, 1.6666666666666665] | [2, 1.5] | Failed |
| one coordinate | [2.0] | [2] | Passed |
| three vectors | [2.0] | [2.142857142857143] | Failed |
| unequal counts | [2.0, 4.0] | [2, 4] | Passed |
SHA-256 / eb9595d049efefc0474ea184cba1bd540e6afaf417fb95ff3760987306683731
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.066167+00:00.
Case digest / 7cf8e16844b761249dc9faf2582379f6f58535a40d90f2d224d7d56305b0d1d6