TL;DR
GoldiMask is a new fine-tuning strategy for discrete diffusion language models that replaces uniform random masking with a principled, two-pass approach. By jointly optimizing which tokens to reveal as context and how to weight the remaining targets using submodular optimization, it significantly boosts performance in reasoning and code generation while reducing the number of steps needed for parallel decoding.
What Problem Does This Paper Address?
Diffusion Large Language Models (DLLMs) are gaining traction as an alternative to standard autoregressive models because they can predict multiple tokens in parallel. However, training them via Supervised Fine-Tuning (SFT) is tricky.
In standard SFT, you mask some tokens and ask the model to predict them based on the visible ones. Usually, this masking is done at random. The authors argue this is suboptimal because masking is a coupled decision: if you reveal a token to provide context, you lose that token as a training target. Random masking ignores this trade-off, often pairing poor context with low-value supervision. GoldiMask aims to solve this by intelligently selecting context that provides the most "support" to the most "learnable" remaining targets.
Methods
GoldiMask moves away from one-size-fits-all random masking toward a dynamic, two-pass procedure:
- Over-mask and Probe: The model performs a first forward pass on a heavily masked response to measure initial token confidence and attention scores.
- Context Selection (The "Goldi" part): The authors formulate context selection as a non-monotone submodular optimization problem. They select a "reveal set" of tokens to show the model. The objective balances the benefit of a token as context (how much it helps other targets via attention) against its value as a target (its "supervision priority").
- Target Weighting: After revealing the selected context, a second forward pass measures how much the remaining targets improved. GoldiMask then uses a water-filling algorithm to assign loss weights. It prioritizes targets that were significantly helped by the new context but still have room to improve.
Datasets
The authors evaluated GoldiMask across several challenging domains:
- Reasoning: Fine-tuned on s1K (1,000 high-quality chain-of-thought examples) and LIFT-SFT-12K. Evaluation benchmarks included GSM8K, MATH-500, Countdown, Sudoku, and AIME24.
- Code Generation: Fine-tuned on KodCode and evaluated on HumanEval and the sanitized MBPP test split.
Key Insights and Ideas
- The "Goldilocks" Priority: The researchers found that focusing on the "hardest" tokens (lowest probability) isn't always best. Instead, they use a priority function $\lambda(p) = p(1-p)^3$ that peaks at intermediate confidence ($p=0.25$). These are tokens that are "learnable"—not so easy they're already mastered, but not so hard they're noise.
- Diminishing Returns of Context: The benefit of adding more context follows a saturating curve. GoldiMask uses a concave support function to ensure the reveal set covers a diverse range of targets rather than over-supporting just a few.
- Training for Faster Inference: Because GoldiMask trains the model to be more effective with partial context, it naturally improves parallel decoding. The resulting models can commit to more tokens per iteration at inference time without losing accuracy.
Key Results
GoldiMask consistently outperformed vanilla SFT and recent adaptive methods (like LIFT, GIFT, and CART) across different model backbones (LLaDA-8B, LLaDA-1.5, and Dream-7B).
- Reasoning Gains: On the s1K dataset with LLaDA-8B, GoldiMask achieved a 41.1% average accuracy across four benchmarks, compared to 36.8% for vanilla SFT and 39.5% for the strongest baseline, LIFT.
- Code Generation: GoldiMask-D significantly improved HumanEval scores on LLaDA-8B, reaching 39.0% vs. 30.8% for vanilla SFT.
- Decoding Efficiency: Under parallel decoding, GoldiMask reduced the number of iterations required by 15–21% on GSM8K and MATH-500 while maintaining comparable accuracy at high confidence thresholds.
Limitations and Future Work
- Computational Overhead: The two-pass approach is more expensive than standard SFT, requiring approximately 1.2x the training time of vanilla SFT.
- Heuristic Functions: While the supervision priority and support functions are theoretically grounded and perform well, the authors note they haven't established their absolute optimality.
- Future Directions: A promising next step is developing more direct, end-to-end estimates of how much a token benefits from specific context, potentially integrating the selection and weighting steps even more tightly.
Summary updated