Dual Modality Prompt Tuning for Vision-Language Pre-Trained Model
Yinghui Xing, Qirui Wu, De Cheng, Shizhou Zhang, Guoqiang Liang, Peng Wang, Yanning Zhang
TL;DR
This work tackles adapting large vision-language pre-trained models to downstream tasks with limited data. It introduces Dual-modality Prompt Tuning (DPT), jointly learning text prompts and visual prompts, and enhances it with Class-Aware Visual Prompt Tuning (CAVPT) that uses cross-attention between text prompts and image patches to concentrate features on target concepts. Across 11 datasets and various few-shot settings, DPT (especially with CAVPT) consistently outperforms existing prompt-based methods and zero-shot CLIP, demonstrating strong generalization and robustness. The approach offers a practical, parameter-efficient path to leverages foundation VLPs for diverse classification tasks, with public code provided.
Abstract
With the emergence of large pre-trained vison-language model like CLIP, transferable representations can be adapted to a wide range of downstream tasks via prompt tuning. Prompt tuning tries to probe the beneficial information for downstream tasks from the general knowledge stored in the pre-trained model. A recently proposed method named Context Optimization (CoOp) introduces a set of learnable vectors as text prompt from the language side. However, tuning the text prompt alone can only adjust the synthesized "classifier", while the computed visual features of the image encoder can not be affected , thus leading to sub-optimal solutions. In this paper, we propose a novel Dual-modality Prompt Tuning (DPT) paradigm through learning text and visual prompts simultaneously. To make the final image feature concentrate more on the target visual concept, a Class-Aware Visual Prompt Tuning (CAVPT) scheme is further proposed in our DPT, where the class-aware visual prompt is generated dynamically by performing the cross attention between text prompts features and image patch token embeddings to encode both the downstream task-related information and visual instance information. Extensive experimental results on 11 datasets demonstrate the effectiveness and generalization ability of the proposed method. Our code is available in https://github.com/fanrena/DPT.
