Masked diffusion models (MDMs) have emerged as a promising alternative to autoregressive models, enabling parallel token generation while achieving competitive performance. Despite these advantages, MDMs face a fundamental limitation: once tokens are unmasked, they remain fixed, leading to error accumulation and ultimately degrading sample quality. We address this by proposing a framework that trains a model to perform both unmasking and correction. By reusing outputs from the MDM denoising network as inputs for corrector training, we train a model to recover from potential mistakes. During generation we apply additional corrective refinement steps between unmasking ones in order to change decoded tokens and improve outputs. We name our training and sampling method Progressive Self-Correction (ProSeCo) for its unique ability to iteratively refine an entire sequence, including already generated tokens. We conduct extensive experimental validation across multiple conditional and unconditional tasks, demonstrating that ProSeCo yields better quality-efficiency trade-offs (up to ~4x faster sampling while still outperforming the best accuracy baseline method) and enables further gains through inference-time compute scaling (up to ~1.2x improvement on benchmarks when allowing for slower, high-NFE decoding).
Figures & tables
Figure 1: ( Left ) Training \mathpzcProSeCo : The original process trains for generation via unmasking. For every timestep in the masking process, we also train for self-correction: undoing corruptions that arise from sampling from unmasking predictions. (Right) Using our method for SFT and Max correction sampling with LLaDA [ 34 ] significantly outperforms vanilla masked diffusion SFT.
Figure 2: Illustrative example demonstrating the benefits of self-correction. (Left) For standard MDM, during parallel unmasking, errors occur. Mistakes accumulate and lead to sample collapse. (Middle) For \mathpzcProSeCo , a short correction loop steers generation ‘back on track.’ (Right) \mathpzcProSeCo can thus produce a final high quality output even with parallel generation.
Code
Math
Corrector Sampling
HumanEval
MBPP
GSM8K
MATH
Off-the-Shelf 8B Models
Prior Work
Llama3.1-Instruct [ 18 ]
✗
63.41
70.90
81.05
47.38
LLaDA-Base [ 34 ]
✗
34.15
37.20
46.78
17.04
LLaDA-Instruct [ 34 ]
✗
45.73
47.09
83.40
43.14
+ ReMDM [ 56 ]
✓
43.90
45.50
83.93
43.76
Table 1: Pass@1 on code and math benchmarks. ‘Corrector Sampling’ ✗ / ✓ symbol indicates whether a correction algorithm was applied. † indicates values taken from Huang et al. [22] . Other "Prior work" values obtained via evaluation with open-sourced weights. Best value is bolded .
Figure 3: Quality-efficiency trade-offs for \mathpzcProSeCo . Standard MDMs (Baseline; gray dot ) attain best performance when decoding a single token every step. \mathpzcProSeCo can vary number of corrector steps and attain comparable performance more efficiently ( Ours: Fast; green star ), it achieve even better quality for modest increase in compute budget ( Ours: Balanced; orange star ), or it maximize quality by further scaling inference-time compute ( Ours: Max; blue star ).
Figure 4: Pareto frontier of parallel decoding and quality. Applying a modest number of corrector steps, allows \mathpzcProSeCo models to recover from paralell decoding errors and extend this frontier.
Figure 5: \mathpzcProSeCo better navigates the novelty-property maximization Pareto frontier. Novel samples ( x -axis) vs. mean property value of novel samples ( y -axis) for classifier-free guidance [ 48 ] , with varying unmasking steps T (line style) and guidance strength γ (marker size). (Left) Maximizing the ring count property. (Right) Maximizing the drug likeness (QED) property.
MAUVE ( ↑ )
Gen. PPL ( ↓ )
Entropy ( ↑ )
Data
1.00
14.8
5.44
AR ( T=1024 ) $
0.76
12.1
5.22
T=
128
256
512
1024
128
256
512
1024
128
256
512
1024
MDLM $ [ 45 ]
0.015
0.023
0.031
0.042
61.5
55.8
53.0
51.3
5.52
5.49
5.48
5.46
ReMDM $ [ 56 ]
0.057
0.216
0.350
0.403
42.5
30.5
21.1
28.6
5.43
5.34
5.21
5.38
PRISM † [ 24 ]
0.118
0.294
0.423
0.527
21.5
18.0
16.4
15.3
5.18
5.15
5.12
5.10
Table 2: Unconditional generation sample quality for models trained on OpenWebText. † Values reported in Kim et al. [24] . $ Values reported in Wang et al. [56] . ∗ Values obtained with open-sourced weights; sequence length reduced to 512 to match the model trained in von Rütte et al. [55] .
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
HumanEval
MBPP
GSM8K
MATH
Baseline (Vanilla SFT)
Accuracy (%)
58.54
56.88
88.86
46.60
Average NFEs
247.8
290.3
214.2
259.4
Generation length
1024
1024
1024
1024
Block length
32
32
32
32
Demasking Tokens/Step
1
1
1
1
Appendix
Table 3: Sampling hyperparameters for results attained with \mathpzcProSeCo and reported in Figure 3 .
T=
Unmasking steps
Maximum Self Correction Steps
Avg. NFEs
128
64
64
123.9
256
128
128
212.6
512
512
512
601.3
1024
1024
1024
1114.2
Appendix
Table 4: Parameters used for GIDD [ 55 ] unmasking and self-correction budgets corresponding to the results in Table 2 .
Model / configuration
HumanEval
MBPP
GSM8K
MATH
Vanilla SFT
58.54
56.88
88.86
46.60
+ ReMDM (paper-recommended)
56.10
50.00
88.48
46.22
+ ReMDM (additional sweep)
62.20
54.50
88.70
46.50
\mathpzcProSeCo SFT + Max Sampling
72.56
69.31
92.19
55.06
Appendix
Table 5: Additional ReMDM configurations applied to our vanilla LLaDA-Base 8B SFT checkpoint. The paper-recommended configuration corresponds to the ReMDM row under our SFT baselines in Table 1 . The additional sweep uses random remasking and multiple ReMDM loops per block. Values are Pass@1; best values are bolded .
Model
HumanEval
MBPP
GSM8K
MATH
Vanilla SFT
58.54
56.88
88.86
46.60
Vanilla SFT ( 2× steps)
62.80
56.35
89.61
48.08
\mathpzcProSeCo SFT + Max Sampling
72.56
69.31
92.19
55.06
Appendix
Table 6: Pass@1 comparison with extended vanilla SFT. The 2× baseline receives twice the optimization steps of the original vanilla SFT baseline. Best values are bolded .
HumanEval
MBPP
GSM8K
MATH
Baseline (Vanilla SFT)
Accuracy
58.54
56.88
88.86
46.60
Avg. NFEs
247.8
290.3
214.2
259.4
Tokens/Second
123.14
131.04
148.92
153.15
\mathpzcProSeCo Max
Accuracy (+ gain)
72.56 ( +14.0 )
69.31 ( +12.4 )
92.19 ( +3.3 )
55.06 ( +8.5 )
Appendix
Table 7: Quality vs. Efficiency Metrics. We report Accuracy (%), Average Number of Function Evaluations (NFEs), and Throughput (Tokens/Second). Best accuracy gain and efficiency results are bolded . Improvements over the baseline are highlighted in green .
Figure 6: Pareto frontier analysis with throughput (tokens per second, TPS) reported.
Figure 7: Ablation: Performance across various configurations of corrector steps. Frequency ω∈{1,2,4,8} (denoted by color) and S∈{1,2,4,8} (denoted by marker size).
Training + Sampling
HumanEval
MBPP
GSM8K
MATH
Vanilla SFT + Standard MDM
58.54
56.88
88.86
46.60
Vanilla SFT + \mathpzcProSeCo Balanced
1.83
1.85
60.42
27.06
\mathpzcProSeCo SFT + \mathpzcProSeCo Balanced
72.56
69.31
92.19
55.06
Appendix
Table 8: Ablation: Applying self-correction sampling to models trained with standard MDM loss leads to worse performance, underscoring the importance of the \mathpzcProSeCo framework. Pass@1 accuracy (%) performance is reported.
Figure 8: Ablation: Selecting self-correction loss weight λt . We retrain the discrete classifier model for maximizing ring count with various λt values.
T=
MAUVE ( ↑ )
Gen. PPL ( ↓ )
Entropy ( ↑ )
128
0.311 ± 0.006
23.045 ± 0.031
5.452 ± 0.002
256
0.572 ± 0.006
16.52 ± 0.014
5.376 ± 0.005
512
0.622 ± 0.005
13.196 ± 0.031
5.293 ± 0.001
1024
0.592 ± 0.006
10.92 ± 0.014
5.221 ± 0.005
Appendix
Table 9: Mean ± standard error for OWT unconditional generation metrics for \mathpzcProSeCo .
Dataset
Licence
GSM8K [ 12 ]
MIT
HumanEval [ 10 ]
MIT
Llama-Nemotron: Efficient Reasoning Models [ 5 ]
CC BY 4.0
MBPP [ 3 ]
MIT
MinveraMath [ 20 ]
MIT
OpenWebText [ 17 ]
Creative Commons CC0 license (“no rights reserved”)
Appendix
Table 10: Datasets and corresponding licenses.
Library
License
HuggingFace [ 61 ]
Apache 2.0
Hydra [ 63 ]
MIT
Fast-DLLM [ 62 ]
Apache 2.0
Language Model Evaluation Harness [ 15 ]
MIT
Matplotlib [ 23 ]
Matplotib license
Mauve [ 41 ]
GNU General Public License, Version 3
Appendix
Table 11: Software and corresponding licenses.
Figure 9: Example of \mathpzcProSeCo ’s generated response on the HumanEval dataset using the max accuracy configuration (see Table 3 ).
Figure 10: Example of \mathpzcProSeCo ’s generated response on the GSM8K dataset using the max accuracy configuration (see Table 3 ).
Figure 11: Generated sample from \mathpzcProSeCo trained on OWT, with a total budget of T=256 : 64 unmasking steps, corrector frequency ω=1 and S=3 steps per loop.