U1.1 Choosing a Path: The Forward Process
Builds on2 notes
We know how to move in one direction
The previous note suggested choosing a path before designing regression targets. How should we choose it?
A path from pure noise to an image is still difficult: we do not know what the noise should become in the next step.
What about the opposite direction? Start with a real image and add a small Gaussian perturbation. Repeat until little image structure remains. Data to noise is a direction we know how to construct.
Think of shuffling an ordered deck. Repeated small shuffles make it random; restoring an arbitrary random deck in one move is hard. Undoing a small amount of disorder sounds more manageable.
Diffusion uses this familiar direction to construct many small corruption steps and learn how to reverse them. A difficult generation task becomes a sequence of denoising problems.

Figure: a ladder of noise levels. Moving right only requires Gaussian draws, scaling, and addition. We want to learn the steps going left.
Let us describe this construction mathematically.
is a real image sampled from . The state after corruption steps is , where is also called time. The endpoint should be nearly pure noise.
The path from to is the forward process. We design it ourselves, so we can choose a convenient construction.
We want to answer these questions:
Does the endpoint really approach pure noise?
What is the distribution of given ?
What do we need to reverse a step, and how do we do it?
This note answers the first two. The required reverse-step information appears in U1.2 and U1.3; sampling is developed in U1.4.
What should the forward process accomplish?
Repeated small noise additions give us a direction. To turn it into a usable method, we should work backward from what we need.
First, the endpoint must have a distribution we can sample, here . Reverse generation needs a starting state. An inaccessible terminal distribution would prevent us from even beginning.
Second, we want to calculate the distribution at any time , preferably without simulating all preceding steps. A Gaussian closed form for would be particularly convenient.
Here denotes the probability law induced by our forward construction. The conditional density describes where the process lies after steps when the clean starting image is known.
The endpoint is simply the special case , so a general formula would answer both requirements.
Imagine traveling from Taipei to Pingtung by either the west or east coast. The start is and intermediate stops are . A one-step transition describes the next stop; describes the location after legs, regardless of the intermediate route.
Ignoring the route means integrating over every possible intermediate state:
The joint density describes a particular sequence of intermediate states given . Integration sums their contributions while keeping only the final state.
Can we deliberately design the process so this integration is easy?
First design: let the next step depend only on the present
Require each transition to depend only on the preceding state:
This makes the process a Markov chain. We impose this property by constructing from and a fresh noise independent of the past.
SupplementThe Markov property
A stochastic process
is a Markov chain if knowing the present is sufficient to predict the next state. Once is known, earlier states provide no additional predictive information about .
This resembles an admissions rule that uses only a final exam score, regardless of how the student’s scores developed over previous years.
The past still matters: its relevant effects are already encoded in the present state. In our forward process, already contains the accumulated earlier noise.
Mathematically,
See M4.0 for transition matrices and long-term behavior.
The Markov property factors the density of an entire route into transitions:
The density of a specified journey is the product of its leg-by-leg transition densities. Each factor only needs the previous stop.
But this solves only part of the difficulty.
Factoring a route does not make its integral tractable.
We also need simple transition forms whose composition leaves a closed-form .
Second design: linear Gaussian transitions
A linear transformation of a Gaussian plus independent Gaussian noise is still Gaussian. Choose small and define
The two arguments of are the mean and covariance. The mean slightly shrinks ; the covariance sets the added spread. Equivalently, sample by
Shrink the previous state slightly, then add fresh Gaussian noise. The parameter controls the new noise at step .
The noise-and-reverse idea dates to Sohl-Dickstein and colleagues [1]. These Gaussian transitions with scaling are the forward process of Ho, Jain, and Abbeel’s DDPM [2], our default construction.
The coefficients also encode two design choices.
Why shrink by ? Adding noise without shrinking makes variance accumulate. Such processes are called variance-exploding (VE) [4] and appear in U5. Here, if ,
The removed signal variance is replaced by noise variance, leaving the total unchanged. This is variance-preserving (VP). It keeps input scales controlled and allows a terminal distribution close to .
Why choose small ? Small forward changes make the local reverse task easier. We divide the task into many simpler steps.
NotationSignal retention, accumulated noise, and SNR
We will repeatedly use these quantities:
- : one-step signal variance retention.
- : cumulative retention, decreasing from one toward zero.
- : cumulative noise variance, with .
- : signal-to-noise ratio, decreasing as noise increases.
The dependence of on time is the schedule. DDPM [2] uses a linear schedule; Nichol and Dhariwal [3] propose a cosine schedule. It determines how quickly signal is replaced along the path.
Repeated substitution constructs the full path:
Every line depends on the previous one and draws fresh noise. Following this definition literally takes transitions to obtain .
Must we really run transitions?
DiscussionQ1
Training needs many pairs, possibly with . Running 800 transitions for every example would be expensive.
Can we jump directly to ?
Show the reasoning
Yes. Independent Gaussians add to a Gaussian, and their covariances add; see M1.0.
Substitute the expression for into the transition:
The last two terms combine into a Gaussian with variance
Again, the squared coefficients sum to one. Induction gives the direct-sampling formula:
A training sample now requires drawing , drawing , and applying the formula, rather than simulating 800 transitions.
At every time, is shrunken data plus Gaussian noise, with squared coefficients summing to one.
We can also view this as interpolation with coefficients . Their squared-sum constraint comes from VP, rather than interpolation in general. U3.0 uses linear coefficients, and U2.4 considers a general form.
Here is the combined, rescaled noise from the first steps, independent of . It is not the individual noise added at step . The training objective will use this accumulated noise.
The two design choices work together: the Markov property factors the path into transitions, and linear Gaussian transitions make their composition tractable. Consequently we can sample directly.
At , the conditional mean is and covariance is . If the schedule makes sufficiently small, the data contribution becomes negligible and the endpoint approaches a standard Gaussian.
SupplementIs the terminal distribution exactly standard Gaussian?
Generally it is only close. A small nonzero leaves a residual contribution from .
Generation starts from an exact , accepting this difference as prior mismatch. DDPM’s makes it small, but not zero; this is one reason the schedule must remove enough signal.
What does this path look like?
Interactive demo. Move to inspect , retained signal, accumulated noise, and SNR. Structure fades toward noise. Switch schedules to compare the intermediate timing: the linear schedule removes structure early, while cosine retains more of the intermediate regime. Their terminal laws are approximately Gaussian, rather than necessarily identical at finite .
Check your understanding
References
- Sohl-Dickstein, J., Weiss, E. A., Maheswaranathan, N., Ganguli, S. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. ICML 2015.
- Ho, J., Jain, A., Abbeel, P. Denoising Diffusion Probabilistic Models. NeurIPS 2020. VP forward process and linear schedule.
- Nichol, A., Dhariwal, P. Improved Denoising Diffusion Probabilistic Models. ICML 2021. Cosine schedule.
- Song, Y., et al. Score-Based Generative Modeling through Stochastic Differential Equations. ICLR 2021. VP and VE formulations.