TL;DR
While standard diffusion models have revolutionized continuous data generation (like images and audio), they often struggle with discrete data like text. This paper introduces D3PMs, a framework that generalizes diffusion to discrete spaces by using structured transition matrices—such as absorbing states or discretized Gaussians—allowing these models to outperform previous discrete baselines and even exceed the log-likelihood of continuous-space models on image tasks.
Introduction
Generative modeling has seen a massive shift toward Denoising Diffusion Probabilistic Models (DDPMs). These models work by gradually "corrupting" data with noise and then learning to reverse that process. However, most DDPMs are designed for continuous spaces using Gaussian noise.
When dealing with discrete data (like text tokens or quantized pixel values), the standard approach was "multinomial diffusion," which treats all categories as equally distant. This is problematic because it ignores the inherent structure of the data. For example, in text, the word "cat" is semantically closer to "dog" than to "skyscraper," and in images, a pixel value of 127 is much closer to 128 than to 0. The authors aim to bridge this gap by incorporating domain-specific structure into the diffusion process.
Methods
The core innovation is the use of Structured Transition Matrices ($Q_t$) to define the forward corruption process. Instead of just flipping a token to a random other token uniformly, the authors propose several structured alternatives:
- Absorbing State: Tokens transition into a special
[MASK]token. This creates a direct link between diffusion models and Masked Language Models like BERT. - Discretized Gaussian: For ordinal data (like pixels), the transition matrix mimics a Gaussian kernel, meaning a value is more likely to "diffuse" to a neighboring value than a distant one.
- Token Embedding Distance: For text, they use the similarity between word embeddings to guide the corruption, making transitions between semantically similar words more likely.
Beyond the matrices, they introduce a new hybrid loss function that combines the standard variational lower bound (VLB) with an auxiliary cross-entropy loss on the predicted clean data ($x_0$). They also utilize a mutual-information-based noise schedule, which provides a more principled way to distribute noise across time steps compared to simple linear schedules.
Datasets
The authors evaluated D3PMs across two distinct domains:
- Text:
- text8: A character-level dataset (27 tokens) derived from Wikipedia.
- LM1B (One Billion Word): A large-scale word-level dataset using a SentencePiece vocabulary of 8,192 tokens.
- Images:
- CIFAR-10: A standard image benchmark, where they treated the 8-bit RGB values (0-255) as discrete categories.
Key Insights and Ideas
- Structure is a Design Choice: The "noise" in a diffusion model doesn't have to be uniform. By choosing a transition matrix that respects the data's geometry (ordinal for images, semantic for text), the model learns more efficiently.
- The "Generative BERT" Connection: The authors show that if you use an absorbing state transition matrix and a single time step, the D3PM objective becomes identical to the BERT denoising objective. This frames BERT as a specific, limited case of a broader diffusion framework.
- Locality Matters for Images: Using a discretized Gaussian matrix for pixels significantly outperformed uniform noise. This suggests that the "locality" exploited by continuous Gaussian diffusion is a primary reason for its success, and D3PMs successfully port that advantage to the discrete regime.
- Direct $x_0$ Prediction: Instead of predicting the noise (as in standard DDPMs), D3PMs predict the clean data $x_0$ at each step. This allows the model to use standard cross-entropy losses, which stabilizes training for discrete categories.
Key Results
- Image Performance: On CIFAR-10, the D3PM with a discretized Gaussian matrix achieved a negative log-likelihood (NLL) of 3.435 bits/dim, outperforming the continuous-space DDPM (3.70 bits/dim).
- Text Performance: The absorbing state D3PM achieved strong results on character-level text generation, beating several non-autoregressive baselines.
- Scaling: The paper successfully demonstrated that discrete diffusion can scale to large vocabularies (8k+ tokens) and long sequences, which was previously a challenge for this model class.
- Efficiency: D3PMs can produce high-quality samples in as few as 20 to 100 steps, making them significantly faster than standard autoregressive models for long sequences.
Limitations and Future Work
- Gap with Autoregressive Models: While D3PMs are faster and perform well, they still lag slightly behind the very best autoregressive models (like Transformer-XL) in terms of raw perplexity on text tasks.
- Image Quality (FID): Although D3PMs beat continuous models in log-likelihood, the continuous models still hold a slight edge in Fréchet Inception Distance (FID), a common measure of visual sample quality.
- Metric Sensitivity: The authors note that the choice of evaluation metrics (IS vs. FID vs. NLL) can lead to different conclusions about which model is "best," suggesting a need for more robust evaluation frameworks in generative modeling.
- Future Directions: The authors suggest exploring even richer structures for transition matrices, perhaps incorporating syntax or hierarchy for language.
Summary updated