TL;DR
This paper introduces a novel "task-oriented multi-modal mutual learning" framework to improve how large vision-language models (VLMs) adapt to new tasks. By developing "class-aware text prompts" and "text-guided feature tuning," the method enhances both text and image representations, leading to significantly better generalization performance on downstream tasks compared to existing approaches.
What Problem Does This Paper Address?
Large pre-trained vision-language models (VLMs) like CLIP have shown impressive capabilities in zero-shot and few-shot learning. However, adapting these massive models to specific downstream tasks efficiently is challenging. Fine-tuning the entire model is computationally prohibitive and can degrade its pre-trained representations. Existing prompt learning methods, such as CoOp and CoCoOp, aim to address this by learning "soft prompts" – learnable text embeddings that guide the model. While CoCoOp improves upon static prompts by making them image-conditional, it suffers from a critical flaw: it fuses identical image semantics with prompts for different classes, leading to ambiguity and weakening class discrimination. This paper tackles this issue by proposing a method that not only generates more discriminative prompts but also actively guides the image encoder to focus on task-relevant features, fostering a synergistic relationship between the text and image modalities.
Methods
The proposed method, "Task-Oriented Multi-Modal Mutual Learning," consists of two core components:
- Class-Aware Text Prompts (CTP): Unlike previous methods that might use generic image semantics for all prompts, CTP leverages class-specific image information to enrich text prompts. It achieves this by calculating an image-to-text attention map between the text prompt and image features. This map highlights regions in the image that are semantically related to the specific class being prompted. These relevant image features are then incorporated into the text prompt, creating a more contextually aware and class-specific prompt. This approach aims to reduce ambiguity and improve discrimination between different classes.
- Text-Guided Feature Tuning (TFT): This component addresses the issue of the image encoder potentially focusing on irrelevant parts of an image. TFT uses the generated text prompts (specifically, the augmented class-aware prompts from CTP) to guide the image branch. It computes a text-to-image attention map, identifying image patches that are semantically relevant to the text prompt. These features are then used to tune the image representations, encouraging the model to focus on task-relevant regions.
These two components work together in a mutual learning strategy. The CTP enhances text prompts using image information, and the TFT enhances image features using text information. A contrastive loss function is used to align these augmented text and image representations, promoting a tighter coupling and mutual benefit between the two modalities throughout the training process.
Datasets
The paper evaluates its method on 11 standard image recognition datasets for various tasks:
- Base-to-New Generalization, Few-Shot Classification, Cross-Dataset Transfer: ImageNet, Caltech101, OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft, SUN397, DTD, EuroSAT, UCF101.
- Domain Generalization: ImageNet (source) and its variants: ImageNetV2, ImageNet-Sketch, ImageNet-A, ImageNet-R (targets).
No new datasets were introduced in this paper.
Key Insights and Ideas
- Class-specific image semantics are crucial for prompt generation: Simply conditioning prompts on generic image features (as in CoCoOp) can lead to ambiguity. By explicitly linking image regions to specific class labels within prompts, discrimination is significantly improved.
- Mutual learning between text and image branches is key: The proposed method demonstrates that a synergistic relationship, where text guides image and image guides text, leads to superior performance. This is more effective than treating the modalities independently or with simpler fusion strategies.
- Attention mechanisms are powerful for cross-modal alignment: The use of attention maps for both image-to-text (in CTP) and text-to-image (in TFT) effectively identifies and leverages semantically relevant information from each modality.
- Focusing the image encoder on task-relevant regions is vital: The TFT component shows that even with good prompts, the image branch needs to be guided to avoid distractions, leading to more accurate feature extraction.
Key Results
The proposed method achieves state-of-the-art results on several tasks:
- Base-to-New Generalization: The method significantly outperforms CoCoOp, achieving an average improvement of 4.03% on new classes and 3.19% on harmonic-mean across 11 benchmarks. It also shows improvements on base classes.
- Few-Shot Classification: The method surpasses baselines, including CoCoOp, with an average improvement of 5.53% over 11 datasets.
- Cross-Dataset Transfer: It achieves the best average accuracy on 11 datasets, demonstrating strong transferability.
- Domain Generalization: The method shows significant performance on ImageNet variants, indicating robustness to distribution shifts.
- Ablation Studies: Both CTP and TFT modules individually contribute to performance gains, and their combination yields the best results. The proposed attention-based structure for CTP and TFT also outperforms simpler MLP-based designs.
Limitations and Future Work
- Batch Size Limitation: Similar to CoCoOp, the method learns image-conditioned representations, requiring a batch size of 1 for training, which is not efficient. The authors aim to address this efficiency issue in future work.
- Future Directions: The authors suggest extending the adaptation of VLMs to more complex vision tasks such as semantic segmentation and object detection.
Summary updated