跳转至

MIT 6.S184: Introduction to Flow Matching and Diffusion Models

Abstract

Latest updates related to this course can be found at the bottom of this page.

  • Website: Latest version
  • Labs: Zicx's repo (2025 Spring)

    My learning steps:

    1. Review lecture videos and capture key insights from the slides.
    2. Apply theoretical concepts by completing the corresponding lab assignments.
    3. Consolidate learning by refining personal notes against the provided lecture notes.

Table of Contents

Lecture Notes

Labs

Recap

Credit: Flow Matching and Diffusion Deep Dive @Medium

Resources

Continuously updated resources related to Flow Matching and Diffusion Models.

Updates

MeanFlow Model

️Detailed Introduction

MeanFlow Model

何恺明的新工作,提出了一种名为 MeanFlow 的生成模型框架,目标是实现高效的one-step 图像生成。 MeanFlow 的核心思想是引入并建模 平均速度(average velocity)的概念,论文从平均速度的定义出发,推导出了一个关键的 MeanFlow 恒等式(MeanFlow Identity),它描述了平均速度与瞬时速度及其时间导数之间的关系。 论文训练一个神经网络来直接预测这个平均速度场,并使用 MeanFlow 恒等式作为 training target.

MeanFlow Identity

MeanFlow Sampling Algorithm

Diffusion Meets Flow Matching

️Detailed Introduction

这篇博客介绍了 Diffusion Gaussian Flow Matching(GFM) 这两种生成框架的相似性和联系,指出它们在数学上是等价的,并且可以相互转换。

Diffusion Formulation

对于 GFM, 我们会发现结果和上式在网络输出为 \(\hat{\mathbf{u}}\) 的时候是等价的。

\[ d\tilde{\mathbf{z}}_t = [\text{Network output}] \cdot d\eta_t \]

Diffusion with DDIM sampler == Flow matching sampler (Euler).

DDIM 采样器可视为重参数化采样 ODE 的一阶 Euler 采样器,其对不同的网络输出采用相同的更新规则,如果网络是一个高阶的 ODE 求解器,那么 DDIM 采样的误差就会和 FM 相差很大。

DDIM 对噪声调度中的线性缩放具有不变性(invariant)

Flow matching weighting == diffusion weighting of \(\mathbf{v}\)-MSE loss + cosine noise schedule.

权重函数(Weighting Function) 是损失函数中最重要的部分,它平衡了图像、视频和音频等感知数据中高频与低频成分的重要性,FM 的权重函数与 Diffusion 常见的 \(\mathbf{v}\)-MSE 损失函数中的权重函数相同。

Takeaways: Gaussian Flow Matching 为该领域带来了两种新模型规范

  1. Network output: a vector field parametrization of the network output.
  2. Sampling noise schedule: a simple linear noise schedule.