CALIP: Zero-Shot Enhancement of CLIP with Parameter-free Attention

Ziyu Guo, Renrui Zhang, Longtian Qiu, Xianzheng Ma, Xupeng Miao +2 more
9/28/2022
cs.CVcs.AIcs.MM
transformer-attention

Official code: ZiyuGuo99/CALIP (91 stars, Python, last commit 2023-04-29).

Abstract

Contrastive Language-Image Pre-training (CLIP) has been shown to learn visual representations with great transferability, which achieves promising accuracy for zero-shot classification. To further improve its downstream performance, existing works propose additional learnable modules upon CLIP and fine-tune them by few-shot training sets.

Show full abstract

However, the resulting extra training cost and data requirement severely hinder the efficiency for model deployment and knowledge transfer. In this paper, we introduce a free-lunch enhancement method, CALIP, to boost CLIP's zero-shot performance via a parameter-free Attention module. Specifically, we guide visual and textual representations to interact with each other and explore cross-modal informative features via attention. As the pre-training has largely reduced the embedding distances between two modalities, we discard all learnable parameters in the attention and bidirectionally update the multi-modal features, enabling the whole process to be parameter-free and training-free. In this way, the images are blended with textual-aware signals and the text representations become visual-guided for better adaptive zero-shot alignment. We evaluate CALIP on various benchmarks of 14 datasets for both 2D image and 3D point cloud few-shot classification, showing consistent zero-shot performance improvement over CLIP. Based on that, we further insert a small number of linear layers in CALIP's attention module and verify our robustness under the few-shot settings, which also achieves leading performance compared to existing methods. Those extensive experiments demonstrate the superiority of our approach for efficient enhancement of CLIP.

View on arXivView PDF

Code Implementations(1)

ZiyuGuo99/CALIPOfficial100%

[AAAI 2023] Zero-Shot Enhancement of CLIP with Parameter-free Attention

912PythonNov 29, 20223 years ago

Similar Papers

Cite this paper

@article{guo2022calip,
  title  = {CALIP: Zero-Shot Enhancement of CLIP with Parameter-free Attention},
  author = {Ziyu Guo and Renrui Zhang and Longtian Qiu and Xianzheng Ma and Xupeng Miao and Xuming He and Bin Cui},
  year   = {2022},
  eprint = {2209.14169},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.14169}
}

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

Discussion