Ilikemechuri commited on
Commit
69fcc79
ยท
verified ยท
1 Parent(s): 46229b5

Translate DiLoCo replay audit documentation to English

Browse files
Files changed (1) hide show
  1. README.md +50 -52
README.md CHANGED
@@ -247,27 +247,27 @@ python clean_training_nondeterministic.py --repo-dir .
247
 
248
  The model-poisoning and backdoor scenarios follow threat families studied in federated learning, including [local model poisoning](https://www.usenix.org/conference/usenixsecurity20/presentation/fang) and [model replacement for backdoor injection](https://proceedings.mlr.press/v108/bagdasaryan20a.html).
249
 
250
- ## ์‚ฌํ›„ ์žฌ์‹คํ–‰ ๊ฐ์‚ฌ์™€ GPU๋ณ„ ํ—ˆ์šฉ์˜ค์ฐจ
251
 
252
- ์ด ์ ˆ์€ ๊ณต๊ฐœ ์Šค๋ƒ…์ƒท `c5373f0dd887a8faf3d85bee9911a009175b8a33`์—์„œ ํ™•์ธํ•œ ๊ฒฝ๋ณด ๊ธฐ์ค€๊ณผ ์ €์žฅ ๋ธํƒ€์˜ ์žฌ๊ณ„์‚ฐ ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋กํ•œ๋‹ค. ๋’ค์˜ ๋ผ์šด๋“œ ๊ธฐ๋ก, ๋‚œ์ˆ˜ ์ง€๋ฌธ, ์‚ฌํ›„ ๊ฐ์‚ฌ ์ ˆ์ฐจ๋Š” DiLoCo์— ์ ์šฉํ•˜๊ธฐ ์œ„ํ•œ ์„ค๊ณ„ ์ œ์•ˆ์ด๋‹ค.
253
 
254
- ํ˜„์žฌ ํ•™์Šต ์ฝ”๋“œ๋Š” GPT-2์™€ FineWeb-Edu๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ, ๊ฒฐ๊ณผ ํŒŒ์ผ์˜ `data_sha256` ํ•„๋“œ์—๋Š” SHA-256 ์•ž 16์ž๋ฆฌ๋งŒ ์ €์žฅ๋œ๋‹ค. ํ† ํฌ๋‚˜์ด์ €, ๋ชจ๋ธ, ๋ฐ์ดํ„ฐ์…‹ revision๊ณผ ์‹ค์ œ ๋ฐฐ์น˜ ์ˆœ์„œ, ์‹œ์ž‘ ๋ชจ๋ธยทoptimizerยทRNG์˜ ์™„์ „ํ•œ ์ƒํƒœ๋Š” ์‚ฌํ›„ ์žฌ์‹คํ–‰์„ ์œ„ํ•ด ์ถ”๊ฐ€๋กœ ๊ณ ์ •ํ•˜๊ณ  ๋ณด์กดํ•ด์•ผ ํ•œ๋‹ค. DDP ์‹คํ—˜์€ ๋ˆ„์  gradient๋ฅผ ๋™๊ธฐํ™”ํ•˜๋Š” ๋กœ์ปฌ ์‹คํ–‰์œผ๋กœ, DiLoCo ์™ธ๋ถ€ ๋ผ์šด๋“œ์˜ ์ง‘๊ณ„ ์ด๋ ฅ์€ ๋ณ„๋„๋กœ ๊ธฐ๋กํ•ด์•ผ ํ•œ๋‹ค. [๋‹จ์ผ GPU ์ฝ”๋“œ](delta_train.py) ยท [DDP ์ฝ”๋“œ](delta_train_multi_gpu.py)
255
 
256
- ### ํ˜„์žฌ ์ €์žฅ์†Œ์˜ ๊ฒฝ๋ณด ๊ธฐ์ค€
257
 
258
- | ๊ฒ€์‚ฌ | ๊ฒฝ๋ณด ์กฐ๊ฑด | ๊ธฐ์ค€๊ฐ’ |
259
  | --- | --- | --- |
260
- | ์ „์—ญ ์ตœ๊ทผ์ ‘ | ์ตœ๊ทผ์ ‘ ์ •์ƒ ์ฐธ์กฐ์— ๋Œ€ํ•œ cosine์ด ๊ธฐ์ค€ ๋ฏธ๋งŒ์ด๊ฑฐ๋‚˜ ์ „์ฒด ์ ˆ๋Œ€ L2๊ฐ€ ๊ธฐ์ค€ ์ดˆ๊ณผ | cosine 0.999237, L2 1.137659. ํ›„์ž๋Š” RTX 3060 ๊ธฐ์ค€ ๋ธํƒ€ norm์˜ ์•ฝ 3.93%์— ํ•ด๋‹น |
261
- | ํ…์„œ๋ณ„ L2 | `min_ref L2(candidate_t, ref_t) / max(์ •์ƒ ์ฐธ์กฐ ์Œ์˜ ์ตœ๋Œ€ L2, 1e-8) > 1` | ํ…์„œ 148๊ฐœ ๊ฐ๊ฐ ๋ณ„๋„. ํ•˜๋‚˜ ์ด์ƒ์ด๋ฉด ํ›„๋ณด ๊ฒฝ๋ณด |
262
- | ํ…์„œ๋ณ„ ์ง€๋ฌธ + L2 norm | ๊ฐ ์ฐธ์กฐ์— ๋Œ€ํ•ด Hammingยทnorm ์ •๊ทœํ™” ์ ์ˆ˜ ์ค‘ ํฐ ๊ฐ’์„ ๊ตฌํ•˜๊ณ , ๊ทธ ๊ฐ’์ด ๊ฐ€์žฅ ์ž‘์€ ๋™์ผ ์ฐธ์กฐ์—์„œ๋„ ์ ์ˆ˜๊ฐ€ 1 ์ดˆ๊ณผ | Hamming ํ—ˆ์šฉ์น˜ ์ค‘์•™๊ฐ’ 24 / 2,048๋น„ํŠธ, ์ตœ๋Œ€ 83 / 2,048๋น„ํŠธ. norm ์ƒ๋Œ€์˜ค์ฐจ ํ—ˆ์šฉ์น˜ ์ค‘์•™๊ฐ’ 0.108%, ์ตœ๋Œ€ 2.075% |
263
 
264
- ์ง€๋ฌธ ์ ์ˆ˜๋Š” `min_ref max(Hamming / max(Hamming_limit_t, 1), norm_rel_error / norm_limit_t)`์ด๋‹ค. norm ์ƒ๋Œ€์˜ค์ฐจ๋Š” ๋‘ norm์˜ ์ฐจ์ด ์ ˆ๋Œ“๊ฐ’์„ ๋‘ norm์˜ ์ตœ๋Œ“๊ฐ’์œผ๋กœ ๋‚˜๋ˆˆ ๊ฐ’์ด๋‹ค. ํ•œ ํ…์„œ๊ฐ€ ํ†ต๊ณผํ•˜๋ ค๋ฉด ๊ฐ™์€ ์ฐธ์กฐ์—์„œ ๋‘ ์กฐ๊ฑด์„ ๋งŒ์กฑํ•ด์•ผ ํ•œ๋‹ค. ์œ„ ์ค‘์•™๊ฐ’๊ณผ ์ตœ๋Œ“๊ฐ’์€ ์ž„๊ณ„๊ฐ’ ๋ถ„ํฌ์˜ ์š”์•ฝ์ด๋‹ค. ํ…์„œ ์ด๋ฆ„๋ณ„ ์ •ํ™•ํ•œ ์ˆ˜์น˜๋Š” CSV์˜ `projection_threshold_hamming`, `norm_relative_threshold`, `reference_max_pair_l2` ์—ด์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ƒˆ ์ง€๋ฌธ ์ •์ฑ…์€ ์ •์ƒ ์žฌ์‹คํ–‰์—์„œ ์—ฌ๋Ÿฌ ๋…๋ฆฝ seed๋ฅผ ํ•จ๊ป˜ ์ƒ˜ํ”Œ๋งํ•ด seed ๋ณ€๋™์„ ํฌํ•จํ•œ ์ž„๊ณ„๊ฐ’์„ ๋ณด์ •ํ•œ๋‹ค. ํ”„๋กœํ•„์ด ๋ฐ”๋€Œ๋ฉด ํ•ด๋‹น ์กฐํ•ฉ์—์„œ ๋‹ค์‹œ ๋ณด์ •ํ•œ๋‹ค. [์ง€๋ฌธ ์ž„๊ณ„๊ฐ’ CSV](per_tensor_random_projection_fingerprint/tensor_metrics.csv) ยท [ํ…์„œ L2 ์ž„๊ณ„๊ฐ’ CSV](tensor_poisoning_audit/tensor_metrics.csv)
265
 
266
- ### ์ €์žฅ ๋ธํƒ€์—์„œ ๋…๋ฆฝ ์žฌ๊ณ„์‚ฐํ•œ GPU๋ณ„ ์ฐจ์ด
267
 
268
- `delta_single_gpu_nvidia-geforce-rtx-3060`์˜ ๊ฐ™์€ ์ •๋ฐ€๋„ ํŒŒ์ผ์„ ๊ธฐ์ค€์œผ๋กœ, ์ด๋ฆ„์ด ์ผ์น˜ํ•˜๋Š” 148๊ฐœ ํ…์„œยท124,439,808๊ฐœ ์›์†Œ๋ฅผ FP64๋กœ ์ฝ์–ด ์ฐจ์ด๋ฅผ ๋ˆ„์‚ฐํ–ˆ๋‹ค. ์ „์ฒด ์ƒ๋Œ€ L2์˜ ๋ถ„๋ชจ๋Š” ๊ธฐ์ค€ ์ „์ฒด ๋ธํƒ€์˜ L2, ํ…์„œ๋ณ„ ์ˆ˜์น˜์˜ ๋ถ„๋ชจ๋Š” ํ•ด๋‹น ๊ธฐ์ค€ ํ…์„œ์˜ L2๋‹ค. BF16์€ ์›๋ณธ์˜ ํ•™์Šต ๋ชจ๋“œ๋ฅผ ๋œปํ•˜๋ฉฐ, ๋ธํƒ€ ํŒŒ์ผ์€ ๋‘ ๋ชจ๋“œ ๋ชจ๋‘ FP32๋กœ ์ €์žฅ๋๋‹ค.
269
 
270
- | ๋น„๊ต ๋Œ€์ƒ | ํ•™์Šต ๋ชจ๋“œ | Cosine | ์ „์ฒด L2 | ์ „์ฒด ์ƒ๋Œ€ L2 | ํ…์„œ๋ณ„ ์ƒ๋Œ€ L2 ์ค‘์•™๊ฐ’ | ํ…์„œ๋ณ„ ์ƒ๋Œ€ L2 ์ตœ๋Œ€ |
271
  | --- | --- | ---: | ---: | ---: | ---: | ---: |
272
  | GeForce RTX 3060 + GeForce RTX 3060 | FP32 | 0.99996788 | 0.235570 | 0.813% | 0.641% | 1.722% |
273
  | CMP 170HX | FP32 | 0.99938010 | 1.024766 | 3.536% | 3.574% | 11.126% |
@@ -283,62 +283,60 @@ The model-poisoning and backdoor scenarios follow threat families studied in fed
283
  | L4 | BF16 | 0.99593113 | 2.520465 | 9.053% | 7.868% | 134.928% |
284
  | RTX PRO 6000 Blackwell Workstation Edition | BF16 | 0.99906424 | 1.216129 | 4.368% | 6.005% | 121.920% |
285
 
286
- ๊ฐ™์€ RTX 3060 ๋‹จ์ผ GPU์˜ FP32์™€ BF16 ๊ฐ„ ์ „์ฒด ์ƒ๋Œ€ L2๋Š” FP32๋ฅผ ๋ถ„๋ชจ๋กœ **20.722%**์˜€๋‹ค. ์žฅ๋น„๋‹น ์ €์žฅ๋œ ํ•œ ์‹คํ–‰์˜ ๋น„๊ต์ด๋ฏ€๋กœ ๋“œ๋ผ์ด๋ฒ„ยท์ปค๋„ ์ฐจ์ด๋ฅผ GPU ๋ชจ๋ธ ํšจ๊ณผ์™€ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์—†๋‹ค. ์ด๋ฒˆ ๋…๋ฆฝ ์žฌ๊ณ„์‚ฐ์€ ๋ณด๊ด€๋œ ๋ธํƒ€์˜ ๋น„๊ต์ด๋ฉฐ, ์ด ํ™˜๊ฒฝ์˜ L4 ํ•œ ์žฅ์—์„œ ์› ํ•™์Šต์ด๋‚˜ 2-GPU DDP๋ฅผ ์ƒˆ๋กœ ๋Œ๋ ค ๊ฒ€์ฆํ•œ ๊ฒฐ๊ณผ๋Š” ์•„๋‹ˆ๋‹ค.
287
 
288
- ### ๋ผ์šด๋“œ ๊ธฐ๋ก๊ณผ ์‹ ๋ขฐ ๊ฐ€์ •
289
 
290
- ํ•™์Šต ๋…ธ๋“œ์™€ ์ง‘๊ณ„๊ธฐ๋Š” ์ž˜๋ชป๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์ œ์ถœํ•˜๊ฑฐ๋‚˜ ๊ฐ€์šฉ์„ฑ์„ ์žƒ์„ ์ˆ˜ ์žˆ๋‹ค. ๊ฐ์‚ฌ์ž์™€ ๋กœ๊ทธ ์ฆ์ธ์€ ์šด์˜ ์ฃผ์ฒด๋ฅผ ๋ถ„๋ฆฌํ•œ๋‹ค. ๊ฒ€์ฆ์ž๋Š” ๊ณต๊ฐœ ๋ฐ์ดํ„ฐ์™€ ์•„ํ‹ฐํŒฉํŠธ๋ฅผ ์ฝ์„ ์ˆ˜ ์žˆ๊ณ , ๋ถ„์Ÿ ์‹œ ๋ณ„๋„ GPU์—์„œ ์ง€์ • ๊ตฌ๊ฐ„ ๋˜๋Š” ์ „์ฒด ๋ผ์šด๋“œ๋ฅผ ์žฌ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•œ๋‹ค. ๋…๋ฆฝ ์ฆ์ธ์ด ๋ชจ๋‘ ๋‹ดํ•ฉํ•˜๊ฑฐ๋‚˜ ๋ณด์กด๋ณธ์ด ๋ชจ๋‘ ์œ ์‹ค๋˜๋ฉด ์‚ฌํ›„ ๊ฒ€์ฆ์˜ ๋ณด์žฅ์ด ์‚ฌ๋ผ์ง„๋‹ค.
291
 
292
- | ๊ธฐ๋ก | ํ•„์ˆ˜ ํ•„๋“œ |
293
  | --- | --- |
294
- | ์‹คํ–‰ ์ •์ฑ… `run_manifest` | ์ฝ”๋“œ ์ปค๋ฐ‹ยท์ด๋ฏธ์ง€ digestยท๋นŒ๋“œ/๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฒ„์ „, ๋ชจ๋ธยทํ† ํฌ๋‚˜์ด์ €ยท๋ฐ์ดํ„ฐ ์›๋ณธ revision, shard ๋ฐ ํ† ํฐ ์ฒญํฌ SHA-256, ๋ฌธ์„œ/์ƒ˜ํ”Œ ์ˆœ์„œยทpackingยทEOSยทmaskยทloss ๊ทœ์น™, step๋ณ„ ๋ฐฐ์น˜ ๋˜๋Š” ์ด๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ณ ์ • ์•Œ๊ณ ๋ฆฌ์ฆ˜๊ณผ seed, ๊ฐ์‚ฌ ์ •์ฑ…๊ณผ ๊ณต๊ฐœ ๋‚œ์ˆ˜ ์ถœ์ฒ˜ |
295
- | ์›Œ์ปค ์ œ์ถœ `worker_commit` | runยทroundยทworkerยทattempt ID, ์‹œ์ž‘ ๊ธ€๋กœ๋ฒŒ ์ฒดํฌํฌ์ธํŠธ root, ๋กœ์ปฌ ์‹œ์ž‘ ์ƒํƒœ root, ์ตœ์ข… ์ƒํƒœยท์ „์†ก ๋ธํƒ€ root, ์ค‘๊ฐ„ ์ƒํƒœ root ๋ชฉ๋ก, ๋ฐ์ดํ„ฐ ๋ฐฐ์ • root, ํ™˜๊ฒฝ ํ”„๋กœํ•„, ์—…๋ฐ์ดํŠธ stepยทํ† ํฐ ์ˆ˜, ๋…ธ๋“œ ์„œ๋ช… |
296
- | ์žฌ์‹œ์ž‘ ์ƒํƒœ | ๋ชจ๋ธ๊ณผ buffer, AdamW moment ๋ฐ step, scheduler, FP32 master weightsยทloss scaler ์‚ฌ์šฉ ์‹œ ํ•ด๋‹น ๊ฐ’, Python/NumPy/CPU/GPU์˜ rank๋ณ„ RNG ์ƒํƒœ์™€ ๋ฐ์ดํ„ฐ ์œ„์น˜. ์ €์žฅ ๊ฒฝ๊ณ„๋Š” optimizer step ์งํ›„๋กœ ํ†ต์ผํ•˜๊ฑฐ๋‚˜ ๋ถ€๋ถ„ ๋ˆ„์  gradient๋„ ๋ณด์กด |
297
- | ์ง‘๊ณ„ `round_record` | ์ง์ „ ๊ธฐ๋ก root, ์ „์ฒด ์ œ์ถœ๊ณผ ์ˆ˜๋ฝ/์ œ์™ธ ์ด์œ , ์›Œ์ปค๋ณ„ ๊ฐ€์ค‘์น˜, ๋ธํƒ€ ๋ถ€ํ˜ธยท์ •๊ทœํ™”ยทclippingยท์–‘์žํ™” ๊ทœ์น™, ํ•ฉ์‚ฐ ์ˆœ์„œยทdtypeยท๋ฐ˜์˜ฌ๋ฆผ, ์™ธ๋ถ€ optimizer ์ด์ „/์ดํ›„ ์ƒํƒœ root, ๋‹ค์Œ ๊ธ€๋กœ๋ฒŒ ๋ชจ๋ธ root |
298
- | ๊ฐ์‚ฌ `audit_record` | ์ปค๋ฐ‹ ํฌํ•จ ์ฆ๋ช…, ๋‚œ์ˆ˜ ์ฒด์ธ IDยท๊ณต๊ฐœ pulseยท์ฆ๋ช…, ํŒŒ์ƒ seedยท์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฒ„์ „, ์ง€๋ฌธ ๋ฐ ์—ฐ์† ํˆฌ์˜๊ฐ’, ํ‘œ๋ณธ ๊ตฌ๊ฐ„, ์›๋ณธยท์žฌ์‹คํ–‰ ํ™˜๊ฒฝ๊ณผ ํ•ด์‹œ, ๋ณด์ • ์ •์ฑ… ID, ์›์‹œ ์ง€ํ‘œยทํŒ์ •ยท๊ฐ์‚ฌ์ž ์„œ๋ช… |
299
 
300
- DiLoCo์—์„œ๋Š” ์ „์†ก ๋ธํƒ€์˜ ๊ทœ์•ฝ์„ ๋ช…์‹œํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `d_i = W_local - W_global`์„ ์ œ์ถœํ•˜๋ฉด ์™ธ๋ถ€ optimizer์— ๊ณต๊ธ‰ํ•  pseudo-gradient๋ฅผ `-ฮฃ a_i d_i`๋กœ ์ •์˜ํ•  ์ˆ˜ ์žˆ๋‹ค. ์‹œ์ž‘ ๋ชจ๋ธ root๋ฅผ ์ด์ „ ๋ผ์šด๋“œ์˜ ๊ณต์ธ ๊ฒฐ๊ณผ์— ์—ฐ๊ฒฐํ•˜๊ณ  ๋กœ์ปฌ optimizer๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š”์ง€ ์œ ์ง€ํ•˜๋Š”์ง€ ๊ธฐ๋กํ•œ๋‹ค. ์œ ์ง€ํ•  ๊ฒฝ์šฐ ํ•ด๋‹น ์›Œ์ปค์˜ ์ด์ „ ์ธ์ฆ ์ƒํƒœ์—์„œ ์ด์–ด์ ธ์•ผ ํ•œ๋‹ค. ์ง‘๊ณ„๋Š” ์ˆ˜๋ฝ๋œ ์ „์†ก ๋ฐ”์ดํŠธ์—์„œ ๊ฐ์‚ฌ์ž๊ฐ€ ๋‹ค์‹œ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋„๋ก ์ •๋ ฌ๋œ ID ์ˆœ์„œ์™€ ๊ณ ์ • ์ฐธ์กฐ ์—ฐ์‚ฐ์„ ์‚ฌ์šฉํ•œ๋‹ค. ์–‘์žํ™”๋ฅผ ์“ด๋‹ค๋ฉด ์›๋ณธ ๋กœ์ปฌ ์ข…๋ฃŒ ์ƒํƒœ์™€ ์‹ค์ œ ์ „์†ก ํ‘œํ˜„ ์‚ฌ์ด์˜ ๋ณ€ํ™˜๋„ ํ™•์ธํ•œ๋‹ค.
301
 
302
- ํŒŒ์ผ ์ „์ฒด์˜ ํ•ด์‹œ๋Š” ๋‹ค์šด๋กœ๋“œ ๋ฐ ๋ฌด๊ฒฐ์„ฑ ๊ฒ€์‚ฌ์— ์‚ฌ์šฉํ•œ๋‹ค. ํ…์„œ ๋น„๊ต์šฉ root๋Š” ์ด๋ฆ„ยทshapeยทdtypeยทendiannessยท๋ฐ”์ดํŠธ ์ˆœ์„œยท์ฒญํฌ ์ธ๋ฑ์Šค์™€ ๊ธธ์ด๋ฅผ ๋ช…์„ธํ•œ canonical ๋ฐ”์ดํŠธ์—์„œ ๊ณ„์‚ฐํ•œ๋‹ค. ๊ธธ์ด ๊ตฌ๋ถ„๊ณผ ๋„๋ฉ”์ธ ๋ถ„๋ฆฌ๋กœ ๋ชจํ˜ธํ•œ ๊ฒฐํ•ฉ์„ ๋ง‰๊ณ , SHA-256 Merkle root์— ๋…ธ๋“œ๊ฐ€ ์„œ๋ช…ํ•œ๋‹ค. ์—ฌ๋Ÿฌ ์ €์žฅ์†Œ๊ฐ€ ๋ณธ๋ฌธ์„ ๋ณด์กดํ•˜๊ณ  ๋…๋ฆฝ ์ฆ์ธ์ด append-only ๋กœ๊ทธ์˜ ์„œ๋ช…๋œ tree head๋ฅผ ๊ตํ™˜ํ•œ๋‹ค. ์กฐ์‚ฌ ๋•Œ ํฌํ•จยท์ผ๊ด€์„ฑ ์ฆ๋ช…๊ณผ ์ฒญํฌ๋ฅผ ํ™•๋ณดํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค. ๊ฐ™์€ ๋ผ์šด๋“œ์—์„œ ์ถฉ๋Œํ•˜๋Š” ์„œ๋ช… ์ œ์ถœ์€ ๊ฐ๊ด€์  ์ฆ๊ฑฐ๊ฐ€ ๋œ๋‹ค. ๋‹จ์ˆœ ์ˆ˜์น˜ ๋ถˆ์ผ์น˜๋Š” ์žฌ์‹คํ–‰๊ณผ ์›์ธ ์กฐ์‚ฌ๋กœ ๋„˜๊ธด๋‹ค. [Merkle ๋กœ๊ทธ ์„ค๊ณ„ ์ฐธ๊ณ  RFC 9162](https://www.rfc-editor.org/rfc/rfc9162.html)
303
 
304
- ### ๋ธํƒ€๋ฅผ ํ™•์ •ํ•œ ๋’ค ๋ฌด์ž‘์œ„ ์ง€๋ฌธ๊ณผ ์‹œ๋“œ๋ฅผ ๊ณต๊ฐœ
305
 
306
- 1. ๋ผ์šด๋“œ ๋งˆ๊ฐ ์ „์— ์›Œ์ปค๊ฐ€ ์„œ๋ช…๋œ ๋ธํƒ€ root์™€ ๋ชจ๋“  ๊ฒ€์‚ฌ ๊ฒฝ๊ณ„์˜ ์ƒํƒœ root๋ฅผ ๊ฒŒ์‹œํ•œ๋‹ค. ๋…๋ฆฝ ๋ณด๊ด€์ž๊ฐ€ ์‹ค์ œ ๋ณธ๋ฌธ์„ ํ™•๋ณดํ•˜๊ณ  ๊ฒ€์ฆํ•œ ์ œ์ถœ๋งŒ ํฌํ•จํ•œ๋‹ค. ๋™์ผ ์ž‘์—…์˜ ํ—ˆ์šฉ๋œ ์ œ์ถœ์€ ํ•˜๋‚˜๋กœ ๊ณ ์ •ํ•œ๋‹ค. ๋งˆ๊ฐ ๋ฐ ๋‚œ์ˆ˜ pulse ๋ฒˆํ˜ธ๋Š” ์‚ฌ์ „ ์ง€์ •ํ•œ๋‹ค.
307
- 2. ๊ณ ์ • ๋กœ๊ทธ head๋ฅผ ๋…๋ฆฝ ์ฆ์ธ์ด ํ™•์ธํ•œ ๋‹ค์Œ, ์ง€์ •ํ•œ ๋ฏธ๋ž˜ pulse์˜ ๊ณต๊ฐœ ๋‚œ์ˆ˜์™€ ์„œ๋ช…์„ ๊ฒ€์ฆํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `seed = SHA256(canonical("diloco/audit/v1", beacon_id, pulse, beacon_value, run_id, round, worker_id, delta_root))`๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ํ…์„œยท์ฒญํฌยท๊ฒ€์‚ฌ ์šฉ๋„๋งˆ๋‹ค ๋„๋ฉ”์ธ์„ ๋ถ„๋ฆฌํ•ด ํŒŒ์ƒํ•œ๋‹ค. ๋‚œ์ˆ˜ ์ดํ›„ ๊ต์ฒดํ•œ ์ œ์ถœ์€ ์›๋ž˜ ์ž‘์—… ๋Œ€์‹  ์ฑ„ํƒํ•˜์ง€ ์•Š๋Š”๋‹ค. ๋‚œ์ˆ˜ ์žฅ์•  ์‹œ์—๋Š” ์‚ฌ์ „ ์ •์˜๋œ ์ค‘๋‹จ ๋˜๋Š” ๋Œ€์ฒด ์ •์ฑ…์„ ๊ธฐ๋กํ•œ๋‹ค. [drand ๋‚œ์ˆ˜ ๋ฌธ์„œ](https://docs.drand.love/docs/cryptography/)
308
- 3. ๊ฐ์‚ฌ์ž๊ฐ€ root๋กœ ํ™•์ธํ•œ ํ…์„œ์—์„œ ์ง€๋ฌธ์„ ์ง์ ‘ ๊ณ„์‚ฐํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด SHAKE256์œผ๋กœ ์ •์˜๋œ Rademacher ๋ถ€ํ˜ธ์—ด๊ณผ ๊ณ ์ • ์ธ๋ฑ์Šค ์ˆœ์„œ์˜ FP64 ๋ˆ„์‚ฐ์„ ๊ทœ๊ฒฉํ™”ํ•œ๋‹ค. ํ…์„œ๋ณ„ sign bit๏ฟฝ๏ฟฝ Hamming ๊ฑฐ๋ฆฌ, L2, ์ •๊ทœํ™”ํ•œ ์—ฐ์† ํˆฌ์˜๊ฐ’์„ ๋ณด์กดํ•œ๋‹ค. ๋ถ€ํ˜ธ๊ฐ€ 0์ผ ๋•Œ์˜ ๊ทœ์น™๊ณผ ๋น„์œ ํ•œ๊ฐ’ ์ฒ˜๋ฆฌ๋„ ๋ฒ„์ „์— ํฌํ•จํ•œ๋‹ค. GPU๋ณ„ PRNG ๊ตฌํ˜„์— ์˜์กดํ•˜๋ฉด ๋™์ผ seed๋กœ๋„ ๊ฒ€์ฆ์ด ์–ด๋ ต๋‹ค. ์ง€๋ฌธ์„ ์žฌ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ์ž‘์€ ๊ณต๊ฐœ ํ…Œ์ŠคํŠธ ๋ฒกํ„ฐ๋ฅผ ํ•จ๊ป˜ ๋ฐฐํฌํ•œ๋‹ค.
309
- 4. ์žฌ์‹คํ–‰ ๊ฒฐ๊ณผ์—๋„ ๋™์ผ seed๋กœ ํˆฌ์˜ํ•œ๋‹ค. ์‹ค์ œ ๋ณธ๋ฌธ์„ ํ™•์ธํ•˜์ง€ ์•Š์€ ์ฑ„ ์ œ์ถœ์ž๊ฐ€ ์˜ฌ๋ฆฐ ์ง€๋ฌธ๋งŒ์œผ๋กœ ํŒ์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค. ์›๋ณธ๊ณผ ์žฌ์‹คํ–‰์˜ ์ง€๋ฌธ์„ ๊ฐ๊ฐ ๋ณด๊ด€ํ•œ๋‹ค. ๊ธฐ๋ก๋œ seed๋กœ ๋‹น์‹œ ๊ฒ€์‚ฌ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ฐ˜๋ณตํ•  ์ˆ˜ ์žˆ๊ณ , root๊ฐ€ ๊ณ ์ •๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ ํ›—๋‚  ์ƒˆ beacon์œผ๋กœ ์ถ”๊ฐ€ ๊ฒ€์‚ฌ๋„ ๊ฐ€๋Šฅํ•˜๋‹ค. ์ „์ฒด ํ…์„œ๋ฅผ ์ฝ์„ ์ˆ˜ ์žˆ์œผ๋ฉด ํ…์„œ๋ณ„ ์ •ํ™•ํ•œ ์ž”์ฐจ๋ฅผ ํ•จ๊ป˜ ๊ณ„์‚ฐํ•œ๋‹ค. ์ง€๋ฌธ์€ ์ž‘์€ ๊ธฐ๋ก๊ณผ ์ด์ƒ ์œ„์น˜ ํƒ์ƒ‰์— ์“ฐ๊ณ , ํ…์„œ ์›๋ณธ๊ณผ ์žฌ์‹œ์ž‘ ์ƒํƒœ๋ฅผ ๋ณด์กดํ•œ๋‹ค.
310
 
311
- ์—ฐ์† ํˆฌ์˜์„ ์“ธ ๋•Œ๋Š” ์˜ˆ๋ฅผ ๋“ค์–ด ์ž”์ฐจ `e = d_submitted - d_replay`์— ๋Œ€ํ•ด `z_j = r_jยทe`, `r_j โˆˆ {โˆ’1,+1}^n`๋กœ ์ •์˜ํ•˜๋ฉด ๋…๋ฆฝ ๋ถ€ํ˜ธ์™€ ๊ณ ์ •๋œ `e`์—์„œ `E[z_jยฒ] = ||e||โ‚‚ยฒ`์ด๋‹ค. ์ด ๊ฐ’์€ ๊ฐ ์ง€๋ฌธ์˜ Hamming ๊ฑฐ๋ฆฌ๋งŒ์œผ๋กœ ๋ฒ„๋ ค์ง€๋Š” ํฌ๊ธฐ ์ •๋ณด๋ฅผ ํฌํ•จํ•œ๋‹ค. Hamming์€ ๊ฐ๋„์— ๊ฐ€๊นŒ์šด ์‹ ํ˜ธ์ด๋ฉฐ, ๋…๋ฆฝ ๋“ฑ๋ฐฉ Gaussian ๋ฒ•์„ ์œผ๋กœ ์ •์˜ํ•œ ์ดˆํ‰๋ฉด์—์„œ๋Š” ํ•œ ๋น„ํŠธ์˜ ๊ธฐ๋Œ€ ๋ถˆ์ผ์น˜์œจ์ด ๊ฐ๋„/ฯ€๋ผ๋Š” ๊ด€๊ณ„๊ฐ€ ์žˆ๋‹ค. ์›๋ž˜ ์‹คํ—˜์ฒ˜๋Ÿผ Rademacher ์ดˆํ‰๋ฉด์„ ์‚ฌ์šฉํ•  ๋•Œ ์ด ๊ด€๊ณ„๋ฅผ ๋ชจ๋“  ํ…์„œ์— ๊ทธ๋Œ€๋กœ ์ ์šฉํ•˜์ง€ ์•Š๊ณ  ๊ด€์ธก๋œ ์ •์ƒ ๋ถ„ํฌ๋กœ ๋ณด์ •ํ•œ๋‹ค. ๋‚œ์ˆ˜ ๊ณต๊ฐœ ์ „์— ๋ธํƒ€๋ฅผ ๊ณ ์ •ํ•˜๋ฉด ์ด๋ฒˆ ์ง€๋ฌธ์— ๋งž์ถฐ ์ œ์ถœ์„ ๋ฐ”๊พธ๊ธฐ ์–ด๋ ค์›Œ์ง„๋‹ค. ๋‹ค๋งŒ ์ •์ƒ ์˜ค์ฐจ ์•ˆ์˜ ์กฐ์ž‘, ๊ณต๋ชจ, ๊ธฐ๋ก ๋ฏธ๋ณด์กด์ด๋‚˜ ํฌ์†Œํ•œ ์‚ฌ๊ฑด์˜ ๋ˆ„๋ฝ๊นŒ์ง€ ํ•ด๊ฒฐํ•˜์ง€๋Š” ์•Š๋Š”๋‹ค.
312
 
313
- ๊ฐ์‚ฌ ์ •์ฑ…์— ์ง€๋ฌธ seed์™€ ๋ธ”๋ก ์ƒ˜ํ”Œ๋ง seed์˜ ๋ชฉ์  ํƒœ๊ทธ๋ฅผ ๋‹ค๋ฅด๊ฒŒ ์ง€์ •ํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `fingerprint/tensor-name`๊ณผ `replay/block-selection`์ด๋‹ค. ๊ณต๊ฐœ pulse์™€ ๋กœ๊ทธ head๋ฅผ ์ €์žฅํ•˜๋ฉด ์ œ3์ž๊ฐ€ ๋ธ”๋ก ์ถ”์ถœ๊ณผ ์ง€๋ฌธ ๊ณ„์‚ฐ์„ ๋ชจ๋‘ ๋ฐ˜๋ณตํ•  ์ˆ˜ ์žˆ๋‹ค. ์ƒ˜ํ”Œ ์ธ๋ฑ์Šค๋Š” rejection sampling์œผ๋กœ ๊ท ์ผํ•˜๊ฒŒ ๋ฝ‘๊ณ  ์ค‘๋ณต์„ ์ œ๊ฑฐํ•œ๋‹ค. ์ €์ฐจ์› ์Šค์ผ€์น˜๋ฅผ ์ง‘๊ณ„๊ธฐ์—๋งŒ ๋งก๊ธฐ๋ฉด ์ง‘๊ณ„๊ธฐ์˜ ํ—ˆ์œ„ ๋ณด๊ณ ๋ฅผ ํ™•์ธํ•˜๊ธฐ ์–ด๋ ค์šฐ๋ฏ€๋กœ ๊ฐ์‚ฌ์ž๊ฐ€ ๋ณด์กด๋ณธ์—์„œ ์žฌ๊ณ„์‚ฐํ•˜๊ณ , ๋ถ„์Ÿ ์‹œ ์„œ๋กœ ๋…๋ฆฝ๋œ ๊ฐ์‚ฌ ๊ฒฐ๊ณผ๋ฅผ ๊ณต๊ฐœํ•œ๋‹ค.
314
 
315
- ### ๋‹ค๋ฅธ GPU์—์„œ ๋‹ค์‹œ ๋Œ๋ฆด ๋•Œ์˜ ํŒ์ •
316
 
317
- **ํ•œ ๋ฒˆ์— ํ•œ ์›Œ์ปค์˜ ๊ฐ™์€ ์ž‘์—…์„ ๋น„๊ตํ•œ๋‹ค.** ์„œ๋กœ ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ shard๋กœ ํ•™์Šตํ•œ ์›Œ์ปค ๋ธํƒ€๋ผ๋ฆฌ ์ตœ๊ทผ์ ‘ ๋น„๊ตํ•˜๋ฉด ์‹ค์ œ ๋ฐ์ดํ„ฐ ์ฐจ์ด๋ฅผ GPU ์ฐจ์ด๋กœ ์˜ค์ธํ•œ๋‹ค. ๋™์ผํ•œ ์‹œ์ž‘ ์ƒํƒœยท์ˆœ์„œยท์ •๋ฐ€๋„ ์ •์ฑ…์—์„œ ๋‹ค์‹œ ๊ณ„์‚ฐํ•˜๊ณ  ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ํ•ด๋‹น ์›Œ์ปค์˜ ์ œ์ถœ๊ณผ ๋น„๊ตํ•œ๋‹ค.
318
-
319
- | ๋‹จ๊ณ„ | ๋น„๊ต ๋ฐ ํŒ์ • |
320
  | --- | --- |
321
- | ์›๋ณธ ๊ฒ€์ฆ | ์„œ๋ช…, ๋ฐฐ์น˜/๋ชจ๋ธ/์ƒํƒœ root, ํŒŒ์ผ ํ•ด์‹œ, schema, shape, NaN/Inf, ๋ผ์šด๋“œ ์—ฐ๊ฒฐ์„ ๋จผ์ € ๊ฒ€์‚ฌํ•œ๋‹ค. ์—ฌ๊ธฐ์„œ ๋ถˆ์ผ์น˜๋Š” ์—ฐ์‚ฐ ํ—ˆ์šฉ์˜ค์ฐจ๋กœ ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š๋Š”๋‹ค. |
322
- | ๋™์ผ ํ™˜๊ฒฝ ์žฌ์‹คํ–‰ | ๋™์ผ GPU ๊ณ„์—ดยท์‹คํ–‰ ์ด๋ฏธ์ง€ยทrank ๋ฐฐ์น˜ยทreduction ์„ค์ •์—์„œ ์ •์ƒ ๋ฐ˜๋ณต์ด ๋น„ํŠธ ์ผ์น˜ํ•˜๋Š”์ง€ ๋จผ์ € ์ธก์ •ํ•œ๋‹ค. ๋น„ํŠธ ์ผ์น˜๊ฐ€ ๊ฒ€์ฆ๋œ ํ”„๋กœํ•„์—์„œ canonical ์ข…๋ฃŒ ์ƒํƒœ์™€ ๋ธํƒ€ ํ•ด์‹œ๋ฅผ ๋น„๊ตํ•œ๋‹ค. |
323
- | ์ด๊ธฐ์ข… ์žฌ์‹คํ–‰ | ์ œ์ถœ ํ”„๋กœํ•„ ร— ๊ฐ์‚ฌ ํ”„๋กœํ•„ ร— ์ •๋ฐ€๋„ ร— DDP ํ† ํด๋กœ์ง€ ร— ์žฌ์‹คํ–‰ ๊ธธ์ด๋ณ„๋กœ ๋ณ„๋„ ๋ณด์ •ํ•œ๋‹ค. FP32์™€ BF16์„ ์„ž์€ ๊ณตํ†ต ์ž„๊ณ„๊ฐ’์„ ๋‘์ง€ ์•Š๋Š”๋‹ค. ๋ฏธ๋ณด์ • ์กฐํ•ฉ์ด๋ฉด ํŒ์ • ๋ณด๋ฅ˜ ํ›„ ์ผ์น˜ ํ”„๋กœํ•„์ด๋‚˜ ๋…๋ฆฝ ๊ฒ€์ฆ ์žฅ๋น„๋กœ ์žฌ์‹คํ–‰ํ•œ๋‹ค. |
324
- | ์ˆ˜์น˜ ์ง€ํ‘œ | ์ „์—ญ relative L2ยทcosine, ํ…์„œ๋ณ„ ์ ˆ๋Œ€ L2์™€ ํฌ๊ธฐ ๋ณด์ • L2, ์ตœ๋Œ€ ์›์†Œ ์˜ค์ฐจ์™€ ์ƒ์œ„ ์˜ค์ฐจ ๋ถ„์œ„์ˆ˜, ์ง€๋ฌธ Hamming๊ณผ ํˆฌ์˜ ์ž”์ฐจ, AdamW momentยทstep ๋ฐ ๊ตฌ๊ฐ„ loss๋ฅผ ๋ณธ๋‹ค. 0์— ๊ฐ€๊นŒ์šด ํ…์„œ๋Š” ์ ˆ๋Œ€ ํ•˜ํ•œ์„ ๋‘”๋‹ค. |
325
- | ๊ฒฝ๊ณ„ ๋ฐ– | ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์žฌ์‹œ๋„ํ•˜๊ณ  ๋…๋ฆฝ ๊ฐ์‚ฌ์ž๊ฐ€ ํ™•์ธํ•œ๋‹ค. ๋™์ผ ํ”„๋กœํ•„ ๊ฒฐ๊ณผ์™€ ๋‹ค๋ฅธ GPU ๊ฒฐ๊ณผ์˜ ๋ฐฉํ–ฅ์„ ๋น„๊ตํ•œ ๋’ค ์›์ธ ๋ฏธํ™•์ธ ์ˆ˜์น˜ ์ด์ƒ, ์žฌํ˜„๋˜๋Š” ๊ทœ์น™ ์œ„๋ฐ˜, ์•„ํ‹ฐํŒฉํŠธ ๋ฏธ์ œ๊ณต ๋“ฑ ๊ทผ๊ฑฐ๋ณ„ ํŒ์ •์„ ๊ธฐ๋กํ•œ๋‹ค. |
326
 
327
- ์˜ˆ์‹œ ํ…์„œ ๊ธฐ์ค€์€ `||d_submit,t โˆ’ d_replay,t||โ‚‚ โ‰ค a_t โˆšn_t + b_t ||d_replay,t||โ‚‚`์ด๋‹ค. `a_t, b_t`๋Š” ์ •์ƒ ๋…๋ฆฝ ์žฌ์‹คํ–‰์—์„œ ํ”„๋กœํ•„๋ณ„๋กœ ์ถ”์ •ํ•œ๋‹ค. 148๊ฐœ ํ…์„œ๋ฅผ ๊ฒ€์‚ฌํ•  ๋•Œ ํ•˜๋‚˜์˜ ๊ฒฝ๋ณด๋งŒ์œผ๋กœ ๋…ธ๋“œ๋ฅผ ํƒˆ๋ฝ์‹œํ‚ค๋ฉด ๋ผ์šด๋“œ ์˜คํƒ์ด ๋ˆ„์ ๋œ๋‹ค. ์ •์ƒ **๋ผ์šด๋“œ ๋‹จ์œ„** ์ตœ๋Œ€ ํ†ต๊ณ„๋Ÿ‰ ๋˜๋Š” ๊ณ„์ธตํ˜• ์ž„๊ณ„๊ฐ’์„ ๋ณ„๋„ ๊ฒ€์ฆ์…‹์œผ๋กœ ๋ณด์ •ํ•˜๊ณ , ํฌ์†Œ ์˜ค๋ฅ˜๋ฅผ ์žก์„ ์ƒ์œ„ ์›์†Œ ์˜ค์ฐจ๋„ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ๋ณด์ •ํ•œ๋‹ค. ๋ฐ์ดํ„ฐ ์ˆœ์„œยทseedยท๋ผ์šด๋“œยท์žฅ๋น„๋ฅผ ๋ฐ”๊ฟ” ๋ณด์ •๊ณผ ํ…Œ์ŠคํŠธ๋ฅผ ๋ถ„๋ฆฌํ•œ๋‹ค. ๋‹จ์ผ 500-step ๊ด€์ธก์ด๋‚˜ ์—ฌ์„ฏ GPU์˜ ์ตœ๋Œ€๊ฐ’์„ ์ปท์˜คํ”„๋กœ ์“ฐ๋ฉด ์•ˆ ๋œ๋‹ค. ๋“œ๋ฌธ ์˜คํƒ ๋ชฉํ‘œ๋ฅผ ๊ฒ€์ฆํ•  ๋•Œ ๋…๋ฆฝ ์ •์ƒ ๋ผ์šด๋“œ์—์„œ ๊ฒฝ๋ณด 0๊ฑด์ธ ๊ฒฝ์šฐ์—๋„ 95% ์ƒํ•œ์€ ๋Œ€๋žต `3/n`์ด๋ฏ€๋กœ 1% ์ˆ˜์ค€์˜ ์ƒํ•œ์— ์•ฝ 300๊ฐœ ๋…๋ฆฝ ์‚ฌ๋ก€๊ฐ€ ํ•„์š”ํ•˜๋‹ค. ์„œ๋กœ ๊ฒน์น˜๋Š” ์žฌ์‹คํ–‰์„ ๋…๋ฆฝ ์‚ฌ๋ก€๋กœ ํ•ฉ์‚ฐํ•˜์ง€ ์•Š๋Š”๋‹ค.
328
 
329
- GPU๋ณ„ ๊ธฐ๋ก์—๋Š” GPU ๋ชจ๋ธ/compute capability, ๋“œ๋ผ์ด๋ฒ„, CUDA/cuBLAS/cuDNN/NCCL, PyTorch/Transformers/Accelerate, TF32ยทautocastยทaccumulation dtype, attentionยทoptimizer ๊ตฌํ˜„, clipping๊ณผ deterministic ์„ค์ •, rank ๋งคํ•‘ยทDDP bucketยทcollective ์„ค์ •์„ ํฌํ•จํ•œ๋‹ค. GPU ๊ต์ฒด ์‹œ์—๋Š” ์ƒˆ ์กฐํ•ฉ์˜ ์ •์ƒ ์Œ์„ ๋จผ์ € ์ˆ˜์ง‘ํ•œ๋‹ค. ์†Œ๊ทœ๋ชจ FP64 ์ฐธ์กฐ๋Š” reduction๊ณผ optimizer ์—…๋ฐ์ดํŠธ์˜ ๋ถ„์Ÿ ๋ถ„์„์— ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. FP64์˜ ์ „์ฒด ํ•™์Šต ๊ฒฐ๊ณผ์—๋Š” ์—ฐ์‚ฐ ์ •๋ฐ€๋„ ์ฐจ์ด๊ฐ€ ๋ˆ„์ ๋˜๋ฏ€๋กœ ๋ณ„๋„ ๋ณด์ •์ด ํ•„์š”ํ•˜๋‹ค. [PyTorch ์žฌํ˜„์„ฑ ๋ฌธ์„œ](https://docs.pytorch.org/docs/stable/notes/randomness.html)
330
 
331
- ### ์‚ฌํ›„ ์žฌ์‹คํ–‰ ์ ˆ์ฐจ์™€ ๋น„์šฉ
332
 
333
- - **์ „์ˆ˜ ์žฌ์‹คํ–‰์ด ๊ฐ€๋Šฅํ•œ ๋ผ์šด๋“œ.** ๊ณต์ธ ๊ธ€๋กœ๋ฒŒ ์ƒํƒœ์™€ ๊ธฐ๋ก๋œ ๋กœ์ปฌ ์‹œ์ž‘ ์ƒํƒœ์—์„œ ๋ชจ๋“  (H) step์„ ๋‹ค์‹œ ์ˆ˜ํ–‰ํ•œ๋‹ค. ์ข…๋ฃŒ ์ƒํƒœ์™€ optimizer ์ƒํƒœ๋ฅผ ๊ฒ€์‚ฌํ•œ ๋‹ค์Œ ์ œ์ถœ๋œ ๋ธํƒ€๊ฐ€ ์‹œ์ž‘ยท์ข…๋ฃŒ์—์„œ ์ •ํ™•ํžˆ ๋„์ถœ๋๋Š”์ง€ ํ™•์ธํ•œ๋‹ค. ์ „์†ก ํ‘œํ˜„๊นŒ์ง€ ์—ฐ๊ฒฐํ•œ ๋’ค ์ง‘๊ณ„์™€ ์™ธ๋ถ€ optimizer ๊ฒฐ๊ณผ๋ฅผ ์žฌ๊ณ„์‚ฐํ•œ๋‹ค.
334
- - **์ƒ˜ํ”Œ๋ง์ด ํ•„์š”ํ•œ ๋ผ์šด๋“œ.** ๊ฐ ์›Œ์ปค์˜ (H) step์„ (M)๊ฐœ ์—ฐ์† ๋ธ”๋ก์œผ๋กœ ๋‚˜๋ˆ„๊ณ  ๋ชจ๋“  ๊ฒฝ๊ณ„์˜ ์™„์ „ ์ƒํƒœ๋ฅผ ํ™•์ •ํ•œ๋‹ค. ์ฒซ ๊ฒฝ๊ณ„๋ฅผ ๊ณต์ธ ์‹œ์ž‘ ์ƒํƒœ์—, ๋งˆ์ง€๋ง‰์„ ์ œ์ถœ ๋ธํƒ€์— ์—ฐ๊ฒฐํ•œ๋‹ค. ๋‚œ์ˆ˜๋กœ ์ค‘๋ณต ์—†์ด (k)๊ฐœ ๋ธ”๋ก์„ ์„ ํƒํ•˜๊ณ  ๊ฐ ์‹œ์ž‘ ์ƒํƒœ์—์„œ ๋ ์ƒํƒœ๊นŒ์ง€ ์žฌ์‹คํ–‰ํ•œ๋‹ค. ์›Œ์ปค ์ „์ฒด ๋ผ์šด๋“œ ์ „์ˆ˜๊ฐ์‚ฌ๋„ ๋ณ„๋„์˜ ๋ฌด์ž‘์œ„ ๋น„์œจ๋กœ ์„ž๋Š”๋‹ค. ํ•ด์‹œ๋กœ ๊ณ ์ •๋œ ์ค‘๊ฐ„ ์ƒํƒœ๋„ ์ด์ „ ๋ธ”๋ก์˜ ์‹คํ–‰์„ ๊ฒ€์ฆํ•˜๊ธฐ ์ „๊นŒ์ง€ ๊ณ„์‚ฐ์˜ ์ •๋‹น์„ฑ์€ ๋ฏธํ™•์ •์ด๋‹ค. [Proof-of-Learning](https://arxiv.org/abs/2103.05633)
335
- - **ํƒ์ง€์œจ์—๋Š” ์กฐ๊ฑด์ด ๋ถ™๋Š”๋‹ค.** (M)๊ฐœ ์ค‘ ๊ฒ€์‚ฌํ•˜๋ฉด ํŒ์ • ๊ธฐ์ค€์„ ๋„˜๋Š” ์œ„๋ฐ˜์ด (b)๊ฐœ์ด๊ณ  ๊ท ์ผ ๋น„๋ณต์›์œผ๋กœ (k)๊ฐœ๋ฅผ ์ƒ˜ํ”Œ๋งํ•˜๋ฉด ํƒ์ง€ ํ™•๋ฅ ์€ `1 โˆ’ C(Mโˆ’b,k)/C(M,k)`์ด๋‹ค. 500-step ๋ผ์šด๋“œ๋ฅผ 50-step์”ฉ 10๊ฐœ๋กœ ๋‚˜๋ˆ  3๊ฐœ๋ฅผ ๊ฒ€์‚ฌํ•˜๋ฉด ์œ„๋ฐ˜ ๋ธ”๋ก ํ•˜๋‚˜๋Š” 30%, ์„ธ ๊ฐœ๋Š” ์•ฝ 70.8%๋‹ค. ์ด ์˜ˆ์˜ ์žฌ๊ณ„์‚ฐ๋Ÿ‰์€ ์›Œ์ปค๋‹น 150 step์ด๋‹ค. ์ƒ˜ํ”Œ๋ง์—์„œ ํ†ต๊ณผํ–ˆ๋‹ค๋Š” ๊ธฐ๋ก์—๋Š” ๊ฒ€์‚ฌ ๋ฒ”์œ„๋ฅผ ํ•จ๊ป˜ ๋„ฃ๋Š”๋‹ค.
336
- - **์Šคํ† ๋ฆฌ์ง€์™€ ์šด์˜.** ์ด๋ฒˆ ํ…์„œ ํฌ๊ธฐ ๊ธฐ์ค€ FP32 ๋ธํƒ€ ์•ฝ 498 MB, ๋ชจ๋ธ๊ณผ FP32 AdamW moment ๋‘ ๊ฐœ๋งŒ์œผ๋กœ ์žฌ์‹œ์ž‘ ์ƒํƒœ๋‹น ์•ฝ 1.49 GB๋‹ค. ์‹œ์ž‘ ์ƒํƒœ ํ•˜๋‚˜๋ฅผ ๊ณต์šฉ์œผ๋กœ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ์„ ๋•Œ 10๊ฐœ ์ถ”๊ฐ€ ๊ฒฝ๊ณ„๋Š” ์›Œ์ปคยท๋ผ์šด๋“œ๋‹น ์•ฝ 14.9 GB๋‹ค. ๋ณธ๋ฌธ์€ ์ฝ˜ํ…์ธ  ์ฃผ์†Œ์™€ ์ฒญํฌ๋ณ„ ์ค‘๋ณต ์ œ๊ฑฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์‹ค์ œ ์••์ถ•๋ฅ ์„ ์ธก์ •ํ•œ๋‹ค. ์ง€๋ฌธ ๋ถ€ํ˜ธ ๋น„ํŠธ๋งŒ์€ 148ร—2,048๋น„ํŠธ, ์•ฝ 38.5 kB๋‹ค. ๋ณด์กด ๊ธฐ๊ฐ„์€ ๊ฐ์‚ฌ ๊ฐ€๋Šฅ ๊ธฐ๊ฐ„๊ณผ ๋งž์ถ”๊ณ , ์ €์žฅ์†Œ ๋ณต์ œ์™€ ์‹ค์ œ ๋‹ค์šด๋กœ๋“œ ๊ฒ€์‚ฌ๋ฅผ ํฌํ•จํ•œ๋‹ค.
337
- - **์‚ฌํ›„ ์กฐ์น˜.** ๊ฐ์‚ฌ์ž ๋ณด๊ณ ์„œ๋ฅผ ๊ฐ™์€ ๋กœ๊ทธ์— ์ถ”๊ฐ€ํ•˜๊ณ , ์˜์‹ฌ ๊ตฌ๊ฐ„ ์ „ํ›„๋ฅผ ์žฌ์‹คํ–‰ํ•ด ์ตœ์ดˆ ์ดํƒˆ ๊ฒฝ๊ณ„๋ฅผ ์ขํžŒ๋‹ค. ์ œ์ถœ ๋ฐ”์ดํŠธ ๋ถˆ์ผ์น˜์™€ ๋ฐ˜๋ณต ์žฌํ˜„๋˜๋Š” ๊ณ„์‚ฐ ๋ถˆ์ผ์น˜๋ฅผ ๊ตฌ๋ถ„ํ•œ๋‹ค. ์ œ์ถœ ๋˜๋Š” ์ง‘๊ณ„๊ฐ€ ์ž˜๋ชป๋œ ๋ผ์šด๋“œ๋ฅผ ํ™•์ •ํ•˜๋ฉด ์ด์ „ ๊ณต์ธ ์ฒดํฌํฌ์ธํŠธ์™€ ์™ธ๋ถ€ optimizer ์ƒํƒœ๋กœ ๋ณต๊ท€ํ•ด ์œ ํšจ ์ œ์ถœ๋กœ ๋‹ค์‹œ ์ง‘๊ณ„ํ•œ๋‹ค. ์ดํ›„ ๋ผ์šด๋“œ๋Š” ๋‹ฌ๋ผ์ง„ ๊ธ€๋กœ๋ฒŒ ๋ชจ๋ธ์—์„œ ์ž…๋ ฅ์„ ๋‹ค์‹œ ๋ฐ›์•„์•ผ ํ•˜๋ฏ€๋กœ ์žฌํ•™์Šตํ•œ๋‹ค.
338
 
339
- ### ์ ์šฉ ์ˆœ์„œ
340
 
341
- 1. ๊ธฐ์กด GPT-2 ์‹คํ—˜์— ์ž…๋ ฅ revision๊ณผ ํ† ํฐ ์ฒญํฌ, ์™„์ „ ์ƒํƒœ checkpoint, ๋ณ„๋„ ์˜คํ”„๋ผ์ธ ๊ฐ์‚ฌ ์‹คํ–‰๊ธฐ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค. ํ˜„์žฌ ์ €์žฅ์†Œ์˜ ์œ ํšจยท๋ณ€์กฐ ๋ธํƒ€๏ฟฝ๏ฟฝ๏ฟฝ ํŒŒ์ผ ๊ณ ์ •๊ณผ ์ง€๋ฌธ ๊ณ„์‚ฐ ํšŒ๊ท€ ๊ฒ€์ฆ์— ํ™œ์šฉํ•œ๋‹ค.
342
- 2. RTX 3060 ๋‹จ์ผ/2-GPU DDP์™€ L4๋ฅผ ์šฐ์„  ๊ต์ฐจ ์‹คํ—˜ํ•˜๊ณ  FP32ยทBF16๋ณ„๋กœ 1ยท10ยท50ยท500 step์—์„œ ๋™์ผ/์ด๊ธฐ์ข… ์žฌ์‹คํ–‰ ๋ถ„ํฌ๋ฅผ ์ธก์ •ํ•œ๋‹ค. ํ•œ ์žฅ๋น„์—์„œ ๋™์ผ ์„ค์ • ๋ฐ˜๋ณต๋„ ๊ธฐ๋กํ•œ๋‹ค. CMP 170HX์ฒ˜๋Ÿผ ์ •์ƒ ์ฐธ์กฐ์—์„œ ํŠน์ดํ•œ ์กฐํ•ฉ์€ ๋ณ„๋„ ํ”„๋กœํ•„๋กœ ์œ ์ง€ํ•˜๊ณ  ์›์ธ์„ ํ™•์ธํ•œ๋‹ค.
343
- 3. ๋กœ๊ทธ ํ™•์ • ์ „ํ›„ยท๋‚œ์ˆ˜ ์ถœ์ฒ˜ยท์žฌ์‹œ๋„ ๊ทœ์น™์„ ์žฌํ˜„ํ•˜๋Š” ํŒŒ์ผ๋Ÿฟ์„ ์šด์˜ํ•œ๋‹ค. ์˜๋„์ ์œผ๋กœ ๊ฑด๋„ˆ๋›ด step, ์ž˜๋ชป๋œ ๋ฐ์ดํ„ฐ/optimizer ์ƒํƒœ, ํฌ์†Œ ์ˆ˜์น˜ ์˜ค๋ฅ˜, ์ €์žฅ๋ณธ ๋ฏธ์ œ๊ณต, ์ง‘๊ณ„ ๊ฐ€์ค‘์น˜ ์˜ค๋ฅ˜๋ฅผ ๊ฒ€์ฆํ•œ๋‹ค. ์ •์ƒ ๋ผ์šด๋“œ ์˜คํƒ๋ฅ ยท์˜ค๋ฅ˜๋ณ„ ํƒ์ง€์œจยท๊ฐ์‚ฌ ๋น„์šฉยท๋ณต๊ตฌ ์‹œ๊ฐ„์„ ๋ชจ๋‘ ๊ธฐ๋กํ•œ๋‹ค. ๊ฒ€์ฆ์…‹์€ ์ž„๊ณ„๊ฐ’ ํ™•์ • ํ›„ ํ‰๊ฐ€ํ•œ๋‹ค.
344
- 4. ๋ฐ์ดํ„ฐ๊ฐ€ ๊ณต๊ฐœ์ด๋ฏ€๋กœ ๋™์ผ ๊ณ„์‚ฐ์„ ๋‹ค๋ฅธ ๋…ธ๋“œ๊ฐ€ ๋Œ€์‹  ์ˆ˜ํ–‰ํ•œ ๊ฒฝ์šฐ์—๋„ ๊ฒฐ๊ณผ ๊ฒ€์‚ฌ์— ํ†ต๊ณผํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ชฉ์ ์„ **์„œ๋ช…ํ•œ ๋…ธ๋“œ์˜ ์—…๋ฐ์ดํŠธ๊ฐ€ ๊ทœ์ •๋œ ํ•™์Šต ๊ฒฐ๊ณผ์™€ ์ผ์น˜ํ•˜๋Š”์ง€**๋กœ ์ •์˜ํ•œ๋‹ค. ํŠน์ • ๋ฌผ๋ฆฌ GPU์—์„œ ๊ณ„์‚ฐํ–ˆ๋‹ค๋Š” ๋ณด์ฆ์ด๋‚˜, ์ •์ฑ… ๊ทธ๋Œ€๋กœ ์ˆ˜ํ–‰ํ•œ ํ•™์Šต์ด ๋ชจ๋“  ๋ชฉํ‘œ์—์„œ ์•ˆ์ „ํ•˜๋‹ค๋Š” ๋ณด์ฆ์€ ๋ณ„๋„์˜ ๋ฌธ์ œ๋‹ค.
 
247
 
248
  The model-poisoning and backdoor scenarios follow threat families studied in federated learning, including [local model poisoning](https://www.usenix.org/conference/usenixsecurity20/presentation/fang) and [model replacement for backdoor injection](https://proceedings.mlr.press/v108/bagdasaryan20a.html).
249
 
250
+ ## Replay Auditing and GPU-Specific Tolerances
251
 
252
+ This section documents the detection thresholds and independently recomputed delta comparisons for snapshot `c5373f0dd887a8faf3d85bee9911a009175b8a33`. The round records, randomized fingerprints, and replay procedures describe a proposed DiLoCo audit design.
253
 
254
+ The training scripts use GPT-2 and FineWeb-Edu. The `data_sha256` field stores the first 16 hex characters of SHA-256. Replay requires pinned model, tokenizer, and dataset revisions, the exact ordered batches, and complete starting model, optimizer, and RNG state. The DDP experiment synchronizes accumulated gradients within local training. DiLoCo outer-round aggregation requires its own records. [Single-GPU script](delta_train.py) ยท [DDP script](delta_train_multi_gpu.py)
255
 
256
+ ### Existing detection thresholds
257
 
258
+ | Check | Flag condition | Threshold |
259
  | --- | --- | --- |
260
+ | Whole delta | Nearest clean-reference cosine falls below the cutoff or absolute L2 distance exceeds the cutoff | Cosine 0.999237, absolute L2 1.137659. The L2 cutoff is about 3.93% of the RTX 3060 reference delta norm. |
261
+ | Per-tensor L2 | Distance to the nearest reference exceeds the largest clean-reference pairwise distance for that tensor, with an absolute floor of 1e-8 | One threshold per tensor. Any flagged tensor flags the candidate. |
262
+ | Per-tensor fingerprint and norm | For each reference, take the larger of the normalized Hamming and norm errors. Flag if the minimum score across references exceeds 1. | Hamming allowance 6โ€“83 of 2,048 bits, median 24. Relative norm allowance 0.0118โ€“2.075%, median 0.108%. |
263
 
264
+ The joint score is `min_ref max(Hamming / max(Hamming_limit_t, 1), norm_rel_error / norm_limit_t)`. The relative norm error is the absolute difference between norms divided by their maximum, with a denominator floor of `1e-30`. Both conditions must pass against the same reference for that tensor. The CSVs give the exact thresholds in `projection_threshold_hamming`, `norm_relative_threshold`, and `reference_max_pair_l2`. Calibrate a randomized fingerprint policy across independent seeds and normal replays, including each new execution profile. [Fingerprint metrics](per_tensor_random_projection_fingerprint/tensor_metrics.csv) ยท [Tensor L2 metrics](tensor_poisoning_audit/tensor_metrics.csv)
265
 
266
+ ### GPU differences recomputed from saved deltas
267
 
268
+ Each comparison uses the single RTX 3060 delta from the same training precision as its baseline. All 148 matching tensors and 124,439,808 elements were read and accumulated in FP64. Relative L2 uses the baseline norm as its denominator, globally or per tensor. Both training modes store their deltas in FP32. BF16 in the table refers to the training mode.
269
 
270
+ | Comparison GPU | Training precision | Cosine | Absolute L2 | Global relative L2 | Median tensor relative L2 | Maximum tensor relative L2 |
271
  | --- | --- | ---: | ---: | ---: | ---: | ---: |
272
  | GeForce RTX 3060 + GeForce RTX 3060 | FP32 | 0.99996788 | 0.235570 | 0.813% | 0.641% | 1.722% |
273
  | CMP 170HX | FP32 | 0.99938010 | 1.024766 | 3.536% | 3.574% | 11.126% |
 
283
  | L4 | BF16 | 0.99593113 | 2.520465 | 9.053% | 7.868% | 134.928% |
284
  | RTX PRO 6000 Blackwell Workstation Edition | BF16 | 0.99906424 | 1.216129 | 4.368% | 6.005% | 121.920% |
285
 
286
+ The single RTX 3060 FP32 and BF16 deltas differed by **20.722%** in global relative L2 using FP32 as the baseline. The table compares saved runs. Each GPU and configuration has one observed run, so the measurements cannot isolate GPU model effects from driver and kernel differences or estimate deployment thresholds. Cross-GPU training and two-GPU DDP were not rerun for this analysis.
287
 
288
+ ### Round records and trust assumptions
289
 
290
+ Workers and aggregators may submit incorrect data or become unavailable. Independent auditors need access to the public inputs and retained artifacts, plus a way to replay disputed segments. Independent witnesses cross-check signed log heads. Retain replicated artifact bodies through the full audit period.
291
 
292
+ | Record | Required fields |
293
  | --- | --- |
294
+ | `run_manifest` | Code commit, immutable image digest, software versions, model/tokenizer/dataset revisions, SHA-256 of shards and token chunks, sample order, packing, EOS, masks and loss rules, step-by-step batch plan or pinned generator and seed, audit policy, and randomness source |
295
+ | `worker_commit` | Run, round, worker and attempt IDs, global starting checkpoint root, local starting state root, ending state and submitted delta roots, intermediate checkpoint roots, assigned data root, execution profile, optimizer step count, token count, and worker signature |
296
+ | Restart state | Model parameters and buffers, AdamW moments and step counters, scheduler, FP32 master weights and loss scaler where applicable, rank-specific Python/NumPy/CPU/GPU RNG state, and input cursor. Save at optimizer-step boundaries or include partially accumulated gradients. |
297
+ | `round_record` | Previous round root, all submissions and acceptance or rejection reasons, worker weights, delta sign and normalization, clipping and quantization rules, reduction order and dtype, rounding rules, outer optimizer state before and after the round, and next global model root |
298
+ | `audit_record` | Commitment inclusion proof, beacon chain and pulse, beacon proof and derived seed, fingerprint algorithm version and values, sampled segments, submitted and replayed artifact digests and environments, calibration policy ID, raw measurements, verdict, and auditor signature |
299
 
300
+ For example, define the worker delta as `d_i = W_local - W_global` and feed `-ฮฃ a_i d_i` to the outer optimizer as its pseudo-gradient. Link every worker to the previous accepted global checkpoint. Record whether local optimizer state is reset or carried forward. With carryover, link the local starting state to the worker's previously accepted state. Recompute aggregation from the accepted transmitted bytes using a fixed worker order and reference arithmetic. If quantization is enabled, verify the conversion from the local ending state to the transmitted representation.
301
 
302
+ Use whole-file hashes for download integrity. Define a canonical tensor encoding that includes the name, shape, dtype, endianness, byte order, chunk index, and length. Use length-delimited fields and domain separation when building a signed SHA-256 Merkle root. Independent witnesses should exchange signed tree heads and verify inclusion and consistency proofs. Conflicting signed submissions for the same assignment establish equivocation. A numerical mismatch warrants replay and investigation. [RFC 9162](https://www.rfc-editor.org/rfc/rfc9162.html)
303
 
304
+ ### Commit the delta before drawing the fingerprint
305
 
306
+ 1. Before the deadline, the worker publishes signed roots for its delta and all replay checkpoints. Independent storage operators verify and retain the underlying artifacts. Fix the accepted submission set and allow one accepted attempt per assignment. Specify the deadline and future beacon pulse in the run policy.
307
+ 2. After witnesses confirm the log head, verify the designated public randomness pulse and its signature. For example, derive `seed = SHA256(canonical("diloco/audit/v1", beacon_id, pulse, beacon_value, run_id, round, worker_id, delta_root))`. Derive separate streams for tensor fingerprints and segment sampling. Use uniform sampling without replacement for segment indices. Enforce a predeclared outage policy and keep the original submission fixed after the pulse. [drand cryptography](https://docs.drand.love/docs/cryptography/)
308
+ 3. Auditors verify the stored tensors against their roots and compute fingerprints from those tensors. Specify the PRNG and byte encoding, such as SHAKE256-derived Rademacher signs with fixed-order FP64 accumulation. Specify the sign of zero and handling of nonfinite values. Store sign bits, L2 norms, normalized continuous projections, the seed, and the algorithm version. Publish small test vectors so third parties can reproduce the calculation.
309
+ 4. Project the replayed delta with the same seed and retain both results. Later auditors can reproduce the original comparison or use a new beacon against the same committed artifacts. When the full tensors are available, compute exact per-tensor residuals alongside the fingerprints.
310
 
311
+ For a fixed residual `e = d_submitted - d_replay`, independent Rademacher projections `z_j = r_j ยท e` satisfy `E[z_jยฒ] = ||e||โ‚‚ยฒ`. Continuous projections retain magnitude information that sign bits omit. For isotropic Gaussian hyperplanes, the expected bit disagreement rate is the angle divided by ฯ€. Calibrate the Rademacher implementation empirically. Drawing the seed after commitment prevents a worker from choosing the committed bytes in response to that draw. Detection still depends on residual size, normal GPU variation, artifact availability, and audit coverage.
312
 
313
+ ### Compare replays across GPUs
314
 
315
+ Replay the same worker assignment from the same starting state using the same data order and precision policy. Comparing workers trained on different shards confounds hardware differences with differences in training data.
316
 
317
+ | Stage | Verification |
 
 
318
  | --- | --- |
319
+ | Artifact integrity | Check signatures, data and state roots, hashes, schema, tensor shapes, nonfinite values, and the round chain before numerical comparison. |
320
+ | Matched replay | Test bitwise repeatability for the same GPU class, image, rank placement, and reduction settings. Where repeatability has been demonstrated, compare canonical ending-state and delta hashes. |
321
+ | Cross-GPU replay | Calibrate each worker/auditor profile pair by training precision, DDP topology, and replay length. Hold the verdict for an uncalibrated pair and replay on a matched profile or independent verified hardware. |
322
+ | Numerical metrics | Measure global relative L2 and cosine, per-tensor absolute and scale-adjusted L2, maximum and high-quantile element errors, Hamming distance and projected residuals, AdamW moments and steps, and segment loss. Use an absolute floor for near-zero tensors. |
323
+ | Out-of-bounds results | Repeat the replay and have an independent auditor confirm it. Record the evidence for numerical anomalies, reproducible rule violations, or missing artifacts. |
324
 
325
+ One candidate per-tensor bound is `||d_submit,t โˆ’ d_replay,t||โ‚‚ โ‰ค a_t โˆšn_t + b_t ||d_replay,t||โ‚‚`. Fit `a_t` and `b_t` on independent normal replays. Calibrate a round-level maximum or hierarchical rule on held-out runs to account for testing 148 tensors. Include element-level statistics for sparse errors. Vary data order, seed, round, and hardware across calibration and evaluation. With zero flags in `n` independent normal rounds, the approximate 95% upper bound on the false-positive rate is `3/n`. An upper bound near 1% therefore requires about 300 independent rounds with zero flags.
326
 
327
+ Record the GPU model and compute capability, driver, CUDA/cuBLAS/cuDNN/NCCL versions, PyTorch/Transformers/Accelerate versions, TF32, autocast and accumulation dtypes, attention and optimizer implementations, clipping and determinism settings, rank placement, DDP buckets, and collective settings. Collect normal replay pairs when adding a GPU profile. Small FP64 reference checks can help investigate reduction and optimizer updates. Full FP64 training requires separate calibration. [PyTorch reproducibility documentation](https://docs.pytorch.org/docs/stable/notes/randomness.html)
328
 
329
+ ### Replay coverage, cost, and response
330
 
331
+ - **Full replay.** Execute all `H` local steps from the accepted global model and recorded local state. Verify the ending model and optimizer state, derive the worker delta and its transmitted representation, then recompute aggregation and the outer optimizer.
332
+ - **Sampled replay.** Split each worker round into `M` contiguous blocks and commit complete restart states for all boundaries. Anchor the first boundary to the accepted starting state and the last to the submitted result. Use the beacon to select `k` distinct blocks and replay each from its committed start to its committed end. Mix in random full-round replays to verify complete worker histories. Report the replay coverage with each verdict. [Proof-of-Learning](https://arxiv.org/abs/2103.05633)
333
+ - **Detection probability.** If `b` blocks contain a violation that would exceed the replay threshold and `k` blocks are drawn uniformly without replacement, the detection probability is `1 โˆ’ C(Mโˆ’b,k)/C(M,k)`. For 500 steps split into ten 50-step blocks, checking three blocks costs 150 steps per worker and detects one violating block with 30% probability or three violating blocks with about 70.8% probability.
334
+ - **Storage and computation.** The FP32 delta is about 498 MB. The model and two FP32 AdamW moment tensors require about 1.49 GB per restart state, or 14.9 GB for ten additional boundaries per worker-round when the starting state is shared. Sign bits alone take about 38.5 kB. Applying 2,048 dense projections to every element takes about 255 billion terms per delta. Measure detection performance if projection count or coverage is reduced. Exact L2 can be computed in a single linear scan. Replicate and periodically download retained artifacts to verify availability.
335
+ - **Incident response.** Append the auditor's findings to the same log and replay adjacent segments to locate the first divergence. For a confirmed invalid update or aggregation, restore the previous accepted model and outer optimizer state, recompute the round from valid submissions, and replay downstream rounds from the corrected checkpoints.
336
 
337
+ ### Rollout
338
 
339
+ 1. Extend the GPT-2 experiment with pinned input revisions, token chunks, complete checkpoints, and a separate offline replay verifier. Use the published clean and modified deltas as regression fixtures for artifact and fingerprint checks.
340
+ 2. Start with RTX 3060 single-GPU and two-GPU DDP runs plus L4, testing FP32 and BF16 at 1, 10, 50, and 500 steps. Collect matched repeats and cross-GPU pairs. Treat the CMP 170HX outlier as a separate calibration case.
341
+ 3. Exercise commit deadlines, beacon selection, and retry rules in a pilot. Test skipped steps, wrong data or optimizer state, sparse numerical errors, missing artifacts, and incorrect aggregation weights. Freeze thresholds before held-out evaluation and record false-positive rates, detection rates by fault type, audit cost, and recovery time.
342
+ 4. Define the assurance as whether the signed update agrees with the prescribed training computation. Public inputs allow another machine to perform that computation. Physical GPU provenance and model safety require separate evidence.