Skip to main content
QUICK REVIEW

[Paper Review] StableRep: Synthetic Images from Text-to-Image Models Make Strong Visual Representation Learners

Yonglong Tian, Lijie Fan|arXiv (Cornell University)|Jun 1, 2023
Multimodal Machine Learning ApplicationsComputer Science23 citations
TL;DR

The paper shows that self-supervised learning on synthetic images from Stable Diffusion can match or surpass real-image baselines, and introduces StableRep, a multi-positive contrastive learning method that leverages multiple images from the same caption to improve representations.

ABSTRACT

We investigate the potential of learning visual representations using synthetic images generated by text-to-image models. This is a natural question in the light of the excellent performance of such models in generating high-quality images. We consider specifically the Stable Diffusion, one of the leading open source text-to-image models. We show that (1) when the generative model is configured with proper classifier-free guidance scale, training self-supervised methods on synthetic images can match or beat the real image counterpart; (2) by treating the multiple images generated from the same text prompt as positives for each other, we develop a multi-positive contrastive learning method, which we call StableRep. With solely synthetic images, the representations learned by StableRep surpass the performance of representations learned by SimCLR and CLIP using the same set of text prompts and corresponding real images, on large scale datasets. When we further add language supervision, StableRep trained with 20M synthetic images achieves better accuracy than CLIP trained with 50M real images.

Motivation & Objective

  • Motivate learning visual representations from synthetic data generated by text-to-image models (Stable Diffusion).
  • Investigate how guidance scale affects image quality/diversity for self-supervised learning.
  • Develop a multi-positive contrastive loss (StableRep) leveraging multiple synthetic images per caption.
  • Evaluate representation quality across ImageNet linear probes, few-shot tasks, and cross-domain datasets.
  • Explore the impact of language supervision when combined with synthetic data.

Proposed method

  • Use Stable Diffusion to generate one image per caption from large image-text datasets (CC3M, CC12M, RedCaps).
  • Train self-supervised methods (SimCLR, MAE, BYOL, MoCo-v3, DINO) on synthetic images and compare to real-image baselines.
  • Introduce StableRep: generate multiple images per caption (via different latent noise) and use a multi-positive contrastive loss across these positives.
  • Formalize multi-positive loss as cross-entropy between a ground-truth match distribution and a softmax over candidate embeddings (eqs 2–4).
  • Experiment with guidance scale w to balance image quality and diversity; evaluate linear probing, few-shot, and segmentation benchmarks.
  • Optionally add language supervision (i2t, t2i) to create StableRep+ and compare to CLIP.

Experimental results

Research questions

  • RQ1Can self-supervised visual representation learning on synthetic images match or exceed learning from real images of the same size?
  • RQ2Does treating multiple images generated from the same caption as positives improve representations (StableRep)?
  • RQ3How does StableRep perform compared with CLIP and SimCLR across standard benchmarks and datasets?
  • RQ4What is the effect of language supervision when combined with synthetic-image pre-training?
  • RQ5How do design choices (image prompts, guidance scale, number of positives) affect performance and scalability?

Key findings

  • StableDiffusion with proper guidance scale (w around 6–8 for SSL, 2–10 for CLIP) yields synthetic images that can outperform real-image SSL baselines on linear evals.
  • StableRep’s multi-positive loss using multiple prompts-generated images improves representation quality; StableRep surpasses SimCLR and CLIP in several settings with synthetic data.
  • StableRep achieves 76.7% linear accuracy on ImageNet with ViT-B/16 trained only on synthetic images.
  • With language supervision, StableRep trained on 20M synthetic images surpasses CLIP trained on 50M real images (in linear accuracy).
  • StableRep+ improves fairness/compositionality metrics on FairFace and ARO benchmarks; with synthetic data it can mitigate some worst-case class accuracies.
  • Across CC12M and RedCaps, StableRep outperforms CLIP trained on real images in linear probing on ImageNet and shows strong cross-domain performance (11-dataset average).
  • In few-shot tasks, StableRep yields strong results across multiple datasets, often outperforming CLIP and SimCLR baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.