[论文解读] ContraGAN: Contrastive Learning for Conditional Image Generation
ContraGAN 引入了条件对比损失(2C 损失),在一个批次中利用数据到数据和数据到类别的关系,带来更强的条件图像生成并减少判别器过拟合,在 Tiny ImageNet 和 ImageNet 上取得显著的 FID 提升。
Conditional image generation is the task of generating diverse images using class label information. Although many conditional Generative Adversarial Networks (GAN) have shown realistic results, such methods consider pairwise relations between the embedding of an image and the embedding of the corresponding label (data-to-class relations) as the conditioning losses. In this paper, we propose ContraGAN that considers relations between multiple image embeddings in the same batch (data-to-data relations) as well as the data-to-class relations by using a conditional contrastive loss. The discriminator of ContraGAN discriminates the authenticity of given samples and minimizes a contrastive objective to learn the relations between training images. Simultaneously, the generator tries to generate realistic images that deceive the authenticity and have a low contrastive loss. The experimental results show that ContraGAN outperforms state-of-the-art-models by 7.3% and 7.7% on Tiny ImageNet and ImageNet datasets, respectively. Besides, we experimentally demonstrate that contrastive learning helps to relieve the overfitting of the discriminator. For a fair comparison, we re-implement twelve state-of-the-art GANs using the PyTorch library. The software package is available at https://github.com/POSTECH-CVLab/PyTorch-StudioGAN.
研究动机与目标
- 通过在条件 GAN 中引入数据到数据关系,推动对条件化的超越数据到类别的损失的研究。
- 提出一种新颖的 2C(两向)对比损失,联合使用图像嵌入和类别嵌入。
- 将 2C 损失整合到 GAN 框架(ContraGAN)以在提高真实感与多样性的同时稳定训练。
- 在 CIFAR10、Tiny ImageNet 和 ImageNet 上与最先进的条件 GAN 和大规模 GAN 进行对比评估。
提出的方法
- 引入一个条件对比损失(2C 损失),在一个小批量中同时利用数据到类别和数据到数据关系。
- 定义编码器 S 和投影头 h,将图像映射到单位超球上的嵌入。
- 用 2C 损失替代或增强常规条件损失,使同一类别的图像嵌入聚集在一起、将其他类别拉开,同时将嵌入与它们的类别嵌入 e(y) 对齐。
- 将 l(xi, yi; t) 形式化为包含同类别负样本项的对比目标,使得实现数据到数据与数据到类别的监督。
- 在真实样本上训练具有辅助 2C 损失的判别器,并在生成样本上引入 2C 损失以指导生成器。
- 证明 2C 损失可以减少判别器的过拟合,并在不同骨干网络(DCGAN、ResGAN、BigGAN)和数据集上提升样本质量。
实验结果
研究问题
- RQ1一个利用批内数据到数据关系的对比目标,是否可以在超越传统数据到类别条件下改善条件图像生成?
- RQ2提出的 2C 损失是否在大规模条件生成任务中稳定 GAN 训练并减少判别器过拟合?
- RQ3在 CIFAR10、Tiny ImageNet 和 ImageNet 上,将 2C 损失整合到常见骨干网络后,生成质量(FID)是否有实质性提升?
主要发现
- ContraGAN 在 Tiny ImageNet 上的 FID 提升达到 7.3%,在 ImageNet 上达到 7.7%,推动了最先进结果。
- 在 CIFAR10 上,ContraGAN 相较于 Table 3 的艺术模型基线实现了 1.3% 的 FID 降低。
- ContraGAN 能减少判别器过拟合,并在相似条件下相比 ProjGAN 展现出更稳定的训练。
- 在消融研究中,2C 损失相较基线显著降低 FID,并且在存在更大批量和一致性正则化时受益。
- ContraGAN 的 2C 损失在不需要Hard Negative Mining或大量数据增强的前提下,显式利用数据到数据关系。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。