image.png

Basic Concept

The Denoising Diffusion Probabilistic Model (DDPM) is to model the data distribution (image distribution) by learning a diffusion process that transforms simple noise (e.g., Gaussian noise) into complex data (e.g., images).

Forward Process (Diffusion Process): Add noise to data step by step to convert it into pure Gaussian noise.

Reverse Process (Denoising Process): Train a neural network (U-Net) to invert the forward process and reconstruct the data from noise.

The model can generate new samples by starting from noise and denoising it step by step.

Forward Process

$$ x_0 \xrightarrow{q(x_1 \mid x_0)} x_1 \xrightarrow{q(x_2 \mid x_1)} x_2 \xrightarrow{} \dots \xrightarrow{} x_{T-1} \xrightarrow{q(x_T \mid x_{T-1})} x_T $$

The forward diffusion process adds Gaussian noise to the data over T timesteps. This transforms a real data sample $x_0$ into a noisy sample $x_T$ that follows an isotropic Gaussian distribution.

$$ x_t \sim q(x_t \mid x_{t-1}) = \mathcal{N}(x_t; \sqrt{1 - \beta_t} x_{t-1}, \beta_t I) $$