Tuning the Implicit Regularizer of Masked Diffusion Language Models: Enhancing Generalization via Insights from $k$-Parity
Jianhao Huang, Baharan Mirzasoleiman
TL;DR
This work analyzes masked diffusion language models through the lens of the $k$-parity problem, revealing that the MD objective naturally decomposes into a task-driven Signal Regime and an information-theoretically obscured Noise Regime that acts as implicit regularization. By deriving an energy-based learning landscape and proposing signal-optimal mask sampling, the authors demonstrate that MDLMs can bypass grokking and generalize rapidly, with empirical gains in both 50M-parameter pretraining and 8B-parameter large-scale settings. They further show that concentrating training on a signal-rich window improves perplexity and downstream task performance, though the optimal masking strategy can depend on the task (discriminative vs. generative). The findings offer a practical temporal scheduling approach for pretraining and fine-tuning masked diffusion models, with potential broad impact on generalization in large language models. Overall, the paper provides a principled framework linking objective structure, mask distribution, and generalization in MDLMs, supported by theory and scalable experiments.
Abstract
Masked Diffusion Language Models have recently emerged as a powerful generative paradigm, yet their generalization properties remain understudied compared to their auto-regressive counterparts. In this work, we investigate these properties within the setting of the $k$-parity problem (computing the XOR sum of $k$ relevant bits), where neural networks typically exhibit grokking -- a prolonged plateau of chance-level performance followed by sudden generalization. We theoretically decompose the Masked Diffusion (MD) objective into a Signal regime which drives feature learning, and a Noise regime which serves as an implicit regularizer. By training nanoGPT using MD objective on the $k$-parity problem, we demonstrate that MD objective fundamentally alters the learning landscape, enabling rapid and simultaneous generalization without experiencing grokking. Furthermore, we leverage our theoretical insights to optimize the distribution of the mask probability in the MD objective. Our method significantly improves perplexity for 50M-parameter models and achieves superior results across both pre-training from scratch and supervised fine-tuning. Specifically, we observe performance gains peaking at $8.8\%$ and $5.8\%$, respectively, on 8B-parameter models, confirming the scalability and effectiveness of our framework in large-scale masked diffusion language model regimes.
