NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Simple and Effective Masked Diffusion Language Models

Subham Sekhar Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan, Edgar Mariano Marroquin, Justin T Chiu, Alexander M Rush, Volodymyr Kuleshov

TL;DR

This paper introduces Masked Diffusion Language Models (MDLM), a simplified approach to discrete diffusion that achieves state-of-the-art results for non-autoregressive text generation. By combining a Rao-Blackwellized objective—which effectively turns diffusion training into a weighted average of BERT-style masking losses—with modern engineering practices, the authors significantly narrow the performance gap between diffusion and traditional autoregressive models.

Overview of MDLM and its performance on LM1B

What Problem Does This Paper Address?

In the world of AI, diffusion models are the undisputed kings of image generation (think Stable Diffusion or DALL-E). However, in the realm of text, Autoregressive (AR) models like GPT-4 still reign supreme. Historically, diffusion models have struggled with language, showing a significant "log-likelihood gap"—meaning they are much less efficient at modeling the probability distribution of text compared to AR methods.

Previous attempts at "discrete diffusion" for text were often mathematically complex, numerically unstable, or relied on outdated neural architectures. The authors of this paper set out to prove that discrete diffusion isn't fundamentally flawed for language; it just needed a better training recipe and a cleaner mathematical formulation.

Methods

The core of MDLM is a "masking" diffusion process. In the forward process, tokens in a clean sentence are gradually replaced by a special [MASK] token until everything is noise.

The paper’s technical "secret sauce" consists of three main components:

  1. SUBS Parameterization: The authors introduce "Substitution-based" parameterization. This enforces two logical constraints: the model never predicts a [MASK] token for a clean input, and it always "carries over" (copies) tokens that are already unmasked.
  2. Rao-Blackwellized Objective: By applying Rao-Blackwellization—a statistical technique to reduce variance—the authors derive a simplified training objective. Remarkably, this complex diffusion math collapses into a simple, weighted average of classical Masked Language Modeling (MLM) losses, similar to how BERT is trained but with randomized masking rates.
  3. Modern Engineering: They swap out older architectures for the Diffusion Transformer (DiT), utilize rotary positional embeddings, and implement a low-discrepancy sampler to reduce training variance.

Datasets

The models were trained and evaluated on several standard benchmarks:

  • LM1B (One Billion Words): A standard large-scale language modeling dataset.
  • OpenWebText (OWT): An open-source clone of the dataset used to train GPT-2.
  • C4: Used for pre-training models to evaluate representation learning on the GLUE benchmark.
  • HG38: The human reference genome, used to test the model’s ability to generate biological (DNA) sequences.

Key Insights and Ideas

  • Diffusion is just Weighted MLM: One of the most elegant "aha" moments is the realization that masked diffusion is essentially just BERT-style training where the number of masked tokens is chosen strategically. This connects the world of generative modeling with the world of representation learning.
  • Invariance to Noise Schedule: The authors prove mathematically and empirically that their continuous-time loss is invariant to the specific "noise schedule" (how fast you add masks) used during training. This removes a major hyperparameter headache common in diffusion research.
  • The Power of Caching: Because the model is time-independent (it doesn't need to know exactly "when" in the diffusion process it is), it can cache predictions. This allows for "Efficient Ancestral Sampling," where the model can skip steps if no new tokens are unmasked, leading to faster generation.
  • Semi-Autoregressive (SAR) Flexibility: MDLM can generate text like a traditional AR model (left-to-right) but in "blocks." This allows it to generate sequences of arbitrary length while being 25-30x faster than previous SAR diffusion methods.

Key Results

MDLM sets a new high-water mark for diffusion-based language models:

Perplexity comparison on the LM1B dataset
  • State-of-the-Art Perplexity: On the LM1B benchmark, MDLM achieved a perplexity of 23.00, significantly beating previous diffusion models like SEDD (32.79) and approaching the performance of retrained AR Transformers (20.86).
  • DNA Modeling: In biological sequence generation, MDLM outperformed all other diffusion schemes and even surpassed AR Mamba models in some metrics.
  • Better than BERT: When used for representation learning, a MosaicBERT model fine-tuned with the MDLM objective outperformed the standard BERT-style pre-training on the GLUE benchmark (82.06 vs 81.62 average score).

Limitations and Future Work

Despite the massive improvements, a small performance gap still exists between MDLM and the best autoregressive models in terms of raw log-likelihood. The authors also note that while their semi-autoregressive sampling is fast, there is still room to optimize the trade-off between generation quality and speed.

Future directions include scaling MDLM to much larger parameter counts (comparable to modern LLMs) and exploring more complex noise processes beyond simple masking, such as token substitutions or deletions.

Summary updated

BibTeX
@inproceedings{sahoo2024simple,
  author = {Subham Sekhar Sahoo and Marianne Arriola and Yair Schiff and Aaron Gokaslan and Edgar Mariano Marroquin and Justin T Chiu and Alexander M Rush and Volodymyr Kuleshov},
  title = {{Simple and Effective Masked Diffusion Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=L4uaAR4ArM},
}
Figure