Diffusion Training Objectives (ε/v-pred, Zero-SNR)
扩散训练目标 (ε/v-pred 与 Zero-SNR)
🎯Core Definition
Diffusion training objectives share the same underlying posterior mean but differ in numerical behavior across signal-to-noise ratios (SNR). The three main forms:
📌Overview
1. ε-pred (original DDPM): predict the injected noise, L=E[∥ϵ−ϵθ(xt,t)∥2].
2. x0-pred: predict the clean image; one-step estimation at sampling, but the target is weak at low SNR.
3. v-pred (v-parameterization, used by SD2/Imagen): define the velocity field v≡αtϵ−σtx0 with αt=αˉt and σt=1−αˉt, objective L=∥v−vθ(xt,t)∥2; from xt=αtx0+σtϵ one derives x0=αtxt−σtvθ(xt,t) and ϵ=σtxt+αtvθ(xt,t), so all three parameterizations are interchangeable at sampling.
📌Overview
Zero-SNR problem: under the classic linear schedule αˉT=0, the terminal xT still contains signal, inconsistent with sampling from pure Gaussian noise — the model must guess the signal at the last step. A Zero-SNR schedule sets αˉT=0 (xT pure noise); then the coefficients 1−αˉt and αˉt of ε-pred/x0-pred degenerate or diverge at the terminal step, so v-pred is required: its two coefficients αt,σt transition smoothly with SNR, loss weighting is naturally balanced across timesteps, and train/inference boundaries match — markedly improving terminal-step denoising.
📌Overview
CFG dropout: with 10–15% probability the condition c is replaced by the empty token ∅ during training, giving the network an unconditional branch that enables Classifier-Free Guidance at sampling.
💡Use Cases
interview favorites — “why did SD2 switch to v-pred?”, “what is Zero-SNR?”, “what CFG dropout rate?”; engineering choices when training diffusion models.
⚡Key Problems Solved
ε-pred is dominated by the noise term at high SNR (small t) and loses signal gradient at low SNR (large t), unbalancing the loss across timesteps; v-pred + Zero-SNR equalizes loss weighting and fixes the terminal boundary, improving training stability and sample quality — now standard in SD2/SDXL/Flux.
🎯5 High-Frequency Exam Points
1
Difference between ε-pred and v-pred; definitions of α_t and σ_t in v = α_t·ε − σ_t·x_0?
2
What is Zero-SNR, and why does it require v-prediction?
3
Write the interchange relations between v-pred, x_0 and ε; how to recover x_0 from v_θ?
4
Typical CFG dropout probability; can CFG work without it?
5
Why do SD2/SDXL/Flux use v-pred over ε-pred, and how does loss weighting vary across timesteps?