One-step Diffusion Models with $f$-Divergence Distribution Matching
本文提出了一种新的基于f-散度分布匹配的单步扩散模型蒸馏方法f-distill,该方法通过最小化教师模型和学生模型样本分布之间的f-散度来实现,并实现在ImageNet64和MS-COCO数据集上取得了最先进的单步图像生成性能。
更新于 2025-02-24。作者:Yilun Xu、Weili Nie、Arash Vahdat。
中文摘要
从扩散模型中采样涉及一个缓慢的迭代过程,这阻碍了它们的实际部署,尤其是在交互式应用中。为了加快生成速度,最近的方法通过变分分数蒸馏将多步扩散模型蒸馏成单步学生生成器,该生成器使学生生成的样本分布与教师的分布匹配。然而,这些方法使用反向 Kullback-Leibler (KL) 散度进行分布匹配,而这已知是模式寻求的。在本文中,我们使用一种新颖的 f-散度最小化框架(称为 f-distill)推广了分布匹配方法,该框架涵盖了具有不同模式覆盖率和训练方差权衡的不同散度。我们推导出教师和学生分布之间 f-散度的梯度,并表明它表示为它们的分数差与由其密度比确定的加权函数的乘积。当使用较少模式寻求的散度时,此加权函数自然会强调教师分布中密度较高的样本。我们观察到,使用反向 KL 散度的流行变分分数蒸馏方法是我们框架中的一个特例。根据经验,我们证明了替代的 f-散度,例如正向 KL 散度和 Jensen-Shannon 散度,在图像生成任务中优于当前最佳的变分分数蒸馏方法。特别是,当使用 Jensen-Shannon 散度时,f-distill 在 ImageNet64 上实现了当前最先进的一步生成性能,并在 MS-COCO 上实现了零样本文本到图像生成。项目页面:https://research.nvidia.com/labs/genair/f-distill
英文摘要
Sampling from diffusion models involves a slow iterative process that hinders their practical deployment, especially for interactive applications. To accelerate generation speed, recent approaches distill a multi-step diffusion model into a single-step student generator via variational score distillation, which matches the distribution of samples generated by the student to the teacher's distribution. However, these approaches use the reverse Kullback-Leibler (KL) divergence for distribution matching which is known to be mode seeking. In this paper, we generalize the distribution matching approach using a novel f-divergence minimization framework, termed f-distill, that covers different divergences with different trade-offs in terms of mode coverage and training variance. We derive the gradient of the f-divergence between the teacher and student distributions and show that it is expressed as the product of their score differences and a weighting function determined by their density ratio. This weighting function naturally emphasizes samples with higher density in the teacher distribution, when using a less mode-seeking divergence. We observe that the popular variational score distillation approach using the reverse-KL divergence is a special case within our framework. Empirically, we demonstrate that alternative f-divergences, such as forward-KL and Jensen-Shannon divergences, outperform the current best variational score distillation methods across image generation tasks. In particular, when using Jensen-Shannon divergence, f-distill achieves current state-of-the-art one-step generation performance on ImageNet64 and zero-shot text-to-image generation on MS-COCO. Project page: https://research.nvidia.com/labs/genair/f-distill
解读
一句话总结
本文提出了一种新的基于f-散度分布匹配的单步扩散模型蒸馏方法f-distill,该方法通过最小化教师模型和学生模型样本分布之间的f-散度来实现,并实现在ImageNet64和MS-COCO数据集上取得了最先进的单步图像生成性能。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:扩散模型的采样过程迭代缓慢,阻碍了其在交互式应用中的实际部署。现有单步生成方法通过将多步扩散模型蒸馏成单步学生生成器来加速生成速度,但这些方法存在局限性。
- 现有方案不足:现有的基于变分分数蒸馏的方法使用反向KL散度进行分布匹配,容易陷入模式寻求,忽略教师模型学习到的多样化模式。
- 研究目标:提出一种通用的分布匹配蒸馏方法,该方法能够覆盖不同的散度,并在模式覆盖和训练方差之间取得不同的权衡。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种新的基于f-散度的分布匹配蒸馏框架f-distill,该框架能够覆盖不同的散度,例如反向KL、正向KL和Jensen-Shannon散度等。
- 方法改进:推导了教师和学生分布之间f-散度的梯度,并证明了其可以表示为分数差异和由密度比确定的加权函数的乘积。该加权函数能够根据选择的f-散度自然地强调教师分布中密度较高的样本。
- 优势:与现有基于反向KL散度的变分分数蒸馏方法相比,f-distill能够更好地覆盖模式,并具有更低的训练方差,从而在图像生成任务中取得更好的性能。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在CIFAR-10、ImageNet-64和MS-COCO数据集上进行了图像生成实验,并与多种基线方法进行了比较,包括多步扩散模型和现有的蒸馏方法。
- 性能提升:使用Jensen-Shannon散度时,f-distill在ImageNet-64数据集上取得了最先进的单步生成性能,并在MS-COCO数据集上的零样本文本到图像生成任务中也取得了最先进的性能。
- 对比结果:与现有的最佳变分分数蒸馏方法相比,f-distill在ImageNet-64数据集上FID分数降低,在MS-COCO数据集上CLIP分数提升。具体的数值在论文中都有详细的表格数据呈现。
问题4:这个研究的实际应用价值是什么?
- 应用场景:f-distill可以加速扩散模型的生成速度,使其能够应用于交互式应用,例如实时图像生成和文本到图像生成等。
- 实施建议:论文详细介绍了f-distill的训练方法,并提供了相关的超参数设置建议。
- 局限与展望:某些f-散度在训练过程中可能存在高方差的问题,未来的工作可以探索更有效的方差控制技术。此外,研究不同f-散度在不同数据集上的性能表现,并寻找更普适的f-散度选择策略也是未来的研究方向。