Diffusion Language Models are Provably Optimal Parallel Samplers

Haozhe Jiang, Nika Haghtalab, Lijie Chen

Introduction: The Autoregressive Bottleneck

Autoregressive (AR) language models have dominated natural language processing, but they suffer from an inherent inference bottleneck: they generate text sequentially, token-by-token. Even on massively parallel hardware, this sequential dependency limits inference speed. Diffusion Language Models (DLMs) have emerged as a promising alternative. By iteratively denoising masked sequences, DLMs allow many tokens to be generated in parallel.

Despite empirical successes, the theoretical capabilities of DLMs have remained largely unexplored territory. While the theoretical limits of AR models—especially when augmented with Chain-of-Thought (CoT) reasoning—are well understood, fundamental questions about DLMs persist: How much sequential computation do DLMs actually save, and what are the space (memory) requirements for this parallelism? This paper provides a rigorous mathematical foundation to answer these questions, proving that DLMs are optimal parallel samplers and revealing the critical importance of "revision" capabilities.

Theoretical Framework: Circuit Complexity

To analyze DLMs, the authors employ circuit complexity, a standard framework in theoretical computer science. They model the computational process of generating a target distribution as a Boolean circuit, where:

  • Circuit Depth represents time (the minimum number of sequential steps required).
  • Circuit Width represents space (the minimum amount of memory or bits needed at any given time).

The study formalizes DLMs as circuits that predict noiseless sequences from noisy (masked) ones, comparing four distinct variants:

  1. Standard DLMs: Can unmask tokens but cannot change them once unmasked.
  2. DLMs with Chain-of-Thought (CoT): Allowed to generate intermediate "scratchpad" tokens before producing the final output.
  3. DLMs with Remasking: Can turn previously generated tokens back into masks (noised) and resample them.
  4. DLMs with Revision: Can directly change unmasked tokens into entirely different tokens.

Key Findings

Time Optimality and the Memory Bottleneck

The authors prove that DLMs equipped with CoT are time-optimal (Theorem 3.1). Specifically, a DLM with CoT can simulate any parallel sampling algorithm in a number of decoding rounds exactly proportional to the circuit's depth. This represents a massive theoretical advantage over AR models, whose sequential steps scale with the circuit's total size (the total number of nodes).

However, this speed comes at a cost for standard DLMs. Because a standard DLM cannot alter a token once it is unmasked, using CoT to simulate complex logic results in massive intermediate memory footprints. The model is forced to keep all of its "scratchpad" work in memory indefinitely.

The Power of Changing Your Mind

To solve the memory bottleneck, the authors introduce the concepts of remasking and revision. By allowing a DLM to "erase" or overwrite intermediate steps that are no longer needed, the memory requirement drops dramatically. Theorem 3.2 proves that a DLM with CoT and remasking/revision can simulate a depth-$d$, width-$w$ circuit in $d+2$ steps using a sequence length of just $O(w + \log d)$. This allows DLMs to achieve optimal space complexity alongside optimal time complexity.

A Strict Expressivity Gap

Remasking and revision are not merely memory-saving tricks; they fundamentally increase the model's computational power. The authors establish a strict expressivity gap using the parity function. Through established complexity theorems (like Hastad's switching lemma), they prove that standard DLMs mathematically cannot generate certain distributions—such as the uniform distribution of $n$-bit strings with even parity—in a constant $O(1)$ number of steps. Conversely, DLMs equipped with revision or remasking can easily sample these distributions in $O(1)$ steps (Theorems 4.1, 4.2, & 4.5).

Limitations and Future Directions

While the paper provides a robust theoretical foundation, it relies on constructive upper bounds. This means the authors have proven that these optimal DLM configurations mathematically exist, but there is no guarantee that standard training algorithms (like gradient descent) will naturally discover these highly efficient parallel decoding strategies in practice.

The authors suggest that future research should focus on designing training algorithms capable of discovering these optimal strategies. Furthermore, given the massive theoretical benefits of revision, they strongly advocate for designing forward diffusion processes that explicitly include revision—rather than just masking—so that models are forced to learn how to revise their outputs during training.

Summary updated

BibTeX
@inproceedings{jiang2026diffusion,
  author = {Haozhe Jiang and Nika Haghtalab and Lijie Chen},
  title = {{Diffusion Language Models are Provably Optimal Parallel Samplers}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=5bkAbueJwM},
}
Figure