Generative Models as a Data Source for Multiview Representation Learning

Ali Jahanian, Xavier Puig, Yonglong Tian, Phillip Isola

TL;DR

This paper explores a provocative question: If generative models are now "good enough," do we still need massive, raw datasets for representation learning? The authors demonstrate that we can learn high-quality visual features by treating a black-box generative model as a "compressed" data source. By using its latent space to create semantically consistent "views" for contrastive learning, this approach can rival or even outperform training on real data.

The Challenge: Reliance on Raw Data

Traditionally, self-supervised representation learning relies heavily on massive datasets of real images.

Traditional representation learning relies on massive, raw datasets.

However, these datasets are becoming increasingly unwieldy to store, difficult to share due to privacy and copyright concerns, and often contain fixed biases.

Generative models (like GANs) act as highly compressed versions of these datasets. The authors investigate whether we can bypass the original data entirely and learn general-purpose visual representations using only samples from a pre-trained, black-box generator. The core challenge is how to effectively use the internal structure of these models—specifically their latent space—to generate the "positive pairs" (different views of the same object) required for modern contrastive learning algorithms like SimCLR.

Methodology: Learning from Generative Models

The researchers propose a framework for Multiview Representation Learning from Generative Models. Instead of just applying standard pixel-level augmentations (like cropping or color jittering) to a static image, they manipulate the generator's input to create "latent views."

Generating multiview data by applying transformations in the latent space of a generative model.

They explore several techniques for generating these views:

  1. Gaussian Latent Views: They take a latent vector $z$ and add a small amount of Gaussian noise to create a neighbor $z'$. Because GAN latent spaces are often smooth, the resulting generated images usually represent the same object with slight variations in pose, lighting, or texture.
  2. Steered Latent Views: They use "steerability" techniques to move the latent vector in specific directions that correspond to known semantic changes, such as zooming, shifting, or rotating the object.
  3. Hybrid Augmentation: The most effective method combines these latent-space transformations with standard pixel-space augmentations.

The authors primarily use the InfoNCE loss to train an encoder that maps these synthetic images into an embedding space. In this space, views of the same "latent seed" are pulled close together, while views of different seeds are pushed apart.

Experimental Setup

The authors evaluate their approach using several standard benchmarks and generative models:

  • Generative Models: BigBiGAN (trained on ImageNet) and StyleGAN2 (trained on LSUN CAR).
  • Training Data: Synthetic samples generated from the models above.
  • Evaluation/Transfer Tasks:
    • ImageNet-1000 & ImageNet-100: Linear probing for classification.
  • Pascal VOC 2007: Object detection.
  • Stanford Cars: Fine-grained car classification to test transferability from the StyleGAN2 car model.

Key Insights

  • The Latent Advantage: Latent-space transformations provide "semantic" augmentations that pixel-space crops cannot. For example, a latent shift might show the back of a car versus the side, whereas a crop just shows a smaller piece of the same pixels.
  • The "Sweet Spot" of Variance: Just like pixel augmentations, latent noise follows an inverse-U curve. If the noise is too small, the task is too easy and the model learns nothing; if it's too large, the images lose semantic identity. The authors found an optimal standard deviation that maximizes feature quality.
  • Synergy of Spaces: Combining latent views with pixel views performs better than either alone. This suggests that the two types of transformations provide complementary information to the learner.
  • Models as Compressed Data: A generative model is essentially a "model zoo" inhabitant that is easier to distribute than a massive raw dataset. This paper proves that these "compressed" versions of data are sufficient for downstream tasks.

Experimental Results

  • Rivaling Real Data: On ImageNet-1000, representations learned from BigBiGAN samples achieved 42.58% top-1 accuracy, coming remarkably close to the 43.90% achieved by training on the actual real images.
  • Outperforming Real Data: In the car domain, training on StyleGAN2-generated images actually outperformed training on real LSUN CAR images when transferring to the Stanford Cars dataset (49.79% vs 39.68%). This is likely because StyleGAN2 produces extremely high-quality, centered, and diverse images that are cleaner for learning than the raw, noisy LSUN dataset.
  • Scaling Laws: Performance improves as you sample more unique images from the generator, though the gains follow a sub-logarithmic trend, suggesting that even synthetic data eventually hits a diversity ceiling.

Limitations and Future Work

  • Generator Quality Matters: The method's success is tied to the quality of the generator. If the generator has low diversity (mode collapse) or produces artifacts, the learned representations suffer.
  • Black-Box vs. White-Box: While this paper treats the generator as a black box (only sampling from it), the authors note that "white-box" access to the generator's internal layers might yield even more powerful representations.
  • Finite Diversity: Even though a generator can produce "infinite" samples, the underlying entropy is limited by what it learned during training. Exploring how to "expand" this diversity is a promising next step.

Summary updated

BibTeX
@inproceedings{jahanian2022generative,
  author = {Ali Jahanian and Xavier Puig and Yonglong Tian and Phillip Isola},
  title = {{Generative Models as a Data Source for Multiview Representation Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=qhAeZjs7dCL},
}
Figure