Skip to content

Reading MIT 6.S184: Flow Matching and Diffusion Through ODEs and SDEs

Sep 30, 20261 min
TL;DRMIT 6.S184 is a short IAP (January Independent Activities Period) course: five lectures (Lecture 3 is split into two recordings, 3-A and 3-B), three labs, and an 84-page set of lecture notes the course calls its backbone. Notes, slides, all six recordings, lab notebooks, and official solutions are public, so it grades A3, enough to self-study. Two gaps remain: lab submission goes through Gradescope inside Canvas, which only enrolled MIT students can use, and Lecture 5 on discrete diffusion has no lab.

🌏 中文版

Version note: This series is based on the IAP 2026 offering of MIT 6.S184. The site also keeps a 2025 page with different videos; this series does not mix the two. Every fact was checked against official materials on 2026-09-30: the course site, the lecture notes PDF (84 pages), five slide decks, six recordings, and the 2026 branch of the labs repo. Access grade: A3, enough to self-study.

Series position: start of series | Next: L1: Generation Is Sampling, and ODEs and SDEs Are the Machine

Image and video generators such as Stable Diffusion 3 and Meta Movie Gen are mostly built on diffusion models or flow matching. Tutorials tend to pick one extreme: code only, or a wall of stochastic differential equations. MIT 6.S184 takes the middle road. It teaches just enough ODE and SDE math, then turns that math step by step into a working latent diffusion model.

This post is the entry point and contains no derivations. By the end you will know what the course teaches, where each material lives, what is missing, and what order to read things in.

What the course is

The formal title on the course site is 6.S184: Generative AI with Stochastic Differential Equations; the page header reads Flow Matching and Diffusion Models. The labs repo README uses the cross-listed number 6.S184/6.S975 and says the labs are "as taught at MIT over IAP 2026."

The site's description is explicit about the goal. Lectures teach the core math needed to understand diffusion models, including stochastic differential equations and the Fokker–Planck equation, and explain each model component step by step. Labs accompany each lecture. By the end, students will have built a latent diffusion model from scratch.

Who does what (Instructors and Acknowledgements sections of the site):

The notes are by Peter Holderrieth and Ezra Erives; the site's citation entry points to arXiv 2506.02070.

Prerequisites: the site lists linear algebra, multivariate calculus, and basic probability, plus familiarity with Python and some PyTorch experience. Notes §1.2 adds that the subject is technical and recommends some mathematical maturity, especially in probability; Appendix A is a probability refresher for that reason. If your probability is rusty, the site's Stanford CS109 guide is a place to start.

Access: A3, with two gaps

Using the grades from the global AI/CS course map, 6.S184 is A3, enough to self-study:

MaterialStatus
Lecture notesFully public, 84 pages (§1–7 plus Appendices A–E). The site calls them the backbone of the course and self-contained
SlidesAll five decks public (3-A and 3-B share one)
RecordingsAll six on YouTube
LabsThree notebooks public
Official solutionsPublic, under solutions/ in the labs repo

Two gaps are worth stating up front:

  1. No graded feedback. The site's submission flow is "export the notebook to PDF and submit to Gradescope via Canvas," which only enrolled MIT students can use. Outside readers can only check their work against the official solutions.
  2. Lecture 5 has no lab. The three labs cover L1, L2–L3, and L3–L4. Notes §1.2 also marks §7 (discrete diffusion) as Optional.

The site also has no formal schedule and no exams. Slide filenames carry dates (20260120, 20260122, 20260123, 20260128, 20260130), but those are filenames, not a published calendar. The Logistics slide in Lecture 1 says that passing requires coming to lecture and doing the labs ("necessary to pass").

The seven-section map of the notes

Notes §1.2 summarizes each section in a sentence, and that summary is the skeleton of this series:

