{"abstract":"Gradient shards are clipped independently rather than by the global norm.","category":"Distributed training aggregation","checks":7,"contract":"Given disjoint gradient shards and a nonnegative limit, return the same shard layout scaled by min(1, limit/global_L2_norm); zero norm uses scale one and results are rounded to 12 decimals.","contract_signature":"shards, limit","evaluation_group":"w3-dta-global-norm-clip","failed_approach":"Using the global root-mean-square magnitude instead of the L2 norm still underestimates the combined norm when coordinates span multiple shards.","family":"w3-distributed-training-aggregation-global-norm-clip","id":"FA-99266","implementations":{"attempt":{"sha256":"ab79be2f71aab62cf1b615b1f2eaad633f8bbb937a890818810c8f0dae7116b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards, limit):\n    total=sum(v*v for shard in shards for v in shard); count=sum(len(shard) for shard in shards)\n    norm=(total/count)**0.5 if count else 0\n    scale=min(1,limit/norm) if norm else 1\n    return [[round(v*scale,12) for v in shard] for shard in shards]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('norm spans two shards',solve([[3*N,0],[0,4*N]],2*N),[[round(1.2*N,12),0],[0,round(1.6*N,12)]])\ncheck('uneven shard widths',solve([[3*N],[4*N,0]],2*N),[[round(1.2*N,12)],[round(1.6*N,12),0]])\ncheck('below limit remains unchanged',solve([[N],[N]],2*N),[[N],[N]])\ncheck('single shard same global rule',solve([[3*N,4*N]],3*N),[[round(1.8*N,12),round(2.4*N,12)]])\ncheck('zero norm',solve([[0,0],[]],N),[[0,0],[]])\ncheck('zero limit',solve([[N]],0),[[0]])\ncheck('empty shards',solve([],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":"0976d76ff7cefd6d7129e98d2237d0171cc94d84009d2fc0c380ee7aaef79c71","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards, limit):\n    out=[]\n    for shard in shards:\n        norm=sum(v*v for v in shard)**0.5\n        scale=min(1,limit/norm) if norm else 1\n        out.append([round(v*scale,12) for v in shard])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('norm spans two shards',solve([[3*N,0],[0,4*N]],2*N),[[round(1.2*N,12),0],[0,round(1.6*N,12)]])\ncheck('uneven shard widths',solve([[3*N],[4*N,0]],2*N),[[round(1.2*N,12)],[round(1.6*N,12),0]])\ncheck('below limit remains unchanged',solve([[N],[N]],2*N),[[N],[N]])\ncheck('single shard same global rule',solve([[3*N,4*N]],3*N),[[round(1.8*N,12),round(2.4*N,12)]])\ncheck('zero norm',solve([[0,0],[]],N),[[0,0],[]])\ncheck('zero limit',solve([[N]],0),[[0]])\ncheck('empty shards',solve([],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-global-norm-clip","generated_at":"2026-09-30T16:48:22.178536+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":"Each rank computes a clipping factor from only its locally owned coordinates.","sha256":"72c690d2cd7825d9b2073714700a8e7b21a076f535a0b9534ef607479305551f","title":"Gradient shards are clipped independently rather than by the global norm · 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.072,"exit_code":1,"observations":[{"actual":[[2.4,0.0],[0.0,3.2]],"check":"norm spans two shards","expected":[[1.2,0],[0,1.6]],"passed":false},{"actual":[[2.078460969083],[2.77128129211,0.0]],"check":"uneven shard widths","expected":[[1.2],[1.6,0]],"passed":false},{"actual":[[1],[1]],"check":"below limit remains unchanged","expected":[[1],[1]],"passed":true},{"actual":[[2.545584412272,3.394112549695]],"check":"single shard same global rule","expected":[[1.8,2.4]],"passed":false},{"actual":[[0,0],[]],"check":"zero norm","expected":[[0,0],[]],"passed":true},{"actual":[[0.0]],"check":"zero limit","expected":[[0]],"passed":true},{"actual":[],"check":"empty shards","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"norm spans two shards\", \"actual\": [[2.4, 0.0], [0.0, 3.2]], \"expected\": [[1.2, 0], [0, 1.6]], \"passed\": false}, {\"check\": \"uneven shard widths\", \"actual\": [[2.078460969083], [2.77128129211, 0.0]], \"expected\": [[1.2], [1.6, 0]], \"passed\": false}, {\"check\": \"below limit remains unchanged\", \"actual\": [[1], [1]], \"expected\": [[1], [1]], \"passed\": true}, {\"check\": \"single shard same global rule\", \"actual\": [[2.545584412272, 3.394112549695]], \"expected\": [[1.8, 2.4]], \"passed\": false}, {\"check\": \"zero norm\", \"actual\": [[0, 0], []], \"expected\": [[0, 0], []], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [[0.0]], \"expected\": [[0]], \"passed\": true}, {\"check\": \"empty shards\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.339,"exit_code":1,"observations":[{"actual":[[2.0,0.0],[0.0,2.0]],"check":"norm spans two shards","expected":[[1.2,0],[0,1.6]],"passed":false},{"actual":[[2.0],[2.0,0.0]],"check":"uneven shard widths","expected":[[1.2],[1.6,0]],"passed":false},{"actual":[[1],[1]],"check":"below limit remains unchanged","expected":[[1],[1]],"passed":true},{"actual":[[1.8,2.4]],"check":"single shard same global rule","expected":[[1.8,2.4]],"passed":true},{"actual":[[0,0],[]],"check":"zero norm","expected":[[0,0],[]],"passed":true},{"actual":[[0.0]],"check":"zero limit","expected":[[0]],"passed":true},{"actual":[],"check":"empty shards","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"norm spans two shards\", \"actual\": [[2.0, 0.0], [0.0, 2.0]], \"expected\": [[1.2, 0], [0, 1.6]], \"passed\": false}, {\"check\": \"uneven shard widths\", \"actual\": [[2.0], [2.0, 0.0]], \"expected\": [[1.2], [1.6, 0]], \"passed\": false}, {\"check\": \"below limit remains unchanged\", \"actual\": [[1], [1]], \"expected\": [[1], [1]], \"passed\": true}, {\"check\": \"single shard same global rule\", \"actual\": [[1.8, 2.4]], \"expected\": [[1.8, 2.4]], \"passed\": true}, {\"check\": \"zero norm\", \"actual\": [[0, 0], []], \"expected\": [[0, 0], []], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [[0.0]], \"expected\": [[0]], \"passed\": true}, {\"check\": \"empty shards\", \"actual\": [], \"expected\": [], \"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."}}