Generative Vision: Diffusion & Text-to-Image

forward diffusion process

The forward diffusion process is the easy half of a diffusion model — the controlled act of vandalism that ruins an image on purpose. Starting from a clean image, you repeatedly add a tiny sprinkle of Gaussian noise; after enough sprinkles the picture is indistinguishable from random static. Crucially, this process has no learnable parameters: it is a fixed recipe chosen in advance. Its only job is to manufacture training pairs — for any noise level we like, we can produce a noised image and know exactly what noise went in, giving the reverse network a target to predict.

Mathematically the forward process is a Markov chain (each step depends only on the previous one): q(x_t | x_{t-1}) = N(x_t; sqrt(1 - beta_t) x_{t-1}, beta_t I). In words, at each step you shrink the current image slightly toward zero (multiply by sqrt(1 - beta_t)) and add Gaussian noise with variance beta_t, where beta_t is a small number set by the noise schedule. A beautiful consequence of using Gaussians is that you can collapse all the steps into one: x_t = sqrt(alpha_bar_t) x_0 + sqrt(1 - alpha_bar_t) epsilon, where alpha_bar_t is the cumulative product of (1 - beta_s) up to step t and epsilon is a single standard Gaussian sample. This closed-form jump means training never has to simulate the chain step by step.

Because the schedule is designed so that x_T is essentially pure N(0, I) noise carrying no information about the original image, sampling can begin from random noise with no knowledge of any real image. The forward process therefore defines the bridge between the data distribution and a simple, easy-to-sample noise distribution; the entire learning problem is to reverse this bridge. Choosing how fast the bridge degrades the image — the noise schedule — is one of the few but consequential design decisions in a diffusion model.

The reparameterization trick in action: to get a half-noised cat at t = 500 of 1000, you do not run 500 additions. You compute alpha_bar_500 once, draw one noise sample epsilon, and set x_500 = sqrt(alpha_bar_500) (cat) + sqrt(1 - alpha_bar_500) epsilon. One line, any timestep, instantly.

Also called
forward processnoising processdiffusion process q