TL;DR
Masked Diffusion Language Models (MDLMs) suffer from a critical training–inference mismatch: training uses uniformly random masking, whereas inference progressively unmasks tokens using confidence-based schedules. This causes over-denoising, where correct intermediate answers are degraded into incorrect final outputs. To close this divide, the authors propose Masked Diffusion Policy Optimization (MDPO)—reinforcement learning with intermediate-step rewards—and Running Confidence Remasking (RCR), a training-free decoding strategy that dynamically revisits early, noisy predictions.
What Problem Does This Paper Address?
While autoregressive (AR) models generate text strictly token-by-token from left to right, Masked Diffusion Language Models (such as LLaDA) iteratively denoise an entire sequence simultaneously from all-mask states.
However, existing MDLMs suffer from an overlooked training–inference divide:
- Mismatched Schedules: During pre-training, tokens are masked at independent random rates across the sequence. In contrast, inference uses structured, confidence-driven remasking schedules that reveal high-confidence tokens first and progressively leave fewer masks.
- Over-Denoising: Because the model never learns to navigate its structured inference trajectory, it often stumbles upon the correct answer halfway through generation, only to "refine" it into an incorrect one by the final step (e.g., adding +9.8% potential accuracy on MATH-500 if intermediate correctness were captured).
- Irreversible Early Errors: Heuristic decoding strategies freeze unmasked tokens at each step. If early iterations make a mistake due to low contextual information, that mistake is permanently locked into the generation.
Methods
The authors introduce two complementary techniques targeting training and inference:
[ Fully Masked Input ]
│
▼
[ Denoising Step t ] ──► Complete Generation xt ──► Verifier Reward r(xt)
│ │
├────────────────────────────────────────────────┤
▼ ▼
[ Running Confidence Remasking ] [ Advantage Estimation ]
(Keeps running max-confidence, (Rewards immediate improvement
remasks low-confidence tokens) and overall trajectory quality)
│ │
▼ ▼
[ Next Denoising Step t-1 ] [ Policy Gradient Update (MDPO) ]
1. Masked Diffusion Policy Optimization (MDPO)
Because discrete diffusion models predict all tokens at every step, each step produces a complete, evaluatable sequence. MDPO formulates denoising as a Markov decision process and trains the policy with reinforcement learning:
- Trajectory-level RL: Formulates denoising rollouts using group-relative advantage estimation (similar to GRPO) with PPO clipped surrogates.
- Intermediate Step Rewards: Step-level advantages evaluate both the immediate delta between steps ($r(x_{t,k}) - r(x_{t+1,k})$) and the running average return over cleaner future states ($\frac{1}{t}\sum_{j=0}^{t-1} r(x_{j,k})$).
- Over-Denoising Filtering: Instead of training on the full dataset, the policy is trained selectively on the ~10% of prompts that exhibit over-denoising during unguided rollouts. This bypasses the typical "zero-advantage collapse" when rollouts produce all-zero rewards.
2. Running Confidence Remasking (RCR)
A plug-and-play inference replacement for Low-Confidence Remasking (LCR). Standard LCR calculates confidence solely at the current step and freezes unmasked tokens. RCR tracks the running maximum confidence of every position across all prior steps:
$$m_{t-1}^i = 1 - \max_{t' \ge t} \left( p_\theta(x_{t'-1}^i \mid \bar{x}_{t'}) \right)$$
If an early unmasked token never achieved high confidence and other positions surpass it later, RCR re-masks and regenerates that position, enabling dynamic error correction.
Datasets
- Training Data:
- Hugging Face OpenR1 / NuminaMath 1.5: 93.7k competition-level mathematics problems.
- Countdown: Combinatorial arithmetic game data split from TinyZero (Pan et al., 2025).
- Evaluation Benchmarks:
- MATH-500: 500 challenging problems from the MATH benchmark, evaluated strictly with
Math-Verify. - Countdown Test Set: Arithmetic planning tasks requiring the model to reach target values using given numbers.
Key Insights and Ideas
- Intermediate generations are valid actions: In autoregressive RL, rewards typically arrive only at the end of a long token chain. In MDLMs, every denoising step yields an entire candidate string, making dense intermediate verification natural and computationally accessible.
- Over-denoising as a natural curriculum filter: Filtering for trajectories where intermediate steps succeeded while the final step failed provides an information-dense training set. It presents both positive and negative step gradients from the exact same problem prompt.
- Diffusion can do latent reasoning: On Countdown, MDPO caused a behavioral shift: rather than generating lengthy chain-of-thought derivations, the model learned to synthesize answers directly within a few parallel steps (<10 denoising steps), exploiting diffusion's latent computation abilities.
- Pre-training origin dictates diffusion behavior: Models trained from scratch (like LLaDA) suffer significantly more from the training–inference divide than models adapted from autoregressive checkpoints (like Dream-7B), because AR pre-training naturally biases generations toward left-to-right confidence ordering.
Key Results
Experiments evaluated LLaDA-8B-Instruct under both block-level autoregressive generation (semi-AR, block size 128) and fully parallel diffusion (pure-Diff, block size 512):
- Sample Efficiency: MDPO matched the performance of previous state-of-the-art RL on MDLMs (
diffu-GRPO) with $60\times$ fewer gradient updates. - MATH-500:
- Baseline LLaDA achieves 36.2% (128 steps, semi-AR) and 18.2% (256 steps, pure-Diff).
- The training-free RCR improves baseline performance immediately to 37.6% (semi-AR) and 25.4% (64 steps, semi-AR).
- MDPO + RCR reaches 44.2% (semi-AR, 256 steps), outperforming supervised fine-tuning (41.8%) and
diffu-GRPO(40.2%). - Countdown:
- LLaDA achieves 20.7% (semi-AR) and 38.7% (pure-Diff).
- MDPO elevates accuracy to 70.7% (semi-AR) and 71.1% (pure-Diff), and 73.4% when combined with RCR—a +54.2% improvement over SOTA.
Limitations and Future Work
- Static Verifiers Required: The evaluation relies on deterministic reward verifiers (math checkers and arithmetic solvers). Extending MDPO to open-ended generation will require integrating LLM-as-a-judge approaches for intermediate steps.
- Filtering Overhead: Identifying over-denoising samples requires an offline inference pass over the training corpus, though this is negligible compared to full backward passes.
- Diminishing Returns on AR-adapted MDLMs: For models like Dream-7B (initialized from pre-trained AR models like Qwen 2.5), the training–inference divide and over-denoising are inherently muted, resulting in marginal gains.
Summary updated