CyCLIP: Cyclic Contrastive Language-Image Pretraining

Shashank Goel, Hritik Bansal, Sumit Bhatia, Ryan A. Rossi, Vishwa Vinay +1 more
5/28/2022
cs.CVcs.LG
contrastive-ssl

Official code: goel-shashank/CyCLIP (126 stars, Python, last commit 2023-02-21).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

12616Python, Jupyter NotebookNov 15, 20213 years ago

Similar Papers

Cite this paper

@article{goel2022cyclip,
  title  = {CyCLIP: Cyclic Contrastive Language-Image Pretraining},
  author = {Shashank Goel and Hritik Bansal and Sumit Bhatia and Ryan A. Rossi and Vishwa Vinay and Aditya Grover},
  year   = {2022},
  eprint = {2205.14459},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.14459}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.14459.svg)](https://codeofpaper.com/paper/2205.14459)

Discussion