Test-Time Prompt Tuning for Vision-Language Models
摘要
Pretrained contrastive vision-language models (VLMs) (e.g., CLIP) have shown promising zero-shot generalization in many downstream tasks (e.g., image classification) with properly designed text prompts. Instead of relying on hand-engineered prompts, prompt tuning learns prompts using the training data from the downstream data distribution. Although effective, training on domain-specific data hurts a model’s generalization capability to unseen new domains. In this chapter, we discuss test-time prompt tuning (TPT), a method that learns adaptive prompts on the fly using a single test sample. In the case of image classification, TPT optimizes the prompt by minimizing entropy with confidence selection so that the model has consistent predictions across different augmented views of each test sample. When evaluated on natural distribution shifts, TPT surpasses previous prompt tuning methods that require additional task-specific training data. When evaluated under the cross-dataset generalization setting, TPT performs on par with the state-of-the-art methods that use additional training data.