TL;DR
The paper introduces Syn2Co, a framework that explores the adage "fake it till you make it" by training Vision Transformers (ViTs) using both diffusion-generated synthetic images and on-the-fly synthetic hard negatives in the feature space. By combining these two forms of "faking it," the authors show that a DeiT-Small model can beat its fully real-data supervised baseline on ImageNet-100 contrastive learning.
What Problem Does This Paper Address?
Self-supervised learning (SSL)—specifically contrastive learning—has allowed AI models to learn powerful visual representations without relying on human-annotated labels. However, contrastive learning still faces two massive bottlenecks:
- Data Scarcity/Scale: It requires vast amounts of real-world data to achieve competitive performance.
- Hard Negative Mining: To learn sharp decision boundaries, contrastive learning needs "hard negatives" (images that are different from the target but look deceptively similar). Finding or curating these informative negatives is difficult and computationally expensive.
This paper tackles these challenges by investigating whether generative models can completely synthesize both the training data (in the image space) and the hard negatives (directly in the representation space) to train robust Vision Transformers.
Methods
The authors propose Syn2Co (Synthetic to Contrastive), which builds upon the MoBY contrastive learning baseline and introduces two synthetic enhancements:
- Synthetic Data Clones: Using a pre-trained generative diffusion model, they generate a completely synthetic clone of the target dataset. During self-supervised pre-training, the model samples images from a combined pool of real and synthetic data.
- Synthetic Hard Negatives: Instead of relying solely on a queue of real negative images, Syn2Co identifies the top-$N$ hardest negatives in the feature space based on cosine similarity to the query image. It then applies a synthesis function (such as interpolation, extrapolation, or noise perturbation) directly to these features to generate new, even more challenging "synthetic hard negatives" on the fly.
The complete pipeline is illustrated below:
Datasets
- ImageNet-100: The primary real-world dataset used for training and evaluation.
- Synthetic ImageNet-100 Clone: A dataset of approximately 130,000 synthetic images generated using a Relay Diffusion model, matching the exact class distribution of the original ImageNet-100.
- Evaluation: The quality of the learned representations is evaluated using linear probing for image classification on ImageNet-100.
Key Insights and Ideas
- Architecture Matters: Different Vision Transformer designs respond uniquely to synthetic elements. Hierarchical models like Swin Transformers benefit almost exclusively from synthetic hard negatives, whereas vanilla ViTs (like DeiT) thrive when combining both synthetic data and synthetic negatives.
- Diminishing Returns of Synthetic Images: While fully synthetic training yields surprisingly good representations, adding more synthetic data eventually hits a wall of diminishing returns due to the inherent distribution shifts introduced by diffusion models. It serves best as a complement rather than a total substitute for real data.
- Sharper Attention Maps: Grad-CAM visualizations reveal that pre-training with synthetic data actually helps the model focus more cleanly and sharply on the primary object of interest compared to training on real data alone.
Key Results
- DeiT-S Breakthrough: When trained with both synthetic data and synthetic hard negatives for 300 epochs, DeiT-S achieved a top-1 linear probing accuracy of 82.12%, outperforming the baseline MoBY model (79.36%) and even the fully supervised baseline (80.50%).
- Swin-T Gains: For Swin-T, adding synthetic hard negatives alone pushed the top-1 accuracy from 83.90% (MoBY baseline) to 84.04%.
As shown in the data mixing experiments, performance steadily scales up as the proportion of real data increases, but synthetic data remains a highly effective booster:
Limitations and Future Work
- Hyperparameter Sensitivity: Generating synthetic hard negatives requires careful tuning of the number of hard negatives ($N$) and the synthetic negative ratios. Sub-optimal choices can easily degrade performance.
- Domain Shift: Diffusion-generated images still carry a distinct statistical signature, meaning they cannot yet completely replace real-world datasets without a slight performance penalty.
- Future Directions: The authors suggest exploring how these synthetic strategies scale to larger models (like ViT-Large) and investigating more advanced feature-space synthesis functions that can automatically adapt to different transformer backbones.
Summary updated