Document tensor detection robustness and limits
Browse files
README.md
CHANGED
|
@@ -71,6 +71,22 @@ including the starting checkpoint, token order, and precision.
|
|
| 71 |
[Experiment summary](tensor_poisoning_audit/summary.json) ·
|
| 72 |
[Reproduction script](tensor_poisoning_audit.py)
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
## Determinism with a Fixed Seed
|
| 75 |
|
| 76 |
On one RTX 3060, the clean gradient for the same 4 × 512 batch was recomputed three times per setting. The tested non-TF32 modes—deterministic algorithms off, cuDNN deterministic off/benchmark on, cuBLAS workspace unset, and all guards off—showed no observed difference from strict fp32: cosine remained 1.0 and relative L2 distance remained 0. The cuDNN and cuBLAS modes also disabled PyTorch's deterministic-algorithm guard, so those settings were not isolated from that guard. TF32 changed the gradient slightly while remaining repeatable: cosine 0.999966, relative L2 0.008204, and absolute L2 0.050642 versus strict fp32.
|
|
|
|
| 71 |
[Experiment summary](tensor_poisoning_audit/summary.json) ·
|
| 72 |
[Reproduction script](tensor_poisoning_audit.py)
|
| 73 |
|
| 74 |
+
### Robustness and attack-effect tradeoff
|
| 75 |
+
|
| 76 |
+
A candidate fails the tensor check if any tensor's distance to its closest clean reference exceeds that tensor's clean threshold. Re-scoring the saved per-tensor distances with different threshold multipliers gives the following counts. The target and clean loss changes are measured relative to the clean single-GPU update.
|
| 77 |
+
|
| 78 |
+
| Candidate | Flagged at 0.5× | Flagged at 1× | Flagged at 2× | Flagged at 10× | Target loss change | Clean loss change |
|
| 79 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 80 |
+
| Clean single GPU | 0 | 0 | 0 | 0 | 0.000 | 0.000 |
|
| 81 |
+
| Clean 2-GPU DDP | 0 | 0 | 0 | 0 | +0.002 | −0.0002 |
|
| 82 |
+
| 1% poison component | 100 | 92 | 81 | 30 | −5.670 | +0.742 |
|
| 83 |
+
| 3% poison component | 132 | 106 | 95 | 66 | −5.805 | +7.911 |
|
| 84 |
+
| 10% poison component | 148 | 141 | 126 | 92 | −5.099 | +13.730 |
|
| 85 |
+
|
| 86 |
+
All three tested poisoned candidates substantially lowered loss on the fixed target phrase and were flagged even at 10× the calibrated threshold. Both clean controls passed at every tested multiplier. This shows that the observed separation is insensitive to these threshold changes for the saved candidates.
|
| 87 |
+
|
| 88 |
+
The stronger hypothesis is that an update that passes the tensor check has negligible attack effect. This experiment leaves that hypothesis open: every poisoned candidate was flagged, so the effect among passing poisoned updates was unmeasured. The three candidates are different strengths of the same setup, and loss on one fixed phrase measures a proxy for attack effect. To establish the stronger claim, measure target behavior on held-out prompts for passing candidates, define a negligible effect in advance, and repeat across independent shards, seeds, and training rounds.
|
| 89 |
+
|
| 90 |
## Determinism with a Fixed Seed
|
| 91 |
|
| 92 |
On one RTX 3060, the clean gradient for the same 4 × 512 batch was recomputed three times per setting. The tested non-TF32 modes—deterministic algorithms off, cuDNN deterministic off/benchmark on, cuBLAS workspace unset, and all guards off—showed no observed difference from strict fp32: cosine remained 1.0 and relative L2 distance remained 0. The cuDNN and cuBLAS modes also disabled PyTorch's deterministic-algorithm guard, so those settings were not isolated from that guard. TF32 changed the gradient slightly while remaining repeatable: cosine 0.999966, relative L2 0.008204, and absolute L2 0.050642 versus strict fp32.
|