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

GalLoP: Learning Global and Local Prompts for Vision-Language Models

About

Prompt learning has been widely adopted to efficiently adapt vision-language models (VLMs), e.g. CLIP, for few-shot image classification. Despite their success, most prompt learning methods trade-off between classification accuracy and robustness, e.g. in domain generalization or out-of-distribution (OOD) detection. In this work, we introduce Global-Local Prompts (GalLoP), a new prompt learning method that learns multiple diverse prompts leveraging both global and local visual features. The training of the local prompts relies on local features with an enhanced vision-text alignment. To focus only on pertinent features, this local alignment is coupled with a sparsity strategy in the selection of the local features. We enforce diversity on the set of prompts using a new ``prompt dropout'' technique and a multiscale strategy on the local prompts. GalLoP outperforms previous prompt learning methods on accuracy on eleven datasets in different few shots settings and with various backbones. Furthermore, GalLoP shows strong robustness performances in both domain generalization and OOD detection, even outperforming dedicated OOD detection methods. Code and instructions to reproduce our results: https://github.com/MarcLafon/gallop.

Marc Lafon, Elias Ramzi, Cl\'ement Rambour, Nicolas Audebert, Nicolas Thome• 2024

Related benchmarks

TaskDatasetResultRank
Image ClassificationStanford Cars
Accuracy89.2
635
Image ClassificationFlowers102
Accuracy98.8
558
Image ClassificationSUN397
Accuracy77.2
441
Image ClassificationEuroSAT
Accuracy90.1
207
Image ClassificationFGVC Aircraft--
203
Image ClassificationOxfordPets
Accuracy94.1
160
Texture ClassificationDTD
Accuracy75.5
119
Image ClassificationImageNet Domain Generalization OOD Variants (test)
ImageNet Acc71.14
43
Action RecognitionUCF101
Accuracy86.9
11
Out-of-Distribution DetectionSkin40 (test)
Accuracy76.75
9
Showing 10 of 12 rows

Other info

Follow for update