Lesson 9B - the math of diffusion
Channel: Jeremy Howard
Date: 2022-10-20

Lesson 9: https://youtu.be/0_BBRNYInx8
Lesson 9A (Deep dive): https://youtu.be/0_BBRNYInx8

Wasim, Tanishq, and Jeremy walk through the math of diffusion models from the ground up. The lesson assumes no prerequisite knowledge beyond what you covered in high school. We walk through the insight underlying the key equations in the work of Sohl-Dickstein et al. that originally discovered diffusion models.

By the end of the lesson you'll have some understanding of the following key concepts and you'll know how to recognize and interpret their symbols in research papers: probability density function (pdf), data distribution, forward process, reverse process, Markov process, Gaussian distribution, log likelihood, and evidence lower bound (ELBO).

We also touch on the more recent breakthroughs of Ho et al. and Song et al., both of which enabled even simpler and more powerful diffusion models.

You can discuss this lesson, and access links to all notebooks and resources from it, at this forum topic: https://forums.fast.ai/t/math-of-stable-diffusion/101077.

Additional links:
- Sohl-Dickstein et al. Deep Unsupervised Learning using Nonequilibrium Thermodynamics - https://arxiv.org/abs/1503.03585
- Ho et al. Denoising Diffusion Probabilistic Models - https://arxiv.org/abs/2006.11239
- Song et al. Denoising Diffusion Implicit Models - https://arxiv.org/abs/2010.02502

0:00 - Introduction
2:19 - Data distribution
6:38 - Math behind lesson 9’s “Magic API”
18:50 - CLIP (Contrastive Language–Image Pre-training)
27:04 - Forward diffusion (markov process with gaussian transitions)
36:11 - Likelihood vs log likelihood
42:16 - Denoising diffusion probabilistic model (DDPM)
48:04 - Conclusion

Thanks to raymond-wu on forums.fast.ai for the timestamps.