Introduction to Flow Matching and Diffusion Models 2026

MIT Course 6.S184: Generative AI with Stochastic Differential Equations

Diffusion and flow models are the cutting edge generative AI methods for images, videos, and many other data types. This course offers a comprehensive introduction for students and researchers seeking a deeper understanding of these models. Lectures will teach the core mathematical concepts necessary to understand diffusion models, including stochastic differential equations and the Fokker-Planck equation, and will provide a step-by-step explanation of the components of each model. Labs will accompany each lecture allowing students to gain practical, hands-on experience with the concepts learned in a guided manner. At the end of the class, students will have built a latent diffusion model from scratch – and along the way, will have gained hands-on experience with the mathematical toolbox of stochastic analysis that is useful in many other fields. This course is ideal for those who want to explore the frontiers of generative AI through a mix of theory and practice. We recommend some prior experience with probability theory and deep learning..

Course Notes

The course notes serve as the backbone of the course and provide a self-contained explanation of all material in the class. We strongly recommend using them. You can view the notes by clicking the button below:

View the course notes here!

Lecture Schedule

Lecture Date & Time Room Topics Slides Recording
01 Tue, Jan 20 — 11:00–12:30 E25-111 Flow and Diffusion Models Lec 01 Link
02 Thu, Jan 22 — 11:00–12:30 E25-111 Flow Matching Lec 02 Link
03 Fri, Jan 23 — 11:00–12:30 E25-111 Score Matching, Guidance Lec 03 Link
04 Wed, Jan 28 — 11:00–12:30 E25-111 Latent Spaces, Neural Network architectures Lec 04 Link
05 Fri, Jan 30 — 12:30-2:00 E25-111 Discrete Diffusion Models Lec 05 Link

Labs

Grading is P/F and based on class participation and completion of labs. There will be 3 labs given as homework which culminate in a codebase training a flow matching model. The labs will guide you through building this model from scratch step-by-step. To support you in completing the labs, there will be office hours where you can ask questions and get help. The office hours schedule is as follows:
Office Hour Date & Time Room Associated Lab
01 Wed, Jan 21 — 11:00–12:30 36-144 Lab 1
02 Fri, Jan 23 — 15:00–16:30 36-156 Lab 2
03 Tue, Jan 27 — 11:00–12:30 36-144 Lab 3

Instructors

Instructor Photo Peter Holderrieth

PhD Student

Instructor Photo Ron Shprints

MEng Student

Prerequisites: Linear algebra, multivariate calculus, and basic probability theory. Students should be familiar with Python and have some experience with PyTorch.

Questions? Email either Peter (phold@mit.edu) or Ron (ronsh@mit.edu)!

Class of 2025: To view a previous iteration of the class, click on the 2025 tab. Yet, we will have new content and a new structure this year.