第 16 章 中的对抗生成器需要第二个网络——判别器或评判器,因为将噪声映射到数据的生成器缺乏直接的回归目标。扩散模型与流匹配模型通过对每个训练样本逐步施加高斯噪声来构造回归目标。逆转一小步高斯加噪过程,需要估计给定加噪观测下干净数据的条件期望。
这一视角统一了三条研究主线:非平衡热力学与去噪扩散概率模型(DDPM)(Sohl-Dickstein 等 2015年; Ho 等 2020年)、基于分数的生成建模 (Song 和 Ermon 2019年; Song 等 2021年),以及流匹配或随机插值 (Lipman 等 2023年; Liu 等 2023年; Albergo 等 2023年)。在这三种表述中,单个神经网络在每个噪声水平 \(t \in [0, 1]\) 上学习预测干净数据(或等价地预测所加噪声、分数 \(\nabla_{\mathbf{x}} \log p_t(\mathbf{x})\) 或沿路径的速度),随后由数值采样器将这些预测从 \(t = 1\) 处的纯噪声反向积分回 \(t = 0\) 处的数据。
以回归取代对抗极小极大目标解决了 GAN 的三项局限:训练只需单个由平方误差优化的网络;加权回归损失给出了对数似然的变分界(并通过概率流 ODE 得到精确对数似然);似然目标会惩罚遗漏模式。全章中,我们的默认表述沿线性路径 \(\mathbf{x}_t = (1 - t)\mathbf{x}_0 + t\boldsymbol\epsilon\) 回归速度 (Esser 等 2024年),同时并行介绍 DDPM 在保方差路径上的噪声预测器。
前三节在二维三峰高斯混合分布上展开完整的数学与算法核心,该分布的真实密度、分数、后验均值与速度场均具有闭式解。17.4 节 转向 Fashion-MNIST 图像,引入时间条件 U-Net、Fréchet 距离评估与无分类器引导。接下来的四节依次考察采样器(17.5 节)、似然界与设计空间(17.6 节)、潜在扩散与 Transformer 主干(17.7 节),以及基于流映射的少步蒸馏(17.8 节)。最后,17.9 节 以词元掩码取代高斯噪声,将扩散推广至离散词元。更详尽的数学证明见 第 38 章,外部教程、课程与参考实现汇总于 17.10 节。
Albergo, Michael S., Nicholas M. Boffi, 和 Eric Vanden-Eijnden. 2023年. 《Stochastic interpolants: a unifying framework for flows and diffusions》. arXiv preprint arXiv:2303.08797.
Esser, Patrick, Sumith Kulal, Andreas Blattmann, 等. 2024年.
《Scaling Rectified Flow Transformers for High-Resolution Image Synthesis》.
Proceedings of the 41st International Conference on Machine Learning, Proceedings of Machine Learning Research, 卷 235: 12606~33.
https://arxiv.org/abs/2403.03206.
Ho, Jonathan, Ajay Jain, 和 Pieter Abbeel. 2020年.
《Denoising diffusion probabilistic models》.
Advances in Neural Information Processing Systems 33: 6840~51.
https://arxiv.org/abs/2006.11239.
Lipman, Yaron, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, 和 Matt Le. 2023年. 《Flow matching for generative modeling》. International Conference on Learning Representations.
Liu, Xingchao, Chengyue Gong, 和 Qiang Liu. 2023年. 《Flow straight and fast: learning to generate and transfer data with rectified flow》. International Conference on Learning Representations.
Sohl-Dickstein, Jascha, Eric Weiss, Niru Maheswaranathan, 和 Surya Ganguli. 2015年.
《Deep unsupervised learning using nonequilibrium thermodynamics》.
International Conference on Machine Learning, 2256~65.
https://proceedings.mlr.press/v37/sohl-dickstein15.html.
Song, Yang, 和 Stefano Ermon. 2019年.
《Generative modeling by estimating gradients of the data distribution》.
Advances in Neural Information Processing Systems 32.
https://arxiv.org/abs/1907.05600.
Song, Yang, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, 和 Ben Poole. 2021年.
《Score-Based Generative Modeling through Stochastic Differential Equations》.
International Conference on Learning Representations.
https://arxiv.org/abs/2011.13456.