NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Data-Efficient Instance Generation from Instance Discrimination

Ceyuan Yang, Yujun Shen, Yinghao Xu, Bolei Zhou

TL;DR

Generative Adversarial Networks (GANs) typically require massive datasets to avoid "memorizing" training images and failing. InsGen solves this by tasking the discriminator with identifying every single image—real or fake—as a unique instance. This effectively turns the generator's infinite output into a bottomless well of training data, preventing overfitting even with tiny datasets.

The Challenge of Data-Hungry GANs

Training high-quality GANs is notoriously data-hungry. When training data is scarce (e.g., only a few thousand images), the discriminator often overfits, essentially memorizing the training set rather than learning the underlying distribution. Once the discriminator stops being challenged, it provides poor feedback to the generator, leading to low-quality images and "mode collapse" (where the generator produces the same few images repeatedly).

While data augmentation helps, the standard GAN objective is still a simple binary choice: "Is this real or fake?" The authors argue this task is too easy. To succeed in low-data regimes, the discriminator needs a more challenging objective that forces it to learn robust, high-level features.

The InsGen Method

The core of the paper is InsGen (Instance Generation), which introduces an auxiliary task for both the generator and discriminator based on instance discrimination.

  1. Instance Discrimination for the Discriminator: Beyond the standard real/fake task, the discriminator must now distinguish every individual image from all others. It uses a contrastive learning head (InfoNCE loss) to project images into a feature space where each image is its own "class."
  2. Learning from the "Infinite" Fake Domain: Crucially, the discriminator doesn't just do this for real images; it also treats every synthesized image from the generator as a unique instance. Since the generator can produce infinite variations, the discriminator effectively has an infinite dataset to practice its feature-extraction skills.
  3. Noise Perturbation: To make the task even harder, the authors introduce a noise perturbation strategy. When comparing "views" of a fake image, they slightly perturb the generator's input latent code. This forces the discriminator to recognize that two slightly different synthesized images are actually the same "instance."
  4. Loop-back for Diversity: The generator is also trained to produce images that are easily distinguishable by the discriminator’s instance head. This explicitly encourages the generator to be diverse; if it produces two similar images, it gets penalized because the discriminator can't tell them apart as unique instances.
The InsGen framework: training the discriminator to recognize unique instances, and using that capability to guide the generator toward diversity.

Key Insights

  • Synthesized Data as a Regularizer: The most elegant "aha moment" is realizing that the generator's flaws can be a feature. By forcing the discriminator to categorize every fake image, the model uses the generator as an infinite data augmentation engine for the discriminator's own representation learning.
  • Harder is Better: Moving from binary classification (1 bit of information) to instance discrimination (log N bits) prevents the discriminator from "taking the easy way out" through memorization.
  • Diversity is Identifiability: By linking the generator's loss to the discriminator's ability to tell instances apart, diversity becomes a primary objective rather than a secondary hope.

Datasets and Key Results

The authors evaluated InsGen on two popular high-resolution benchmarks to simulate data-scarce environments: FFHQ (human faces, tested on 2K and 10K subsets) and AFHQ (roughly 5,000 images each for Cats, Dogs, and Wild Life).

InsGen achieved state-of-the-art results in these data-limited settings, significantly outperforming the previous gold standard, StyleGAN2-ADA.

  • FFHQ-2K: On the 2,000-image subset, InsGen improved the FID (Fréchet Inception Distance, where lower is better) from 15.60 to 11.92—a 23.5% improvement.
  • AFHQ: Across all categories (Cat, Dog, Wild life), InsGen consistently lowered FID scores compared to baselines, producing highly realistic and diverse textures.
  • Extreme Low-Data: The authors showed that InsGen can produce recognizable, diverse faces even when trained on as few as 100 images, a regime where standard GANs typically fail completely.
Qualitative results on the AFHQ dataset (Cat, Dog, and Wild Life) demonstrating high-quality synthesis in data-limited settings.

Limitations and Future Work

While highly effective for small datasets, the authors note a few areas for improvement:

  • Diminishing Returns: The performance boost is most dramatic in low-data settings. When the training set is already very large (e.g., 70K+ images), the benefits of InsGen become marginal because the discriminator already has enough real data to avoid overfitting.
  • FID Floor: While visually impressive, the FID scores at the extreme low end (e.g., 100 images) are still relatively high (53.93), indicating there is still a significant gap between "satisfying" results and true high-fidelity synthesis.
  • Future Directions: The authors suggest exploring more sophisticated ways to utilize fake samples for discriminator training beyond simple contrastive learning.

Summary updated

BibTeX
@inproceedings{yang2021data,
  author = {Ceyuan Yang and Yujun Shen and Yinghao Xu and Bolei Zhou},
  title = {{Data-Efficient Instance Generation from Instance Discrimination}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=q9XLiCG3ont},
}
Figure