Instance-Conditioned GAN

Arantxa Casanova, Marlène Careil, Jakob Verbeek, Michal Drozdzal, Adriana Romero-Soriano

Generative Adversarial Networks (GANs) have achieved remarkable success in synthesizing photo-realistic images within narrow domains, such as human faces. However, scaling these models to unconditionally generate high-entropy, complex datasets like ImageNet or COCO-Stuff remains a significant challenge. Without explicit class labels to partition the data, unconditional GANs frequently suffer from mode collapse or produce blurry, low-quality samples because the underlying data distribution is too complex to model as a single entity.

Instance-Conditioned GAN (IC-GAN) introduces a novel approach to density modeling that conditions the generator on individual data points rather than broad class labels. By treating the data manifold as a mixture of overlapping neighborhoods—inspired by non-parametric kernel density estimation—IC-GAN achieves state-of-the-art results in unlabeled image generation and demonstrates a remarkable ability to transfer to entirely new datasets at inference time.

Methodology: Overlapping Neighborhoods

Previous unsupervised attempts at partitioning data typically rely on "hard" clustering, which creates coarse, non-overlapping boundaries that can degrade image quality at the edges. Instead of learning one global distribution or $N$ discrete clusters, IC-GAN learns to model the local "neighborhood" around any given instance.

  1. Feature Extraction: A pre-trained self-supervised model (such as SwAV) maps all images in a dataset into a dense feature space.
  2. Neighborhood Definition: For any given image (the "instance"), the system identifies its $k$-nearest neighbors within this feature space.
  3. Instance Conditioning: Both the Generator ($G$) and Discriminator ($D$) are conditioned on the feature vector of a specific instance.
  4. Adversarial Game: $G$ is tasked with generating samples that plausibly belong to the neighborhood of the conditioning instance. $D$ must distinguish between these generated samples and the actual nearest neighbors of that instance.

To generate new images at inference time, one simply provides a feature vector from a "stored" instance. The authors found that storing just 1,000 cluster centroids is enough to effectively cover and reconstruct the distribution of the 1.2-million-image ImageNet dataset.

Key Insights and Zero-Shot Transfer

A major advantage of IC-GAN's overlapping neighborhoods is the creation of a smoother representation of the data manifold, preventing the boundary artifacts seen in other unsupervised methods. Because the model learns the relationship between an instance and its neighbors rather than memorizing specific class features, it functions similarly to a learned Kernel Density Estimator.

Remarkably, this non-parametric flexibility enables zero-shot dataset transfer. An IC-GAN trained exclusively on ImageNet can generate high-quality images in entirely new domains simply by being conditioned on a feature vector from those datasets at test time. The model leverages the structural priors learned from ImageNet to flesh out the style and content of the novel instance.

Zero-shot transfer capabilities of IC-GAN. The model, trained only on ImageNet, generates novel samples (right) conditioned on out-of-distribution instances (left) such as street scenes, statues, and sketches.

Results and Controllability

IC-GAN was rigorously evaluated on ImageNet, COCO-Stuff, and ImageNet-LT, demonstrating significant improvements over existing baselines.

  • Unlabeled Generation: At 128x128 resolution on ImageNet, IC-GAN achieved an FID of 11.7, nearly doubling the performance of prior state-of-the-art unsupervised models like SS-cluster GAN (FID 22.0). It also established a new state-of-the-art on COCO-Stuff, surpassing even models that rely on expensive bounding-box annotations.
  • Long-Tail Robustness: On the heavily imbalanced ImageNet-LT dataset, IC-GAN significantly outperformed BigGAN, particularly on "few-shot" classes where traditional conditional models struggle due to data scarcity.
  • Controllability: When extended to a class-conditional setting, IC-GAN offers unprecedented dual control. Users can fix the "instance" to preserve the overall layout and style while swapping the "class" label (e.g., transforming a dog in a field into a sheep in the exact same field).
Semantically controllable generation. By extending IC-GAN to a class-conditional setting, the model can preserve the layout of an instance (left) while swapping the semantic class (e.g., changing a cow to a camel).

Limitations and Future Work

The model's success is inherently tied to the quality of the pre-trained feature extractor; if the self-supervised model fails to group semantically similar images together, the resulting neighborhoods become nonsensical. Additionally, unlike purely parametric GANs, IC-GAN requires a "memory bank" of instances to sample from during inference. Finally, while the transfer capabilities are impressive, extreme domain shifts (e.g., highly abstract sketches) can degrade generation quality if the conditioning instance is too far outside the training distribution.

Future work could involve training the feature extractor and the GAN jointly to further optimize the neighborhood boundaries and improve representation learning.

Summary updated

BibTeX
@inproceedings{casanova2021instance,
  author = {Arantxa Casanova and Marlène Careil and Jakob Verbeek and Michal Drozdzal and Adriana Romero-Soriano},
  title = {{Instance-Conditioned GAN}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=V059MLZOqOt},
}
Figure