Self-Repulsive Sampling for Diffusion Language Models
Organizations: ETH Zürich · EPFL
Abstract
Sampling several responses and voting over their answers can improve a language model's accuracy, but repeated answers limit the benefit of additional samples. Raising temperature increases diversity at a potential cost to per-sample accuracy. We introduce Self-Repulsion (SR), a sampler for masked diffusion language models that uses peer commitments to diversify the pool. At each penalized denoising step, each path lowers a token's logit according to how many peers have committed that token at the same position. Paths share a batched forward pass and then commit in sequence, so later paths observe choices made earlier in the same step. This coupling requires no training or additional forward or backward pass and can produce distinct paths even at temperature zero. When all paths commit a position together from identical logits, the update exactly maximizes total logit minus a convex duplication cost. On LLaDA-8B-Instruct with ten paths and 128 denoising steps, deterministic SR reaches 80.38% plurality accuracy on GSM8K, compared with 70.17% for the unpenalized greedy decoder. At temperature 0.6 and matched model-evaluation budgets, the count penalty improves over self-consistency by 2.06 percentage points in blocks of 32 and 14.50 under pure diffusion. Experiments on GSM8K, MATH and TruthfulQA show that voting gains arise mainly from higher coverage of correct answers, with gains that vary by benchmark and decoding regime.
Figures & tables
| Plurality ( ) | Coverage ( ) | Per-sample ( ) | Disagreement | ||||||||
| Method | GSM | MATH | TQA | GSM | MATH | GSM | MATH | TQA | GSM | MATH | TQA |
| Semi-autoregressive blocks of 32 | |||||||||||
| Self-consistency, ( greedy, ) | 70.17 | 28.25 | 55.26 | 70.17 | 28.25 | 70.17 | 28.25 | 55.26 | 0.00 | 0.00 | 0.00 |
| Self-consistency | 77.05 | 40.14 | 59.02 | 89.70 | 56.81 | 70.04 | 30.02 | 54.44 | 27.14 | 62.01 | 34.09 |
| TAPS | 77.69 | 39.47 | 58.27 | 91.00 | 57.32 | 66.77 | 29.26 | 53.53 | 35.51 | 64.47 | 36.63 |
| ODD ( ) | 77.24 | 37.03 | 60.32 | 91.75 | 54.27 | 64.94 | 24.19 | 52.35 | 38.72 | 70.98 | 40.97 |
| Conditions on | Varies | Disagr. | Per-sample | Plur. | Cov. | Temp. here | Gap |
|---|---|---|---|---|---|---|---|
| Nothing (temperature) | 15.02 | 53.42 | 54.53 | 63.17 | – | – | |
| Nothing (temperature) | 25.06 | 53.76 | 57.44 | 68.83 | – | – | |
| Nothing (temperature) | 28.25 | 53.24 | 57.82 | 71.33 | – | – | |
| Nothing (temperature) | 34.86 | 51.95 | 57.83 | 73.08 | – | – | |
| Nothing (temperature) | 50.61 | 47.77 | 60.72 | 79.92 | – | – | |
| Own distribution | 24.48 | 53.94 | 57.57 | 69.33 | 53.74 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Configuration | Metric | Seed 0 | Seed 1 | Seed 2 | Seed 3 | Seed 4 | Mean | SD | Range |
|---|---|---|---|---|---|---|---|---|---|
| SR, 1280 | Plurality | 80.93 | 78.89 | 78.79 | 78.06 | 78.89 | 79.11 | 1.08 | 2.87 |
| Coverage | 94.33 | 92.17 | 94.00 | 93.50 | 93.67 | 93.53 | 0.83 | 2.17 | |
| Per-sample | 67.68 | 68.12 | 68.72 | 68.00 | 68.52 | 68.21 | 0.41 | 1.03 | |
| Self-consistency, 1280 | Plurality | 77.42 | 77.21 | 77.06 | 76.38 | 77.20 | 77.05 | 0.40 | 1.04 |
| Coverage | 89.50 | 89.67 | 90.67 | 89.50 | 89.17 | 89.70 | 0.57 | 1.50 | |
| Per-sample | 70.03 | 69.65 | 70.57 | 70.02 | 69.92 | 70.04 | 0.33 | 0.92 |
| Plurality ( ) | Coverage ( ) | Per-sample ( ) | Disagreement | ||||||||
| Method | GSM | MATH | TQA | GSM | MATH | GSM | MATH | TQA | GSM | MATH | TQA |
| Semi-autoregressive blocks of 32 | |||||||||||
| Single greedy decode ( ) | 73.00 | – | – | 73.00 | – | 73.00 | – | – | 0.00 | – | – |
| Self-consistency | 76.09 | 38.18 | 59.84 | 87.94 | 55.89 | 72.31 | 31.60 | 56.37 | 19.93 | 55.39 | 28.47 |
| TAPS | 75.37 | 37.54 | 58.46 | 90.17 | 55.39 | 68.88 | 30.26 | 55.42 | 29.36 | 57.89 | 30.80 |
| ODD ( ) | 77.75 | 37.49 | 59.31 | 91.58 | 56.20 | 69.14 | 26.88 | 54.01 | 31.00 | 66.43 | 37.55 |
| NFE | Seeds | Plurality | Coverage | Per-sample | Disagr. | ||||
| Fixed gate | |||||||||
| 2 | 8 | 8.00 | 512 | 600 | 3 | 71.47 | 79.72 | 71.47 | 25.39 |
| 3 | 16 | 8.00 | 768 | 600 | 3 | 74.44 | 84.39 | 72.00 | 26.07 |
| 5 | 32 | 8.00 | 1280 | 600 | 3 | 76.88 | 88.78 | 71.39 | 28.03 |
| 7 | 48 | 8.00 | 1792 | 600 | 3 | 77.57 | 91.50 | 71.48 | 28.55 |
| Fixed strength , the -invariant scaling of Corollary 3 | |||||||||
| Parameter | Setting | Seeds | Plurality | Coverage | Per-sample | Disagr. |
|---|---|---|---|---|---|---|
| Reference | count, , | 5 | 79.11 | 93.53 | 68.21 | 35.53 |
| Self-consistency | , | 5 | 77.05 | 89.70 | 70.04 | 27.14 |
| Split at 1280 NFE | 5 samples 256 steps, | 3 | 76.88 | 88.78 | 71.39 | 28.03 |
| Statistic | expected count | 2 | 80.65 | 94.67 | 66.47 | 40.60 |
| Statistic | collision-weighted | 2 | 80.07 | 94.42 | 61.87 | 48.63 |
| Expected count count | Collision-weighted count | |||||
|---|---|---|---|---|---|---|
| Benchmark | Diffusion | Block 32 | Interaction | Diffusion | Block 32 | Interaction |
| GSM8K ( ) | ||||||
| MATH ( ) | ||||||
| TruthfulQA ( ) | ||||||
| Regime | Seeds | Plurality | Coverage | Per-sample | Disagr. | |||
|---|---|---|---|---|---|---|---|---|
| Blocks of 32 | 64 | 7.11 | 600 | 5 | 79.11 | 93.53 | 68.21 | 35.53 |
| Blocks of 32 | 0 | 0.00 | 600 | 5 | 77.05 | 89.70 | 70.04 | 27.14 |
| Pure diffusion | 64 | 7.11 | 600 | 2 | 70.30 | 87.25 | 52.58 | 51.18 |
| Pure diffusion | 0 | 0.00 | 600 | 2 | 54.39 | 65.83 | 52.02 | 21.08 |
| Parameter | Recommended | Range | Note |
|---|---|---|---|
| Ensemble size | 10 | 2 to 32 | Vote flat past ten at fixed ; coverage still rising |
| Strength | 64 | – | Selected on 200 problems at one seed |
| Strength across | 10 to 32 | Hold , not (Corollary 3 ); fixed at costs per-sample accuracy | |
| Denoising steps | 128 | 128 to 256 | Vote flat in the step count; 128 is cheaper |
| Temperature | 0.6 or 0 | 0 to 0.6 | Zero (gate 8, ) is 1.27 above the sampled configuration ( ) at 128 steps and 0.33 below it at 256; uses no randomness |
| Statistic | Count | – | Ordering is benchmark-dependent |
| Method | Plur. ( ) | Cover. ( ) | Per-s. ( ) | Distinct | Disagr. |
|---|---|---|---|---|---|
| Self-consistency | 76.85 | 87.25 | 74.15 | 1.69 | 17.82 |
| SR, count | 79.31 | 94.00 | 72.33 | 2.26 | 28.22 |
| Plurality at own ( ) | Difference from SR | |||||
| Method | GSM | MATH | TQA | GSM | MATH | TQA |
| Self-consistency, | 77.05 | 40.14 | 59.02 | |||
| Self-consistency, | 78.28 | 39.47 | 58.65 | |||
| TAPS, | 77.87 | 39.31 | 57.74 | |||
| ODD ( ), | 78.23 | 36.66 | 60.86 | |||
| ODD ( ), | 78.61 | 37.52 | 60.12 | |||
| Configuration | Gate | Agreement | Distinct | Per-sample ( ) | Coverage ( ) | Plurality ( ) | |
| Parallel, , the deployed design | |||||||
| Penalty off | 0 | 0 | 100.00 | 1.00 | 73.00 | 73.00 | 73.00 |
| Count penalty | 1 | 9 | 77.54 | 1.91 | 72.17 | 89.50 | 76.97 |
| Count penalty | 2 | 18 | 75.62 | 2.04 | 71.85 | 90.83 | 77.31 |
| Count penalty | 4 | 36 | 73.04 | 2.18 | 71.90 | 92.00 | 77.97 |
| Count penalty | 8 | 72 | 68.27 | 2.43 | 69.65 | 92.33 | 78.60 |
| Coupling | Gate | Agreement | Per-sample ( ) | Coverage ( ) | Plurality ( ) | |
|---|---|---|---|---|---|---|
| Triangular filtration | 4 | 36 | 76.53 | 71.75 | 90.00 | 76.12 |
| Triangular filtration | 8 | 72 | 73.12 | 71.30 | 92.00 | 77.41 |
| Triangular filtration | 16 | 144 | 67.72 | 68.67 | 91.50 | 77.19 |
| Mutual cascade, symmetric | 8 | 72 | 68.27 | 69.65 | 92.33 | 78.60 |
| Benchmark | Penalty | plurality | Coverage | Selectivity | Fixes | Breaks |
| Semi-autoregressive blocks of 32 | ||||||
| GSM8K | count | 7.17 | 3.25 | |||
| GSM8K | collision-wt. | 6.83 | 3.92 | |||
| MATH | count | 6.00 | 3.66 | |||
| MATH | collision-wt. | 5.18 | 3.05 | |||
| TruthfulQA | count | 6.65 | 5.77 | |||
| GSM8K | MATH | |||||||
| Sampler | 2 | 5 | 10 | 2 | 5 | 10 | ||
| Blocks of 32 | ||||||||
| Self-consistency | 72.18 | 78.58 | 84.54 | 87.67 | 31.60 | 39.60 | 48.78 | 55.89 |
| SR, count | 70.93 | 81.52 | 90.07 | 93.83 | 30.22 | 40.51 | 52.12 | 60.47 |
| SR, coll.-wt. | 66.70 | 80.14 | 90.20 | 94.75 | 28.25 | 38.57 | 50.75 | 58.74 |
| Pure diffusion | ||||||||
| GSM8K | MATH | TQA | |||||||
| Method | 3 | 5 | 10 | 3 | 5 | 10 | |||
| Semi-autoregressive blocks of 32 | |||||||||
| Self-consistency | 70.04 | 82.45 | 86.03 | 89.70 | 30.02 | 44.14 | 49.78 | 56.81 | 54.44 |
| TAPS | 66.77 | 83.28 | 87.53 | 91.00 | 29.26 | 44.03 | 49.84 | 57.32 | 53.53 |
| ODD ( ) | 64.94 | 82.60 | 87.21 | 91.75 | 24.19 | 40.12 | 46.45 | 54.27 | 52.35 |
| ODD ( ) | 66.57 | 83.32 | 87.73 | 92.17 | 22.77 | 39.22 | 45.97 | 54.37 | 49.85 |
| Sampler | Mask | Plurality ( ) | Coverage ( ) | Per-sample ( ) | Disagr. | plur. |
|---|---|---|---|---|---|---|
| Self-consistency | off | 57.02 | 67.00 | 54.47 | 20.40 | — |
| SR, count | off | 71.53 | 87.75 | 53.85 | 49.73 | |
| SR, count | on | 70.44 | 88.00 | 53.07 | 50.45 | |
| SR, coll.-wt. | off | 76.27 | 90.00 | 59.81 | 45.93 |