Table of Contents
Fetching ...

Efficient and Long-Tailed Generalization for Pre-trained Vision-Language Model

Jiang-Xin Shi, Chi Zhang, Tong Wei, Yu-Feng Li

TL;DR

This work addresses the practical challenges of adapting large vision-language models like CLIP to long-tailed and open-set regimes. It introduces Candle, a lightweight framework that operates in the feature space and combines Compensating Logit-Adjusted Loss, cross-modal attention, and virtual prototypes to generalize from base to new classes efficiently. Empirical results across 11 diverse datasets show Candle achieves state-of-the-art harmonic mean performance in base-to-new settings, competitive cross-dataset transfer, and robust domain generalization, all with substantially reduced training time. By treating CLIP as a black box and avoiding full-backbone fine-tuning, Candle offers a practical, scalable solution for long-tailed generalization in real-world deployment.

Abstract

Pre-trained vision-language models like CLIP have shown powerful zero-shot inference ability via image-text matching and prove to be strong few-shot learners in various downstream tasks. However, in real-world scenarios, adapting CLIP to downstream tasks may encounter the following challenges: 1) data may exhibit long-tailed data distributions and might not have abundant samples for all the classes; 2) There might be emerging tasks with new classes that contain no samples at all. To overcome them, we propose a novel framework to achieve efficient and long-tailed generalization, which can be termed as Candle. During the training process, we propose compensating logit-adjusted loss to encourage large margins of prototypes and alleviate imbalance both within the base classes and between the base and new classes. For efficient adaptation, we treat the CLIP model as a black box and leverage the extracted features to obtain visual and textual prototypes for prediction. To make full use of multi-modal information, we also propose cross-modal attention to enrich the features from both modalities. For effective generalization, we introduce virtual prototypes for new classes to make up for their lack of training images. Candle achieves state-of-the-art performance over extensive experiments on 11 diverse datasets while substantially reducing the training time, demonstrating the superiority of our approach. The source code is available at https://github.com/shijxcs/Candle.

Efficient and Long-Tailed Generalization for Pre-trained Vision-Language Model

TL;DR

This work addresses the practical challenges of adapting large vision-language models like CLIP to long-tailed and open-set regimes. It introduces Candle, a lightweight framework that operates in the feature space and combines Compensating Logit-Adjusted Loss, cross-modal attention, and virtual prototypes to generalize from base to new classes efficiently. Empirical results across 11 diverse datasets show Candle achieves state-of-the-art harmonic mean performance in base-to-new settings, competitive cross-dataset transfer, and robust domain generalization, all with substantially reduced training time. By treating CLIP as a black box and avoiding full-backbone fine-tuning, Candle offers a practical, scalable solution for long-tailed generalization in real-world deployment.

Abstract

Pre-trained vision-language models like CLIP have shown powerful zero-shot inference ability via image-text matching and prove to be strong few-shot learners in various downstream tasks. However, in real-world scenarios, adapting CLIP to downstream tasks may encounter the following challenges: 1) data may exhibit long-tailed data distributions and might not have abundant samples for all the classes; 2) There might be emerging tasks with new classes that contain no samples at all. To overcome them, we propose a novel framework to achieve efficient and long-tailed generalization, which can be termed as Candle. During the training process, we propose compensating logit-adjusted loss to encourage large margins of prototypes and alleviate imbalance both within the base classes and between the base and new classes. For efficient adaptation, we treat the CLIP model as a black box and leverage the extracted features to obtain visual and textual prototypes for prediction. To make full use of multi-modal information, we also propose cross-modal attention to enrich the features from both modalities. For effective generalization, we introduce virtual prototypes for new classes to make up for their lack of training images. Candle achieves state-of-the-art performance over extensive experiments on 11 diverse datasets while substantially reducing the training time, demonstrating the superiority of our approach. The source code is available at https://github.com/shijxcs/Candle.
Paper Structure (16 sections, 9 equations, 5 figures, 11 tables)

This paper contains 16 sections, 9 equations, 5 figures, 11 tables.

Figures (5)

  • Figure 1: Candle achieves significant improvements on multiple imbalanced base-to-new generalization tasks.
  • Figure 2: An overview of the proposed framework.
  • Figure 3: Absolute improvement on the base classes with imbalance ratio 10, 20, 50
  • Figure 4: Absolute improvement on the new classes with imbalance ratio 10, 20, 50
  • Figure 5: Ablation studies on cross-modal attention (left) and virtual prototypes (right). The experiment is conducted on the imbalanced base-to-new generalization task with an imbalance ratio of 50.