Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

MaPLe: Multi-modal Prompt Learning

About

Pre-trained vision-language (V-L) models such as CLIP have shown excellent generalization ability to downstream tasks. However, they are sensitive to the choice of input text prompts and require careful selection of prompt templates to perform well. Inspired by the Natural Language Processing (NLP) literature, recent CLIP adaptation approaches learn prompts as the textual inputs to fine-tune CLIP for downstream tasks. We note that using prompting to adapt representations in a single branch of CLIP (language or vision) is sub-optimal since it does not allow the flexibility to dynamically adjust both representation spaces on a downstream task. In this work, we propose Multi-modal Prompt Learning (MaPLe) for both vision and language branches to improve alignment between the vision and language representations. Our design promotes strong coupling between the vision-language prompts to ensure mutual synergy and discourages learning independent uni-modal solutions. Further, we learn separate prompts across different early stages to progressively model the stage-wise feature relationships to allow rich context learning. We evaluate the effectiveness of our approach on three representative tasks of generalization to novel classes, new target datasets and unseen domain shifts. Compared with the state-of-the-art method Co-CoOp, MaPLe exhibits favorable performance and achieves an absolute gain of 3.45% on novel classes and 2.72% on overall harmonic-mean, averaged over 11 diverse image recognition datasets. Our code and pre-trained models are available at https://github.com/muzairkhattak/multimodal-prompt-learning.

Muhammad Uzair Khattak, Hanoona Rasheed, Muhammad Maaz, Salman Khan, Fahad Shahbaz Khan• 2022

Related benchmarks

TaskDatasetResultRank
Person Re-IdentificationDuke MTMC-reID (test)
Rank-163
1018
Image ClassificationImageNet 1k (test)
Top-1 Accuracy67.96
848
Image ClassificationImageNet A
Top-1 Acc50.9
654
Image ClassificationStanford Cars
Accuracy83.6
635
Image ClassificationImageNet V2
Top-1 Acc64.07
611
Image ClassificationImageNet-1K
Top-1 Acc70.72
600
Image ClassificationEuroSAT
Accuracy92.33
569
Image ClassificationFlowers102
Accuracy97
558
Image ClassificationFood-101
Accuracy90.71
542
Image ClassificationDTD
Accuracy71.33
542
Showing 10 of 479 rows
...

Other info

Code

Follow for update