NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CPT: Colorful Prompt Tuning for pre-trained vision-language models

Yuan Yao, Ao Zhang, Zhengyan Zhang, Zhiyuan Liu, Tat-Seng Chua, Maosong Sun

TL;DR

This paper introduces Cross-modal Prompt Tuning (CPT), a novel method to adapt pre-trained vision-language models (VL-PTMs) for visual grounding tasks. CPT reformulates grounding as a fill-in-the-blank problem using color-based prompts in both images and text, significantly improving few-shot and zero-shot performance by bridging the gap between pre-training and fine-tuning objectives.

What Problem Does This Paper Address?

Pre-trained Vision-Language Models (VL-PTMs) have shown great promise in tasks that require understanding the relationship between images and text, like visual question answering and visual grounding. However, a significant challenge arises during the fine-tuning process for downstream tasks. Typically, VL-PTMs are pre-trained using objectives like masked language modeling, which differs substantially from the classification or ranking objectives used for fine-tuning. This "objective gap" often necessitates large amounts of labeled data to effectively adapt the model's visual grounding capabilities. The paper aims to bridge this gap, enabling VL-PTMs to perform well even with limited or no task-specific training data.

Methods

The core innovation is Cross-modal Prompt Tuning (CPT), which reframes visual grounding as a fill-in-the-blank task. CPT introduces two key components:

  • Visual Sub-prompt: Image regions are marked with "color-based co-referential markers." This can be in the form of colored blocks or segmentation masks overlaid on the target regions. The color itself is associated with a textual label (e.g., a red block corresponds to the word "red").
  • Textual Sub-prompt: The natural language query is embedded into a template that includes a masked token and a color reference. For example, "the horse watched by the woman" might become "[CLS] the horse watched by the woman is in [MASK] color [SEP]".

The VL-PTM then predicts the color that best fills the mask, effectively grounding the text to the corresponding colored image region. This approach reuses the pre-trained masked language modeling head, thus minimizing the objective gap.

A crucial aspect of CPT is the Cross-Modal Prompt Search (CPS) algorithm. This method intelligently searches for the optimal set of colors (both visual appearance and textual label) that are most sensitive to the VL-PTM, considering both visual and textual semantics to improve grounding accuracy.

Datasets

The paper evaluates CPT on the following datasets for visual grounding:

  • RefCOCO: A widely used dataset for visual grounding, containing referring expressions for objects in MSCOCO images.
  • RefCOCO+: Similar to RefCOCO but focuses on appearance-based expressions to distinguish objects.
  • RefCOCOg: Features longer and more complex referential expressions.

For visual relation detection, the Visual Genome dataset is used.

Key Insights and Ideas

  • Bridging the Objective Gap: The most significant insight is that by reformulating visual grounding as a fill-in-the-blank problem using color prompts, CPT effectively aligns the fine-tuning objective with the pre-training objective (masked language modeling). This dramatically reduces the need for large labeled datasets.
  • Color as a Cross-Modal Bridge: Colors, when used consistently in both image and text prompts, act as a powerful semantic link. This allows VL-PTMs to leverage their pre-trained knowledge about colors to ground language.
  • Prompt Search is Crucial: Simply using standard colors isn't enough. The CPS algorithm highlights the importance of finding color configurations that are specifically sensitive to the VL-PTM, leading to better performance.
  • Few-Shot and Zero-Shot Power: CPT unlocks impressive few-shot and zero-shot capabilities because it relies on the model's inherent understanding of language and visual concepts, rather than requiring extensive task-specific training.
  • Stability in Few-Shot Learning: CPT leads to more stable performance in few-shot settings, indicated by a significantly smaller standard deviation in accuracy compared to traditional fine-tuning.

Key Results

  • Significant Accuracy Gains: CPT outperforms random baselines and vanilla fine-tuning by a large margin in zero-shot and few-shot settings. For instance, with one shot, CPT-Blk achieved a 17.3% absolute accuracy improvement on average in RefCOCO evaluation.
  • CPT-Seg Outperforms CPT-Blk: Using colored segmentation masks (CPT-Seg) generally yields better results than colored blocks (CPT-Blk), achieving up to 20.0% absolute accuracy improvement in some cases.
  • Reduced Variance: CPT-Blk achieved a 73.8% relative standard deviation reduction on average with one shot in RefCOCO evaluation, demonstrating improved stability.
  • Competitive in Fully Supervised Settings: CPT achieves comparable performance to strong fine-tuned VL-PTMs even in fully supervised scenarios, showcasing its versatility.
  • Generalization to Visual Relation Detection: CPT also shows strong performance on visual relation detection, outperforming baselines in zero-shot and few-shot settings.

Limitations and Future Work

  • Color Disturbance: CPT can be susceptible to "color disturbance," where colors in raw images or text might interfere with the prompt colors. This is more pronounced in few-shot settings.
  • Computational Efficiency: The current implementation uses small image region batch sizes to mitigate color disturbance, which can impact computational efficiency.
  • Future Work: The authors suggest addressing color disturbance and improving computational efficiency. They also plan to investigate CPT's effectiveness on other vision-language tasks, such as object classification and scene graph classification, by adapting the prompt tuning framework. Exploring more advanced cross-modal prompt search methods is also a direction for future research.

Summary updated

BibTeX
@inproceedings{yao2021cpt,
  author = {Yuan Yao and Ao Zhang and Zhengyan Zhang and Zhiyuan Liu and Tat-Seng Chua and Maosong Sun},
  title = {{CPT: Colorful Prompt Tuning for pre-trained vision-language models}},
  booktitle = {AI Open},
  year = {2021},
  doi = {10.1016/j.aiopen.2024.01.004},
}
Figure