[Google DeepMind] D-MMD: Breaking the Speed Limit of Discrete Diffusion Models
Beyond Single Tokens: Distilling Discrete Diffusion Models via Discrete MMD
The paper introduces Discrete Moment Matching Distillation (D-MMD), a principled framework for distilling discrete diffusion models (such as masked and uniform diffusion) into high-quality, few-step generators. By generalizing the continuous MMD objective to discrete spaces, the authors achieve state-of-the-art results where distilled students often outperform their teachers in quality and diversity using up to 64x fewer sampling steps.
TL;DR
Researchers at Google DeepMind have unveiled Discrete Moment Matching Distillation (D-MMD), a technique that allows discrete diffusion models (for text and images) to generate high-fidelity samples in as few as 4 to 16 steps. Surprisingly, these distilled "student" models actually outperform their "teacher" models, providing a massive boost to inference efficiency without the typical quality loss seen in non-autoregressive generation.
Background: The Discrete Bottleneck
While continuous diffusion (like Stable Diffusion) has seen an explosion in distillation techniques (e.g., Progressive Distillation, Consistency Models), the discrete domain—essential for text and categorical data—has lagged behind.
The core issue? Factorization Errors. Discrete models usually predict each token independently given a noisy input. When you try to skip steps, these independent "best guesses" don't coordinate, leading to ungrammatical text or noisy images. Previous attempts to fix this either led to "mode collapse" (the model only generates one thing) or required complex mixture models that didn't scale.
Methodology: The "Soft Sample" Breakthrough
The authors reframe distillation as a Moment Matching problem. The goal is simple: ensure the expectation of the student's output matches the teacher's expectation at any given noise level.
1. Generalizing MMD
D-MMD uses a min-max optimization strategy:
- The Generator (): Tries to produce samples that look like the teacher's predictions.
- The Auxiliary Model (): Acts as a moving target that helps the generator see where its current distribution differs from the teacher.
2. Matching in Log-Probability Space
To bypass the non-differentiable nature of categorical sampling, D-MMD matches log-probabilities rather than raw tokens.
Algorithm 1: The alternating training steps for the Generator and Auxiliary model.
3. Learning Correlation
Despite being a factorized model at the final sampling step, the generator learns to "correlate" by reducing the entropy of its soft predictions (). If the model is confident about a sequence, the factorized sampling becomes effectively coordinated.
A New Metric: GPT-2 Gradient Moment (GM)
One of the paper's most insightful contributions is the critique of Generative Perplexity. The authors argue that judging a model based on how much an LLM "likes" its samples is flawed—LLMs often give high scores to repetitive, ungrammatical nonsense.
Instead, they propose GPT-2 GM:
- If a reference model (like GPT-2) is already trained on real data, its gradient on that data should be near zero.
- By measuring the norm of the gradient of GPT-2 on the student’s samples, we can see exactly how "distinguishable" those samples are from real data.
Empirical Results: Student Surpasses Teacher
The results on CIFAR-10 and Open Web Text are startling.
| Model | NFE (Steps) | Performance (Lower is Better) |
|---|---|---|
| Masked Teacher | 1024 | 6.4 (FID) |
| Masked D-MMD | 64 | 3.5 (FID) |
| Uniform Teacher | 512 | 0.313 (GM) |
| Uniform D-MMD | 16 | 0.310 (GM) |
Figure 1: D-MMD generators match or outperform their teachers using significantly fewer Function Evaluations (NFE).
Conclusion and Outlook
D-MMD demonstrates that the perceived gap between autoregressive models (like GPT-4) and non-autoregressive diffusion models might be a sampling efficiency problem, not a fundamental architectural one.
Limitations: Adversarial optimization (min-max) remains sensitive to hyperparameters. However, the ability to "mode-seek" during distillation allows D-MMD to find the best parts of a teacher model's distribution, resulting in cleaner, more professional-looking outputs in a fraction of the time.
Future Work: This framework opens the door for real-time, long-context text generation where tokens are generated in massive parallel blocks rather than one by one.
