Collapse by Conditioning: Training Class-conditional GANs with Limited Data

Mohamad Shahbazi, Martin Danelljan, Danda Pani Paudel, Luc Van Gool

Introduction

While adding class labels usually helps Generative Adversarial Networks (GANs) produce better images, recent research reveals a counter-intuitive phenomenon: "conditioning-induced mode collapse" when training data is scarce. To fix this, researchers have introduced a "transitional" training strategy that starts with unconditional learning and gradually injects class information, achieving state-of-the-art image quality and diversity on limited datasets.

The Problem: Conditioning-Induced Mode Collapse

Generative Adversarial Networks (GANs) are the engines behind high-fidelity synthetic images. Usually, we want to control what the GAN makes—for example, asking it to generate a "Panda" specifically rather than just any "Animal." This is called class-conditioning.

Intuitively, giving a model more information (labels) should make its job easier. However, when training data is limited (e.g., only 100 images per category), conditional GANs often suffer from mode collapse. Instead of learning the diverse features of a specific class, the model "collapses" and generates the same blurry, repetitive image over and over.

Interestingly, an unconditional GAN (one that doesn't know about labels) trained on the exact same small dataset remains stable and produces diverse, high-quality images. This paper seeks to bridge that gap: how can we get the precise control of a conditional GAN without the instability caused by limited data?

Visual comparison of generated images showing mode collapse in standard conditional GANs (middle) versus the diverse outputs of the unconditional baseline (top) and the proposed transitional method (bottom).

The Solution: Transitional-cGAN

The authors propose a method called transitional-cGAN. The core idea is to treat training like a curriculum: learn the general distribution of images first, then learn the specific differences between classes.

  1. The Transition Function ($\lambda_t$): They introduce a scalar that moves from 0 to 1 over the course of training. When $\lambda_t = 0$, the model is purely unconditional. As it approaches 1, the model becomes fully conditional.
  2. Generator Modification: In the early stages, the class labels are "masked out." The generator focuses on learning shared features across all classes (like "eyes," "fur," or "backgrounds"). As $\lambda_t$ increases, the class embeddings are gradually injected into the network.
  3. Dual-Branch Discriminator: The discriminator (the "critic" of the GAN) is modified to have two branches. One branch evaluates if the image looks "real" in general (unconditional), while the other evaluates if it matches the specific class label (conditional).
  4. Weighted Loss: The total training loss is a sum of the unconditional loss and the conditional loss, with the latter weighted by $\lambda_t$. This ensures the model doesn't get "distracted" by labels until it has a solid foundation of what a real image looks like.

Key Insights

  • The "Conditioning Trap": In low-data settings, the model tries to satisfy the class-conditioning requirement too early. Because it hasn't seen enough examples to understand the class's diversity, it "cheats" by finding a single point (mode) that satisfies the discriminator, leading to collapse.
  • Stability through Shared Information: By starting unconditionally, the model leverages the entire dataset to learn low-level features. A "Panda" and a "Tiger" both have eyes and fur; learning these shared features first provides a stable starting point for later differentiation.
  • Minimal Architecture Changes: One of the most elegant parts of this research is that it requires very few changes to existing state-of-the-art architectures like StyleGAN2. It is primarily a change in the process of training.

Key Results and Robustness

The researchers evaluated their method on four benchmark datasets modified to simulate "limited data" regimes (e.g., ImageNet Carnivores, Food101, CUB-200-2011, and AnimalFace). The transitional-cGAN significantly outperformed standard conditional GANs and other state-of-the-art techniques across all metrics.

  • FID Scores: The Fréchet Inception Distance (FID) measures how close generated images are to real ones (lower is better). On the Carnivores dataset, a standard conditional GAN scored 100, while the transitional-cGAN scored a remarkable 14.
  • Visual Diversity: Qualitative results show that while baseline models produced "ghostly" or repetitive artifacts, the proposed method generated crisp, diverse images with varying poses and backgrounds.
  • Robustness: The method proved highly effective across a wide range of dataset sizes. Even as the number of classes increased or samples per class decreased, the transitional approach maintained its lead over traditional training methods.
FID scores across varying numbers of classes and samples per class, demonstrating the robustness of the transitional-cGAN (green) compared to standard conditional (red) and unconditional (blue) baselines in limited data regimes.

Limitations and Future Work

While the paper focuses on class-conditioning (discrete labels), the authors note that they haven't yet tested this transitional strategy on other types of conditioning, such as semantic masks or image-to-image translation.

Future work could involve exploring more complex transition functions (beyond simple linear ones) or applying this "unconditional-to-conditional" philosophy to other generative architectures like Diffusion Models. Additionally, investigating if this method can help in "fine-grained" scenarios where the differences between classes are extremely subtle remains an exciting open question.

Summary updated

BibTeX
@inproceedings{shahbazi2022collapse,
  author = {Mohamad Shahbazi and Martin Danelljan and Danda Pani Paudel and Luc Van Gool},
  title = {{Collapse by Conditioning: Training Class-conditional GANs with Limited Data}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=7TZeCsNOUB_},
}
Figure