Improved baselines for vision-language pre-training

Enrico Fini, Pietro Astolfi, Adriana Romero-Soriano, Jakob Verbeek, Michal Drozdzal

TL;DR

Is the success of recent vision-language models due to clever new loss functions, or just better training hygiene? This paper reveals that standard CLIP can achieve state-of-the-art performance simply by upgrading its training recipe with modern data augmentations, label smoothing, and multi-layer projectors. By isolating these variables, the authors show that a well-tuned, classic CLIP baseline consistently outperforms more complex, hybrid architectures.

What Problem Does This Paper Address?

Contrastive Language-Image Pre-training (CLIP) revolutionized how we map images and text into a shared semantic space. However, standard CLIP has known limitations: it requires massive batch sizes, is highly sensitive to dataset noise, and uses a relatively primitive training recipe (e.g., basic random cropping for images and no text augmentations).

To fix this, a wave of recent papers proposed adding auxiliary, non-contrastive losses borrowed from visual Self-Supervised Learning (SSL) methods like BYOL, SimSiam, or Barlow Twins. While these new models claimed superior performance, they also introduced advanced training techniques, making it impossible to tell whether the gains came from the sophisticated new loss functions or simply from better optimization and data augmentation. This paper sets out to disentangle these factors.

Methods

The authors tackle the problem from two angles:

  1. Building Faithful Non-Contrastive Baselines: They systematically translate four popular visual SSL loss functions into the vision-language pre-training (VLP) domain, creating four hybrid models: SiamLIP (SimSiam), BYOLIP (BYOL), BarLIP (Barlow Twins), and SwALIP (SwAV). These models combine the standard CLIP contrastive loss with cross-modal non-contrastive objectives.
Figure 2: Overview of the proposed improved baselines: SiamLIP, BYOLIP, BarLIP and SwALIP. For the sake of visualization, we do not show the CLIP loss used in combination to the non-contrastive loss and the projector networks in all the models. For BYOLIP we do not show the additional momentum encoder.
  1. The Improved Training Recipe ($\mathcal{R}$): They design a modernized training recipe for standard CLIP, which includes:
  2. Strong Image Augmentations: SimCLR-style transformations including aggressive cropping, color jittering, greyscaling, and Gaussian blur.
  3. Text Augmentations: Random stop-word removal and Easy Data Augmentation (EDA) techniques like synonym replacement and sentence shuffling.
  4. Projector Design: Introducing separate, deep Multi-Layer Perceptron (MLP) projectors for strongly augmented views, while retaining standard linear projectors for weakly augmented views.
  5. Regularization: Incorporating label smoothing on the strong contrastive loss and dropout on the text encoder.
Figure 1: Overall architecture of our CLIP 🚀model.

Datasets

The models were pre-trained on several standard public datasets of varying scales:

  • CC3M: 3.3 million image-text pairs.
  • CC12M: 12.4 million image-text pairs.
  • YFCC15M: A cleaned subset of 15 million pairs from the Yahoo Flickr Creative Commons dataset.
  • Open29M: The union of CC3M, CC12M, and YFCC15M (29 million pairs).
  • PMD46M: A 46 million subset of the Popular Multimodal Datasets.

Evaluation was performed primarily using zero-shot classification accuracy on ImageNet-1K, alongside an extended suite of 22 downstream vision benchmarks (including the VTAB benchmark).

Key Insights and Ideas

  • The Recipe Trumps the Loss: When evaluated using the basic CLIP training setup, the SSL-infused hybrid models show minor improvements. However, once the improved training recipe ($\mathcal{R}$) is applied to all models, the advantage of the complex auxiliary losses completely vanishes. Standard CLIP with the improved recipe ($\text{CLIP}^{\mathcal{R}}$) actually outperforms the more complicated hybrids.
  • Asymmetric Projectors Prevent Overfitting: A key architectural unlock is using deep MLP projectors only for the strongly augmented data streams, while keeping linear projectors for the weak streams. This provides enough regularization for the model to learn from heavily distorted views without collapsing or overfitting.
  • Label Smoothing Mitigates Web Noise: Web-scraped datasets are notoriously noisy. Applying label smoothing to the contrastive loss acts as an explicit regularizer, preventing the model from becoming overconfident on potentially mismatched image-text pairs.

Key Results

  • Massive Zero-Shot Boost: Applying the improved recipe to standard CLIP yields up to an 11% absolute increase (a ~25% relative boost) in zero-shot accuracy on ImageNet compared to the original CLIP baseline.
  • Resetting the State-of-the-Art: Pre-trained on the Open29M dataset, $\text{CLIP}^{\mathcal{R}}$ achieves 53.3% zero-shot accuracy on ImageNet, outperforming the previous best competitor, DeCLIP, by 4.0% absolute.
  • Data Efficiency: $\text{CLIP}^{\mathcal{R}}$ matches the performance of OpenCLIP models trained on the LAION dataset despite using 10x less data and 10x fewer total training samples.

Limitations and Future Work

The primary drawback of the improved recipe is its computational footprint. Generating and processing multiple strongly augmented views per image-text pair increases memory usage and training time.

While the authors demonstrate that this can be partially mitigated by downsampling the resolution of the strong views (saving 10-20% compute with minimal performance loss), finding more compute-efficient ways to inject these invariances remains an open challenge. Additionally, the authors note that text augmentations provided a much smaller performance boost than image augmentations, suggesting that cross-modal augmentation strategies deserve deeper exploration.

Summary updated

BibTeX
@article{fini2023improved,
  author = {Enrico Fini and Pietro Astolfi and Adriana Romero-Soriano and Jakob Verbeek and Michal Drozdzal},
  title = {{Improved baselines for vision-language pre-training}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=a7nvXxNmdV},
}
Figure