Fast Sampling via Discrete Non-Markov Diffusion Models with Predetermined Transition Time

Zixiang Chen, Huizhuo Yuan, Yongqian Li, Yiwen Kou, Junkai Zhang, Quanquan Gu

TL;DR: Discrete Non-Markov Diffusion Models (DNDM) introduce a training-free sampling acceleration for discrete data like text. By leveraging a "transition time set"—the specific moments when discrete tokens flip from data to noise—the authors achieve up to a 30x speedup in sampling without sacrificing generation quality.

The Challenge of Discrete Diffusion

Diffusion models have revolutionized generative AI, but their success in continuous spaces (like images) hasn't perfectly translated to discrete spaces (like text). In continuous diffusion, we have "denoising diffusion implicit models" (DDIM), which allow for much faster sampling by skipping steps.

However, discrete diffusion models—such as Discrete Denoising Diffusion Probabilistic Models (D3PM)—have remained computationally expensive. They typically require a full sequence of $T$ neural network evaluations (one for every time step) to generate a sample. While some methods exist to speed this up, they often require retraining the model. The challenge is to find a training-free way to accelerate discrete sampling while maintaining the high quality required for tasks like machine translation.

Taxonomy of Diffusion Models

Introducing DNDM

The authors propose Discrete Non-Markov Diffusion Models (DNDM) to fill the gap in discrete, non-Markovian sampling. The core innovation lies in how they rethink the "forward" noise process.

  1. Transition Time ($\tau$): In discrete space, a token (like a word) doesn't "gradually" become noisy; it eventually flips from its original state to a noise state (like a [MASK] or a random word). The authors define $\tau$ as the exact time step this transition occurs.
  2. The Transition Time Set ($\mathcal{T}$): For a sentence of length $N$, each token has its own transition time. DNDM pre-samples these times to create a set $\mathcal{T}$.
  3. Accelerated Sampling: In standard models, you call the neural network at every step $t=1 \dots T$. In DNDM, you only need to call the network at time steps that are actually in the set $\mathcal{T}$. If no token is scheduled to "transition" at step $t$, the model simply skips the computation for that step.
  4. DNDM-C (Continuous-time): The authors extend this logic to the limit where $T \to \infty$, bridging the gap between discrete-step and continuous-time processes.
  5. DNDM-k: They also incorporate a "top-k" selection strategy, which uses the model's confidence scores to prioritize which tokens to update, further refining quality.

Crucially, because the marginal distributions of DNDM match those of standard Markovian discrete diffusion, this method is training-free. You can take an existing pre-trained model and simply swap in the DNDM sampling algorithm.

Key Insights

  • Sparsity is a Feature: In continuous diffusion, every pixel changes slightly at every step. In discrete diffusion, token changes are sparse. DNDM exploits this sparsity to skip redundant computations.
  • Deterministic Evolution: By pre-determining the transition times, the reverse sampling process becomes "de-randomized." Once the transition times are sampled, the path from noise back to data becomes more stable.
  • The $O(1)$ NFE: Theoretically, as the number of total steps $T$ goes to infinity, the number of function evaluations (NFE) required by DNDM doesn't grow linearly. Instead, it approaches a constant related to the sequence length $N$, effectively decoupling sampling speed from the total diffusion "time."
  • Order Matters: The authors found that transitioning tokens from left-to-right (mimicking human reading/writing) yields better BLEU scores than right-to-left or random orders.

Datasets and Results

The researchers evaluated DNDM on conditional text generation (Machine Translation: IWSLT14, WMT14, WMT16) and unconditional text generation (text8, enwik8).

Machine Translation Results
  • Massive Speedups: Compared to standard D3PM baselines, DNDM is roughly 3x faster for 50-step sampling and a staggering 30x faster for 1000-step sampling. As seen in the results, a 1000-step process on IWSLT14 drops from over 6300 seconds to just 191 seconds.
  • Efficiency: For a 1000-step process, DNDM often requires fewer than 40 neural network calls (NFE) to achieve peak quality, whereas standard models require all 1000.
  • Quality Gains: On the WMT16 (EN-RO) translation task, DNDM-k achieved a BLEU score of 33.86 at infinite steps, outperforming the RDM baseline while being significantly faster.
  • Perplexity: In unconditional generation (text8), DNDM reduced perplexity from 1,465.75 (Vanilla) to 600.02, while cutting generation time from 135.9s to 31.1s.

Limitations and Future Work

  • Domain Constraint: The current empirical evidence is focused strictly on text. The authors acknowledge that performance on other discrete domains, like audio or image quantization, remains to be explored.
  • Architecture: The study focused on non-autoregressive models. Testing DNDM with modern autoregressive GPT-style architectures is a suggested next step.
  • Infinite Step Quality: While DNDM-C (continuous-time) is theoretically elegant, the authors noted that "infinite" steps don't always beat 1000 steps in practice. This is likely due to cumulative estimation errors in the neural network that can build up over very high step counts.

Summary updated

BibTeX
@inproceedings{chen2024fast,
  author = {Zixiang Chen and Huizhuo Yuan and Yongqian Li and Yiwen Kou and Junkai Zhang and Quanquan Gu},
  title = {{Fast Sampling via Discrete Non-Markov Diffusion Models with Predetermined Transition Time}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=KkYZmepjHn},
}
Figure