Table of Contents
Fetching ...

Selective Vision-Language Subspace Projection for Few-shot CLIP

Xingyu Zhu, Beier Zhu, Yi Tan, Shuo Wang, Yanbin Hao, Hanwang Zhang

TL;DR

Selective Vision-Language Subspace Projection (SSP) targets modality gaps in CLIP by building two training-free subspaces from selective local image features: a vision subspace for images and a language subspace for texts. By projecting image and text features into these subspaces using SVD-based operators, SSP strengthens cross-modal alignment and improves few-shot classification without additional learnable parameters. Extensive experiments on 11 datasets show SSP consistently enhances alignment and base-model performance, with additional benefits in out-of-distribution generalization and minimal computation overhead. The approach is modular and can be integrated with existing CLIP-based methods to boost performance in practical, resource-constrained settings.

Abstract

Vision-language models such as CLIP are capable of mapping the different modality data into a unified feature space, enabling zero/few-shot inference by measuring the similarity of given images and texts. However, most existing methods overlook modality gaps in CLIP's encoded features, which is shown as the text and image features lie far apart from each other, resulting in limited classification performance. To tackle this issue, we introduce a method called Selective Vision-Language Subspace Projection (SSP), which incorporates local image features and utilizes them as a bridge to enhance the alignment between image-text pairs. Specifically, our SSP framework comprises two parallel modules: a vision projector and a language projector. Both projectors utilize local image features to span the respective subspaces for image and texts, thereby projecting the image and text features into their respective subspaces to achieve alignment. Moreover, our approach entails only training-free matrix calculations and can be seamlessly integrated into advanced CLIP-based few-shot learning frameworks. Extensive experiments on 11 datasets have demonstrated SSP's superior text-image alignment capabilities, outperforming the state-of-the-art alignment methods. The code is available at https://github.com/zhuhsingyuu/SSP

Selective Vision-Language Subspace Projection for Few-shot CLIP

TL;DR

Selective Vision-Language Subspace Projection (SSP) targets modality gaps in CLIP by building two training-free subspaces from selective local image features: a vision subspace for images and a language subspace for texts. By projecting image and text features into these subspaces using SVD-based operators, SSP strengthens cross-modal alignment and improves few-shot classification without additional learnable parameters. Extensive experiments on 11 datasets show SSP consistently enhances alignment and base-model performance, with additional benefits in out-of-distribution generalization and minimal computation overhead. The approach is modular and can be integrated with existing CLIP-based methods to boost performance in practical, resource-constrained settings.

Abstract

Vision-language models such as CLIP are capable of mapping the different modality data into a unified feature space, enabling zero/few-shot inference by measuring the similarity of given images and texts. However, most existing methods overlook modality gaps in CLIP's encoded features, which is shown as the text and image features lie far apart from each other, resulting in limited classification performance. To tackle this issue, we introduce a method called Selective Vision-Language Subspace Projection (SSP), which incorporates local image features and utilizes them as a bridge to enhance the alignment between image-text pairs. Specifically, our SSP framework comprises two parallel modules: a vision projector and a language projector. Both projectors utilize local image features to span the respective subspaces for image and texts, thereby projecting the image and text features into their respective subspaces to achieve alignment. Moreover, our approach entails only training-free matrix calculations and can be seamlessly integrated into advanced CLIP-based few-shot learning frameworks. Extensive experiments on 11 datasets have demonstrated SSP's superior text-image alignment capabilities, outperforming the state-of-the-art alignment methods. The code is available at https://github.com/zhuhsingyuu/SSP
Paper Structure (22 sections, 13 equations, 6 figures, 5 tables)

This paper contains 22 sections, 13 equations, 6 figures, 5 tables.

Figures (6)

  • Figure 1: A illustration of modality gaps conducted on ImageNet Imagenet with ViT-B/32. (a) Text and image features from CLIP lie in different cones. (b) Text and image features aligned by SSP almost line in the same cone. (c) Comparisons of distribution metrics for CLIP and SSP.
  • Figure 2: Comparisons of class activations maps, where the CLIP's encoded features may concentrate on opposite or noisy regions as discussed in clipsur, while our SSP-aligned features primarily foreground objects.
  • Figure 3: The training images and extended labels are sent to the frozen visual encoder and textual encoder to extract features, respectively. Subsequently, the related local image features (features maps) are employed to construct the vision subspace and language subspaces, which are performed to align the extracted image and text features through subspace projection. Finally, a projected testing feature along with projected training features are inputted into the classification framework to predict results.
  • Figure 4: The main differences between our SSP and other adapter-based methods tipAPELFA.
  • Figure 5: Comparison of classification accuracy and percentage measurements by varying the number of selected local image features under the 16-shot setting: (a) and (b) classification results using only vision subspace projection and language subspace, respectively, (c) and (d) relationships between text features and local image features selected by image features, and between image features and local image features selected by text features, respectively
  • ...and 1 more figures