Skip to main content
QUICK REVIEW

[Paper Review] Prompt Tuning with Soft Context Sharing for Vision-Language Models

Kun Ding, Ying Wang|arXiv (Cornell University)|Aug 29, 2022
Domain Adaptation and Few-Shot LearningComputer Science9 citations
TL;DR

This paper proposes SoftCPT, a novel multi-task prompt tuning method for vision-language models that uses a shared meta network to generate task-specific, continuously soft-shared prompt vectors from learnable meta prompts and task names. Experiments show SoftCPT significantly outperforms CoOp and hard prompt sharing across three few-shot datasets, demonstrating improved accuracy and stability in multi-task few-shot image recognition.

ABSTRACT

Vision-language models have recently shown great potential on many tasks in computer vision. Meanwhile, prior work demonstrates prompt tuning designed for vision-language models could acquire superior performance on few-shot image recognition compared to linear probe, a strong baseline. In practice, many few-shot tasks are inherently correlated, particularly within specialized domains. However, such information is overlooked previously. Inspired by the fact that modeling task relationship by multi-task learning can usually boost performance, we propose a novel method SoftCPT (Soft Context Sharing for Prompt Tuning) to tune pre-trained vision-language models on multiple target few-shot tasks jointly. Specifically, we design a task-shared meta network to generate prompt context for each task using task name together with a learnable task context as input. The parameters of this meta network as well as the task context are tuned on the joint training set of all tasks. As such, the prompt context of all tasks will be shared in a soft manner. Extensive experiments across four multi-task few-shot datasets covering 44 tasks and 1593 categories demonstrate that SoftCPT significantly outperforms single-task prompt tuning methods, highlighting the effectiveness of multi-task learning for vision-language prompt tuning. Code is available at https://github.com/kding1225/softcpt.

Motivation & Objective

  • To address the limitation of single-task prompt tuning in few-shot vision-language learning by leveraging task relationships.
  • To explore whether multi-task learning can improve prompt tuning performance in vision-language models, especially in specialized domains with correlated tasks.
  • To design a method that enables soft, continuous sharing of prompt representations across multiple tasks without hard constraints.
  • To improve generalization and stability in few-shot image recognition by jointly fine-tuning prompts across related tasks.
  • To validate that multi-task prompt tuning can outperform both single-task tuning and prompt transfer methods.

Proposed method

  • A task-shared meta network is introduced to generate per-task prompt vectors using a learnable meta prompt and pre-defined task names as input.
  • The meta network processes the concatenation of the meta prompt and task name through CLIP’s text encoder to produce a task-specific feature.
  • A lightweight sub-network transforms the task feature into a continuous, soft prompt vector for each task, enabling parameter sharing in a differentiable manner.
  • The meta network and meta prompt are jointly fine-tuned on the union of all target few-shot training sets, enabling cross-task knowledge transfer.
  • SoftCPT uses a class-agnostic prompt strategy, where all classes in a task share the same prompt vector generated by the meta network.
  • The method avoids hard parameter sharing by learning task-specific prompts through a shared, learnable architecture, improving adaptability and performance.

Experimental results

Research questions

  • RQ1Can multi-task learning improve few-shot image recognition performance in vision-language models through prompt tuning?
  • RQ2Does soft, continuous sharing of prompt parameters across tasks lead to better generalization than hard sharing or single-task tuning?
  • RQ3How does the proposed SoftCPT method compare to prompt transfer and ensemble methods in terms of performance and stability?
  • RQ4To what extent do task correlations, as reflected in prompt features, align with true task relatedness in real-world few-shot scenarios?
  • RQ5Can a shared meta network effectively generate high-quality, task-specific prompts without fine-tuning the vision-language model's main parameters?

Key findings

  • SoftCPT outperforms CoOp-CA by 0.73%, 5.09%, and 0.93% on General-10, Plant-6, and Fashion-20 datasets, respectively, under 16-shot settings.
  • SoftCPT achieves a lower RSD (Relative Standard Deviation) of 1.28% on General-10 and 3.70% on Plant-6, indicating superior performance stability across tasks.
  • The proposed method reduces RSD by 12.4% compared to CoOp-MT on General-10, demonstrating improved robustness in multi-task settings.
  • The correlation map from SoftCPT-NATA shows a 0.32 coefficient with oracle task similarity, significantly higher than CoOp-CA’s -0.03, indicating better alignment with true task relatedness.
  • Prompt transferring via Oracle and ensemble methods yields only marginal gains (e.g., ~0.07% improvement on Plant-6), while SoftCPT achieves substantial gains, proving its superiority.
  • SoftCPT-NATS achieves 67.04% ± 0.23 on General-10 and 67.13% ± 1.15 on Plant-6, outperforming both CoOp-CA and the Oracle baseline in both accuracy and stability.

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.