Tutorials › Fundamentals
Chapter 0 — Preamble
In physics, diffusion is the net movement of particles (atoms, molecules) in a medium, from higher to lower concentration. It's what happens when you drop ink in water.
In 2015, this paper proposed to borrow the established mathematical framework for diffusion in order to model how probabilities change across time. As we'll see soon, this ability is crucial for generating high-quality data—be it images, audio, video or even text.
Diffusion papers tend to be very math-heavy, which is refreshing after a decade of mostly empirical machine learning. But it also obfuscates intuition.
To add salt to injury, there are multiple formulations for diffusion models, each coming from a different research lab. The most popular one uses Markov chains—you're probably familiar with the classic picture of a dog that gets progressively noisier. Personally, I always found it underwhelming as a means of understanding diffusion, since it doesn't offer an obvious connection to physics.
For me, the unlock happened when I started reading the diffusion formulation from Stanford University, best captured in this paper. Compared to prior work, time is continuous and data generation can be directly intepreted as particle motion. In these lessons, I will mostly follow this formulation (though it's completely equivalent to previous ones).
For an end-to-end overview, check out my YouTube video. It's not strictly necessary (the content here is self-contained), but you might find it helpful.
A final note: I really tried to keep the math minimal and bring it in only when it truly helps build an intuition. So please don't chicken out when you see it—it's very carefully curated.
Let's begin :)