[Paper Review] Diffusion-LM Improves Controllable Text Generation
Diffusion-LM introduces a continuous diffusion-based, non-autoregressive language model for controllable text generation, enabling gradient-based control on latent variables to satisfy complex constraints while maintaining fluency.
Controlling the behavior of language models (LMs) without re-training is a major open problem in natural language generation. While recent works have demonstrated successes on controlling simple sentence attributes (e.g., sentiment), there has been little progress on complex, fine-grained controls (e.g., syntactic structure). To address this challenge, we develop a new non-autoregressive language model based on continuous diffusions that we call Diffusion-LM. Building upon the recent successes of diffusion models in continuous domains, Diffusion-LM iteratively denoises a sequence of Gaussian vectors into word vectors, yielding a sequence of intermediate latent variables. The continuous, hierarchical nature of these intermediate variables enables a simple gradient-based algorithm to perform complex, controllable generation tasks. We demonstrate successful control of Diffusion-LM for six challenging fine-grained control tasks, significantly outperforming prior work.
Motivation & Objective
- Motivate the need for controllable generation without retraining of large LMs.
- Develop a continuous diffusion-based model for text (Diffusion-LM) that handles discrete text via embeddings and rounding.
- Enable gradient-based control of generation using classifier guidance on diffusion latents.
- Demonstrate controllable generation across fine-grained structural and semantic controls.
- Show classifier-guided control and classifier-free infilling with competitive or superior results to baselines.
Proposed method
- Extend diffusion models to text by embedding words into a continuous space and learning end-to-end embeddings.
- Introduce a rounding mechanism to map continuous latent vectors back to discrete words and a clamping technique to reduce rounding errors.
- Train a diffusion model with an end-to-end objective that includes embeddings and a learnable rounding component.
- Control generation by gradient updates on continuous latents using a classifier term and fluency regularization, balancing p(x_{t-1}|x_t) and p(c|x_{t-1}).
- Downsample diffusion steps and apply multiple gradient steps per step to improve efficiency and control quality.
- Optionally apply Minimum Bayes Risk decoding to select high-quality samples without a classifier for infilling tasks.
Experimental results
Research questions
- RQ1Can a continuous diffusion framework be effectively adapted to discrete text via embeddings and rounding?
- RQ2Can gradient-based control on diffusion latents achieve complex controls (syntax, semantics, length) better than autoregressive plug-and-play methods?
- RQ3How does Diffusion-LM perform on classifier-guided control tasks compared to baselines like PPLM, FUDGE, and fine-tuned models?
- RQ4Is it possible to compose multiple controls and perform infilling without a classifier?
Key findings
- Diffusion-LM achieves high control success and fluent text across six fine-grained tasks, outperforming prior plug-and-play methods.
- On five classifier-guided tasks, Diffusion-LM shows higher control scores and lower perplexity (lm) than PPLM and FUDGE baselines, sometimes exceeding a fine-tuning oracle on syntactic parse trees and spans.
- Diffusion-LM enables complex controls such as parse trees and syntax spans more effectively than autoregressive methods due to its non-autoregressive, coarse-to-fine latent structure.
- For infilling (classifier-free control), Diffusion-LM significantly outperforms prior plug-and-play methods and rivals autoregressive models trained specifically for the task.
- Sampling with diffusion-based control is slower than autoregressive decoding but faster than some strong baselines (1.5x slower than FUDGE; ~60x faster than PPLM).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.