A Unified Generative Adversarial Network Training via Self-Labeling and Self-Attention

Tomoki Watanabe, Paolo Favaro

Conditional Generative Adversarial Networks (cGANs) are the gold standard for high-quality image synthesis, but they come with a significant catch: they require massive amounts of labeled data. In the real world, labels are expensive to acquire, and most data exists "in the wild" without annotations.

A team of researchers from Toshiba and the University of Bern recently presented a framework that allows GANs to reap the benefits of conditioning even when labels are scarce or non-existent. Remarkably, this approach can sometimes outperform models trained with perfect human labels.

TL;DR: The authors propose a unified GAN training scheme that uses a "teacher" classifier—trained on synthetic data—to automatically label real data. By combining this self-labeling with a confidence-based selection mechanism (self-attention), they achieve state-of-the-art image quality that can surpass fully supervised conditional GANs.

The Labeling Bottleneck in GANs

GANs typically consist of a Generator (creating images) and a Discriminator (detecting fakes). Providing "class labels" (e.g., telling the GAN "this is a cat") significantly stabilizes training and improves the visual fidelity of the generated images.

However, manual labeling is a severe bottleneck. Previous attempts to bridge this gap using unsupervised or semi-supervised methods often struggled to match the performance of fully supervised cGANs. The core challenge is creating a system that can "discover" its own categories and use them effectively to guide the generation process without human intervention.

Proposed Methodology

The researchers introduce two primary innovations to the standard GAN pipeline to enable self-supervised conditional training:

Architecture comparison showing Unconditional GAN, AC-GAN, Top-k GAN, and the proposed Self-Labeling GAN.
  1. The Teacher Classifier (Self-Labeling): The authors exploit a known property of neural networks: generators naturally tend to map similar "latent vectors" to semantically similar images. They train a separate classifier, called the teacher ($C$), exclusively on synthetic images where the "artificial label" ($c$) is already known. This teacher is then used during inference to predict labels for the unlabeled real images ($x_r$).
  2. Self-Attention (Confidence Filtering): Not all predicted labels are accurate, especially early in training. To prevent the discriminator from being confused by wrong labels, the authors implement a "self-attention" mechanism. Rather than a standard Transformer-style attention, this acts as a selection gate. The system only uses a real image for conditional training if the teacher's classification confidence exceeds a high threshold ($P(\hat{y}_c|x_r) > Th$).

These components are integrated into a unified training loop where the Generator, Discriminator, and Teacher all evolve simultaneously.

Key Insights

  • Generator Inductive Bias: The core "aha moment" is realizing that the generator's architecture itself acts as a natural clusterer. By training a teacher on the generator's output, the system can "extract" these clusters and apply them back to the real world.
  • Artificial Labels > Human Labels? Surprisingly, the model performed better using its own discovered "artificial labels" than it did using ground-truth human labels on CIFAR-10. This suggests that the categories the model discovers might be more aligned with the generator's internal logic than rigid human categories.
  • Feature Alignment: Even without being told what a specific object is, the teacher eventually learns to group real objects with generated objects because they share similar visual features.

Experimental Results

The method was evaluated on three standard computer vision benchmarks: CIFAR-10, STL-10, and SVHN. The primary metric used is the Fréchet Inception Distance (FID), where a lower score indicates higher image quality and diversity.

  • Unlabeled CIFAR-10: The proposed method achieved an FID of 6.81, crushing the standard BigGAN (14.73) and significantly outperforming other self-supervised methods like SLCGAN (8.95).
  • Surpassing Supervision: On the labeled version of CIFAR-10, their "Artificial & Real" label approach hit an FID of 4.35, which is better than state-of-the-art fully supervised cGANs.
  • Robustness: On STL-10, which is notoriously difficult due to its large unlabeled set, their method improved the baseline FID from 32.85 down to 30.91.

Limitations and Future Work

While highly effective, the framework has a few notable constraints:

  • Threshold Sensitivity: The "self-attention" threshold ($Th$) is a hyperparameter that needs to be set carefully. If it's too high, the model ignores too much data; if it's too low, noisy labels degrade the quality.
  • Computational Cost: Adding a third network (the teacher) and performing extra inference steps on real data increases the computational overhead compared to a basic unconditional GAN.
  • Label Meaning: While the artificial labels are effective for image quality, they are "black boxes." A discovered category might represent "blue objects in the sky" rather than a specific biological species, which might not be ideal for applications requiring interpretable classes.

Ultimately, for researchers looking to squeeze more performance out of unlabeled datasets, this paper provides a powerful blueprint for letting the model "teach itself" how to categorize the world.

Summary updated

BibTeX
@inproceedings{watanabe2021unified,
  author = {Tomoki Watanabe and Paolo Favaro},
  title = {{A Unified Generative Adversarial Network Training via Self-Labeling and Self-Attention}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure