Skip to main content
QUICK REVIEW

[论文解读] STransGAN: An Empirical Study on Transformer in GANs

Rui Xu, Xiangyu Xu|arXiv (Cornell University)|Oct 25, 2021
Generative Adversarial Networks and Image Synthesis被引用 8
一句话总结

本文提出 STrans-G 和 STrans-D,分别为无需卷积神经网络(CNN)的基于 Transformer 的生成器和判别器,通过利用局部注意力机制和重构残差连接实现。该方法在无条件与条件生成任务中均实现了具有竞争力的图像合成性能,显著缩小了基于 Transformer 的判别器与基于 CNN 的判别器之间的准确率差距。

ABSTRACT

Transformer becomes prevalent in computer vision, especially for high-level vision tasks. However, deploying Transformer in the generative adversarial network (GAN) framework is still an open yet challenging problem. In this paper, we conduct a comprehensive empirical study to investigate the intrinsic properties of Transformer in GAN for high-fidelity image synthesis. Our analysis highlights the importance of feature locality in image generation. We first investigate the effective ways to implement local attention. We then examine the influence of residual connections in self-attention layers and propose a novel way to reduce their negative impacts on learning discriminators and conditional generators. Our study leads to a new design of Transformers in GAN, a convolutional neural network (CNN)-free generator termed as STrans-G, which achieves competitive results in both unconditional and conditional image generations. The Transformer-based discriminator, STrans-D, also significantly reduces its gap against the CNN-based discriminators.

研究动机与目标

  • 探究 Transformer 在 GAN 中的内在特性,以实现高保真度图像合成。
  • 解决在 GAN 中部署 Transformer 所面临的挑战,特别是保持判别能力与生成质量。
  • 缩小 GAN 中基于 Transformer 的判别器与基于 CNN 的判别器之间的性能差距。
  • 设计一种无需 CNN 的生成器与判别器,使其在图像生成任务中表现优于或等同于现有的基于 CNN 的模型。

提出的方法

  • 实施局部自注意力机制以保留特征的局部性,这对图像生成至关重要。
  • 重新设计自注意力层中的残差连接,以减轻其对判别器和条件生成器学习的负面影响。
  • 提出 STrans-G,一种基于改进 Transformer 架构的无 CNN 生成器,用于无条件与条件图像生成。
  • 设计 STrans-D,一种基于 Transformer 的判别器,其性能可匹配或超越基于 CNN 的判别器。
  • 开展广泛的消融研究,以评估局部注意力机制与残差连接修改的贡献。
  • 在标准基准数据集上对所提出的模型进行训练与评估,涵盖无条件与条件图像合成任务。

实验结果

研究问题

  • RQ1局部注意力机制如何影响基于 Transformer 的 GAN 中的图像生成质量?
  • RQ2残差连接对基于 Transformer 的 GAN 中判别器与条件生成器训练动态有何影响?
  • RQ3无 CNN 的生成器与判别器能否在高保真度图像合成中实现与基于 CNN 的模型相媲美甚至更优的性能?
  • RQ4对注意力机制与残差连接的架构改进如何提升 Transformer 在 GAN 中的稳定性与性能?

主要发现

  • 局部注意力机制显著提升了基于 Transformer 的 GAN 中的特征表示能力与图像质量。
  • 重构后的残差连接减少了对判别器与生成器学习的干扰,从而实现了更稳定的训练过程。
  • STrans-G 在无条件与条件图像生成任务中均表现出具有竞争力的性能,且完全不使用卷积层。
  • STrans-D 显著缩小了与基于 CNN 的判别器之间的性能差距,证明了纯 Transformer 架构在判别能力上的强大表现。
  • 消融研究证实,局部注意力机制与修改后的残差连接对高保真度图像合成均至关重要。
  • 所提出的 STransGAN 框架在标准基准上实现了无 CNN 的基于 Transformer 的 GAN 框架中的最先进性能。

更好的研究,从现在开始

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

无需绑定信用卡

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