Diffusion models
What Are Diffusion Models?
Diffusion models, also called diffusion probabilistic models, are a class of generative machine learning models that produce data by learning to reverse a gradual noising process. Training corrupts real samples with successive additions of Gaussian noise until they become indistinguishable from pure noise, and a neural network is fitted to undo one step of that corruption. Generation then runs the learned reversal from a random noise sample back toward the data distribution, one denoising step at a time.
The formulation comes from nonequilibrium thermodynamics, where a diffusion process destroys structure and a reverse-time process restores it. Within machine learning, diffusion models sit alongside variational autoencoders, normalizing flows, and generative adversarial networks as approaches to density modeling, and they differ from those methods by trading a single forward pass for an iterative sampling procedure. That trade buys training stability, since there is no adversarial minimax objective to balance, at the cost of slower inference.
Forward and Reverse Processes
The forward process is fixed rather than learned. It is a Markov chain that adds noise according to a variance schedule, and the schedule is chosen so that the marginal distribution after the final step is close to a standard normal. A useful property of the Gaussian formulation is that the corrupted sample at any step can be drawn directly from the clean sample without simulating the intermediate steps, which makes training cheap. The denoising diffusion probabilistic model formulation introduced by Ho, Jain, and Abbeel in 2020 reparameterized the reverse step so that the network predicts the noise added at a given step rather than the denoised image itself, and it trained that network on a simple weighted mean squared error bound. This reparameterization is what made the approach practical for high-resolution image synthesis.
Score Matching and Continuous-Time Formulations
A parallel line of work arrives at the same algorithm from denoising score matching, where the network estimates the gradient of the log density of the noised data. Treating the number of steps as continuous unifies the two views: the paper on score-based generative modeling through stochastic differential equations casts the forward corruption as an SDE and the reverse as its time-reversal, driven by the learned score function. The continuous framing gives access to numerical SDE and ordinary differential equation solvers, which is the basis of the fast samplers that cut generation from a thousand steps to a few dozen. It also supplies an exact likelihood through the probability flow ODE, something the discrete formulation only bounds.
Conditioning, Guidance, and Latent Diffusion
Practical systems condition generation on text, class labels, segmentation maps, or other signals. Classifier-free guidance, which interpolates between conditional and unconditional predictions at sampling time, controls how strictly output follows the conditioning at the expense of sample diversity. Cost is the other constraint: running the reverse process at full pixel resolution is expensive. The latent diffusion approach of Rombach and colleagues trains an autoencoder to compress images into a lower-dimensional latent space and runs the diffusion process there, with cross-attention layers injecting the conditioning. That design underpins several widely deployed text-to-image systems and has been carried over to video, audio, and three-dimensional shape generation.
Applications
Diffusion models have applications in a wide range of fields, including:
- Text-to-image and text-to-video synthesis
- Medical image reconstruction from undersampled MRI and CT measurements
- Molecular and protein structure generation for drug discovery
- Speech synthesis and audio waveform generation
- Image restoration tasks such as inpainting, super-resolution, and deblurring
- Robotics, where diffusion policies model multimodal action distributions
- Scientific simulation and weather forecasting ensembles