Patch Ranking: Efficient CLIP by Learning to Rank Local Patches

Cheng-En Wu, Jinhong Lin, Yu Hen Hu, Pedro Morgado
9/22/2024
cs.CVcs.LG

No official code found. Best implementation: CEWu/PatchRanking (4 stars, MIT, last commit 2025-02-28).

Abstract

Contrastive image-text pre-trained models such as CLIP have shown remarkable adaptability to downstream tasks. However, they face challenges due to the high computational requirements of the Vision Transformer (ViT) backbone. Current strategies to boost ViT efficiency focus on pruning patch tokens but fall short in addressing the multimodal nature of CLIP and identifying the optimal subset of tokens for maximum performance. To address this, we propose greedy search methods to establish a "Golden Ranking" and introduce a lightweight predictor specifically trained to approximate this Ranking. To compensate for any performance degradation resulting from token pruning, we incorporate learnable visual tokens that aid in restoring and potentially enhancing the model's performance. Our work presents a comprehensive and systematic investigation of pruning tokens within the ViT backbone of CLIP models. Through our framework, we successfully reduced 40% of patch tokens in CLIP's ViT while only suffering a minimal average accuracy loss of 0.3 across seven datasets. Our study lays the groundwork for building more computationally efficient multimodal models without sacrificing their performance, addressing a key challenge in the application of advanced vision-language models.

View on arXivView PDF

Code Implementations(1)

CEWu/PatchRankingCommunity100%
MIT

[WACV 2025] Patch Ranking: Efficient CLIP by Learning to Rank Local Patches

42Shell, PythonNov 28, 20241 years agoMIT

Similar Papers

Cite this paper

@article{wu2024patch,
  title  = {Patch Ranking: Efficient CLIP by Learning to Rank Local Patches},
  author = {Cheng-En Wu and Jinhong Lin and Yu Hen Hu and Pedro Morgado},
  year   = {2024},
  eprint = {2409.14607},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14607v2}
}

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

Discussion