[论文解读] Unifying Diffusion Models' Latent Space, with Applications to CycleDiffusion and Guidance
本文提出了一种统一的高斯潜在空间公式化方法,用于扩散模型,实现了可重建的DPM-编码器,可将图像映射到潜在码。通过利用这一共享潜在空间,作者提出了CycleDiffusion方法,实现无配对图像到图像的转换,并通过基于能量的模型实现即插即用的引导,证明扩散模型在引导生成下对低密度子群体和个体的覆盖范围优于生成对抗网络(GANs)。
Diffusion models have achieved unprecedented performance in generative modeling. The commonly-adopted formulation of the latent code of diffusion models is a sequence of gradually denoised samples, as opposed to the simpler (e.g., Gaussian) latent space of GANs, VAEs, and normalizing flows. This paper provides an alternative, Gaussian formulation of the latent space of various diffusion models, as well as an invertible DPM-Encoder that maps images into the latent space. While our formulation is purely based on the definition of diffusion models, we demonstrate several intriguing consequences. (1) Empirically, we observe that a common latent space emerges from two diffusion models trained independently on related domains. In light of this finding, we propose CycleDiffusion, which uses DPM-Encoder for unpaired image-to-image translation. Furthermore, applying CycleDiffusion to text-to-image diffusion models, we show that large-scale text-to-image diffusion models can be used as zero-shot image-to-image editors. (2) One can guide pre-trained diffusion models and GANs by controlling the latent codes in a unified, plug-and-play formulation based on energy-based models. Using the CLIP model and a face recognition model as guidance, we demonstrate that diffusion models have better coverage of low-density sub-populations and individuals than GANs. The code is publicly available at https://github.com/ChenWu98/cycle-diffusion.
研究动机与目标
- 将多种扩散模型的潜在空间统一为一个共同的、高斯形式化的空间,以实现一致的表征。
- 开发一种可重建的DPM-编码器,将真实图像映射到随机扩散模型的潜在码。
- 通过共享潜在空间,利用两个独立训练的扩散模型实现无配对图像到图像的转换。
- 基于基于能量的模型,提供一种即插即用、无需微调的引导框架,适用于扩散模型和GANs。
- 评估在引导生成下,扩散模型是否比GANs更好地泛化到低密度子群体和个体。
提出的方法
- 将训练好的扩散模型重新表述为从高斯潜在码 z 到图像 x 的确定性映射,从而实现统一的潜在空间。
- 提出DPM-编码器,一种可重建的编码器,通过使用去噪U-Net反演扩散过程,将图像映射到潜在码。
- 引入CycleDiffusion方法,利用DPM-编码器将来自两个不同领域的图像编码到共享潜在空间,并重新解码,从而实现无配对图像到图像的转换。
- 应用基于能量的模型实现即插即用的引导:基于CLIP或人脸识别嵌入定义能量函数,以引导生成向期望属性对齐。
- 使用固定步数和噪声调度的Langevin动力学采样,从引导分布中采样,无需微调扩散模型。
- 采用从同一潜在码生成的图像之间的有界距离度量,形式化定义跨模型的共同潜在空间的出现。
实验结果
研究问题
- RQ1能否在独立训练的扩散模型之间建立一个共同的、高斯形式化的潜在空间?
- RQ2CycleDiffusion能否仅使用预训练的扩散模型,在无配对图像到图像转换任务中达到最先进性能?
- RQ3文本到图像扩散模型能否通过所提出的潜在空间和DPM-编码器,作为零样本图像到图像编辑器使用?
- RQ4通过基于能量的模型实现的即插即用引导,是否能提升扩散模型对低密度子群体的覆盖范围,相比GANs?
- RQ5相同的引导框架能否在不进行模型特定微调的情况下,统一应用于扩散模型和GANs?
主要发现
- CycleDiffusion在无配对图像到图像转换任务中优于先前的基于GAN和基于扩散的方法,在多个基准测试中达到最先进性能。
- 大规模文本到图像扩散模型(如Stable Diffusion)可通过CycleDiffusion作为零样本图像到图像编辑器使用,实现无需重新训练的编辑。
- 在引导生成以复现参考人脸时,扩散模型的个体相似度显著优于2D/3D GANs(例如,ID-D上的余弦相似度为0.911,而StyleGAN2为0.687)。
- 在扩散模型中,确定性LDM-DDIM(η=0)实现了最高的个体引导性能(ID-D上为0.911),表明其具有更高的稳定性和覆盖范围。
- DDGAN和DiffAE在个体引导方面表现良好(分别为0.837和0.873),但仍逊于LDM-DDIM和SN-DDPM。
- SN-DDPM在ID-D上实现了较高的个体相似度(0.873),表明基于分数的扩散模型同样能从统一的潜在空间和引导框架中获益。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。