{"abstract":"An empty microbatch dilutes the equal-microbatch mean.","category":"Gradient accumulation weighting","checks":7,"contract":"Inputs are already per-microbatch means and a positive participation count. Average nonempty microbatch means equally; empty batches are ignored.","contract_signature":"means, nonempty","evaluation_group":"gradient-accumulation-equal_microbatch","failed_approach":"Using participation counts as weights turns equal segment influence into count weighting.","family":"w3-gradient-accumulation-weighting-equal-microbatch","id":"FA-98856","implementations":{"attempt":{"sha256":"50c7a6d4db0413ca25302dc8610618b5d7d105bdfeb21ac4fc4e8cba0e1237b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(means, nonempty):\n    return sum(m for m,c in zip(means,nonempty) if c) / max(1,sum(nonempty))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('different batch sizes',solve([2*N,4*N],[N,3*N]),3*N)\ncheck('empty batch skipped',solve([0,7*N],[0,1]),7*N)\ncheck('all empty',solve([0,0],[0,0]),0)\ncheck('single batch',solve([5*N],[1]),5*N)\ncheck('three batch means',solve([N,3*N,8*N],[1,1,1]),4*N)\ncheck('empty input',solve([],[]),0)\ncheck('one of two',solve([9*N,0],[1,0]),9*N)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"1d6c1e0cc372d90da0e46f85c5072ad1e9d60bbc47e6c13e75be98c85d8123c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(means, nonempty):\n    return sum(means) / max(1,len(means))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('different batch sizes',solve([2*N,4*N],[N,3*N]),3*N)\ncheck('empty batch skipped',solve([0,7*N],[0,1]),7*N)\ncheck('all empty',solve([0,0],[0,0]),0)\ncheck('single batch',solve([5*N],[1]),5*N)\ncheck('three batch means',solve([N,3*N,8*N],[1,1,1]),4*N)\ncheck('empty input',solve([],[]),0)\ncheck('one of two',solve([9*N,0],[1,0]),9*N)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-gradient-accumulation-weighting-equal-microbatch","generated_at":"2026-09-30T16:48:17.605732+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic toy model isolates one local accumulation contract.","root_cause":"Empty segments are included in the divisor, although only participating segment means belong in this contract.","sha256":"b7dd0e370bf5a4744302b1a9b702ae4e72e2dfb2a43bfb18efed7636e2c6c777","title":"An empty microbatch dilutes the equal-microbatch mean · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":27.852,"exit_code":1,"observations":[{"actual":1.5,"check":"different batch sizes","expected":3,"passed":false},{"actual":7.0,"check":"empty batch skipped","expected":7,"passed":true},{"actual":0.0,"check":"all empty","expected":0,"passed":true},{"actual":5.0,"check":"single batch","expected":5,"passed":true},{"actual":4.0,"check":"three batch means","expected":4,"passed":true},{"actual":0.0,"check":"empty input","expected":0,"passed":true},{"actual":9.0,"check":"one of two","expected":9,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different batch sizes\", \"actual\": 1.5, \"expected\": 3, \"passed\": false}, {\"check\": \"empty batch skipped\", \"actual\": 7.0, \"expected\": 7, \"passed\": true}, {\"check\": \"all empty\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"single batch\", \"actual\": 5.0, \"expected\": 5, \"passed\": true}, {\"check\": \"three batch means\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"empty input\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"one of two\", \"actual\": 9.0, \"expected\": 9, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.159,"exit_code":1,"observations":[{"actual":3.0,"check":"different batch sizes","expected":3,"passed":true},{"actual":3.5,"check":"empty batch skipped","expected":7,"passed":false},{"actual":0.0,"check":"all empty","expected":0,"passed":true},{"actual":5.0,"check":"single batch","expected":5,"passed":true},{"actual":4.0,"check":"three batch means","expected":4,"passed":true},{"actual":0.0,"check":"empty input","expected":0,"passed":true},{"actual":4.5,"check":"one of two","expected":9,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different batch sizes\", \"actual\": 3.0, \"expected\": 3, \"passed\": true}, {\"check\": \"empty batch skipped\", \"actual\": 3.5, \"expected\": 7, \"passed\": false}, {\"check\": \"all empty\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"single batch\", \"actual\": 5.0, \"expected\": 5, \"passed\": true}, {\"check\": \"three batch means\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"empty input\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"one of two\", \"actual\": 4.5, \"expected\": 9, \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}