☆ Save 8.9 Diffusion Models — Generating Data by Adding and Reversing Noise
09/13/2026
A Diffusion Model is a generative model that first corrupts data step by step and then learns how to reverse that corruption to create new samples. Imagine repeatedly adding small amounts of Gaussian noise to a clean cat image. At first, the cat is still clearly recognizable. As more noise is added, its structure gradually disappears until the image becomes almost indistinguishable from random noise. Forward Diffusion defines this corruption process. Reverse Diffusion runs in the opposite direction, starting from noise and progressively recovering structure to synthesize a new image. This chapter connects those two processes, explains how SMLD differs from DDPM, and examines why Diffusion Models can achieve strong sample quality and diversity while paying a cost in generation speed.
Table of Contents
- The Core Idea Behind Diffusion Models
- Forward Diffusion Process
- Reverse Diffusion Process and Generation
- Score-Based Generative Models and DDPM
- How Diffusion Models Compare with Other Generative Models
The Core Idea Behind Diffusion Models
High-dimensional data such as images follows an extremely complex distribution. Even a single cat image contains a large number of pixels, and the number of possible pixel configurations is effectively enormous. But choosing pixel values at random does not produce a meaningful cat image. Real images occupy only a tiny, highly structured subset of all possible pixel combinations.
A Diffusion Model does not try to sample from this complicated distribution in one step. Instead, it first transforms real data into progressively simpler states. Starting from a clean image x₀, a small amount of Gaussian noise is added to produce x₁. Adding more noise gives x₂, and repeating the process produces intermediate states xₜ until the final state xT contains almost no recognizable structure.
This leads to the central idea behind diffusion modeling: we can explicitly define the process that turns data into noise, but we must learn the process that turns noise back into data. A Diffusion Model is trained to approximate that reverse direction. During generation, it does not need a real image as input. Instead, it starts from a sample of Gaussian noise and repeatedly applies the learned Reverse Diffusion process until a new data sample emerges.
Forward Diffusion Process
The Forward Diffusion Process gradually injects Gaussian noise into real data. Suppose x₀ is a clean cat image. After the first step, x₁ may look almost unchanged except for slightly degraded fine details in the fur. After another step, x₂ becomes noisier and the overall shape starts to blur. As the process continues, information from the original image is steadily removed while the contribution of noise increases.
-
$$ x_0 \rightarrow x_1 \rightarrow x_2 \rightarrow \cdots \rightarrow x_T $$
Repeatedly adding Gaussian noise to the original data x₀ produces a sequence of intermediate states that eventually reaches the final state xT.
Each step depends only on the state immediately before it. To obtain x₆ from x₅, for example, there is no need to return to the original image. The next state can be produced by adding noise to the current state x₅ according to a predefined rule. This single probabilistic step is written as follows.
-
$$ q(x_t \mid x_{t-1}) $$
This Forward transition describes the probability of producing the next noisy state xₜ given the previous state xₜ₋₁.
As these transitions are repeated, recognizable structures such as the cat’s eyes·ears·and fur gradually disappear. In the idealized limit where the number of diffusion steps T becomes arbitrarily large, the final state xT approaches an Isotropic Gaussian with zero mean and identity covariance.
-
$$ T \rightarrow \infty,\qquad x_T \sim \mathcal{N}(0,I) $$
After sufficiently many Forward Diffusion steps, complex data approaches simple Gaussian noise.
The purpose of this process is to give generation a simple starting distribution. Sampling directly from the distribution of real images is difficult, while drawing a noise sample from a Gaussian Distribution is straightforward. By defining a path from data to noise, the generation problem can therefore be reframed as learning how to travel along that path in reverse.
Reverse Diffusion Process and Generation
The Reverse Diffusion Process moves in the opposite direction. Generation begins not with a real image but with Gaussian noise xT. The model progressively transforms xT into xT₋₁, then xT₋₂, and so on, producing states with increasingly less noise and more recognizable structure. After the full sequence of reverse steps, the process arrives at a new data sample corresponding to x₀.
-
$$ x_T \rightarrow x_{T-1} \rightarrow \cdots \rightarrow x_1 \rightarrow x_0 $$
Generation starts from Gaussian noise and progressively recovers data structure one step at a time.
Forward and Reverse Diffusion are not simply the same procedure run in opposite directions. In the Forward Process, the rule for adding noise is specified in advance. Given only a noisy state xₜ, however, there is no direct rule that tells us exactly how to recover the cleaner state xₜ₋₁. The reverse transition therefore has to be learned, typically using a neural network.
-
$$ p_\theta(x_{t-1} \mid x_t) $$
This learned Reverse Distribution describes the transition from the current noisy state xₜ to a slightly cleaner state xₜ₋₁.
Imagine starting with an image that looks almost like pure noise. In one reverse step, the model may recover a faint outline. The next step can build on that outline to introduce more coherent structure, and later steps can progressively refine finer details. Rather than producing a finished image in a single prediction, a Diffusion Model generates a sample through a sequence of small reverse transitions.
This iterative structure turns a difficult generation problem into a sequence of more manageable probabilistic transitions. The tradeoff is that those transitions must also be executed sequentially at generation time. As a result, the long Markov Chain used by Reverse Diffusion is both a defining feature of the model and a major reason why sampling can be slow.
Score-Based Generative Models and DDPM
The idea of progressively corrupting data with noise and then learning how to reverse that corruption can be implemented in several ways. Two representative approaches are SMLD (Score Matching with Langevin Dynamics) and the Denoising Diffusion Probabilistic Model (DDPM). Their training formulations differ, but both learn from data corrupted at multiple noise levels and use that information to move samples back toward the data distribution.
The central quantity in SMLD is the Score Function. Here, the score does not directly provide the probability density of the current sample. Instead, it indicates the direction in which the sample should move to reach regions of higher log-density.
-
$$ s(x)=\nabla_x \log p(x) $$
Here, p(x) is the probability density of the data and ∇ₓ is the gradient with respect to the input x. The Score Function points in the direction where the log-density increases.
Suppose the current sample lies in a region where real data is extremely unlikely to occur. The score can be interpreted as a signal pointing toward regions where the data density is higher. SMLD learns this score across multiple Noise Scales and uses Langevin Dynamics during generation to move from higher to lower Noise Scales. The sample begins in a highly corrupted state, but as the Noise Scale decreases, it progressively develops structure that is more consistent with the data distribution.
DDPM approaches the same generation problem by learning a sequence of Reverse Distributions. It first defines a process that gradually adds noise to the data and then trains a probabilistic model to reverse each noise-corruption step. Given the current noisy state, the model repeatedly learns how to move one step toward a less corrupted state.
Although SMLD and DDPM may appear to start from different formulations, they are closely connected. In a continuous state space with continuous time t, the DDPM training objective can be interpreted as implicitly estimating the score at different Noise Scales. From this perspective, the two approaches are not fundamentally separate generation principles. Both can be understood within the broader framework of Score-Based Generative Models, where the central goal is to learn how to move noisy samples back toward the data distribution.
※ This article is an independently organized and restructured summary based on lectures by Professor Sungroh Yoon at Seoul National University.
Recommended prerequisite reading (3/5)
+2
- 8.6 Data Distribution Modeling — How Generative Models Learn Data Distributions
- 8.8 Deep Generative Models — Major Approaches to Probability Distribution Modeling
- 8.7 Normalizing Constant — Turning Model Scores into Valid Probability Distributions
- Likelihood-Free Modeling — Inferring Generative Processes with Simulation-Based Inference
- Likelihood-Based Modeling — Learning Data Distributions with Maximum Likelihood
Recommended next reading (5/15)
+5
- 8.3 Inverse Problems — Understanding Forward and Inverse Problems
- Latent Variable Models — Modeling the Relationship Between Observed and Hidden Variables
- Flow-based Models — Learning Data Distributions Through Invertible Transformations
- Distribution Matching — How Generative Models Learn Real-World Data Distributions
- Data Distribution vs Model Distribution — How Generative Models Approximate Real-World Data
- 8.5 Approximate Inference — Approximating Posterior Distributions with MCMC and Variational Inference
- Conditional Generation — How Generative Models Control Their Outputs
- NADE (Neural Autoregressive Distribution Estimator) — How Generative Models Learn Probability Distributions
- Conditional Density Modeling — Learning Data Distributions Under Specific Conditions
- Top-p Sampling (Nucleus Sampling) — Why the Number of Candidates Changes Dynamically
- 8.4 Posterior Inference — Posterior Distributions and Why Exact Inference Is Hard
- Latent Variable Inference — Inferring Hidden Structure from Observed Data
- SMLD (Score Matching with Langevin Dynamics) — Score-Based Sampling
- Model Distribution — How LLMs Learn Output Probabilities
- Density Modeling — How Probability Density Is Estimated from Image Vectors
Posts on the same topic (3/3)
- PixelCNN — How Autoregressive Image Generation Learns Pixel Probabilities
- Sample Generation — How LLMs Select Tokens from a Probability Distribution
- Sampling-based Inference — Why Probabilistic Token Selection Matters in LLM Decoding
Related concepts (3/3)
- Conditional Distribution — How AI Models Reason with Conditional Probabilities
- Mode-Seeking — An approximation behavior that focuses on the most probable patterns to match them sharply
- Mode-Covering — An Approximation Property That Broadly Includes Patterns So the Data Does Not Miss Existing Modes
📍 Where this concept fits in the AI learning map
See where this concept sits within the full AI Universe.
📍 Current position in AI Universe
☰
Reset Show completed · Login required Loading…
🌌 AI Universe
‹
›
⭐ Concept
Select a star.
🔖 Tags: DDPM · Diffusion Models · Forward Diffusion · gaussian noise · Generative Models · Reverse Diffusion · Score-Based Models