Skip to content
BIASED

DDPM: reverse process and objective

Block 1 of 8~2 min

Reverse Gaussian steps

The topic DDPM: the forward process built a fixed chain that turns an image x0x_0 into almost pure noise xTx_T in TT small Gaussian steps. Nothing in it is learned. To generate, we have to walk the chain the other way: start from noise and remove it one step at a time. This topic derives what a network must learn to do that, and how to train it.

The model of the way back is the reverse process, again a Markov chain. Writing x0:Tx_{0:T} for the whole chain (x0,…,xT)(x_0, \dots, x_T),

pθ(x0:T)=p(xT)∏t=1Tpθ(xt−1∣xt),p(xT)=N(0,I).p_\theta(x_{0:T}) = p(x_T) \prod_{t=1}^{T} p_\theta(x_{t-1} \mid x_t), \qquad p(x_T) = \mathcal N(0, I).

DDPM (Ho, Jain and Abbeel, 2020) makes every reverse step a Gaussian:

pθ(xt−1∣xt)=N(μθ(xt,t), σt2I).p_\theta(x_{t-1} \mid x_t) = \mathcal N\big(\mu_\theta(x_t, t),\ \sigma_t^2 I\big).

The mean comes from one network shared by all steps, a U-Net that receives tt as an extra input. The variance σt2\sigma_t^2 is fixed by the schedule and not learned; DDPM uses σt2=βt\sigma_t^2 = \beta_t.

Why a Gaussian? The true reverse step q(xt−1∣xt)q(x_{t-1} \mid x_t) is not Gaussian in general: it mixes over every image that could have led to xtx_t. But when βt\beta_t is small, one step moves xt−1x_{t-1} only a little, and over such a short distance the reverse step is close to a Gaussian (Feller, 1949; Sohl-Dickstein et al., 2015). That is why diffusion uses many small steps rather than a few large ones.

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