[论文解读] Vector Quantized Diffusion Model for Text-to-Image Synthesis
本文提出 VQ-Diffusion,是一个在 VQ-VAE 潜在空间中的离散扩散模型,用于文本到图像生成,通过掩码与替换扩散策略和重参数化,在推理速度高于自回归方法的同时实现最先进的质量。
We present the vector quantized diffusion (VQ-Diffusion) model for text-to-image generation. This method is based on a vector quantized variational autoencoder (VQ-VAE) whose latent space is modeled by a conditional variant of the recently developed Denoising Diffusion Probabilistic Model (DDPM). We find that this latent-space method is well-suited for text-to-image generation tasks because it not only eliminates the unidirectional bias with existing methods but also allows us to incorporate a mask-and-replace diffusion strategy to avoid the accumulation of errors, which is a serious problem with existing methods. Our experiments show that the VQ-Diffusion produces significantly better text-to-image generation results when compared with conventional autoregressive (AR) models with similar numbers of parameters. Compared with previous GAN-based text-to-image methods, our VQ-Diffusion can handle more complex scenes and improve the synthesized image quality by a large margin. Finally, we show that the image generation computation in our method can be made highly efficient by reparameterization. With traditional AR methods, the text-to-image generation time increases linearly with the output image resolution and hence is quite time consuming even for normal size images. The VQ-Diffusion allows us to achieve a better trade-off between quality and speed. Our experiments indicate that the VQ-Diffusion model with the reparameterization is fifteen times faster than traditional AR methods while achieving a better image quality.
研究动机与目标
- 解决文本到图像生成方法中的单向偏差问题。
- 通过在离散潜在空间中使用掩码与替换扩散来消除误差累积。
- 通过重参数化实现高质量图像合成与高效推理。
- 在从 CUB-200 到 MSCOCO以及大规模 LAION 的数据集上展示可扩展性。
- 提供一个适用于条件(文本引导)和无条件图像生成的统一框架。
提出的方法
- 利用 VQ-VAE 将图像映射到潜在空间中的离散标记。
- 使用基于 Transformer 的逆向模型,以有条件的离散扩散过程对潜在空间进行建模。
- 引入一种掩码与替换扩散,使标记可以被掩码和/或替换,以引导学习并减少误差累积。
- 使用变分下界 (VLB) 和辅助无噪声标记目标进行训练,以提高重建质量。
- 采用重参数化技巧来预测无噪声标记,使通过更少的扩散步实现更快的推理成为可能。
- 利用带有 AdaLN 的编解码器 Transformer 架构,在解码阶段注入时间步条件。
实验结果
研究问题
- RQ1在参数数量相近的情况下,VQ-Diffusion 是否在文本到图像合成质量上超越自回归和基于 GAN 的方法?
- RQ2掩码与替换扩散策略是否降低离散扩散中的误差累积并加快文本条件图像生成的收敛?
- RQ3重参数化和快速推理策略是否可以在不牺牲质量的前提下实现数量级别的加速?
- RQ4该方法是否可扩展到大规模数据集,并能够在多种领域实现条件和无条件生成?
主要发现
| 模型 | MSCOCO FID | CUB-200 FID | Oxford-102 FID |
|---|---|---|---|
| StackGAN | 74.05 | 51.89 | 55.28 |
| StackGAN++ | 81.59 | 15.30 | 48.68 |
| EFF-T2I | - | 11.17 | 16.47 |
| SEGAN | 32.28 | - | - |
| AttnGAN | 35.49 | 23.98 | - |
| DM-GAN | 32.64 | 16.09 | - |
| DF-GAN | 21.42 | - | - |
| DAE-GAN | 28.12 | 15.19 | - |
| DALLE | 27.50 | 56.10 | - |
| Cogview | 27.10 | - | - |
| VQ-Diffusion-S | 30.17 | 12.97 | 14.95 |
| VQ-Diffusion-B | 19.75 | 11.94 | 14.88 |
| VQ-Diffusion-F | 13.86 | 10.32 | 14.10 |
- VQ-Diffusion 的 S/B/F 模型在 MSCOCO、CUB-200 和 Oxford-102 数据集上取得比若干 GAN 基和自回归方法更好的 FID 分数(例如 VQ-Diffusion-F 在 MSCOCO 上取得了出色的结果)。
- 掩码与替换扩散策略相较于仅掩码或仅替换的变体,降低了误差累积并改善了收敛。
- 重参数化实现更快的推理,据报道该方法比传统自回归方法快十五倍,同时提供更好的图像质量。
- 在固定数量的扩散步和快速推理步幅下进行推理,而不会导致较大质量损失。
- 该方法提供一个统一框架,适用于多数据集上的条件(文本引导)和无条件图像生成任务(如 FFHQ、ImageNet、COCO 等)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。