Skip to main content
QUICK REVIEW

[Paper Review] Dual Modality Prompt Tuning for Vision-Language Pre-Trained Model

Yinghui Xing, Qirui Wu|arXiv (Cornell University)|Aug 17, 2022
Multimodal Machine Learning ApplicationsComputer Science6 citations
TL;DR

This paper proposes Dual Modality Prompt Tuning (DPT), a novel method that jointly optimizes learnable text and visual prompts to improve few-shot vision-language classification. By dynamically generating class-aware visual prompts via cross-attention between text and image tokens, DPT enhances feature concentration on target concepts, achieving state-of-the-art accuracy of 79.47% on 11 datasets under 16-shot settings, outperforming prior methods significantly.

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.

Motivation & Objective

  • To address the limitation of existing prompt tuning methods that only optimize text prompts while keeping image features fixed, which fails to adapt visual representations to downstream tasks.
  • To improve feature alignment by enabling the vision encoder to focus on target visual concepts through learnable visual prompts.
  • To develop a class-aware visual prompt mechanism that integrates task-specific and instance-specific information via cross-attention between text and image embeddings.
  • To demonstrate the effectiveness and generalization of dual-modality prompt tuning across diverse few-shot vision benchmarks.
  • To show that joint tuning of both modalities yields superior performance compared to tuning only text or visual prompts.

Proposed method

  • Introduces a dual-modality prompt tuning (DPT) framework that trains both text prompts (learnable vectors in the language stream) and visual prompts (learnable vectors injected into image patch tokens) in a joint, end-to-end manner.
  • Applies visual prompts by inserting trainable parameters before each transformer block in a Vision Transformer (ViT) encoder, modifying image patch token embeddings through self-attention mechanisms.
  • Proposes class-aware visual prompt tuning (CAVPT), where visual prompts are dynamically generated via cross-attention between text prompt features and image patch token embeddings.
  • Uses cross-attention to inject downstream task information (from text prompts) into visual features, enabling the model to attend more strongly to relevant visual concepts.
  • Maintains the pretrained image and text encoders frozen, while only tuning the prompt parameters, ensuring efficient adaptation with minimal parameters.
  • Employs a weighted combination of text and visual prompt supervision, with hyperparameter α controlling the balance between the two modalities.

Experimental results

Research questions

  • RQ1Can joint tuning of text and visual prompts improve few-shot vision-language classification beyond single-modality prompt tuning?
  • RQ2Does dynamically generated, class-aware visual prompting enhance attention on the target visual concept compared to fixed or non-aware visual prompts?
  • RQ3How does the performance of DPT compare to zero-shot CLIP, CoOp, and other prompt tuning baselines across diverse few-shot datasets?
  • RQ4What is the optimal length and configuration of visual prompts for maximizing performance without overfitting?
  • RQ5Does the effectiveness of DPT generalize across different vision transformer backbones, such as ViT-B/16 and ViT-B/32?

Key findings

  • DPT achieves a new state-of-the-art average accuracy of 79.47% across 11 few-shot datasets under 16-shot settings, significantly outperforming zero-shot CLIP (61.32%) and CoOp (76.02%).
  • The ablation study shows that visual prompt tuning alone improves accuracy by 3.45% over CoOp, and joint tuning of both modalities further boosts performance by 0.45%.
  • Class-aware visual prompt tuning (CAVPT) with 10 visual prompt tokens achieves the highest average accuracy of 79.47%, outperforming shorter (5) and longer (50) prompt lengths.
  • The method generalizes well across different ViT backbones, with DPT achieving 78.96% on ViT-B/16 and 79.47% on ViT-B/32, confirming its robustness.
  • Visualization results confirm that DPT concentrates attention more effectively on the ground-truth target object, while baseline methods like CoOp and zero-shot CLIP highlight multiple irrelevant objects.
  • The ablation with varying α values shows that a balanced combination (α=0.5) yields optimal performance, indicating that both modalities contribute significantly to the final result.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.