Imagine you're trying to guess what a picture looks like, but someone keeps adding more and more blur to it. The noise schedule is like the recipe for how much blur to add each second.
If you add tons of blur right away, you'll lose important details like faces or text — game over. If you add blur super slowly, it'll take forever to blur it completely. The best schedules (like "cosine") add blur slowly at first (keeping details), speed up in the middle, then slow down again at the end.
Why? Because our "de-blurring robot" (the neural network) learns better when each step is equally hard. If one step is too easy and another is impossible, the robot gets confused. A good schedule makes every step just-right difficult!
#flashcards/ai-ml
What is the mathematical relationship between βt, αt, and αˉt in noise scheduling?
αt=1−βt (per-step signal retention), αˉt=∏s=1tαs (cumulative signal retention from x0 to xt)
What is the correct linear schedule formula?
βt=β1+T−1(t−1)(βT−β1) — a linear interpolation from β1 (typically 10−4) to βT (typically 0.02)
Why does cosine schedule outperform linear schedule in diffusion models?
Cosine provides S-curve decay: preserves signal longer initially (fewer early artifacts), smoother SNR gradient (stable training), avoids the linear schedule's early collapse where signal is nearly gone by the midpoint, wasting late steps
Derive the direct sampling formula xt=αˉtx0+1−αˉtϵ
Start with xt=αtxt−1+1−αtϵt−1. Expand recursively, use Gaussian sum property N(0,σ12)+N(0,σ22)=N(0,σ12+σ22), simplify variances to get αˉt coefficient on x0
What is the SNR at timestep t and why does it matter for schedule design?
SNR(t)=αˉt/(1−αˉt). Measures signal-to-noise ratio; constant logSNR decay ensures uniform difficulty per denoising step, leading to stable gradients and better convergence
Why is logSNR(0) ill-defined and how do we fix it in an SNR-based schedule?
At t=0, αˉ0=1 so SNR(0)=1/0=∞ and logSNR=+∞. Fix by regularizing: cap αˉ0 at 1−ε (giving finite λmax=logε1−ε) or start the schedule at tmin>0
Why must β1>0 (not exactly zero) even though we want to preserve information initially?
Exactly zero causes: (1) division by α1=1 numerical issues, (2) zero gradient flow (no learning signal), (3) infinite/undefined log-SNR since αˉ1=1. Tiny β1≈10−4 provides stability without significant information loss
What boundary conditions must a good noise schedule satisfy?
At t=0: αˉ0≈1 (no noise; capped at 1−ε for finite log-SNR). At t=T: αˉT<0.01 (nearly pure noise, matches prior N(0,I)). Poor boundaries cause edge artifacts
How is βt computed from a αˉt schedule?
From definition αˉt=αˉt−1αt=αˉt−1(1−βt), rearrange: βt=1−αˉt/αˉt−1. Clamp to valid range [10−4,0.999] for numerical stability
Dekho, diffusion models ka basic idea simple hai: hum ek clean image mein thoda-thoda karke noise add karte hain jab tak woh pure random noise na ban jaye, aur phir model ko sikhate hain ki is process ko ulta kaise kare. Yahan noise scheduling ka matlab hai ki har step par kitna noise add karna hai - ye ek recipe hai. Socho tum ek photo ko acid mein dhire-dhire ghula rahe ho: agar shuru mein hi bahut tezi se ghula doge to important details permanently lost ho jayengi aur model reverse nahi kar payega; agar bahut slowly karoge to time waste hoga. Isliye schedule (βt ya αt values) ko carefully balance karna padta hai.
Ab maths ki taraf - ek badi khubsurat baat ye hai ki independent Gaussian noises ko add karne se variance simply add ho jaata hai. Isi property ki wajah se hum recurrence ko expand karke ek direct formula nikaal sakte hain: xt=αˉtx0+1−αˉtϵ. Yahan αˉt (cumulative product of α values) ek single number hai jo batata hai step t par original signal ka kitna hissa bacha hai. Iska practical fayda ye hai ki hume step-by-step noise add nahi karna padta - kisi bhi timestep ka noisy image ek hi shot mein sample kar sakte hain, jo training ko fast banata hai.
Ab linear vs cosine schedule ka farak samajhna zaroori hai. Linear schedule shuru mein hi signal ko jaldi khatam kar deta hai - t=500 tak toh signal almost gaya, matlab baaki ke late steps kaafi waste ho jaate hain kyunki wahan already pure noise hai. Cosine schedule zyada smart hai: ye signal ko lambe time tak zinda rakhta hai (S-curve shape mein - slow start, fast middle, slow end), destruction ko evenly distribute karta hai. Isse gradients stable rehte hain, artifacts kam aate hain aur sample quality behtar hoti hai. Ye matter karta hai kyunki galat schedule se tumhara model ya toh train hi nahi hoga (vanishing/exploding gradients) ya phir ghatiya, blurry images banayega - toh scheduling ek chhoti si cheez lagti hai par poore model ki performance decide karti hai.