Skip to content
BIASED

DDPM: the forward process

Block 1 of 7~2 min

Many small steps

The topic Energy-based models ended with a bill: sampling an EBM takes hundreds of gradient steps on a learned landscape, and training needs such samples after every update. Diffusion models keep the walk from noise to data but change what is learned. They reach noise in many small steps of a fixed process, each step adds a little Gaussian noise, and no step has to be invertible, unlike the layers of a flow (see The change of variables).

Start from a data point x0∈RDx_0 \in \mathbb R^D, say an image. Add a little noise to get x1x_1, a little more to get x2x_2, and so on up to xTx_T:

x0  ⟶  x1  ⟶  x2  ⟶  ⋯  ⟶  xT.x_0 \;\longrightarrow\; x_1 \;\longrightarrow\; x_2 \;\longrightarrow\; \cdots \;\longrightarrow\; x_T .

This is the forward process. Two properties define it. First, each step looks only at the previous point: xtx_t is drawn from a distribution q(xt∣xt−1)q(x_t \mid x_{t-1}) that ignores x0,…,xt−2x_0, \dots, x_{t-2}. A chain like this is a Markov chain. Second, qq is fixed in advance. It has no parameters, and nothing in it is trained.

Why destroy data on purpose? Because of where the chain ends. We want xTx_T to be distributed as N(0,I)\mathcal N(0, I), whatever image we started from. That is a prior we can sample from, like p(z)p(z) in a VAE or a flow. If a model learns to walk the chain backwards, from xTx_T to x0x_0, it turns noise into data. The idea comes from Sohl-Dickstein et al. (2015); DDPM (Ho, Jain and Abbeel, 2020) made it produce good images. This topic builds the forward chain. The walk back comes next.

Answers are saved on the server and tied to this browser until you sign in.

Go deeper — optional

Code and labs do not count toward the main percentage or the certificate.

  • DDPM: β schedule and sampling x_toptional

    Computes ᾱ_t for a linear β schedule and checks marginal variance. Self-check in the notebook.

    ~20 min · easier on a computer · DDPM forward process topic read.

    Self-check in the notebook — not part of mastery or the certificate.