ComCLIP: Training-Free Compositional Image and Text Matching

Kenan Jiang, Xuehai He, Ruize Xu, Xin Eric Wang
11/25/2022
cs.CVcs.AIcs.CL

Official code: UCSB-AI/ComCLIP (37 stars, Python, MIT, last commit 2024-08-18).

Abstract

Contrastive Language-Image Pretraining (CLIP) has demonstrated great zero-shot performance for matching images and text. However, it is still challenging to adapt vision-lanaguage pretrained models like CLIP to compositional image and text matching -- a more challenging image and text matching task requiring the model understanding of compositional word concepts and visual components.

Show full abstract

Towards better compositional generalization in zero-shot image and text matching, in this paper, we study the problem from a causal perspective: the erroneous semantics of individual entities are essentially confounders that cause the matching failure. Therefore, we propose a novel \textbf{\textit{training-free}} compositional CLIP model (ComCLIP). ComCLIP disentangles input images into subjects, objects, and action sub-images and composes CLIP's vision encoder and text encoder to perform evolving matching over compositional text embedding and sub-image embeddings. In this way, ComCLIP can mitigate spurious correlations introduced by the pretrained CLIP models and dynamically evaluate the importance of each component. Experiments on four compositional image-text matching datasets: SVO, ComVG, Winoground, and VL-checklist, and two general image-text retrieval datasets: Flick30K, and MSCOCO demonstrate the effectiveness of our plug-and-play method, which boosts the \textbf{\textit{zero-shot}} inference ability of CLIP, SLIP, and BLIP2 even without further training or fine-tuning. Our codes can be found at https://github.com/eric-ai-lab/ComCLIP.

View on arXivView PDF

Code Implementations(1)

UCSB-AI/ComCLIPOfficial100%
MIT

Official implementation and dataset for the NAACL 2024 paper "ComCLIP: Training-Free Compositional Image and Text Matching"

375Python, ShellNov 10, 20232 years agoMIT
blip2causalityclipcompositionalityflickr30k+7 more

Similar Papers

Cite this paper

@article{jiang2022comclip,
  title  = {ComCLIP: Training-Free Compositional Image and Text Matching},
  author = {Kenan Jiang and Xuehai He and Ruize Xu and Xin Eric Wang},
  year   = {2022},
  eprint = {2211.13854},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.13854}
}

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/2211.13854.svg)](https://codeofpaper.com/paper/2211.13854)

Discussion