Skip to main content
QUICK REVIEW

[论文解读] Draft-and-Revise: Effective Image Generation with Contextual RQ-Transformer

Doyup Lee, Chiheon Kim|arXiv (Cornell University)|Jun 9, 2022
Generative Adversarial Networks and Image Synthesis被引用 6
一句话总结

本文提出了一种名为 Draft-and-Revise 的新型图像生成框架,采用上下文感知的 RQ-Transformer 以改进自回归图像生成中的全局上下文建模。通过先生成多样化的低质量草稿,再迭代地优化并保持全局结构,该方法在 ImageNet 和 CC-3M 基准测试中实现了最先进(SOTA)的 FID 分数,优于包括使用拒绝采样方法的 3.8B 参数 RQ-Transformer 在内的先前模型。

ABSTRACT

Although autoregressive models have achieved promising results on image generation, their unidirectional generation process prevents the resultant images from fully reflecting global contexts. To address the issue, we propose an effective image generation framework of Draft-and-Revise with Contextual RQ-transformer to consider global contexts during the generation process. As a generalized VQ-VAE, RQ-VAE first represents a high-resolution image as a sequence of discrete code stacks. After code stacks in the sequence are randomly masked, Contextual RQ-Transformer is trained to infill the masked code stacks based on the unmasked contexts of the image. Then, Contextual RQ-Transformer uses our two-phase decoding, Draft-and-Revise, and generates an image, while exploiting the global contexts of the image during the generation process. Specifically. in the draft phase, our model first focuses on generating diverse images despite rather low quality. Then, in the revise phase, the model iteratively improves the quality of images, while preserving the global contexts of generated images. In experiments, our method achieves state-of-the-art results on conditional image generation. We also validate that the Draft-and-Revise decoding can achieve high performance by effectively controlling the quality-diversity trade-off in image generation.

研究动机与目标

  • 解决自回归图像生成模型在顺序生成过程中无法有效利用全局上下文的局限性。
  • 通过在生成过程中显式建模双向上下文,提升图像生成的质量与多样性。
  • 设计一种解码策略,通过两个不同阶段(草稿阶段与修正阶段)实现质量与多样性的平衡:草稿阶段生成多样化但低保真度的图像,修正阶段则迭代提升质量并保持全局结构。
  • 在条件图像生成基准测试(包括 ImageNet 和 CC-3M)中实现最先进性能。

提出的方法

  • 使用残差量化变分自编码器(RQ-VAE)将高分辨率图像表示为离散代码堆栈序列,以实现高效建模。
  • 训练一个具有双向自注意力机制的上下文感知 RQ-Transformer,基于未掩码的全局上下文预测被掩码的代码堆栈,类似于 BERT 的预训练方式。
  • 提出一种双阶段解码策略:Draft-and-Revise,其中草稿阶段生成多样化但保真度较低的图像,修正阶段则通过迭代方式逐步提升质量并保持全局结构。
  • 仅在修正阶段使用温度缩放,并选择性地应用无分类器引导,以控制质量与多样性之间的权衡。
  • 在修正阶段通过并行更新代码堆栈实现迭代优化,同时保持全局一致性。
  • 采用拒绝采样和采样速度评估,与先前模型对比效率与性能表现。

实验结果

研究问题

  • RQ1基于双向 Transformer 的模型是否能通过填补被掩码的代码堆栈,有效建模图像生成中的全局上下文?
  • RQ2与标准自回归生成相比,Draft-and-Revise 解码策略是否能提升图像质量和多样性?
  • RQ3双阶段解码过程是否能有效控制图像生成中的质量-多样性权衡?
  • RQ4与最先进自回归模型(如 RQ-Transformer 和 VQGAN)相比,该方法在 FID 和推理速度方面表现如何?

主要发现

  • 所提方法在 ImageNet 基准测试中实现了最先进(SOTA)的 FID 分数 3.45,优于使用拒绝采样的 3.8B 参数 RQ-Transformer。
  • 当 $ T_{\text{draft}} = 64 $ 时,模型的 FID 达到 3.45,尽管比 RQ-Transformer 慢 2.5 倍,但仍优于其 FID 表现。
  • 仅在修正阶段使用无分类器引导可实现最佳平衡,达到最低 FID(3.45),同时保持高精确率(0.82)和可接受的召回率(0.52)。
  • 当 $ T_{\text{draft}} = 32 $ 时,草稿阶段实现最佳 FID(3.73)与采样速度(0.06 秒/样本),在质量与效率之间取得良好权衡。
  • 消融研究证实,当 $ T_{\text{revise}} $ 超过 2 后,FID 略有下降,原因在于低质量草稿代码堆栈导致的误差传播。
  • 当 $ T_{\text{draft}} = 8 $ 时,模型实现 SOTA FID(5.41),推理速度更快(0.03 秒/样本),优于 VQGAN(15.78 FID,0.16 秒/样本)和 RQ-Transformer(8.71 FID,0.04 秒/样本)。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。