GenView: Enhancing View Quality with Pretrained Generative Model for Self-Supervised Learning

Xiaojie Li, Yibo Yang, Xiangtai Li, Jianlong Wu, Yue Yu, Bernard Ghanem, Min Zhang

TL;DR

GenView is a novel framework that uses pretrained generative models (like Stable Diffusion) to create highly diverse yet semantically consistent "positive views" for contrastive self-supervised learning. By adaptively controlling the generation process and weighting training pairs based on their semantic quality, GenView significantly outperforms standard data augmentation techniques across major computer vision benchmarks.

What Problem Does This Paper Address?

Self-supervised learning (SSL), particularly contrastive learning, has become a cornerstone of modern computer vision. The core idea is simple: take an image, create two different "views" of it (positive pairs) using augmentations like cropping or color jittering, and train a model to recognize that these views represent the same thing.

However, the authors identify two major bottlenecks in current methods:

  1. Limited Diversity: Standard manual transformations only modify surface-level features. They can't change an object's pose, viewpoint, or the high-level environment, which limits the model's ability to learn truly invariant representations.
  2. False Positive Risk: Aggressive cropping can be "too much of a good thing." If a random crop misses the main object entirely and only captures the background, the model is essentially being told that "background" and "object" are the same thing, which degrades performance.

Methods

GenView tackles these issues by replacing or supplementing manual augmentations with a controllable generative pipeline.

1. Adaptive View Generation

The framework uses a pretrained Stable unCLIP model to generate new views conditioned on the original image. To prevent the generative model from "hallucinating" and changing the image's meaning, the authors developed an Adaptive Selection (AS) mechanism for noise levels.

Fig. 2: GenView is composed of a view quality enhancement framework, an adaptive view generation method to balance diversity and semantic fidelity, and a quality-driven contrastive loss mechanism. The framework generates the enhanced view by passing the noisy image embedding, which is extracted from the frozen CLIP encoder, to the image- conditioned pretrained generative models (the Stable Diffusion generator). Positive views are passed through encoders to compute the contrastive loss, with an emphasis on those high-quality positive pairs. The encoders f can be the same encoder or different ones, e.g. an encoder and its momentum-updated one. All the pretrained CLIP encoder and Stable Diffusion have not accessed the dataset for SSL.

Using PCA on features from a frozen CLIP encoder, the system calculates the "foreground proportion" of an image.

  • Small objects (Low foreground): The system uses a lower noise level during generation to ensure the small subject doesn't disappear or distort.
  • Large objects (High foreground): The system uses higher noise levels to encourage more diverse poses and environmental changes, as the core semantics are more robust.

2. Quality-Driven Contrastive Loss

Even with adaptive noise, generative models occasionally fail. To mitigate this, GenView introduces a loss function that assesses the quality of each positive pair. It uses a frozen encoder to separate foreground and background features, then calculates a quality score: $$q_i = \text{foreground similarity} - \text{background similarity}$$ The framework then re-weights the contrastive loss, prioritizing pairs where the objects are similar but the backgrounds are diverse.

Datasets

The authors validated GenView across several standard benchmarks:

  • ImageNet-1K & ImageNet-100: The primary datasets for large-scale pretraining and ablation studies.
  • CIFAR-10, CIFAR-100, and Tiny ImageNet: Used to compare against other view-construction methods.
  • MS-COCO: Used for transfer learning tasks like object detection and instance segmentation.
  • Laion400M & ImageNet-21K: Used as sources for "naive" data augmentation to prove that GenView's synthetic views are more effective than simply adding more real data.

Key Insights and Ideas

  • Generative Models as "Super-Augmentors": Unlike a simple crop, a generative model can change a dog's pose from sitting to running while keeping it the same dog. This provides the "high-level variations" that standard SSL lacks.
  • Controllability is Mandatory: The paper demonstrates that "naive" generation (using fixed noise) is suboptimal. The "aha moment" is linking the noise level to the object's prominence (foreground proportion), which balances diversity with semantic fidelity.
  • Quality Over Quantity: Interestingly, the authors found that adding just 0.15 million GenView-generated images was more effective for training than adding 0.3 million real images from massive datasets like Laion400M. This suggests that how views are paired matters more than the raw volume of data.
Fig. 3: Illustration of our adaptive view generation. For the images with lower fore- ground proportion, a lower noise level is selected (in blue) because a higher noise level could easily result in synthetic images whose semantic contents are changed (1st col- umn), disappeared (2nd column), or distorted (3rd column). For the images with higher foreground proportion, a higher noise level is favored (in green) to introduce diversity, e.g. different pose (4th column), action (5th column), and background (6th column).

Key Results

GenView is framework-agnostic and was tested with MoCov2, MoCov3, SimSiam, BYOL, and SwAV.

  • Linear Probing: On ImageNet-1K, GenView improved MoCov2's top-1 accuracy by 2.5% and MoCov3's by 2.0%.
  • Semi-Supervised Learning: When training with only 1% of ImageNet labels, GenView boosted MoCov2 performance by a staggering 8.5%.
  • Efficiency: A ResNet-50 trained with GenView for 300 epochs achieved 74.8% accuracy, outperforming the original CLIP model (74.3%) despite CLIP being trained on 400 million image-text pairs.

Limitations and Future Work

While powerful, GenView isn't perfect. The authors noted several failure cases:

  • Capacity Constraints: The underlying CLIP encoder or generator can struggle with "long-tail" (rare) categories or extremely complex scenes (e.g., confusing a lobster with other sea life).
  • Resolution Sensitivity: When conditioning on very low-resolution images (like 32x32 from CIFAR), the model can lose fine details, leading to semantic drift (e.g., a camel becoming a horse).
  • Future Directions: The authors plan to refine diffusion models specifically for the task of representation learning and address these specific failure cases in complex scenes.

Summary updated

BibTeX
@inproceedings{li2024genview,
  author = {Xiaojie Li and Yibo Yang and Xiangtai Li and Jianlong Wu and Yue Yu and Bernard Ghanem and Min Zhang},
  title = {{GenView: Enhancing View Quality with Pretrained Generative Model for Self-Supervised Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73113-6\_18},
}
Figure