Skip to main content
QUICK REVIEW

[Paper Review] Data Determines Distributional Robustness in Contrastive Language Image Pre-training (CLIP)

Alex Chengyu Fang, Gabriel Ilharco|arXiv (Cornell University)|May 3, 2022
Multimodal Machine Learning ApplicationsComputer Science27 citations
TL;DR

The study systematically tests five potential causes of CLIP-style robustness and concludes that training distribution diversity dominates robustness, with language supervision and loss function contributing little. It also introduces ImageNet-Captions to enable controlled language-image experiments and shows that image distribution is the main driver of robustness across natural shifts.

ABSTRACT

Contrastively trained language-image models such as CLIP, ALIGN, and BASIC have demonstrated unprecedented robustness to multiple challenging natural distribution shifts. Since these language-image models differ from previous training approaches in several ways, an important question is what causes the large robustness gains. We answer this question via a systematic experimental investigation. Concretely, we study five different possible causes for the robustness gains: (i) the training set size, (ii) the training distribution, (iii) language supervision at training time, (iv) language supervision at test time, and (v) the contrastive loss function. Our experiments show that the more diverse training distribution is the main cause for the robustness gains, with the other factors contributing little to no robustness. Beyond our experimental results, we also introduce ImageNet-Captions, a version of ImageNet with original text annotations from Flickr, to enable further controlled experiments of language-image training.

Motivation & Objective

  • Identify the factors potentially responsible for robustness in contrastively trained language-image models (CLIP, ALIGN, BASIC).
  • Quantify the impact of training set size, training distribution, language supervision at training and test time, and the contrastive loss on robustness.
  • Provide controlled experimental frameworks and baselines to isolate language effects from data distribution effects.
  • Introduce ImageNet-Captions to enable controlled language-image experiments and offer a simpler baseline to mimic CLIP-like robustness.

Proposed method

  • Conduct controlled experiments varying five candidate factors: training set size, training distribution, language supervision at training time, language supervision at test time (prompts), and the contrastive loss.
  • Introduce ImageNet-Captions, a subset of ImageNet with original Flickr captions, to enable language-image training on the same images used for standard classification.
  • Create a simple language-free baseline by pretraining on images and then matching to ImageNet classes via text matches, to isolate language effects.
  • Evaluate robustness using effective robustness, defined as the difference between observed test accuracy and a baseline mapping from in-domain accuracy to out-of-distribution accuracy.
  • Train CLIP on ImageNet-Captions and compare to image-only classification baselines on ImageNet and natural distribution shifts (ImageNet-V2, ImageNet-R, ImageNet-Sketch, ObjectNet, ImageNet-A).
  • Experiment with YFCC-15M to test whether image-only pretraining plus minimal text matching can reach CLIP-like robustness.

Experimental results

Research questions

  • RQ1Does increasing training set size alone improve effective robustness in CLIP-like models?
  • RQ2Is robustness primarily driven by training distribution diversity rather than language supervision or contrastive loss?
  • RQ3Can language supervision at training or test time account for CLIP-like robustness, or is distributional diversity the main factor?
  • RQ4Does a language-free training paradigm (images only plus simple text matching) achieve similar effective robustness to CLIP?
  • RQ5What is the role of prompts and templates at test time in contributing to robustness?

Key findings

  • Training distribution diversity is the main driver of CLIP-like robustness across natural distribution shifts.
  • Language supervision at training time does not significantly increase robustness when the training images are the same as a standard classification dataset.
  • Language supervision mainly facilitates training on diverse visual distributions by avoiding the need for consistent class labels.
  • A simple image-only pretraining followed by minimal text matching can match CLIP’s robustness on several distribution shifts, indicating data distribution, not language supervision, drives robustness.
  • ImageNet-Captions enables controlled comparisons between language-image training and purely classification training on the same images.
  • Prompting strategies at test time can alter accuracy and robustness, but the changes in effective robustness are largely tied to overall accuracy differences rather than intrinsic robustness gains from prompts.

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.