Diffusion Models and Their Applications
From diffusion models and flow matching to discrete generation, one-step models, and guidance at generation time.
7 units 46 notes Read 0 / 46 Oct 2026
-
U1 Diffusion Models 0 / 6 From "what does generation learn" to the forward process, denoising regression, Tweedie & score, and DDPM / DDIM / SDE-ODE sampling.
- U1.0 What Is a Generative Model Learning?
- U1.1 Choosing a Path: The Forward Process
- U1.2 Denoising: How Do We Learn a Reverse Step?
- U1.3 Tweedie's Formula: How Does a Denoiser Describe the Data Distribution?
- U1.4 From Discrete Steps to Forward and Reverse Dynamics
- U1.5 Lab: Build a Toy Diffusion Experiment LAB
Tools this unit usesL0.0 Learning Rules from Examples L0.1 A Loss Function Declares What Matters L0.3 Direction, Step Size, and Gradient Descent L1.0 Overfitting and Underfitting L1.1 Bias and Variance L1.2 Why Split Data? L2.0 Minibatch Gradients and Noise L2.1 Momentum and Adam L4.0 If MLPs Can Approximate Everything, Why Use Other Architectures? L4.5 Where should instructions enter a shared model? L5.0 How should we score how well a model explains the data? L5.1 What can we optimize when the required marginal is intractable? L5.3 Which number tells us whether a generative model is good? M0.3 Total Derivatives, Integral Differentiation, and JVPs M1.0 Linear Combinations of Gaussians M1.1 Conditional Expectation M1.2 Which Temperature Should We Forecast? MSE Selects the Conditional Mean M1.3 Bayes' Rule and the Posterior M1.4 Tweedie's Formula M2.2 The Continuity Equation M2.3 Euler's Method and Its Error M3.0 Where Is the Walker After an Hour? From Random Walks to Brownian Motion M3.1 Stochastic Differential Equations M3.2 The Fokker–Planck Equation M3.3 Langevin Dynamics and Stationarity M4.0 Markov Chains and Transition Matrices M5.1 KL Divergence and Cross-Entropy -
U2 Flow Matching 0 / 6 Start from reference paths and explain velocity regression through both theory and intuition. Introduce the continuity equation and its intuitive meaning, use DDIM to bridge Flow Matching and diffusion models, then generalize to stochastic interpolants and a family of ODE/SDE samplers that share the same marginals.
- U2.0 Is a Forward Corruption Process Necessary?
- U2.1 Learn Where to Go by Following the Crowd
- U2.2 Why Does the Average Crowd Transport the Whole Distribution?
- U2.3 Gaussian Sources: Where DDIM and Flow Matching Meet
- U2.4 Stochastic Interpolants: Unifying Flows and Diffusions
- U2.5 Lab: From Reference Paths to a Flow ODE LAB
Tools this unit usesM0.1 Divergence and Flux M1.0 Linear Combinations of Gaussians M1.1 Conditional Expectation M1.2 Which Temperature Should We Forecast? MSE Selects the Conditional Mean M1.4 Tweedie's Formula M2.0 Vector Fields and ODEs M2.2 The Continuity Equation M2.3 Euler's Method and Its Error M5.1 KL Divergence and Cross-Entropy M6.1 How Far Apart Are Two Population Maps? The W₂ Distance -
U3 Reducing ODE Discretization Error 0 / 6 Where does ODE discretization error come from? Relate velocity variation to finite-step error, then follow two routes: change learned trajectories with reflow or minibatch OT, or use a better numerical solver for a more accurate approximation under the same compute budget.
- U3.0 Why Can Straight Reference Paths Produce Curved ODE Trajectories?
- U3.1 How Do We Measure the Velocity Changes Euler Misses?
- U3.2 Straightening I: Reflow
- U3.3 Straightening II: Choose Better Couplings Without Repeated Training
- U3.4 Can Fewer Direction Queries Still Give Accurate Sampling?
- U3.5 Lab: Reuse the Methods with New Data and Models LAB
Tools this unit usesM0.2 Taylor Expansion and Straight-Line Prediction M1.1 Conditional Expectation M2.0 Vector Fields and ODEs M2.3 Euler's Method and Its Error M2.4 Higher-Order Methods M3.4 Strong and Weak Convergence M5.0 Convexity and Jensen's Inequality M6.0 Monge, Kantorovich, and Couplings M6.1 How Far Apart Are Two Population Maps? The W₂ Distance M6.2 One-Dimensional Monotonicity and Brenier's Theorem M6.3 Sinkhorn and Minibatch Approximations -
U4 Discrete Diffusion 0 / 8 Start from joint PMFs and probability interpolation, then ask what velocity means for discrete data. Jump rates, conservation, and posterior averaging lead to training and sampling; factorization and remasking motivate two labs separating sampling and prediction errors.
- U4.0 What does noise mean for tokens?
- U4.1 How do token jump rates change a distribution?
- U4.2 Can tokens have Flow Matching without straight lines?
- U4.3 What should we learn to generate from masks?
- U4.4 Do correct token marginals make a correct sequence?
- U4.5 Can remasking preserve the same distribution?
- U4.6 Lab A: Correct marginals, incorrect sequences? LAB
- U4.7 Lab B: Rate sampling, remasking, and ratios LAB
Tools this unit usesM1.1 Conditional Expectation M1.3 Bayes' Rule and the Posterior M2.2 The Continuity Equation M3.2 The Fokker–Planck Equation M3.3 Langevin Dynamics and Stationarity M4.0 Markov Chains and Transition Matrices M4.1 Absorbing States and Absorption Times M4.2 Continuous-Time Markov Chains M4.3 Can You Detect a Reversed Movie? Time Reversal and Probability Ratios M5.1 KL Divergence and Cross-Entropy -
U5 Consistency Models 0 / 7 Can we learn the one-step map directly? Progressive distillation, the consistency function and self-consistency, CD vs. CT, which error each iCT / sCM trick fights, and why multistep CM saturates.
- U5.0 不走了,直接學那一步
- U5.1 Progressive Distillation:學生一步,等於老師兩步
- U5.2 Consistency Function:同一條軌跡,同一個終點
- U5.3 Consistency Distillation 與 Consistency Training:沒有老師,憑什麼?
- U5.4 讓 CT 訓得起來:iCT 與連續時間的 sCM
- U5.5 多步 CM 的極限:每一步都得回到 x₀
- U5.6 實作:三種「一步」放在同一張圖上 LAB
Tools this unit usesM0.2 Taylor Expansion and Straight-Line Prediction M0.3 Total Derivatives, Integral Differentiation, and JVPs M1.1 Conditional Expectation M1.2 Which Temperature Should We Forecast? MSE Selects the Conditional Mean M1.4 Tweedie's Formula M2.0 Vector Fields and ODEs M2.1 Flow Maps and Pushforwards M2.3 Euler's Method and Its Error M5.2 EMA, Moving Targets, and Stop-Gradient M6.1 How Far Apart Are Two Population Maps? The W₂ Distance -
U6 Consistency Trajectory Model and Flow Map 0 / 7 Start from CTM's arbitrary t→s traversal, then organize it as a flow map: four defining conditions, the three Flow Map Matching losses, the MeanFlow identity, Shortcut / AYF, and failure modes of regression versus distribution-matching (DMD) distillation.
- U6.0 Consistency Trajectory Models: Can We Jump from Any t to Any s?
- U6.1 Flow Map Matching:三條恆等式,三種損失
- U6.2 MeanFlow:平均速度與一條精確的恆等式
- U6.3 Shortcut 與 Align Your Flow:同一張表的其他格子
- U6.4 另一條路:分佈匹配
- U6.5 統一表與選擇指南
- U6.6 實作:MeanFlow、半群檢查,與交叉問題的最終回收 LAB
Tools this unit usesM0.3 Total Derivatives, Integral Differentiation, and JVPs M1.1 Conditional Expectation M1.2 Which Temperature Should We Forecast? MSE Selects the Conditional Mean M1.4 Tweedie's Formula M2.0 Vector Fields and ODEs M2.1 Flow Maps and Pushforwards M2.3 Euler's Method and Its Error M5.1 KL Divergence and Cross-Entropy M5.3 Differentiating a Generator M6.1 How Far Apart Are Two Population Maps? The W₂ Distance -
U7 Test-time Guidance 0 / 6 How can a trained model incorporate a new condition, observation, or reward at sampling time? From classifier guidance, CFG, and reward tilting to Best-of-N, Feynman–Kac/SMC, SPT, inverse problems, data assimilation, planning, and scientific design.
- U7.0 The Model Is Trained. Can We Still Change What We Want?
- U7.1 Where Can a Fixed Model Get a Guidance Direction?
- U7.2 High Reward and Plausible Data: Which Distribution Should We Sample?
- U7.3 What If the Reward Scores Samples but Gives No Direction?
- U7.4 When Rewards Become Observations, Goals, and Constraints
- U7.5 Lab: How Far Can Guidance Move the Same Base Distribution? LAB
Lit notes are what this browser has read; the record stays on this device.