Diffusion Language Models › From Continuous Diffusion to Discrete Tokens
Language AI HandbookAll chapters The diffusion recipe in continuous space has three parts. A forward process gradually adds Gaussian noise to a data point : , where is the per-step noise variance and is the identity matrix. A network is trained to reverse it, usually by predicting the noise or, equivalently, the clean signal . Sampling starts from pure noise and iteratively denoises.
A finite Gaussian chain with reduces the signal coefficient at each step. While that coefficient stays positive, still depends on . A sufficiently small terminal coefficient motivates using a noise prior. The forward posterior is Gaussian at intermediate noise steps when conditioned on the clean input. Integrating over the unknown clean input generally gives a mixture. A learned Gaussian reverse transition, as in DDPM, approximates the reverse process using only and the step. Ho et al. (2020), §2
Diffusion-LM applies Gaussian diffusion to continuous word-vector representations. The paper demonstrated gradient-based control for selected syntactic and semantic attributes using trained attribute classifiers with a fixed base language model. The gradient steers the denoising trajectory. The results measure the tested controls and models. Li et al. (2022)
The continuous model still needs a map back to discrete words. Diffusion-LM includes a learned word distribution and examines clamping predicted clean representations to word embeddings during sampling. A decoding rule can affect the discrete output even when the continuous denoising trajectory is unchanged.
Replace the Gaussian corruption with a corruption defined directly on the token alphabet. The state is always a well-formed sequence of tokens (possibly including a mask symbol), rounding is unnecessary, and the likelihood is a genuine categorical likelihood over sequences. The forward process becomes a Markov chain over a finite state space, and the model in this chapter uses a product of categorical distributions across positions for each reverse step.
This reframing is the central move. Once the state space is the set of token sequences rather than the set of embedding vectors, every operation is well defined on the object we actually care about. There is no nearest-neighbor projection, no rounding loss, no gap between what the model generates and what it can represent. The price is that the clean Gaussian algebra of the continuous case is replaced by finite-state combinatorics, but, as we will see, the absorbing variant makes that combinatorics almost trivially simple.
Two examples of discrete corruption are uniform replacement and absorbing masking.
Uniform corruption is one option in D3PM (Austin et al., 2021). Its doubly stochastic transition is . With enough noise, visible tokens may be wrong. The reverse transitions must allow a visible token to change into another token.
Absorbing corruption maps a token to a dedicated [MASK] symbol that is outside the clean vocabulary. A masked position stays masked through the remaining forward steps. LLaDA is one example that uses absorbing masks. The reverse process reveals tokens, and the absorbing formulation is the one developed below.
Absorbing noise keeps visible tokens unchanged. This simplifies what each denoising step must predict.
- Visible tokens are preserved in forward corruption. Uniform noise can replace a lexical token with another one. Absorbing noise removes the token and records that its value is hidden.
- Masked states provide a focused prediction task. D3PM Table 2 reports lower LM1B perplexity with its absorbing kernel than with its uniform kernel at the tested 1,000 steps. That comparison measures the systems and training settings used there. D3PM
- The clean-conditioned reverse posterior has small support. If a position is masked and its clean token is given, the posterior at the preceding step has support in . The first reverse update back to the clean time must recover . A learned reveal distribution spreads mass across the model's candidate lexical tokens when the clean answer is unknown. Uniform corruption can involve a vocabulary-wide KL sum, but its identity-plus-rank-one kernel can be applied without materializing a dense transition matrix. D3PM
BERT selects 15 percent of input positions for prediction and replaces 80 percent of those selected positions with its mask symbol. A masked prediction objective alone does not specify a reverse chain or a sequence likelihood. Here the corruption and reverse transitions define both. BERT, §3.1
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!