Noise Schedules & Signal-to-Noise Ratio
Linear, cosine, and learned noise schedules: derivation, SNR analysis, the effect of schedule choice on sample quality, and continuous-time formulations via SDEs.
Prerequisites
Table of Contents
- Learning Objectives
- Notation
- Core Intuition
- Linear Schedule
- Cosine Schedule
- Signal-to-Noise Ratio Analysis
- Continuous-Time Formulation
- Learned and Adaptive Schedules
- Schedule for Latent Diffusion
- Common Pitfalls
- Summary
- Exercises
Learning Objectives
- Derive the linear and cosine schedules and compute their SNR curves.
- Explain why cosine schedule preserves information longer than linear.
- Connect discrete schedules to continuous-time SDEs.
- Analyze how schedule choice affects which timesteps the model prioritizes.
- Explain schedule rescaling for latent diffusion models.
Notation
- — noise added at step
- — cumulative signal retention
- — signal-to-noise ratio
- — log-SNR
Core Intuition
The noise schedule controls how quickly information is destroyed during the forward process. Too fast → model sees only noise at most timesteps (can't learn structure). Too slow → many timesteps are redundant (inefficient). The ideal schedule distributes "learning difficulty" evenly across timesteps.
Noise Schedules Comparison
Linear Schedule
DDPM (Ho et al., 2020): increases linearly from to :
Cumulative:
Problem: Signal decays too quickly in early steps. By , is already very small — most timesteps see nearly pure noise. The model spends most training time on "easy" pure-noise timesteps.
Cosine Schedule
Improved DDPM (Nichol & Dhariwal, 2021): Define directly via a cosine function:
Then , clipped to .
Properties:
- Signal decays gradually (cosine-shaped).
- More timesteps with intermediate SNR (the "interesting" regime).
- Avoids the abrupt destruction of the linear schedule.
Signal-to-Noise Ratio Analysis
SNR interpretation:
- SNR : signal dominates, image is clear.
- SNR : equal parts signal and noise.
- SNR : noise dominates, image is unrecognizable.
Uniform log-SNR schedule: Ideally, should be approximately uniformly spaced in , ensuring equal "difficulty" per timestep.
Linear schedule: Log-SNR drops quickly then plateaus → most steps are "easy" (pure noise).
Cosine schedule: Log-SNR decreases more uniformly → better distribution of difficulty.
Continuous-Time Formulation
In the continuous limit (), the forward process becomes an SDE:
where is the continuous noise rate.
Variance-preserving (VP) SDE: .
Variance-exploding (VE) SDE: (noise increases without signal decay).
The choice of SDE determines the noise schedule and the structure of the generative process.
Learned and Adaptive Schedules
Learned schedule: Parameterize (or ) as a neural network output and optimize jointly with the diffusion model. Constraint: must be monotonically decreasing in SNR.
Resolution-dependent scheduling: Higher-resolution images need faster initial noise addition (large-scale structure is determined early) and slower fine-detail noise.
EDM schedule (Karras et al., 2022): Parameterize via noise level directly, with:
Train with log-uniform sampling of , which naturally weights all SNR levels equally.
Schedule for Latent Diffusion
Problem: Latent diffusion operates on VAE latents with different statistics than pixel space.
Rescaling: Latents are typically zero-centered with standard deviation . The effective SNR must account for this:
Stable Diffusion: Uses a scaled linear schedule where values are adjusted for the latent space statistics. The "zero terminal SNR" condition () is enforced for proper generation.
Common Pitfalls
Pitfall 1. Using a linear schedule for high-resolution images. Signal is destroyed too quickly; the model never learns fine details.
Pitfall 2. Not ensuring terminal SNR ≈ 0. If , the model cannot generate from pure noise — there's residual signal information that was never removed.
Pitfall 3. Changing the schedule without adjusting the loss weighting. The optimal loss weights depend on the schedule; a mismatch leads to poor training.
Summary
- Linear: Simple, fast decay, biased toward high-noise timesteps.
- Cosine: Gradual decay, more uniform log-SNR distribution, better sample quality.
- SNR connects all schedules: ideal schedule distributes log-SNR uniformly.
- Continuous-time: VP-SDE and VE-SDE formulations unify discrete schedules.
- Latent diffusion: Requires schedule rescaling for VAE latent statistics.
Exercises
Exercise 1. Compute and SNR for the linear schedule at .
Exercise 2. Derive from the cosine schedule definition and verify it's monotonically increasing.
Exercise 3. For the VP-SDE, show that by solving the mean of the forward process.
Exercise 4. Design a noise schedule where log-SNR decreases linearly from to . Derive the corresponding .
Exercise 5. Explain why "zero terminal SNR" () is important for unconditional generation.