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

Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models

About

Pre-trained vision-language models (e.g., CLIP) have shown promising zero-shot generalization in many downstream tasks with properly designed text prompts. Instead of relying on hand-engineered prompts, recent works learn prompts using the training data from downstream tasks. While effective, training on domain-specific data reduces a model's generalization capability to unseen new domains. In this work, we propose test-time prompt tuning (TPT), a method that can learn adaptive prompts on the fly with a single test sample. For image classification, TPT optimizes the prompt by minimizing the entropy with confidence selection so that the model has consistent predictions across different augmented views of each test sample. In evaluating generalization to natural distribution shifts, TPT improves the zero-shot top-1 accuracy of CLIP by 3.6% on average, surpassing previous prompt tuning approaches that require additional task-specific training data. In evaluating cross-dataset generalization with unseen categories, TPT performs on par with the state-of-the-art approaches that use additional training data. Project page: https://azshue.github.io/TPT.

Manli Shu, Weili Nie, De-An Huang, Zhiding Yu, Tom Goldstein, Anima Anandkumar, Chaowei Xiao• 2022

Related benchmarks

TaskDatasetResultRank
Image ClassificationImageNet-1k (val)--
1498
Image ClassificationImageNet V2
Top-1 Acc66.83
749
Image ClassificationImageNet A
Top-1 Acc58.47
698
Image ClassificationCIFAR-100
Accuracy63.78
691
Semantic segmentationCityscapes
mIoU50.1
668
Image ClassificationStanford Cars
Accuracy66.3
660
Image ClassificationImageNet-1K
Top-1 Acc68.98
600
Image ClassificationDTD
Accuracy65.5
599
Image ClassificationImageNet-R
Top-1 Acc80.41
581
Image ClassificationFood-101
Accuracy84.7
570
Showing 10 of 329 rows
...

Other info

Code

Follow for update