Notes sectionQuestion it answers
§1 Generative Modeling as SamplingWhat does "generate an image of a dog" mean precisely? Sampling from a probability distribution
§2 Flow and Diffusion ModelsWhat is the machine that generates? Simulating ODEs and SDEs
§3 Flow MatchingHow do you train that machine? A simple, scalable algorithm
§4 Score MatchingWhat score functions are and how to learn them; they unlock SDE sampling and guidance
§5 GuidanceHow to make generation follow a prompt: classifier-free guidance
§6 Latent Spaces, Neural Network ArchitecturesHow large image/video generators are built: architectures, latent space, case studies
§7 (Optional) Discrete Diffusion ModelsHow to carry the same principles over to discrete data like language

The appendices are A probability refresher, B a proof of the Fokker–Planck equation, C existence and uniqueness of continuous-time Markov chains, D additional perspectives on VAEs, and E a guide to the diffusion literature.

Materials table

One row per lecture. Page numbers come from the notes' table of contents.

LectureTopicNotesSlidesRecordingLabThis series
1Flow and Diffusion Models§1.3, §2 (pp.4–13)Slides 1L1Lab 1L1, Lab 1
2Flow Matching§3 (pp.14–24)Slides 2L2Lab 2L2
3-AScore Functions and Score Matching§4 (pp.25–33)Slides 3L3ALab 2L3A, Lab 2
3-BClassifier-free Guidance§5 (pp.34–40)Slides 3L3BLab 3 Part 2L3B
4Latent Spaces and Neural Network Architectures§6 (pp.41–53)Slides 4L4Lab 3L4, Lab 3
5Discrete Diffusion Models§7 (pp.54–65, Optional)Slides 5L5NoneL5

The labs' names on the site are Lab 1 Working with ODEs and SDEs, Lab 2 Flow Matching and Score Matching, and Lab 3 Diffusion Transformer and VAEs. The site links to Colab and Google Drive; this series uses the notebooks on GitHub because the solutions live in the same repo.

A self-study route

The site and Remark 1 in the notes split the roles this way: the notes are self-contained, the recordings walk you through each section, and the labs have you write the code. That suggests a rhythm per lecture:

  1. Read the notes section first. Skip formulas you can't follow yet; make sure you understand each Key Idea, each Theorem statement, and each Algorithm box.
  2. Then watch the recording. It is the spoken version of the notes and good for intuition.
  3. Do the lab. Per the site, download the .ipynb from GitHub, open it in Jupyter or Colab, and complete every question.
  4. Check against the official solutions. Open solutions/lab_*_complete.ipynb and compare question by question. For outside readers, this is the only feedback there is.

This series follows the dependency order of the notes: L1 → Lab 1 → L2 → L3A → Lab 2 → L3B → L4 → Lab 3 → L5. Lab 2 comes after L3A because it asks for a conditional score; Lab 3 comes after L4 because it uses both CFG and DiT/VAE.

Something you can do tonight: open the notes PDF, read §1 (pp.3–6, the four Key Ideas), then make sure your environment can run PyTorch for the Lab 1 notebook.

One convention to remember: t=0 is noise, t=1 is data

The notes use one time direction throughout: t=0 is the initial distribution p_init (usually the standard Gaussian N(0, I_d)), and t=1 is the data distribution p_data. Generating means simulating from t=0 to t=1.

Much of the diffusion literature runs the other way. Appendix E of the notes flags it: a popular convention puts p_data at t=0, the opposite of the notes. When you read DDPM-style papers, or this site's CMU 11-785 L23 diffusion guide, check the time direction before comparing formulas.

License

The course site footer says CC BY-NC-SA. This series only summarizes and guides; formulas and algorithm numbers point back to the original notes.

Series contents

  1. L1: Generation Is Sampling, and ODEs and SDEs Are the Machine
  2. Lab 1: Simulating ODEs and SDEs
  3. L2: Flow Matching, Learning the Marginal Vector Field from Conditional Paths
  4. L3A: Score Functions, SDE Sampling, and Score Matching
  5. Lab 2: Writing Flow Matching and Score Matching by Hand
  6. L3B: Guidance and Classifier-Free Guidance
  7. L4: U-Nets, DiTs, and Latent Space
  8. Lab 3: From DiT and VAE to Latent Diffusion
  9. L5: Discrete Diffusion, Generating Language with CTMCs

Further reading

References