Abstract
GANs involve training two networks in an adversarial game, where each network's task depends on its adversary. Recently, several works have framed GAN training as an online or continual learning problem. We focus on the discriminator, which must perform classification under an (adversarially) shifting data distribution. When trained on sequential tasks, neural networks exhibit forgetting. For GANs, discriminator forgetting leads to training instability. To counter forgetting, we encourage the discriminator to maintain useful representations by adding a self-supervision. Conditional GANs have a similar effect using labels. However, our self-supervised GAN does not require labels, and closes the performance gap between conditional and unconditional models. We show that, in doing so, the self-supervised discriminator learns better representations than regular GANs.
Introduction
Training Generative Adversarial Networks (GANs) is notoriously difficult due to the non-stationary nature of the adversarial game. As the generator evolves, the discriminator faces a shifting distribution of "fake" data, often leading to catastrophic forgetting. The discriminator becomes overly specialized to the current batch of samples, losing the general representations necessary to distinguish complex, real-world structures. This forgetting is a primary driver of training instability and mode collapse.
Countering Forgetting with Self-Supervision
To address this, we introduce Self-Supervised GANs (SsGANs). The core idea is to augment the discriminator with an auxiliary self-supervised task—specifically, predicting the rotation of images. By requiring the discriminator to identify whether an image (real or generated) has been rotated by 0°, 90°, 180°, or 270°, we force it to learn and maintain stable, structural features that do not change as the generator updates.
As seen in the figure above, standard training results in highly volatile classifier accuracy, whereas the self-supervised variant maintains a much more stable signal. This stability allows the discriminator to act as a more consistent teacher for the generator.
Experimental Results and Stability
We evaluated SsGAN across diverse datasets, including ImageNet and CIFAR-10. A significant contribution of this work is closing the performance gap between unconditional GANs and conditional models (which use class labels). By using Self-Modulated Batch Normalization (sBN), where the generator's internal normalization is modulated by its own latent noise, we further enhance the model's capacity.
On ImageNet, SsGAN achieved a Fréchet Inception Distance (FID) of 43.87, nearly matching the 42.07 of the label-dependent P-cGAN. Crucially, as shown in the FID plot, standard unconditional models like SN-GAN often diverge during long training runs, while SsGAN remains stable for over 1 million iterations.
Discussion and Limitations
While rotation prediction is highly effective for general datasets, its utility can vary. For instance, on datasets like CelebA-HQ, where faces are consistently centered and upright, the rotation task may be too simple to provide a strong learning signal. Future work may explore other self-supervised tasks, such as colorization or jigsaw puzzles, to provide even more robust stability across varied data domains.
Conclusion
SsGAN demonstrates that the stability benefits of labels in GANs can be largely recovered through self-supervision. By preventing discriminator forgetting, we enable the training of high-quality, stable, unconditional generative models that rival their conditional counterparts.
Summary updated