{"abstract":"Vector coordinates use the number of microbatches as denominator.","category":"Gradient accumulation weighting","checks":7,"contract":"Equal-width vectors contain coordinatewise summed gradients. Divide every coordinate by the same total example count; empty input returns [].","contract_signature":"gradient_vectors, example_counts","evaluation_group":"gradient-accumulation-vector_global","failed_approach":"Averaging per-microbatch coordinate means retains unequal batch weighting.","family":"w3-gradient-accumulation-weighting-vector-global","id":"FA-98881","implementations":{"attempt":{"sha256":"eb9595d049efefc0474ea184cba1bd540e6afaf417fb95ff3760987306683731","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(gradient_vectors, example_counts):\n    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 []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two coordinates',solve([[2*N,4*N],[12*N,8*N]],[N,3*N]),[3.5,3])\ncheck('single vector',solve([[5*N,7*N]],[N]),[5,7])\ncheck('empty',solve([],[]),[])\ncheck('zero coordinate',solve([[0,2*N],[8*N,4*N]],[N,3*N]),[2,1.5])\ncheck('one coordinate',solve([[8*N],[2*N]],[4,1]),[2*N])\ncheck('three vectors',solve([[N],[6*N],[8*N]],[1,2,4]),[15*N/7])\ncheck('unequal counts',solve([[4*N,8*N],[2*N,4*N]],[2,1]),[2*N,4*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":"0de61ef73302eb69bc85d14c95311e01fe5dade73c5ac9aa7e0bdaeb7fdd0a56","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(gradient_vectors, example_counts):\n    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 []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two coordinates',solve([[2*N,4*N],[12*N,8*N]],[N,3*N]),[3.5,3])\ncheck('single vector',solve([[5*N,7*N]],[N]),[5,7])\ncheck('empty',solve([],[]),[])\ncheck('zero coordinate',solve([[0,2*N],[8*N,4*N]],[N,3*N]),[2,1.5])\ncheck('one coordinate',solve([[8*N],[2*N]],[4,1]),[2*N])\ncheck('three vectors',solve([[N],[6*N],[8*N]],[1,2,4]),[15*N/7])\ncheck('unequal counts',solve([[4*N,8*N],[2*N,4*N]],[2,1]),[2*N,4*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-vector-global","generated_at":"2026-09-30T16:48:18.066167+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":"The broken path divides vector coordinates by microbatch count rather than example count.","sha256":"7cf8e16844b761249dc9faf2582379f6f58535a40d90f2d224d7d56305b0d1d6","title":"Vector coordinates use the number of microbatches as denominator · 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":32.499,"exit_code":1,"observations":[{"actual":[3.0,3.333333333333333],"check":"two coordinates","expected":[3.5,3],"passed":false},{"actual":[5.0,7.0],"check":"single vector","expected":[5,7],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1.3333333333333333,1.6666666666666665],"check":"zero coordinate","expected":[2,1.5],"passed":false},{"actual":[2.0],"check":"one coordinate","expected":[2],"passed":true},{"actual":[2.0],"check":"three vectors","expected":[2.142857142857143],"passed":false},{"actual":[2.0,4.0],"check":"unequal counts","expected":[2,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two coordinates\", \"actual\": [3.0, 3.333333333333333], \"expected\": [3.5, 3], \"passed\": false}, {\"check\": \"single vector\", \"actual\": [5.0, 7.0], \"expected\": [5, 7], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero coordinate\", \"actual\": [1.3333333333333333, 1.6666666666666665], \"expected\": [2, 1.5], \"passed\": false}, {\"check\": \"one coordinate\", \"actual\": [2.0], \"expected\": [2], \"passed\": true}, {\"check\": \"three vectors\", \"actual\": [2.0], \"expected\": [2.142857142857143], \"passed\": false}, {\"check\": \"unequal counts\", \"actual\": [2.0, 4.0], \"expected\": [2, 4], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":30.477,"exit_code":1,"observations":[{"actual":[7.0,6.0],"check":"two coordinates","expected":[3.5,3],"passed":false},{"actual":[5.0,7.0],"check":"single vector","expected":[5,7],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[4.0,3.0],"check":"zero coordinate","expected":[2,1.5],"passed":false},{"actual":[5.0],"check":"one coordinate","expected":[2],"passed":false},{"actual":[5.0],"check":"three vectors","expected":[2.142857142857143],"passed":false},{"actual":[3.0,6.0],"check":"unequal counts","expected":[2,4],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two coordinates\", \"actual\": [7.0, 6.0], \"expected\": [3.5, 3], \"passed\": false}, {\"check\": \"single vector\", \"actual\": [5.0, 7.0], \"expected\": [5, 7], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero coordinate\", \"actual\": [4.0, 3.0], \"expected\": [2, 1.5], \"passed\": false}, {\"check\": \"one coordinate\", \"actual\": [5.0], \"expected\": [2], \"passed\": false}, {\"check\": \"three vectors\", \"actual\": [5.0], \"expected\": [2.142857142857143], \"passed\": false}, {\"check\": \"unequal counts\", \"actual\": [3.0, 6.0], \"expected\": [2, 4], \"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."}}