4.5.12 · D2Generative Models

Visual walkthrough — Noise scheduling

1,994 words9 min readBack to topic

This is a visual companion to the parent note. If you want the same story in Hinglish, see 4.5.12 Noise scheduling (Hinglish).


Step 0 — The vocabulary we are allowed to use

Before any symbol appears in a formula, let us earn it in plain words.

That is our entire alphabet. Everything below is built from just these.


Step 1 — One smudge: the single-step rule

WHAT. One step of the forward process takes the current picture and produces a slightly noisier one:

WHY these exact square-roots. Why not just ? Because we care about variance (spread), and variance grows with the square of a multiplier. If you scale a bell curve of spread 1 by a number , its spread becomes . So to make the signal keep fraction of its variance and the noise carry fraction of the variance, the multipliers must be and . Then : total spread is conserved at 1. That is the whole reason for the square-roots.

PICTURE. The old picture arrow gets shortened by ; a perpendicular noise arrow of length is added on. Because they are perpendicular (independent), their lengths combine by Pythagoras to give back length 1.

Figure — Noise scheduling

Step 2 — Why noise adds like Pythagoras, not like ordinary numbers

WHAT. We need one fact before we can chain steps together. When you add two independent bell-curve noises, their spreads combine like the sides of a right triangle:

Here ("sigma-one-squared") is the variance = spread-squared of the first noise; likewise . The rule says the variances add — not the spreads themselves.

WHY it is Pythagoras. Independent noises point in "unrelated directions". Two unrelated directions are geometrically like perpendicular vectors. The length of the sum of two perpendicular vectors is — exactly the hypotenuse. This is the single tool that lets us merge two rounds of static into one.

PICTURE. Two perpendicular grey noise-arrows; the diagonal (their sum) has length equal to the square-root of the sum of their squared lengths.

Figure — Noise scheduling

Step 3 — Two smudges in a row, then merge them

WHAT. Substitute the step- rule into the step- rule (unroll one layer):

Distribute the outer :

WHY merge. Two noise terms are ugly; we want one. Use Step 2. The first noise has variance (the squared), the second has variance . Add the variances:

So the two noises collapse into a single fresh noise of variance :

PICTURE. The two grey noise-arrows from the two steps fuse into one diagonal arrow; the surviving-signal multiplier becomes the product (each step shrinks, and shrinks stack multiplicatively).

Figure — Noise scheduling

Step 4 — Keep unrolling → the product is born

WHAT. Nothing new happens if we unroll a third, fourth, ... step: each time the surviving-signal factor picks up one more , and all the noises keep merging into one. After going all the way back to :

WHY a name. That long product appears twice, so we name it: The bar means "cumulative". is the fraction of the original signal still alive after steps. Since each , multiplying them makes shrink toward 0 — the picture fades.

PICTURE. A chain of shrinking blue signal-arrows (each multiplied by another ) versus a growing grey noise-cloud; where the two cross is the "half signal, half noise" moment.

Figure — Noise scheduling

Step 5 — The one-line direct-jump formula

WHAT. Substituting the name gives the central result of the whole topic:

WHY this is a big deal. Naively, to reach step you would sample times in sequence. This formula lets you teleport to any step in a single draw of — essential for training, where you pick a random every batch. The signal weight and noise weight always satisfy : the picture rotates from "all signal" to "all noise" along a unit circle.

PICTURE. A single unit vector making angle with the signal axis: its horizontal shadow is (signal), its vertical shadow is (noise). As grows, the vector rotates from horizontal (clean) to vertical (pure noise).

Figure — Noise scheduling

Step 6 — Edge case A: the start (), and why is forbidden

WHAT. At the very start, (empty product = 1), so — no noise. Tempting to set so the first step also does nothing.

WHY it breaks. Look at the SNR: Dividing by zero is undefined; the log-SNR blows up to , and the training loss (which divides by the noise variance) explodes. The fix is a tiny , or clipping to , so the noise shadow is small-but-nonzero and every quantity stays finite.

PICTURE. The rotating vector pinned exactly horizontal: its vertical (noise) shadow is zero, so the ratio's denominator collapses — we mark the singularity in red, then show the "nudged-off-horizontal" safe version.

Figure — Noise scheduling

Step 7 — Edge case B: the end (), and why we insist

WHAT. At the last step we want to be pure static, indistinguishable from , so that sampling can start from pure noise. That requires the signal weight , i.e. (aim for ).

WHY it must not overshoot. If a linear schedule drives to near-zero too early (say by out of ), the last 500 steps are all "pure noise → pure noise" — wasted work. This is precisely why the cosine schedule wins: it keeps the vector rotating evenly and only reaches vertical right at .

PICTURE. Two rotation paths for across : the linear one plummets and flattens on the noise floor early (wasted region shaded), the cosine one glides down evenly and lands on the floor exactly at .

Figure — Noise scheduling

The one-picture summary

Everything above compresses into a single diagram: a unit vector sweeping from the signal axis to the noise axis as runs . Its horizontal shadow is , its vertical shadow is , and is the running product that drives the sweep. Good schedules make the angle advance evenly (steady difficulty); the two ends are guarded so we never divide by zero (start) and always reach pure noise (end).

Figure — Noise scheduling

add tiny noise

unroll and merge noises

substitute name

guard start

guard end

clean x0

one step: sqrt alpha times x plus noise

product alpha bar t

direct jump x t

SNR equals alpha bar over one minus alpha bar

beta1 above zero

alpha bar T near zero

Recall Feynman retelling — say it back in plain words

We wanted to add static to a picture over and over, a thousand tiny times. Adding it one step at a time is slow, so we asked: can we skip straight to any step? Yes — because independent static combines like the sides of a right triangle (variances add), every step's noise fuses into one scoop of static, and every step's shrinking of the signal multiplies into one number . So the noisy picture is just of the original plus of fresh static — a single vector rotating from "all picture" to "all snow". We must not start exactly on the picture axis (dividing by zero static breaks the math) and we must finish exactly on the snow axis (so sampling can begin from pure noise). Choosing how fast the vector rotates is the whole art of noise scheduling.

Where this leads

  • 4.5.11-Forward-and-reverse-diffusion-process — the single-step rule in Step 1 is the forward process .
  • 4.5.13-Denoising-objective — the loss is built on predicting the in the Step 5 formula.
  • 4.5.15-Score-matching — the SNR in Step 5 sets the magnitude of the score .
  • 4.5.18-Fast-sampling — because Step 5 lets us jump to any , we can skip steps at sampling time (DDIM).
Recall Quick self-test

What does represent physically? ::: The fraction of the original signal's variance still surviving after noising steps; it is the product . Why square-roots in ? ::: Because variance scales with the square of a multiplier, so makes the signal and noise variances sum to exactly 1. Why can't ? ::: Then , so and the loss divides by zero — undefined. What do we require of ? ::: It must be (below ) so is indistinguishable from the prior .