Bring the mental model from Maximum Likelihood; this page will reuse it instead of restarting from zero.
Generative Models
Diffusion, Score-Based Models & Flow Matching
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.

Concept Structure
Diffusion, Score-Based Models & Flow Matching
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
Diffusion, Score-Based Models & Flow MatchingConceptual Bridge
What should feel connected as you move through this page.
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.
The next edge should feel earned: use the demo prediction here before following Flow Matching & Rectified Flows.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Diffusion models generate by starting from noise and repeatedly denoising.
The forward process is easy: take a data vector, such as an image representation, and add a little noise, again and again, until it becomes almost pure Gaussian noise.
The reverse process is the learning problem: train a network that, given a slightly-noised sample, parameterizes reverse or noise-removal updates toward cleaner, data-like samples. Sampling repeatedly applies learned reverse updates.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
A common discrete-time forward process (DDPM-style) is:
where and for a noise schedule .
Equivalently, you can sample:
Training often uses the noise-prediction loss:
The "score" view connects denoising to the gradient of log-density . Under the Gaussian DDPM or VP corruption above, a learned noise predictor can be converted into an approximate score estimate:
Flow matching is a separate continuous-vector-field view and is only a forward pointer here.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
T = 1000
beta = np.linspace(1e-4, 0.02, T)
alpha = 1.0 - beta
alpha_bar = np.concatenate([[1.0], np.cumprod(alpha)]) # alpha_bar[0]=1 (no noise)
x0 = np.array([1.0, -1.0])
for t in [0, 10, 100, 500, 1000]:
eps = np.random.randn(*x0.shape)
xt = np.sqrt(alpha_bar[t]) * x0 + np.sqrt(1.0 - alpha_bar[t]) * eps
print(f"t={t:>3} xt={np.round(xt, 3)} noise_std={np.sqrt(1.0 - alpha_bar[t]):.3f}")
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
This first lab isolates the DDPM forward process. Scrub to watch
push a two-blob toy distribution toward a near-Gaussian noise cloud. Before checking, predict whether a fixed structure-match proxy crosses its threshold early, in the middle, or late. Score matching and flow matching are separate mechanisms and will be handled in their own focused labs.
Live Concept Demo
Explore Diffusion, Score-Based Models & Flow Matching
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Diffusion, Score-Based Models & Flow Matching should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Diffusion, Score-Based Models & Flow Matching should make visible.
Visual Inquiry
Make the image answer a mathematical question
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.
Which visible object should carry the first intuition?
Pick the cue that should make Diffusion, Score-Based Models & Flow Matching easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Early diffusion framing: a gradual noising process paired with learned reverse dynamics.
Open sourceGrounds DDPM forward noising equations and simplified epsilon-prediction training; the page demo uses the forward noising equation.
Open sourceConnects score-based modeling, diffusion processes, and reverse-time SDE sampling.
Open sourceClaim Review
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.
Claims without a substantive review badge still need exact source-support review.
sohl-dickstein-2015-nonequilibrium, ho-2020-ddpm, song-2020-score-sde
Use equation, code, and demo objects to check whether the source support is operational.
Sohl-Dickstein supports iterative forward corruption plus learned reverse diffusion. Ho supports the DDPM closed-form q(x_t|x_0), reparameterized x_t sample, and simplified L_simple epsilon-prediction MSE. Song supports estimating time-dependent scores and using the reverse-time SDE/numerical solvers as the score-based reverse-sampling bridge. Local math/code/demo witness DDPM forward noising only.
Sources: Deep Unsupervised Learning using Nonequilibrium Thermodynamics, Denoising Diffusion Probabilistic Models, Score-Based Generative Modeling through Stochastic Differential EquationsExported math refs cover only q(x_t|x_0) and reparameterized x_t. Code/demo isolate forward noising/backward replay, not a trained sampler. Excludes guidance, latent diffusion, sampler variants, flow matching, production image quality, and broad modality claims.A bounded review summary is present; still check caveats and exact source scope.Sohl-Dickstein supports iterative forward corruption plus learned reversal; Ho supports DDPM q(x_t|x_0), reparameterized x_t, and L_simple epsilon-MSE; Song grounds reverse-time SDE sampling from time-dependent scores. Local math/code/demo witness only forward noising; epsilon-MSE and Score-SDE mechanics are source-supported, not locally simulated.
Reviewer: codex+oracle+codex-5.3; reviewed 2026-05-08Source support candidates
paper 2015Deep Unsupervised Learning using Nonequilibrium ThermodynamicsEarly diffusion framing: a gradual noising process paired with learned reverse dynamics.
paper 2020Denoising Diffusion Probabilistic ModelsGrounds DDPM forward noising equations and simplified epsilon-prediction training; the page demo uses the forward noising equation.
paper 2020Score-Based Generative Modeling through Stochastic Differential EquationsConnects score-based modeling, diffusion processes, and reverse-time SDE sampling.
Practice Loop
Try the idea before it explains itself
Denoise noise into data: the diffusion forward process, score matching, and modern sampling via reverse-time dynamics and flow matching.
Before touching the demo, predict one visible change that should happen in Diffusion, Score-Based Models & Flow Matching.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Diffusion, Score-Based Models & Flow Matching
What is the smallest example that makes Diffusion, Score-Based Models & Flow Matching click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:generative-models/diffusion.
- Source ids to inspect: sohl-dickstein-2015-nonequilibrium, ho-2020-ddpm, song-2020-score-sde
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Diffusion, Score-Based Models & Flow Matching Object key: concept:generative-models/diffusion Context: Generative Models Anchor id: concept/concept-notebook/generative-models/diffusion Open question: What is the smallest example that makes Diffusion, Score-Based Models & Flow Matching click without losing the math? Evidence to inspect: - Source ids to inspect: sohl-dickstein-2015-nonequilibrium, ho-2020-ddpm, song-2020-score-sde - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/generative-models/diffusion
concept:generative-models/diffusion