{"abstract":"Per-worker loss means receive equal weight despite different token counts.","category":"Distributed training aggregation","checks":6,"contract":"Rows are [loss_sum, valid_count]; return global token mean or None when total count is zero.","contract_signature":"rows","evaluation_group":"w3-dta-weighted-loss-sum","failed_approach":"Weighting each local mean by its token count but dividing by worker count still does not normalize by global token count.","family":"w3-distributed-training-aggregation-weighted-loss-sum","id":"FA-99256","implementations":{"attempt":{"sha256":"499970e209a0ac0353cc906b45a42e27e01dbc6f17ea2209fd54cddf7b5a0c4d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return sum((x/c)*c for x,c in rows if c)/len(rows) if rows else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal tokens',solve([[N,1],[9*N,3]]),2.5*N)\ncheck('equal token split',solve([[2*N,2],[4*N,2]]),1.5*N)\ncheck('empty',solve([]),None)\ncheck('zero counts',solve([[N,0]]),None)\ncheck('zero worker ignored',solve([[N,0],[6*N,2]]),3*N)\ncheck('single batch',solve([[5*N,5]]),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":"75cf1207c52c6bc25516266fe744345eea2f0195c829f4499f61a4d2a0980f8a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return sum(x/c for x,c in rows if c)/len(rows) if rows else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal tokens',solve([[N,1],[9*N,3]]),2.5*N)\ncheck('equal token split',solve([[2*N,2],[4*N,2]]),1.5*N)\ncheck('empty',solve([]),None)\ncheck('zero counts',solve([[N,0]]),None)\ncheck('zero worker ignored',solve([[N,0],[6*N,2]]),3*N)\ncheck('single batch',solve([[5*N,5]]),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 already materialized Python values from a fixed toy collective; no transport, failure recovery, optimizer state, or real model behavior is represented. 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-distributed-training-aggregation-weighted-loss-sum","generated_at":"2026-09-30T16:48:22.178268+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A toy distributed-training contract makes replica and shard contribution rules explicit without claiming framework compatibility or performance.","root_cause":"Averaging local token means gives each worker equal influence even when their valid-token counts differ.","sha256":"579c8ef17540958bcd9f38e0bc09331c1de28ed0ddd996c4bf9746305f4bf662","title":"Per-worker loss means receive equal weight despite different token counts · 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":31.116,"exit_code":1,"observations":[{"actual":5.0,"check":"unequal tokens","expected":2.5,"passed":false},{"actual":3.0,"check":"equal token split","expected":1.5,"passed":false},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":0.0,"check":"zero counts","expected":null,"passed":false},{"actual":3.0,"check":"zero worker ignored","expected":3,"passed":true},{"actual":5.0,"check":"single batch","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal tokens\", \"actual\": 5.0, \"expected\": 2.5, \"passed\": false}, {\"check\": \"equal token split\", \"actual\": 3.0, \"expected\": 1.5, \"passed\": false}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero counts\", \"actual\": 0.0, \"expected\": null, \"passed\": false}, {\"check\": \"zero worker ignored\", \"actual\": 3.0, \"expected\": 3, \"passed\": true}, {\"check\": \"single batch\", \"actual\": 5.0, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.967,"exit_code":1,"observations":[{"actual":2.0,"check":"unequal tokens","expected":2.5,"passed":false},{"actual":1.5,"check":"equal token split","expected":1.5,"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":0.0,"check":"zero counts","expected":null,"passed":false},{"actual":1.5,"check":"zero worker ignored","expected":3,"passed":false},{"actual":1.0,"check":"single batch","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal tokens\", \"actual\": 2.0, \"expected\": 2.5, \"passed\": false}, {\"check\": \"equal token split\", \"actual\": 1.5, \"expected\": 1.5, \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero counts\", \"actual\": 0.0, \"expected\": null, \"passed\": false}, {\"check\": \"zero worker ignored\", \"actual\": 1.5, \"expected\": 3, \"passed\": false}, {\"check\": \"single batch\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}], \"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."}}