Gumbel Substitution: Removing Sampler Drift from RL Without Trusting the Sampler
Organizations: Reliquary
Abstract
When RL rollouts come from untrusted samplers on arbitrary hardware, precision and checkpoint lag, the sampling distribution differs from the trainer's policy , and training on the sampler's tokens adds a drift term equal to supervised fine-tuning toward . Published corrections (TIS, MIS, IcePop, score centering, GSPO, CISPO) all need , which a permissionless sampler reports and can misreport. We introduce Gumbel substitution. The coordinator fixes public Gumbel noise for every token position, bit-identical across GPUs, and the sampler draws . The trainer recomputes , the token its own policy would have drawn with the same noise, and scores in the sampler's context. For a sampler that follows the protocol, is an exact sample from given the prefix, so the drift vanishes in expectation for any , without sampler-reported probabilities. We measure the residual left by the deployed heads, bound the one added by admission gates, and state what an adaptive sampler can still do. The same comparison gives a per-token match rate that admits and pays samplers. In the lab, on a 9B model with the same head on both sides, the expected drift of uncorrected training is at least 170 to 4,800 times that of substitution. On a 2B model under strong mismatch, uncorrected training collapses while substitution stays stable, comparable to MIS with score centering given the true . On a permissionless network, a 9B model was trained for 158 optimizer steps on 15.75B tokens from heterogeneous samplers, with no skipped step and 1.21% of tokens substituted; it improved on all eight held-out benchmarks.
Figures & tables
| Sampler behavior | Status |
|---|---|
| Chooses its hardware, precision or an older checkpoint | Covered by Proposition 1, for any . Paid only for matched tokens. |
| Reports false probabilities or metadata | No effect: the protocol reads tokens only. |
| Emits tokens that do not follow the draw | Each such token is substituted and unpaid; rollouts below match 0.90 or above gap 8 are excluded. No general detection guarantee for a forger who stays within the gates. |
| Chooses its prefix using the noise of later positions | Violates the independence assumption. Possible in principle, since the lease nonce determines the noise of the whole rollout. Deviations are limited by the gates and each one is substituted and unpaid, but they are not excluded. |
| Withholds a group after seeing its draws | The noise is fixed per prompt, checkpoint, rollout index and position, so a sampler cannot redraw; it can only forfeit a whole leased group and its pay. This is a selection the bound above does not cover. |
| Condition | TV | Disagreement, inverse-CDF | Disagreement, Gumbel-max |
|---|---|---|---|
| Honest, bf16 heads | 0.0122 | 0.0373 | 0.0155 |
| Honest, fp32 heads | 0.0044 | 0.0218 | 0.0085 |
| fp8 weights | 0.0318 | 0.0806 | 0.0388 |
| Sampler verifier | Match rate |
|---|---|
| RTX 3090, 5090, A6000, L40, H100; bf16 heads | 0.9858–0.9864 |
| fp32 heads on both sides | 0.9939–0.9942 |
| fp8 KV cache | 0.9851–0.9856 |
| W8A16 (Marlin) / online fp8 weights | 0.970 / 0.963–0.970 |
| W4A16 / NVFP4 | 0.854–0.856 |
| Condition | L0 bias | L2 bias | L0 expected drift | L2 expected drift |
|---|---|---|---|---|
| per position | per position | norm (cos. with SFT ) | norm | |
| Honest, bf16 | 0.0152 | 0.0001 | 16,382 (1.000) | 96.5 |
| Honest, fp32 | 0.0057 | 0.0001 | 17,171 (1.000) | 93.8 |
| fp8 weights | 0.0406 | 0.0001 | 111,861 (1.000) | 97.7 |
| Weight noise | 0.1758 | 0.0002 | 640,223 (1.000) | 133.1 |
| Lag | Match, | Match, Gumbel | Gradient | L0 expected | L2 expected | (L2, L3 | (L0, L3 |
|---|---|---|---|---|---|---|---|
| (steps) | inverse-CDF | (replay) | rewritten | drift | drift | true ) | true ) |
| 0 | 0.973 | 0.987 | 5.5% | – | – | 0.938 | 1.00 |
| 1 | 0.962 | 0.983 | 7.7% | 59k | floor | 0.899 | 0.981 |
| 2 | 0.961 | 0.982 | 8.0% | 87k | floor | 0.908 | 0.98 |
| 4 | 0.945 | 0.970 | 11.5% | 418k | floor | 0.866 | 0.752 |
| 8 | 0.912 | 0.949 | 17.9% | 900k | floor | 0.792 | 0.606 |
| Positions | Mean [95% CI] | |
|---|---|---|
| Disagreement positions | 1,000 | 0.096 [0.089, 0.103] |
| Entropy-matched controls | 1,000 | 0.103 [0.096, 0.111] |
| Environment | Max gap at lag 1 / 2 / 4 (LR ) | Rejected at gap 8 | Re-graded at gap 3 (reward changed) |
|---|---|---|---|
| gsm8k | 0.19 / 0.40 / 0.82 | 0 | 0 |
| Code | 0.36 / 0.68 / 3.86 | 0 | 2 of 384 (0) |
| IF | 2.06 / 1.90 / 2.21 | 0 | 0 |
| Mismatch | Loss | LR | Reward, last 20 | Greedy eval | Entropy | Outcome |
|---|---|---|---|---|---|---|
| None | L0 | 2e-6 | 0.778 | 0.798 | 0.351 | Reference (2 seeds) |
| Strong | L0 | 2e-6 | 0.791 | 0.815 | 0.221 | Best short-term, entropy collapsing |
| Strong | L2 | 2e-6 | 0.734 | 0.770 | 0.341 | |
| Strong | L3 | 2e-6 | 0.740 | 0.780 | 0.334 | |
| Strong | L0 | 5e-6 | 0.001 / 0.000 | 0.000 | 0.08 / 0.02 | Collapse at steps 41, 44 |
| Strong | L2 | 5e-6 | 0.824 / 0.805 | 0.815 / 0.840 | 0.30 / 0.24 | Stable |
| Quantity | Value |
|---|---|
| Optimizer steps | 158 over 11 days |
| Trained tokens | 15.75B |
| Samplers | 161 accounts with at least one trained group; up to 73 active at once over steps 1–131 |
| Match rate / substitution | 0.979 (stochastic positions) / 1.21% (all trained tokens) |
| Step duration (median, steps 1–131) | 68 min; 104 min over steps 1–20, 59 min over steps 61–131 as completions shortened (120M to 74M trained tokens per step) |
| Declared hardware (opt-in) | RTX 5090, RTX PRO 6000 Blackwell, B200, RTX 3090, H200, RTX 4090, RTX A6000, A100, RTX 6000 Ada; about 77% of trained tokens over steps 1–131 come from undeclared samplers |
| Steps | Match | Subst. | Entropy | Grad norm, median | Mean | Re-graded | Below | |
|---|---|---|---|---|---|---|---|---|
| rate | (median) | [range] | lag | (median) | floor | |||
| 1–20 | 0.9900 | 0.62% | 0.695 | 0.030 [0.022–0.064] | 1.37 | 2.2e-5 | 1.3% | 0.17% |
| 21–40 | 0.9831 | 1.03% | 0.688 | 0.028 [0.022–0.043] | 1.52 | 7.7e-5 | 4.9% | 2.7% |
| 41–60 | 0.9801 | 1.15% | 0.634 | 0.033 [0.024–0.039] | 3.17 | 8.4e-5 | 5.6% | 2.1% |
| 61–80 | 0.9779 | 1.24% | 0.599 | 0.046 [0.033–0.059] | 1.40 | 1.3e-4 | 3.8% | 1.0% |
| 81–100 | 0.9698 | 1.69% | 0.541 | 0.046 [0.034–0.067] | 2.29 | 1.6e-4 | 6.2% | 2.3% |
| Production cluster (math match rate) | Declared hardware | Lab value for the matching precision |
|---|---|---|
| 0.993 | Mostly B200 and H200 | fp32 heads: 0.994 |
| 0.986, the bulk | Almost all undeclared | bf16 heads: 0.986; fp8 KV cache: 0.985 |
| 0.967 | A few stable, undeclared samplers | fp8 weights: 0.963–0.970 |
| 0.955 | RTX 5090 | Unexplained: 0.01 below fp8 weights |
| Benchmark | Teutonic-I, after SFT | Teutonic-I-Reliquary, after RL | Qwen3.5-9B | ||
|---|---|---|---|---|---|
| SWE-bench Verified | 486 | 17.3 [13.9–20.7] | 43.6 [39.2–48.0] | +26.3 | 35.1 [30.9–39.3] |
| TMax | 200 | 28.4 [22.2–34.6] | 74.8 [68.8–80.8] | +46.4 | 82.2 [76.9–87.5] |
| LiveCodeBench | 300 | 40.7 [35.1–46.3] | 62.0 [56.5–67.5] | +21.3 | 57.0 [51.4–62.6] |
| AIME 2025 | 30 | 73.3 [57.5–89.1] | 91.2 [81.1–100.0] | +17.9 | 86.2 [73.9–98.5] |
| AIME 2026 | 30 | 74.2 [58.5–89.9] | 89.6 [78.7–100.0] | +15.4 | 86.7 [74.5–98.9] |
| IFBench | 300 | 65.3 [59.9–70.7] | 74.7 [69.8–79.6] | +9.4 | 67.5 [62.2–72.8] |
| Method | Removes drift | Needs | Checks sampled tokens | Heterogeneous hardware |
|---|---|---|---|---|
| TIS [ 5 ] , MIS [ 6 ] , IcePop [ 7 ] | Truncates or masks | Yes | No | Yes |
| GSPO [ 21 ] , CISPO [ 22 ] | Sequence-level or clipped weights | Yes | No | Yes |
| Score centering + MIS [ 8 , 4 ] | Yes, in expectation | Yes, top- of | No | Yes |
| Bitwise alignment [ 13 , 14 ] | Removes the mismatch itself | No | No | No: same kernels on both sides |
| TOPLOC, INTELLECT-2 [ 12 , 1 ] | No | No | No: checks activations | Within a tolerance |
| Token-DiFR [ 9 ] | No: verification only | No | Yes | Yes |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| # | Gate | Value | Consequence |
|---|---|---|---|
| 0 | Valid lease and not yet revealed | lag 16 | Refused |
| 1 | Coordinator-side grading and integrity; the reward is never supplied by the sampler | – | Rejected, not paid |
| 2 | Learning zone: standard deviation of the 16 rewards 0.24 | 0.24 | In zone: trained; out of zone: audited |
| 3 | Lag above 16 checkpoints | 16 | Not trained, not paid |
| 4 | Per rollout, in the training forward: match 0.90, max gap 8, final EOS gap 1 (not for episodes) | 0.90 / 8 / 1 | Removed from the loss, not paid |
| 5 | Suspicious positions: gap 3, or is a stop token and | 3 | Feeds gate 8 |
| Parameter | Value |
|---|---|
| Model | 9B (Teutonic-I, after SFT) |
| Sampling | Temperature 1, top- 1, top- 0, Gumbel-max |
| Rollouts per group / groups per step | 16 / 512 |
| Optimizer | AdamW, fp32 master weights, 8-bit states |
| Learning rate | , 8 warm-up steps |
| Gradient clipping | Norm 1.0; step skipped above 100 |
| Set | 0 | 20 | 40 | 60 | 85 | 100 | 120 | 140 | 158 |
|---|---|---|---|---|---|---|---|---|---|
| AIME 2025 | 75.8 [65.0–85.4] | 78.8 | 86.2 | 83.3 | 87.1 [77.1–95.4] | 87.9 | 86.2 | 90.8 | 90.4 |
| AIME 2026 | 73.3 [60.8–85.4] | 80.4 | 81.7 | 81.7 | 84.6 [74.2–92.9] | 86.7 | 87.1 | 90.8 | 89.6 |
| GPQA Diamond | 62.8 [57.6–68.1] | 65.5 | 66.0 | 65.2 | 65.0 [59.3–70.3] | 65.7 | 65.3 | 65.0 | 65.9 |
| LiveCodeBench | 39.5 [34.5–44.5] | 41.8 | 49.5 | 49.0 | 55.0 [49.5–60.2] | 58.7 | 56.5 | 59.3 | 61.0 |
| IFBench | 63.7 [58.8–68.2] | 62.8 | 68.5 | 68.3 | 73.0 [68.8–77.0] | 70.2 | 71.3 | 72.5 | 74.7 |
| MMLU-Pro | 75.0 [71.4–78.5] | 74.5 | 75.8 | 76.0 | 77.9 [74.5–81.1] | 76.8 | 77.9 | 79.1 | 78.4 |