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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Test-Time Prompt Tuning for Vision-Language Models

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

摘要

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.