Skip to main content
QUICK REVIEW

[Paper Review] CyCLIP: Cyclic Contrastive Language-Image Pretraining

Shashank Goel, Hritik Bansal|arXiv (Cornell University)|May 28, 2022
Multimodal Machine Learning ApplicationsComputer Science46 citations
TL;DR

CyCLIP adds cycle-consistency regularizers to CLIP to enforce geometric consistency between image and text representations, improving zero-shot classification and robustness over CLIP.

ABSTRACT

Recent advances in contrastive representation learning over paired image-text data have led to models such as CLIP that achieve state-of-the-art performance for zero-shot classification and distributional robustness. Such models typically require joint reasoning in the image and text representation spaces for downstream inference tasks. Contrary to prior beliefs, we demonstrate that the image and text representations learned via a standard contrastive objective are not interchangeable and can lead to inconsistent downstream predictions. To mitigate this issue, we formalize consistency and propose CyCLIP, a framework for contrastive representation learning that explicitly optimizes for the learned representations to be geometrically consistent in the image and text space. In particular, we show that consistent representations can be learned by explicitly symmetrizing (a) the similarity between the two mismatched image-text pairs (cross-modal consistency); and (b) the similarity between the image-image pair and the text-text pair (in-modal consistency). Empirically, we show that the improved consistency in CyCLIP translates to significant gains over CLIP, with gains ranging from 10%-24% for zero-shot classification accuracy on standard benchmarks (CIFAR-10, CIFAR-100, ImageNet1K) and 10%-27% for robustness to various natural distribution shifts. The code is available at https://github.com/goel-shashank/CyCLIP.

Motivation & Objective

  • Identify geometry-related inconsistencies in standard contrastive image-text learning (CLIP).
  • Propose cycle-consistency regularizers to enforce cross-modal and in-modal geometric structure.
  • Demonstrate empirical gains of CyCLIP over CLIP on zero-shot classification and distribution shifts.
  • Analyze how the added geometric constraints improve concept hierarchy capture in learned representations.

Proposed method

  • Build on CLIP by adding two cycle-consistency regularizers to the baseline contrastive loss: in-modal consistency and cross-modal consistency.
  • Cross-modal cyclic consistency encourages the similarity between mismatched image-text pairs to be symmetric (I_j with T_k vs I_k with T_j).
  • In-modal cyclic consistency encourages similarity symmetry between image-image pairs and text-text pairs (I_j with I_k vs T_k with T_j).
  • Combine regularizers with the standard CLIP loss as L_CyCLIP = L_CLIP + lambda1 L_I-Cyclic + lambda2 L_C-Cyclic with lambda1 = lambda2 = 0.25.
  • Pretrain on Conceptual Captions 3M using ResNet-50 as the image encoder and a transformer text encoder; embedding dimension is 1024.

Experimental results

Research questions

  • RQ1Does enforcing cycle consistency in image-text representations reduce downstream inconsistencies between image-space and text-space predictions?
  • RQ2Do cross-modal and in-modal cyclic regularizers lead to improved zero-shot classification and robustness to distribution shifts compared to CLIP?
  • RQ3How do the cyclic constraints affect alignment and uniformity of multimodal representations and the model’s ability to capture coarse- and fine-grained concept hierarchies?

Key findings

  • CyCLIP achieves 10.2%/10.6%/23.9% absolute improvements over CLIP in zero-shot Top-1 accuracy on ImageNet-1K, CIFAR-10, and CIFAR-100 respectively.
  • CyCLIP yields 10%–27% gains on zero-shot classification across standard distribution-shift benchmarks (ImageNetV2, ImageNetSketch, ImageNet-A, ImageNet-R).
  • Consistency scores (agreement between image-space k-NN and text-space predictions) improve by about 8.6–10.0 percentage points across CIFAR-10, CIFAR-100, and ImageNet1K (Top1–Top10).
  • CyCLIP produces better coarse-grained (concept-level) accuracy than CLIP, indicating stronger capture of high-level hierarchies.
  • In image-text retrieval, CyCLIP shows marginal zero-shot gains and notable improvements after fine-tuning on Flickr30K and MSCOCO.

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.