Self-Attention Generative Adversarial Networks
Self-Attention Generative Adversarial Networks
^{1}Department of Computer Science, Rutgers University ^{2}Google Research, Brain Team. Correspondence to: Han Zhang zhanghan@google.com.
Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, PMLR 97, 2019. Copyright 2019 by the author(s).
Abstract
摘要
In this paper, we propose the Self-Attention Generative Adversarial Network (SAGAN) which allows attention-driven, long-range dependency modeling for image generation tasks. Traditional convolutional GANs generate high-resolution details as a function of only spatially local points in lower-resolution feature maps. In SAGAN, details can be generated using cues from all feature locations. Moreover, the discriminator can check that highly detailed features in distant portions of the image are consistent with each other. Furthermore, recent work has shown that generator conditioning affects GAN performance. Leveraging this insight, we apply spectral normalization to the GAN generator and find that this improves training dynamics. The proposed SAGAN performs better than prior work^{1}, boosting the best published Inception score from 36.8 to 52.52 and reducing Fréchet Inception distance from 27.62 to 18.65 on the challenging ImageNet dataset. Visualization of the attention layers shows that the generator leverages neighborhoods that correspond to object shapes rather than local regions of fixed shape.
本文提出自注意力生成对抗网络(Self-Attention Generative Adversarial Network,SAGAN),用于在图像生成任务中做由注意力驱动的远距离依赖建模。传统卷积 GAN 在生成高分辨率细节时,只依赖低分辨率特征图中空间上相邻的局部点。在 SAGAN 里,细节可以从所有特征位置上的线索生成。判别器也可以检查图像中相距较远、细节丰富的特征是否彼此一致。此外,近期工作表明生成器的条件化会影响 GAN 的表现。据此,我们把谱归一化用到 GAN 的生成器上,并发现这会改善训练动态。提出的 SAGAN 优于已有工作^{1}:在具有挑战性的 ImageNet 数据集上,把当时最好的已发表 Inception 分数从 36.8 提高到 52.52,并把 Fréchet Inception 距离从 27.62 降到 18.65。对注意力层的可视化显示,生成器利用的是与物体形状相对应的邻域,而不是固定形状的局部区域。
^{1}Brock et al. (2018), which builds heavily on this work, has since improved those results substantially.
1. Introduction
1. 引言
Image synthesis is an important problem in computer vision. There has been remarkable progress in this direction with the emergence of Generative Adversarial Networks (GANs) (Goodfellow et al., 2014). GANs based on deep convolutional networks (Radford et al., 2016; Karras et al., 2018; Zhang et al.) have been especially successful. However, by carefully examining the generated samples from these models, we can observe that convolutional GANs (Odena et al., 2017; Miyato et al., 2018; Miyato & Koyama, 2018) have much more difficulty in modeling some image classes than others when trained on multi-class datasets (e.g., ImageNet (Russakovsky et al., 2015)). For example, while the state-of-the-art ImageNet GAN model (Miyato & Koyama, 2018) excels at synthesizing image classes with few structural constraints (e.g., ocean, sky and landscape classes, which are distinguished more by texture than by geometry), it fails to capture geometric or structural patterns that occur consistently in some classes (for example, dogs are often drawn with realistic fur texture but without clearly defined separate feet).
图像合成是计算机视觉中的一个重要问题。随着生成对抗网络(Generative Adversarial Network,GAN)(Goodfellow et al., 2014)的出现,这一方向已有显著进展。基于深度卷积网络的 GAN(Radford et al., 2016; Karras et al., 2018; Zhang et al.)尤其成功。不过,仔细查看这些模型生成的样本会发现:在多类数据集(例如 ImageNet(Russakovsky et al., 2015))上训练时,卷积 GAN(Odena et al., 2017; Miyato et al., 2018; Miyato & Koyama, 2018)对某些图像类别的建模难度远高于其他类别。例如,当时最先进的 ImageNet GAN 模型(Miyato & Koyama, 2018)擅长合成结构约束较少的类别(如海洋、天空和风景类,它们更多靠纹理而不是几何来区分),却难以抓住某些类别中反复出现的几何或结构模式(例如,狗常常被画成毛皮纹理逼真,却没有清晰分开的脚)。
One possible explanation for this is that previous models rely heavily on convolution to model the dependencies across different image regions. Since the convolution operator has a local receptive field, long range dependencies can only be processed after passing through several convolutional layers. This could prevent learning about long-term dependencies for a variety of reasons: a small model may not be able to represent them, optimization algorithms may have trouble discovering parameter values that carefully coordinate multiple layers to capture these dependencies, and these parameterizations may be statistically brittle and prone to failure when applied to previously unseen inputs. Increasing the size of the convolution kernels can increase the representational capacity of the network but doing so also loses the computational and statistical efficiency obtained by using local convolutional structure.
一种可能的解释是,此前的模型主要靠卷积来建模不同图像区域之间的依赖。卷积算子的感受野是局部的,远距离依赖只有在经过若干卷积层之后才能被处理。这可能从多个方面妨碍对长程依赖的学习:较小的模型可能表达不了这些依赖;优化算法可能很难找到能仔细协调多层、从而抓住这些依赖的参数;这些参数化在统计上也可能很脆弱,一旦用到此前未见过的输入就容易失效。增大卷积核可以提高网络的表达能力,但同时也会失去局部卷积结构带来的计算效率和统计效率。
Self-attention (Cheng et al., 2016; Parikh et al., 2016; Vaswani et al., 2017), on the other hand, exhibits a better balance between the ability to model long-range dependencies and the computational and statistical efficiency. The self-attention module calculates response at a position as a weighted sum of the features at all positions, where the weights – or attention vectors – are calculated with only a small computational cost.
相比之下,自注意力(Cheng et al., 2016; Parikh et al., 2016; Vaswani et al., 2017)在远距离依赖建模能力与计算、统计效率之间更为平衡。自注意力模块把某一位置的响应计算为所有位置特征的加权和,其中的权重——也就是注意力向量——只需较小的计算代价即可得到。
In this work, we propose Self-Attention Generative Adversarial Networks (SAGANs), which introduce a self-attention mechanism into convolutional GANs. The self-attention module is complementary to convolutions and helps with modeling long range, multi-level dependencies across image regions. Armed with self-attention, the generator can draw images in which fine details at every location are carefully coordinated with fine details in distant portions of the image. Moreover, the discriminator can also more accurately enforce complicated geometric constraints on the global image structure.
在这项工作中,我们提出自注意力生成对抗网络(Self-Attention Generative Adversarial Network,SAGAN),把自注意力机制引入卷积 GAN。自注意力模块是对卷积的补充,有助于建模图像区域之间远程、多层次的依赖。有了自注意力,生成器可以画出这样的图像:每个位置上的细部都与图像远处的细部仔细协调。判别器也能更准确地在全局图像结构上施加复杂的几何约束。
In addition to self-attention, we also incorporate recent insights relating network conditioning to GAN performance. The work by (Odena et al., 2018) showed that well-conditioned generators tend to perform better. We propose enforcing good conditioning of GAN generators using the spectral normalization technique that has previously been applied only to the discriminator (Miyato et al., 2018).
除了自注意力,我们还吸收了近期关于网络条件化与 GAN 表现之间关系的认识。(Odena et al., 2018)的工作表明,条件化良好的生成器往往表现更好。我们提议用谱归一化技术来约束 GAN 生成器的条件化;这项技术此前只被用在判别器上(Miyato et al., 2018)。
We have conducted extensive experiments on the ImageNet dataset to validate the effectiveness of the proposed self-attention mechanism and stabilization techniques. SAGAN significantly outperforms prior work in image synthesis by boosting the best reported Inception score from 36.8 to 52.52 and reducing Fréchet Inception distance from 27.62 to 18.65. Visualization of the attention layers shows that the generator leverages neighborhoods that correspond to object shapes rather than local regions of fixed shape. Our code is available at https://github.com/brain-research/self-attention-gan.
我们在 ImageNet 数据集上做了大量实验,以验证所提出的自注意力机制和稳定化技术的效果。SAGAN 在图像合成上明显优于已有工作:把当时最好的已报告 Inception 分数从 36.8 提高到 52.52,并把 Fréchet Inception 距离从 27.62 降到 18.65。对注意力层的可视化显示,生成器利用的是与物体形状相对应的邻域,而不是固定形状的局部区域。代码发布在 https://github.com/brain-research/self-attention-gan。
Figure 1. The proposed SAGAN generates images by leveraging complementary features in distant portions of the image rather than local regions of fixed shape to generate consistent objects/scenarios. In each row, the first image shows five representative query locations with color coded dots. The other five images are attention maps for those query locations, with corresponding color coded arrows summarizing the most-attended regions.
图 1. 提出的 SAGAN 生成图像时,会利用图像中相距较远的互补特征,而不是固定形状的局部区域,以生成协调一致的物体或场景。每一行中,第一张图用彩色圆点标出五个有代表性的查询位置。其余五张图是这些查询位置对应的注意力图,并用相应颜色的箭头概括最受关注的区域。
2. Related Work
2. 相关工作
Generative Adversarial Networks. GANs have achieved great success in various image generation tasks, including image-to-image translation (Isola et al., 2017; Zhu et al., 2017; Taigman et al., 2017; Liu & Tuzel, 2016; Xue et al., 2018; Park et al., 2019), image super-resolution (Ledig et al., 2017; Snderby et al., 2017) and text-to-image synthesis (Reed et al., 2016b;a; Zhang et al., 2017; Hong et al., 2018). Despite this success, the training of GANs is known to be unstable and sensitive to the choices of hyper-parameters. Several works have attempted to stabilize the GAN training dynamics and improve the sample diversity by designing new network architectures (Radford et al., 2016; Zhang et al., 2017; Karras et al., 2018; 2019), modifying the learning objectives and dynamics (Arjovsky et al., 2017; Salimans et al., 2018; Metz et al., 2017; Che et al., 2017; Zhao et al., 2017; Jolicoeur-Martineau, 2019), adding regularization methods (Gulrajani et al., 2017; Miyato et al., 2018) and introducing heuristic tricks (Salimans et al., 2016; Odena et al., 2017). Recently, Miyato et al. (Miyato et al., 2018) proposed limiting the spectral norm of the weight matrices in the discriminator in order to constrain the Lipschitz constant of the discriminator function. Combined with the projection-based discriminator (Miyato & Koyama, 2018), the spectrally normalized model greatly improves class-conditional image generation on ImageNet.
生成对抗网络。 GAN 已在多种图像生成任务上取得很大成功,包括图像到图像翻译(Isola et al., 2017; Zhu et al., 2017; Taigman et al., 2017; Liu & Tuzel, 2016; Xue et al., 2018; Park et al., 2019)、图像超分辨率(Ledig et al., 2017; Snderby et al., 2017)以及文本到图像合成(Reed et al., 2016b;a; Zhang et al., 2017; Hong et al., 2018)。尽管如此,GAN 的训练仍以不稳定、对超参数选择敏感著称。已有若干工作试图通过设计新的网络结构(Radford et al., 2016; Zhang et al., 2017; Karras et al., 2018; 2019)、修改学习目标和动态(Arjovsky et al., 2017; Salimans et al., 2018; Metz et al., 2017; Che et al., 2017; Zhao et al., 2017; Jolicoeur-Martineau, 2019)、加入正则化方法(Gulrajani et al., 2017; Miyato et al., 2018)以及引入启发式技巧(Salimans et al., 2016; Odena et al., 2017),来稳定 GAN 的训练动态并提高样本多样性。最近,Miyato 等人(Miyato et al., 2018)提出限制判别器中权重矩阵的谱范数,以约束判别器函数的 Lipschitz 常数。再与基于投影的判别器(Miyato & Koyama, 2018)结合后,经过谱归一化的模型在 ImageNet 类条件图像生成上有很大提升。
Attention Models. Recently, attention mechanisms have become an integral part of models that must capture global dependencies (Bahdanau et al., 2014; Xu et al., 2015; Yang et al., 2016; Gregor et al., 2015; Chen et al., 2018). In particular, self-attention (Cheng et al., 2016; Parikh et al., 2016), also called intra-attention, calculates the response at a position in a sequence by attending to all positions within the same sequence. Vaswani et al. (Vaswani et al., 2017) demonstrated that machine translation models could achieve state-of-the-art results by solely using a self-attention model. Parmar et al. (Parmar et al., 2018) proposed an Image Transformer model to add self-attention into an autoregressive model for image generation. Wang et al. (Wang et al., 2018) formalized self-attention as a non-local operation to model the spatial-temporal dependencies in video sequences. In spite of this progress, self-attention has not yet been explored in the context of GANs. (AttnGAN (Xu et al., 2018) uses attention over word embeddings within an input sequence, but not self-attention over internal model states). SAGAN learns to efficiently find global, long-range dependencies within internal representations of images.
注意力模型。 近来,注意力机制已成为必须捕捉全局依赖的模型中的重要组成部分(Bahdanau et al., 2014; Xu et al., 2015; Yang et al., 2016; Gregor et al., 2015; Chen et al., 2018)。具体而言,自注意力(Cheng et al., 2016; Parikh et al., 2016)也称内部注意力(intra-attention),通过关注同一序列中的所有位置来计算序列中某一位置的响应。Vaswani 等人(Vaswani et al., 2017)证明,仅使用自注意力模型,机器翻译也能达到当时最好的结果。Parmar 等人(Parmar et al., 2018)提出 Image Transformer,把自注意力加入用于图像生成的自回归模型。Wang 等人(Wang et al., 2018)把自注意力形式化为一种非局部操作,用来建模视频序列中的时空依赖。尽管有这些进展,自注意力尚未在 GAN 的语境中得到探索。(AttnGAN(Xu et al., 2018)是对输入序列中的词嵌入做注意力,而不是对模型内部状态做自注意力。)SAGAN 学习在图像的内部表示中高效地找出全局、远距离的依赖。
图 2. 用于 SAGAN 的自注意力模块。 表示矩阵乘法。softmax 操作沿每一行进行。
3. Self-Attention Generative Adversarial Networks
3. 自注意力生成对抗网络
Most GAN-based models (Radford et al., 2016; Salimans et al., 2016; Karras et al., 2018) for image generation are built using convolutional layers. Convolution processes the information in a local neighborhood, thus using convolutional layers alone is computationally inefficient for modeling long-range dependencies in images. In this section, we adapt the non-local model of (Wang et al., 2018) to introduce self-attention to the GAN framework, enabling both the generator and the discriminator to efficiently model relationships between widely separated spatial regions. We call the proposed method Self-Attention Generative Adversarial Networks (SAGAN) because of its self-attention module (see Figure 2).
大多数用于图像生成的基于 GAN 的模型(Radford et al., 2016; Salimans et al., 2016; Karras et al., 2018)都由卷积层构成。卷积处理的是局部邻域中的信息,因此仅使用卷积层来建模图像中的远距离依赖,在计算上是低效的。在本节中,我们改造(Wang et al., 2018)的非局部模型,把自注意力引入 GAN 框架,使生成器和判别器都能高效地建模相距很远的空间区域之间的关系。由于其中的自注意力模块,我们把提出的方法称为自注意力生成对抗网络(SAGAN)(见图 2)。
The image features from the previous hidden layer are first transformed into two feature spaces , to calculate the attention, where ,
来自上一隐藏层的图像特征 先被变换到两个特征空间 、,以便计算注意力,其中 ,
and indicates the extent to which the model attends to the location when synthesizing the region. Here, is the number of channels and is the number of feature locations of features from the previous hidden layer. The output of the attention layer is , where,
其中 表示模型在合成第 个区域时对第 个位置的关注程度。这里, 是通道数, 是上一隐藏层特征的特征位置数。注意力层的输出是 ,其中
In the above formulation, , , , and are the learned weight matrices, which are implemented as convolutions. We did not notice any significant performance decrease when reducing the channel number of to be , where after few training epochs on ImageNet. For memory efficiency, we choose (i.e., ) in all our experiments.
在上述公式中,、、 以及 是要学习的权重矩阵,实现为 卷积。在 ImageNet 上训练若干轮之后,我们没有观察到把 的通道数降到 (其中 )会带来明显的性能下降。为了节省显存,全部实验都取 (即 )。
In addition, we further multiply the output of the attention layer by a scale parameter and add back the input feature map. Therefore, the final output is given by,
此外,我们还把注意力层的输出乘以一个尺度参数,再加回输入特征图。因此,最终输出为
where is a learnable scalar and it is initialized as 0. Introducing the learnable allows the network to first rely on the cues in the local neighborhood – since this is easier – and then gradually learn to assign more weight to the non-local evidence. The intuition for why we do this is straightforward: we want to learn the easy task first and then progressively increase the complexity of the task. In the SAGAN, the proposed attention module has been applied to both the generator and the discriminator, which are trained in an alternating fashion by minimizing the hinge version of the adversarial loss (Lim & Ye, 2017; Tran et al., 2017; Miyato et al., 2018),
其中 是一个可学习的标量,初始化为 0。引入可学习的 ,使网络可以先依赖局部邻域中的线索——因为这更容易——再逐渐把更大的权重分给非局部证据。这样做的直观理由很直接:我们希望先学容易的任务,再逐步提高任务的复杂度。在 SAGAN 中,提出的注意力模块被同时用到生成器和判别器上,二者交替训练,最小化对抗损失的铰链形式(Lim & Ye, 2017; Tran et al., 2017; Miyato et al., 2018),
$$\begin{aligned}
L_{D} &= -\mathbb{E}{(x,y)\sim p{data}}[\min(0,-1+D(x,y))] \
&\quad -\mathbb{E}{z\sim p{z},, y\sim p_{data}}[\min(0,-1-D(G(z),y))], \
L_{G} &= -\mathbb{E}{z\sim p{z},, y\sim p_{data}} D(G(z),y),
\end{aligned} \eqno{(4)}$$
4. Techniques to Stabilize the Training of GANs
4. 稳定 GAN 训练的技术
We also investigate two techniques to stabilize the training of GANs on challenging datasets. First, we use spectral normalization (Miyato et al., 2018) in the generator as well as in the discriminator. Second, we confirm that the two-timescale update rule (TTUR) (Heusel et al., 2017) is effective, and we advocate using it specifically to address slow learning in regularized discriminators.
我们还考察了两项技术,用于在具有挑战性的数据集上稳定 GAN 的训练。第一,我们把谱归一化(Miyato et al., 2018)同时用在生成器和判别器上。第二,我们确认双时间尺度更新规则(two-timescale update rule,TTUR)(Heusel et al., 2017)是有效的,并主张专门用它来应对正则化判别器学习偏慢的问题。
4.1. Spectral normalization for both generator and discriminator
4.1. 生成器与判别器都使用谱归一化
Miyato et al. (Miyato et al., 2018) originally proposed stabilizing the training of GANs by applying spectral normalization to the discriminator network. Doing so constrains the Lipschitz constant of the discriminator by restricting the spectral norm of each layer. Compared to other normalization techniques, spectral normalization does not require extra hyper-parameter tuning (setting the spectral norm of all weight layers to 1 consistently performs well in practice). Moreover, the computational cost is also relatively small.
Miyato 等人(Miyato et al., 2018)最初提出,通过对判别器网络做谱归一化来稳定 GAN 的训练。这样做通过限制每一层的谱范数,来约束判别器的 Lipschitz 常数。与其他归一化技术相比,谱归一化不需要额外的超参数调节(在实践中,把所有权重层的谱范数设为 1 一直表现良好)。此外,计算代价也相对较小。
We argue that the generator can also benefit from spectral normalization, based on recent evidence that the conditioning of the generator is an important causal factor in GANs’ performance (Odena et al., 2018). Spectral normalization in the generator can prevent the escalation of parameter magnitudes and avoid unusual gradients. We find empirically that spectral normalization of both generator and discriminator makes it possible to use fewer discriminator updates per generator update, thus significantly reducing the computational cost of training. The approach also shows more stable training behavior.
我们主张生成器也能从谱归一化中受益,依据是近期的证据:生成器的条件化是影响 GAN 表现的一个重要因果因素(Odena et al., 2018)。在生成器中做谱归一化,可以防止参数幅度膨胀,并避免异常梯度。我们从经验上发现,对生成器和判别器都做谱归一化后,每次生成器更新只需配上更少的判别器更新,从而显著降低训练的计算代价。这种方法的训练行为也更稳定。
4.2. Imbalanced learning rate for generator and discriminator updates
4.2. 生成器与判别器更新使用不平衡的学习率
In previous work, regularization of the discriminator (Miyato et al., 2018; Gulrajani et al., 2017) often slows down the GANs’ learning process. In practice, methods using regularized discriminators typically require multiple (e.g., 5) discriminator update steps per generator update step during training. Independently, Heusel et al. (Heusel et al., 2017) have advocated using separate learning rates (TTUR) for the generator and the discriminator. We propose using TTUR specifically to compensate for the problem of slow learning in a regularized discriminator, making it possible to use fewer discriminator steps per generator step. Using this approach, we are able to produce better results given the same wall-clock time.
在以往工作中,对判别器做正则化(Miyato et al., 2018; Gulrajani et al., 2017)常常会放慢 GAN 的学习过程。实践中,使用正则化判别器的方法在训练时,通常每一步生成器更新都要配上多次(例如 5 次)判别器更新。与此独立地,Heusel 等人(Heusel et al., 2017)主张给生成器和判别器使用不同的学习率(TTUR)。我们提议专门用 TTUR 来补偿正则化判别器学得偏慢的问题,从而可以在每步生成器更新时使用更少的判别器步数。采用这种方法,我们能够在相同的墙上时钟时间内得到更好的结果。
5. Experiments
5. 实验
To evaluate the proposed methods, we conducted extensive experiments on the LSVRC2012 (ImageNet) dataset (Russakovsky et al., 2015). First, in Section 5.1, we present experiments designed to evaluate the effectiveness of the two proposed techniques for stabilizing GANs’ training. Next, the proposed self-attention mechanism is investigated in Section 5.2. Finally, our SAGAN is compared with state-of-the-art methods (Odena et al., 2017; Miyato & Koyama, 2018) on the image generation task in Section 5.3.
为了评估提出的方法,我们在 LSVRC2012(ImageNet)数据集(Russakovsky et al., 2015)上做了大量实验。首先,在第 5.1 节,我们给出用于评估两项稳定 GAN 训练的技术效果的实验。接着,第 5.2 节考察提出的自注意力机制。最后,第 5.3 节把我们的 SAGAN 与当时最先进的方法(Odena et al., 2017; Miyato & Koyama, 2018)在图像生成任务上进行比较。
Evaluation metrics. We choose the Inception score (IS) (Salimans et al., 2016) and the Fréchet Inception distance (FID) (Heusel et al., 2017) for quantitative evaluation. The Inception score (Salimans et al., 2016) computes the KL divergence between the conditional class distribution and the marginal class distribution. Higher Inception score indicates better image quality. We include the Inception score because it is widely used and thus makes it possible to compare our results to previous work. However, it is important to understand that Inception score has serious limitations—it is intended primarily to ensure that the model generates samples that can be confidently recognized as belonging to a specific class, and that the model generates samples from many classes, not necessarily to assess realism of details or intra-class diversity. FID is a more principled and comprehensive metric, and has been shown to be more consistent with human evaluation in assessing the realism and variation of the generated samples (Heusel et al., 2017). FID calculates the Wasserstein-2 distance between the generated images and the real images in the feature space of an Inception-v3 network. Besides the FID calculated over the whole data distribution (i.e., all 1000 classes of images in ImageNet), we also compute FID between the generated images and dataset images within each class (called intra FID (Miyato & Koyama, 2018)). Lower FID and intra FID values mean closer distances between synthetic and real data distributions. In all our experiments, 50k samples are randomly generated for each model to compute the Inception score, FID and intra FID.
评价指标。 我们选用 Inception 分数(IS)(Salimans et al., 2016)和 Fréchet Inception 距离(FID)(Heusel et al., 2017)做定量评价。Inception 分数(Salimans et al., 2016)计算的是条件类别分布与边缘类别分布之间的 KL 散度。Inception 分数越高,表示图像质量越好。我们纳入 Inception 分数,是因为它使用广泛,从而可以与已有工作比较。不过需要清楚,Inception 分数有严重局限——它的主要目的是确保模型生成的样本能够被有把握地识别为属于某一类,并且模型会从许多类别中生成样本,并不一定是在评估细节的真实感或类内多样性。FID 是一项更有原则、也更全面的指标,在评估生成样本的真实感和变化程度时,已被证明与人类评价更为一致(Heusel et al., 2017)。FID 计算的是生成图像与真实图像在 Inception-v3 网络特征空间中的 Wasserstein-2 距离。除了在整个数据分布上计算的 FID(即 ImageNet 全部 1000 类图像),我们还计算每一类中生成图像与数据集图像之间的 FID(称为类内 FID,intra FID(Miyato & Koyama, 2018))。FID 和类内 FID 越低,表示合成数据分布与真实数据分布越接近。在全部实验中,每个模型都随机生成 5 万个样本,用来计算 Inception 分数、FID 和类内 FID。
Network structures and implementation details. All the SAGAN models we train are designed to generate images. By default, spectral normalization (Miyato et al., 2018) is used for the layers in both the generator and the discriminator. Similar to (Miyato & Koyama, 2018), SAGAN uses conditional batch normalization in the generator and projection in the discriminator. For all models, we use the Adam optimizer (Kingma & Ba, 2015) with and for training. By default, the learning rate for the discriminator is 0.0004 and the learning rate for the generator is 0.0001.
网络结构与实现细节。 我们训练的全部 SAGAN 模型都设计用于生成 的图像。默认情况下,生成器和判别器中的层都使用谱归一化(Miyato et al., 2018)。与(Miyato & Koyama, 2018)类似,SAGAN 在生成器中使用条件批归一化,在判别器中使用投影。对所有模型,我们都用 Adam 优化器(Kingma & Ba, 2015)训练,其中 ,。默认情况下,判别器的学习率为 0.0004,生成器的学习率为 0.0001。
5.1. Evaluating the proposed stabilization techniques
5.1. 评估提出的稳定化技术
In this section, experiments are conducted to evaluate the effectiveness of the proposed stabilization techniques, i.e., applying spectral normalization (SN) to the generator and utilizing imbalanced learning rates (TTUR). In Figure 3, our models “SN on G/D” and “SN on G/D+TTUR” are compared with a baseline model, which is implemented based on the state-of-the-art image generation method (Miyato et al., 2018). In this baseline model, SN is only utilized in the discriminator. When we train it with 1:1 balanced updates for the discriminator (D) and the generator (G), the training becomes very unstable, as shown in the leftmost sub-figures of Figure 3. It exhibits mode collapse very early in training. For example, the top-left sub-figure of Figure 4 illustrates some images randomly generated by the baseline model at the 10k-th iteration. Although in the the original paper (Miyato et al., 2018) this unstable training behavior is greatly mitigated by using 5:1 imbalanced updates for and , the ability to be stably trained with 1:1 balanced updates is desirable for improving the convergence speed of the model. Thus, using our proposed techniques means that the model can produce better results given the same wall-clock time. Given this, there is no need to search for a suitable update ratio for the generator and discriminator.
在本节中,我们通过实验评估提出的稳定化技术的效果,即把谱归一化(SN)用到生成器上,以及使用不平衡的学习率(TTUR)。在图 3 中,我们的模型“SN on G/D”和“SN on G/D+TTUR”与一个基线模型进行比较,该基线基于当时最先进的图像生成方法(Miyato et al., 2018)实现。在这个基线模型中,SN 只用在判别器上。当我们按 1:1 的均衡更新来训练判别器()和生成器()时,训练会变得非常不稳定,如图 3 最左侧的子图所示。它在训练很早就会出现模式崩塌。例如,图 4 左上角的子图展示了基线模型在第 1 万次迭代时随机生成的一些图像。尽管在原论文(Miyato et al., 2018)中,这种不稳定的训练行为通过给 和 使用 5:1 的不平衡更新而得到很大缓解,但能够在 1:1 均衡更新下稳定训练,对于提高模型的收敛速度是有益的。因此,使用我们提出的技术,意味着模型可以在相同的墙上时钟时间内得到更好的结果。这样一来,也就不必再为生成器和判别器搜索合适的更新比。
图 3. 基线模型与采用提出的稳定化技术的模型的训练曲线,包括“SN on G/D”以及双时间尺度学习率(TTUR)。所有模型都按 1:1 的均衡更新训练 和 。
As shown in the middle sub-figures of Figure 3, adding SN to both the generator and the discriminator greatly stabilized our model “SN on G/D”, even when it was trained with 1:1 balanced updates. However, the quality of samples does not improve monotonically during training. For example, the image quality as measured by FID and IS is starting to drop at the 260k-th iteration. Example images randomly generated by this model at different iterations can be found in Figure 4. When we also apply the imbalanced learning rates to train the discriminator and the generator, the quality of images generated by our model “SN on G/D+TTUR” improves monotonically during the whole training process. As shown in Figure 3 and Figure 4, we do not observe any significant decrease in sample quality or in the FID or the Inception score during one million training iterations. Thus, both quantitative results and qualitative results demonstrate the effectiveness of the proposed stabilization techniques for GANs’ training. They also demonstrate that the effect of the two techniques is at least partly additive. In the rest of experiments, all models use spectral normalization for both the generator and discriminator and use the imbalanced learning rates to train the generator and the discriminator with 1:1 updates.
如图 3 中间的子图所示,把 SN 同时加到生成器和判别器上,极大地稳定了我们的模型“SN on G/D”,即便它是按 1:1 均衡更新训练的。不过,样本质量在训练过程中并不是单调提高。例如,以 FID 和 IS 衡量的图像质量在第 26 万次迭代时开始下降。该模型在不同迭代次数下随机生成的示例图像见图 4。当我们再用不平衡的学习率来训练判别器和生成器时,模型“SN on G/D+TTUR”生成的图像质量在整个训练过程中单调提高。如图 3 和图 4 所示,在一百万次训练迭代中,我们没有观察到样本质量、FID 或 Inception 分数有明显下降。因此,定量结果和定性结果都表明,提出的稳定化技术对 GAN 训练是有效的。它们还表明,这两项技术的效果至少有一部分是可叠加的。在其余实验中,全部模型都对生成器和判别器使用谱归一化,并用不平衡的学习率按 1:1 更新来训练生成器和判别器。
5.2. Self-attention mechanism.
5.2. 自注意力机制
To explore the effect of the proposed self-attention mechanism, we build several SAGAN models by adding the self-attention mechanism to different stages of the generator and the discriminator. As shown in Table 1, the SAGAN models with the self-attention mechanism at the middle-to-high level feature maps (e.g., and ) achieve better performance than the models with the self-attention mechanism at the low level feature maps (e.g., and ). For example, the FID of the model “SAGAN, ” is improved from 22.98 to 18.28 by “SAGAN, ”. The reason is that self-attention receives more evidence and enjoys more freedom to choose conditions with larger feature maps (i.e., it is complementary to convolution for large feature maps), however, it plays a similar role as the local convolution when modeling dependencies for small (e.g., ) feature maps. It demonstrates that the attention mechanism gives more power to both the generator and the discriminator to directly model the long-range dependencies in the feature maps. In addition, the comparison of our SAGAN and the baseline model without attention (2nd column of Table 1) further shows the effectiveness of the proposed self-attention mechanism.
为了考察提出的自注意力机制的作用,我们把自注意力加到生成器和判别器的不同阶段,构建了若干 SAGAN 模型。如表 1 所示,把自注意力机制放在中高层次特征图上的 SAGAN 模型(例如 和 )比放在低层次特征图上的模型(例如 和 )表现更好。例如,模型“SAGAN, ”的 FID 是 22.98,而“SAGAN, ”把它改进到 18.28。原因在于,特征图较大时,自注意力能获得更多证据,也有更大的自由去选择条件(也就是说,它对大特征图上的卷积是一种补充);而在对较小的(例如 )特征图建模依赖时,它扮演的角色与局部卷积相似。这说明,注意力机制使生成器和判别器都更有能力直接建模特征图中的远距离依赖。此外,把我们的 SAGAN 与没有注意力的基线模型(表 1 第 2 列)相比较,也进一步表明了提出的自注意力机制的效果。
图 4. 基线模型以及我们的模型“SN on G/D”和“SN on G/D+TTUR”随机生成的 示例。
| Model | no attention | SAGAN | SAGAN | SAGAN | SAGAN | Residual | Residual | Residual | Residual |
|---|---|---|---|---|---|---|---|---|---|
| FID | 22.96 | 22.98 | 22.14 | 18.28 | 18.65 | 42.13 | 22.40 | 27.33 | 28.82 |
| IS | 42.87 | 43.15 | 45.94 | 51.43 | 52.52 | 23.17 | 44.49 | 38.50 | 38.96 |
Table 1. Comparison of Self-Attention and Residual block on GANs. These blocks are added into different layers of the network. All models have been trained for one million iterations, and the best Inception scores (IS) and Fréchet Inception distance (FID) are reported. means adding self-attention to the feature maps.
| Model | no attention | SAGAN | SAGAN | SAGAN | SAGAN | Residual | Residual | Residual | Residual |
|---|---|---|---|---|---|---|---|---|---|
| FID | 22.96 | 22.98 | 22.14 | 18.28 | 18.65 | 42.13 | 22.40 | 27.33 | 28.82 |
| IS | 42.87 | 43.15 | 45.94 | 51.43 | 52.52 | 23.17 | 44.49 | 38.50 | 38.96 |
表 1. 自注意力块与残差块在 GAN 上的比较。这些块被加入网络的不同层。所有模型都训练一百万次迭代,报告最好的 Inception 分数(IS)和 Fréchet Inception 距离(FID)。 表示把自注意力加到 的特征图上。
Compared with residual blocks with the same number of parameters, the self-attention blocks also achieve better results. For example, the training is not stable when we replace the self-attention block with the residual block in feature maps, which leads to a significant decrease in performance (e.g., FID increases from 22.98 to 42.13). Even for the cases when the training goes smoothly, replacing the self-attention block with the residual block still leads to worse results in terms of FID and Inception score. (e.g., FID 18.28 vs 27.33 in feature map ). This comparison demonstrates that the performance improvement given by using SAGAN is not simply due to an increase in model depth and capacity.
与参数量相同的残差块相比,自注意力块也得到了更好的结果。例如,当我们在 特征图上用残差块替换自注意力块时,训练并不稳定,性能明显下降(例如,FID 从 22.98 升到 42.13)。即便在训练较为平稳的情形下,用残差块替换自注意力块,在 FID 和 Inception 分数上仍然更差(例如,在 特征图上,FID 为 18.28 对 27.33)。这一比较表明,使用 SAGAN 带来的性能提升,并不只是因为模型深度和容量增加。
To better understand what has been learned during the generation process, we visualize the attention weights of the generator in SAGAN for different images. Some sample images with attention are shown in Figure 5 and Figure 1.
为了更好地理解生成过程中学到了什么,我们可视化了 SAGAN 生成器在不同图像上的注意力权重。一些带注意力的样本图像见图 5 和图 1。
We observe that the network learns to allocate attention according to similarity of color and texture, rather than just spatial adjacency. For example, in the top-left cell of Figure 1, the red point attends mostly to the body of the bird around it, however, the green point learns to attend to other side of the image. In this way, the image has a consistent background (i.e., trees from the left to the right though they are separated by the bird). Similarly, the blue point allocates the attention to the whole tail of the bird to make the generated part coherent. Those long-range dependencies could not be captured by convolutions with local receptive fields. We also find that although some query points are quite close in spatial location, their attention maps can be very different, as shown in the bottom-left cell. The red point attends mostly to the background regions, whereas the blue point, though adjacent to red point, puts most of the attention on the foreground object. This also reduces the chance for the local errors to propagate, since the adjacent position has the freedom to choose to attend to other distant locations. These observations further demonstrate that self-attention is complementary to convolutions for image generation in GANs. As shown in the top-right cell, SAGAN is able to draw dogs with clearly separated legs. The blue query point shows that attention helps to get the structure of the joint area correct.
我们观察到,网络学会按照颜色和纹理的相似性来分配注意力,而不仅仅依据空间相邻性。例如,在图 1 左上角的单元格中,红点主要关注它周围的鸟身,绿点却学会去关注图像的另一侧。这样,图像就有了连贯的背景(也就是说,尽管被鸟隔开,从左到右的树木仍然一致)。类似地,蓝点把注意力分配到鸟的整条尾巴上,使生成的这一部分保持协调。这些远距离依赖是局部感受野的卷积无法抓住的。我们还发现,有些查询点在空间位置上相当接近,它们的注意力图却可以差别很大,如左下角单元格所示。红点主要关注背景区域,而与红点相邻的蓝点把大部分注意力放在前景物体上。这也降低了局部误差传播的机会,因为相邻位置可以自由选择去关注其他远处的位置。这些观察进一步表明,对于 GAN 中的图像生成,自注意力是对卷积的补充。如右上角单元格所示,SAGAN 能够画出腿部分开清晰的狗。蓝色查询点表明,注意力有助于把关节区域的结构画对。
Figure 5. Visualization of attention maps. These images were generated by SAGAN. We visualize the attention maps of the last generator layer that used attention, since this layer is the closest to the output pixels and is the most straightforward to project into pixel space and interpret. In each cell, the first image shows three representative query locations with color coded dots. The other three images are attention maps for those query locations, with corresponding color coded arrows summarizing the most-attended regions. We observe that the network learns to allocate attention according to similarity of color and texture, rather than just spatial adjacency (see the top-left cell). We also find that although some query points are quite close in spatial location, their attention maps can be very different, as shown in the bottom-left cell. As shown in the top-right cell, SAGAN is able to draw dogs with clearly separated legs. The blue query point shows that attention helps to get the structure of the joint area correct. See the text for more discussion about the properties of learned attention maps.
图 5. 注意力图的可视化。这些图像由 SAGAN 生成。我们可视化的是生成器中最后一个使用了注意力的层的注意力图,因为这一层最接近输出像素,也最便于投影到像素空间并加以解释。在每个单元格中,第一张图用彩色圆点标出三个有代表性的查询位置。其余三张图是这些查询位置对应的注意力图,并用相应颜色的箭头概括最受关注的区域。我们观察到,网络学会按照颜色和纹理的相似性来分配注意力,而不仅仅依据空间相邻性(见左上角单元格)。我们还发现,有些查询点在空间位置上相当接近,它们的注意力图却可以差别很大,如左下角单元格所示。如右上角单元格所示,SAGAN 能够画出腿部分开清晰的狗。蓝色查询点表明,注意力有助于把关节区域的结构画对。关于学到的注意力图的性质,更多讨论见正文。
5.3. Comparison with the state-of-the-art
5.3. 与当时最先进方法的比较
Our SAGAN is also compared with the state-of-the-art GAN models (Odena et al., 2017; Miyato & Koyama, 2018) for class conditional image generation on ImageNet. As shown in Table 2, our proposed SAGAN achieves the best Inception score, intra FID and FID. The proposed SAGAN significantly improves the best published Inception score from 36.8 to 52.52. The lower FID (18.65) and intra FID (83.7) achieved by the SAGAN also indicates that the SAGAN can better approximate the original image distribution by using the self-attention module to model the long-range dependencies between image regions.
我们的 SAGAN 还与当时最先进的 GAN 模型(Odena et al., 2017; Miyato & Koyama, 2018)在 ImageNet 类条件图像生成上做了比较。如表 2 所示,提出的 SAGAN 在 Inception 分数、类内 FID 和 FID 上都取得了最好结果。提出的 SAGAN 把当时最好的已发表 Inception 分数从 36.8 显著提高到 52.52。SAGAN 达到的更低 FID(18.65)和类内 FID(83.7)也表明,通过用自注意力模块建模图像区域之间的远距离依赖,SAGAN 能够更好地逼近原始图像分布。
Figure 6 shows some comparison results and generated-images for representative classes of ImageNet. We observe that our SAGAN achieves much better performance (i.e., lower intra FID) than the state-of-the-art GAN model (Miyato & Koyama, 2018) for synthesizing image classes with complex geometric or structural patterns, such as goldfish and Saint Bernard. For classes with few structural constraints (e.g., valley, stone wall and coral fungus, which are distinguished more by texture than by geometry), our SAGAN shows less superiority compared with the baseline model (Miyato & Koyama, 2018). Again, the reason is that the self-attention in SAGAN is complementary to the convolution for capturing long-range, global-level dependencies occurring consistently in geometric or structural patterns, but plays a similar role as the local convolution when modeling dependencies for simple texture.
图 6 给出了 ImageNet 中若干有代表性类别的比较结果和生成图像。我们观察到,对于金鱼和圣伯纳犬这类具有复杂几何或结构模式的图像类别,我们的 SAGAN 比当时最先进的 GAN 模型(Miyato & Koyama, 2018)表现好得多(即类内 FID 更低)。对于结构约束较少的类别(例如山谷、石墙和珊瑚菌,它们更多靠纹理而不是几何来区分),我们的 SAGAN 相对基线模型(Miyato & Koyama, 2018)的优势较小。原因同样在于:SAGAN 中的自注意力对卷积是一种补充,有助于抓住几何或结构模式中反复出现的远程、全局层依赖;而在对简单纹理建模依赖时,它扮演的角色与局部卷积相似。
| Model | Inception Score | Intra FID | FID |
|---|---|---|---|
| AC-GAN (Odena et al., 2017) | 28.5 | 260.0 | / |
| SNGAN-projection (Miyato & Koyama, 2018) | 36.8 | 92.4 | 27.62 |
| SAGAN | 52.52 | 83.7 | 18.65 |
Table 2. Comparison of the proposed SAGAN with state-of-the-art GAN models (Odena et al., 2017; Miyato & Koyama, 2018) for class conditional image generation on ImageNet. FID of SNGAN-projection is calculated from officially released weights.
| Model | Inception Score | Intra FID | FID |
|---|---|---|---|
| AC-GAN (Odena et al., 2017) | 28.5 | 260.0 | / |
| SNGAN-projection (Miyato & Koyama, 2018) | 36.8 | 92.4 | 27.62 |
| SAGAN | 52.52 | 83.7 | 18.65 |
表 2. 提出的 SAGAN 与当时最先进的 GAN 模型(Odena et al., 2017; Miyato & Koyama, 2018)在 ImageNet 类条件图像生成上的比较。SNGAN-projection 的 FID 由官方发布的权重计算得到。
图 6. SAGAN 为不同类别生成的 128x128 示例图像。每一行展示一个类别的例子。最左列列出我们的 SAGAN(左)与当时最先进方法(Miyato & Koyama, 2018))(右)的类内 FID。
6. Conclusion
6. 结论
In this paper, we proposed Self-Attention Generative Adversarial Networks (SAGANs), which incorporate a self-attention mechanism into the GAN framework. The self-attention module is effective in modeling long-range dependencies. In addition, we show that spectral normalization applied to the generator stabilizes GAN training and that TTUR speeds up training of regularized discriminators. SAGAN achieves the state-of-the-art performance on class-conditional image generation on ImageNet.
本文提出了自注意力生成对抗网络(SAGAN),把自注意力机制纳入 GAN 框架。自注意力模块能够有效建模远距离依赖。此外,我们表明,把谱归一化用到生成器上可以稳定 GAN 的训练,而 TTUR 能够加快正则化判别器的训练。SAGAN 在 ImageNet 类条件图像生成上达到了当时最好的性能。
Acknowledgments
致谢
We thank Surya Bhupatiraju for feedback on drafts of this article. We also thank David Berthelot and Tom B. Brown for help with implementation details. Finally, we thank Jakob Uszkoreit, Tao Xu, and Ashish Vaswani for helpful discussions.
感谢 Surya Bhupatiraju 对本文草稿的反馈。也感谢 David Berthelot 和 Tom B. Brown 在实现细节上的帮助。最后,感谢 Jakob Uszkoreit、Tao Xu 和 Ashish Vaswani 的有益讨论。
References
参考文献
Arjovsky, M., Chintala, S., and Bottou, L. Wasserstein GAN. arXiv:1701.07875, 2017.
Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. arXiv:1409.0473, 2014.
Brock, A., Donahue, J., and Simonyan, K. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018.
Che, T., Li, Y., Jacob, A. P., Bengio, Y., and Li, W. Mode regularized generative adversarial networks. In ICLR, 2017.
Chen, X., Mishra, N., Rohaninejad, M., and Abbeel, P. Pixelsnail: An improved autoregressive generative model. In ICML, 2018.
Cheng, J., Dong, L., and Lapata, M. Long short-term memory-networks for machine reading. In EMNLP, 2016.
Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A. C., and Bengio, Y. Generative adversarial nets. In NIPS, 2014.
Gregor, K., Danihelka, I., Graves, A., Rezende, D. J., and Wierstra, D. DRAW: A recurrent neural network for image generation. In ICML, 2015.
Gulrajani, I., Ahmed, F., Arjovsky, M., Dumoulin, V., and Courville, A. C. Improved training of wasserstein GANs. In NIPS, 2017.
Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and Hochreiter, S. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In NIPS, pp. 6629–6640, 2017.
Hong, S., Yang, D., Choi, J., and Lee, H. Inferring semantic layout for hierarchical text-to-image synthesis. In CVPR, 2018.
Isola, P., Zhu, J.-Y., Zhou, T., and Efros, A. A. Image-to-image translation with conditional adversarial networks. In CVPR, 2017.
Jolicoeur-Martineau, A. The relativistic discriminator: a key element missing from standard GAN. In ICLR, 2019.
Karras, T., Aila, T., Laine, S., and Lehtinen, J. Progressive growing of GANs for improved quality, stability, and variation. In ICLR, 2018.
Karras, T., Laine, S., and Aila, T. A style-based generator architecture for generative adversarial networks. In CVPR, 2019.
Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. In ICLR, 2015.
Ledig, C., Theis, L., Huszar, F., Caballero, J., Aitken, A., Tejani, A., Totz, J., Wang, Z., and Shi, W. Photo-realistic single image super-resolution using a generative adversarial network. In CVPR, 2017.
Lim, J. H. and Ye, J. C. Geometric GAN. arXiv:1705.02894, 2017.
Liu, M. and Tuzel, O. Coupled generative adversarial networks. In NIPS, 2016.
Metz, L., Poole, B., Pfau, D., and Sohl-Dickstein, J. Unrolled generative adversarial networks. In ICLR, 2017.
Miyato, T. and Koyama, M. cGANs with projection discriminator. In ICLR, 2018.
Miyato, T., Kataoka, T., Koyama, M., and Yoshida, Y. Spectral normalization for generative adversarial networks. In ICLR, 2018.
Odena, A., Olah, C., and Shlens, J. Conditional image synthesis with auxiliary classifier GANs. In ICML, 2017.
Odena, A., Buckman, J., Olsson, C., Brown, T. B., Olah, C., Raffel, C., and Goodfellow, I. Is generator conditioning causally related to GAN performance? In ICML, 2018.
Parikh, A. P., Täckström, O., Das, D., and Uszkoreit, J. A decomposable attention model for natural language inference. In EMNLP, 2016.
Park, T., Liu, M., Wang, T., and Zhu, J. Semantic image synthesis with spatially-adaptive normalization. In CVPR, 2019.
Parmar, N., Vaswani, A., Uszkoreit, J., ukasz Kaiser, Shazeer, N., and Ku, A. Image transformer. arXiv:1802.05751, 2018.
Radford, A., Metz, L., and Chintala, S. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
Reed, S., Akata, Z., Mohan, S., Tenka, S., Schiele, B., and Lee, H. Learning what and where to draw. In NIPS, 2016a.
Reed, S., Akata, Z., Yan, X., Logeswaran, L., Schiele, B., and Lee, H. Generative adversarial text-to-image synthesis. In ICML, 2016b.
Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A. C., and Fei-Fei, L. ImageNet large scale visual recognition challenge. IJCV, 2015.
Salimans, T., Goodfellow, I. J., Zaremba, W., Cheung, V., Radford, A., and Chen, X. Improved techniques for training GANs. In NIPS, 2016.
Salimans, T., Zhang, H., Radford, A., and Metaxas, D. N. Improving GANs using optimal transport. In ICLR, 2018.
Snderby, C. K., Caballero, J., Theis, L., Shi, W., and Huszar, F. Amortised map inference for image super-resolution. In ICLR, 2017.
Taigman, Y., Polyak, A., and Wolf, L. Unsupervised cross-domain image generation. In ICLR, 2017.
Tran, D., Ranganath, R., and Blei, D. M. Deep and hierarchical implicit models. arXiv:1702.08896, 2017.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. arXiv:1706.03762, 2017.
Wang, X., Girshick, R., Gupta, A., and He, K. Non-local neural networks. In CVPR, 2018.
Xu, K., Ba, J., Kiros, R., Cho, K., Courville, A. C., Salakhutdinov, R., Zemel, R. S., and Bengio, Y. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015.
Xu, T., Zhang, P., Huang, Q., Zhang, H., Gan, Z., Huang, X., and He, X. AttnGAN: Fine-grained text to image generation with attentional generative adversarial networks. In CVPR, 2018.
Xue, Y., Xu, T., Zhang, H., Long, L. R., and Huang, X. SegAN: Adversarial network with multi-scale L1 loss for medical image segmentation. Neuroinformatics, pp. 1–10, 2018.
Yang, Z., He, X., Gao, J., Deng, L., and Smola, A. J. Stacked attention networks for image question answering. In CVPR, 2016.
Zhang, H., Xu, T., Li, H., Zhang, S., Wang, X., Huang, X., and Metaxas, D. N. StackGAN++: Realistic image synthesis with stacked generative adversarial networks. TPAMI.
Zhang, H., Xu, T., Li, H., Zhang, S., Wang, X., Huang, X., and Metaxas, D. StackGAN: Text to photo-realistic image synthesis with stacked generative adversarial networks. In ICCV, 2017.
Zhao, J., Mathieu, M., and LeCun, Y. Energy-based generative adversarial network. In ICLR, 2017.
Zhu, J.-Y., Park, T., Isola, P., and Efros, A. A. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017.





