The Forward Process: A Corruption Engineered to Be Jumped Into
Published:
Two things the corruption has to do
The forward process has no free parameters to learn, so it is tempting to treat it as boilerplate. It is not. It has to satisfy two constraints simultaneously, and they pull in different directions.
First, it must converge to a fixed, samplable distribution. At sampling time we start from \(\mathbf{x}_T\) drawn from a prior, so \(q(\mathbf{x}_T)\) had better actually be that prior, regardless of which image we started from.
Second, it must be jumpable. Training draws a random timestep and needs \(\mathbf{x}_t\) immediately. Simulating 400 sequential steps per training example would make the method unusable.
Why the shrink factor is there
One step of the chain is
where \(\beta_t \in (0,1)\) is the variance schedule: a fixed, increasing sequence of small positive numbers. Track the per-coordinate variance \(v_t = \operatorname{Var}[\mathbf{x}_t]\). Scaling by \(\sqrt{1-\beta_t}\) multiplies variance by \(1-\beta_t\), and the injected noise adds \(\beta_t\):
This recursion has a fixed point at \(v = 1\), and it is attracting: \(v_t - 1 = (1-\beta_t)(v_{t-1}-1)\), so the gap to unit variance shrinks by a factor \(1-\beta_t\) every step. Data normalised to unit variance stays there; data that is not gets pulled in.
Now delete the shrink factor, so that \(\mathbf{x}_t = \mathbf{x}_{t-1} + \sqrt{\beta_t}\,\mathbf{z}\). The recursion becomes \(v_t = v_{t-1} + \beta_t\), and the variance is just an accumulating sum. With the standard linear schedule — \(T = 1000\), \(\beta\) rising linearly from \(10^{-4}\) to \(0.02\) — that sum is \(\sum_t \beta_t = 10.05\), so unit-variance data would end at variance \(11.05\), a standard deviation of \(3.32\). The terminal distribution then depends on \(T\) and on the schedule, and no fixed prior matches it. Variance-exploding formulations do exist and work, but they have to rescale explicitly at sampling time; see the score-SDE view.
The closed-form jump
Write \(\alpha_t = 1-\beta_t\) and \(\bar{\alpha}_t = \prod_{s=1}^{t}\alpha_s\). Composing \(t\) Gaussian steps gives another Gaussian, and the means and variances telescope:
with \(\boldsymbol{\epsilon}\sim\mathcal{N}(\mathbf{0},\mathbf{I})\). The two coefficients square to one, so \(\bar{\alpha}_t\) is exactly the fraction of the variance still carried by signal. That gives a clean scalar summary of the whole schedule, the signal-to-noise ratio:
Every design question about schedules is really a question about the shape of this curve.
What the linear schedule actually does
Values for \(T=1000\), \(\beta\) linear from \(10^{-4}\) to \(0.02\):
| \(t\) | \(\bar{\alpha}_t\) | \(\sqrt{\bar{\alpha}_t}\) | \(\sqrt{1-\bar{\alpha}_t}\) | \(\mathrm{SNR}(t)\) |
|---|---|---|---|---|
| 50 | 0.9710 | 0.985 | 0.170 | 33.5 |
| 100 | 0.8970 | 0.947 | 0.321 | 8.71 |
| 200 | 0.6590 | 0.812 | 0.584 | 1.93 |
| 400 | 0.1951 | 0.442 | 0.897 | 0.243 |
| 600 | 0.0259 | 0.161 | 0.987 | 0.0266 |
| 800 | 0.00153 | 0.039 | 0.999 | 0.00153 |
| 1000 | 0.00004 | 0.006 | 1.000 | 0.00004 |
Read the last three rows. By \(t=600\) the signal amplitude is 16% of the noise amplitude; by \(t=800\) it is 4%. Taking \(\mathrm{SNR} = 0.01\) as a generous threshold for “there is nothing recoverable here”, the linear schedule crosses it at \(t = 675\) — so 325 of the 1000 steps operate on inputs that are effectively pure noise. Those steps still cost a network evaluation at sampling time and still consume gradient updates during training.
The cosine schedule
Nichol & Dhariwal define the schedule through \(\bar{\alpha}_t\) directly rather than through \(\beta_t\):
with a small offset \(s = 0.008\) that keeps \(\beta_1\) from collapsing to zero. The implied \(\beta_t = 1 - \bar{\alpha}_t/\bar{\alpha}_{t-1}\) is clipped at \(0.999\) to keep the final step finite. The shape is close to linear in the middle and nearly flat at both ends, so destruction is spread evenly instead of front-loaded. On the same threshold, the cosine schedule does not cross \(\mathrm{SNR}=0.01\) until \(t = 937\): 63 wasted steps instead of 325.
When it matters and when it does not
The gap is largest at low resolution. Nichol & Dhariwal report that the linear schedule is noticeably sub-optimal at \(32\times32\) and \(64\times64\), and that under it a substantial prefix of the reverse process can be skipped with little effect on sample quality — a direct symptom of the wasted region. At \(256\times256\) the difference narrows, because a high-resolution image carries far more information and survives longer under the same relative noise.
The other consequence surfaces in DDIM and other fast samplers. When you drop from 1000 steps to 30, you subsample the schedule, and steps drawn from a dead region contribute nothing. A schedule with a well-spread log-SNR curve is a precondition for short sampling, not an independent refinement.
One residual issue: neither schedule reaches \(\bar{\alpha}_T = 0\) exactly, so \(q(\mathbf{x}_T)\) is not quite the prior we sample from. With the linear schedule \(\sqrt{\bar{\alpha}_{1000}} \approx 0.006\), a small but non-zero leak of the mean image into the terminal distribution. Zero-terminal-SNR schedules fix this by forcing \(\bar{\alpha}_T = 0\), which matters most for models expected to produce very dark or very bright outputs.
References
- Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., & Ganguli, S. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. ICML 2015.
- Ho, J., Jain, A., & Abbeel, P. Denoising Diffusion Probabilistic Models. NeurIPS 2020.
- Nichol, A., & Dhariwal, P. Improved Denoising Diffusion Probabilistic Models. ICML 2021.
- Lin, S., Liu, B., Li, J., & Yang, X. Common Diffusion Noise Schedules and Sample Steps are Flawed. WACV 2024.
