TL;DR
This paper introduces D-CFG and D-CBG, straightforward adaptations of classifier-free and classifier-based guidance for discrete data like DNA and molecules. By combining these with a new class of Uniform Diffusion Language Models (UDLM) and a tightened continuous-time loss function, the authors achieve state-of-the-art performance in controllable discrete generation, often outperforming standard autoregressive models.
The Challenge of Discrete Guidance
Diffusion models have revolutionized image generation largely because they are highly "steerable." Using guidance, we can nudge a model to generate an image of a "golden retriever" rather than just a random dog. However, this steering usually relies on taking gradients with respect to the continuous data—a process that breaks down when your data consists of discrete tokens (like the letters in a DNA sequence or atoms in a molecule).
Furthermore, most current discrete diffusion models use "absorbing states" (masking tokens). While effective for modeling, these models "lock in" tokens once they are unmasked. This makes it difficult for guidance to correct mistakes or refine the output iteratively. This paper bridges the gap between the high controllability of continuous diffusion and the discrete nature of text, genomics, and chemistry.
Core Methods
The authors propose three major technical contributions to enable effective discrete guidance:
- Discrete Classifier-Free Guidance (D-CFG): They provide a clean derivation to apply the popular CFG trick to discrete categorical distributions. It works by interpolating between a conditional model $p(z|y)$ and an unconditional model $p(z)$ directly in the probability space, shifting the likelihood of specific discrete tokens.
- Discrete Classifier-Based Guidance (D-CBG): To avoid the massive computational cost of evaluating a classifier for every possible token at every position, they use a first-order Taylor approximation. This allows them to "steer" the model using a single forward and backward pass, mimicking how gradients work in continuous space.
- Uniform Diffusion Language Models (UDLM): They revisit "uniform noise" diffusion, where tokens are randomly flipped to other tokens rather than just masked. Crucially, they derive a continuous-time variational lower bound (ELBO). This new loss function is mathematically "tighter," leading to significantly better model performance and faster sampling.
Key Insights
- Uniform Noise is More Guidable: Because uniform noise models can change any token at any step (unlike masking models which only fill in blanks), they are much more responsive to guidance. They can effectively "edit" their way out of a bad sequence.
- Vocabulary Size Matters: A surprising finding was that uniform noise diffusion actually attains state-of-the-art performance on small-vocabulary datasets (like DNA or SMILES), challenging the widely held belief that masking is always superior for discrete data.
- Parallelism Wins: Unlike Autoregressive (AR) models that must generate tokens one-by-one (taking tens of thousands of steps for long sequences), these diffusion models can decode the entire sequence in parallel in just a few hundred steps.
Empirical Results
The researchers evaluated their methods across a diverse set of discrete domains, including genomics (Species10), molecules (QM9), images (CIFAR10), and natural language (text8, LM1B).
- Genomics: On the Species10 dataset, UDLM with D-CFG achieved an F1 score of 0.94 for species-specific generation, significantly higher than the 0.87 achieved by standard Autoregressive models.
- Molecules: When trying to maximize "drug-likeness" (QED) in molecule generation, D-CBG combined with discrete diffusion outperformed established AR guidance methods like FUDGE and PPLM.
- Image Quality: On discretized CIFAR10, adding D-CFG improved the Fréchet Inception Distance (FID) from 33.75 down to 15.56, a massive leap in visual quality.
- Language Modeling: UDLM set a new state-of-the-art for uniform noise models on text8 (1.44 bits-per-character) and LM1B (31.28 perplexity), closing the gap with more complex masking-based models. The continuous-time formulation ($T=\infty$) was key to driving down perplexity during training.
Limitations and Future Work
While the results are impressive, the authors note that for very large vocabulary natural language tasks, discrete diffusion still lags slightly behind the best Autoregressive Transformers in terms of raw perplexity.
Additionally, the first-order approximation used in D-CBG is still an approximation; exploring higher-order terms or more complex "discrete gradients" could further improve control. Finally, scaling these "guidable" uniform noise models to the multi-billion parameter regime remains an open and exciting challenge for the field.
Summary updated