Progressive Visual Prompt Learning with Contrastive Feature Re-formation

Chen Xu, Yuhan Zhu, Haocheng Shen, Boheng Chen, Yixuan Liao, Xiaoxin Chen, Limin Wang

TL;DR

Adapting large Vision-Language models like CLIP to new tasks usually relies on tuning text prompts, while visual prompting has remained notoriously unstable and prone to overfitting. This paper introduces ProVP-Ref, a novel framework that stabilizes visual prompt learning through "progressive" layer connections and a contrastive feature re-formation loss that preserves the model's original general knowledge. The result is a state-of-the-art method that, for the first time, shows visual prompts can outperform traditional text-based prompting across diverse image recognition tasks.

What Problem Does This Paper Address?

Large-scale Vision-Language (V-L) models like CLIP are powerful but expensive to fine-tune fully for specific downstream tasks. Researchers have turned to prompt learning—adding a small set of learnable parameters while keeping the backbone frozen. While text-based prompting (like CoOp) has seen great success, visual prompting has lagged behind.

Existing visual methods, such as Visual Prompt Tuning (VPT), suffer from two major headaches:

  1. Training Instability: Performance often fluctuates wildly during training, sometimes crashing to near-zero accuracy (see Figure 2). This is largely because prompts are inserted into each layer independently, creating "isolated islands" of parameters that don't interact well.
  2. Generalization Deterioration: Models often overfit to the specific training data ("base" classes) and lose their ability to recognize "new" unseen classes, destroying the zero-shot magic that makes CLIP so useful.

Methods

The authors propose two primary innovations to solve these issues, combined into a framework called ProVP-Ref:

1. Progressive Visual Prompt (ProVP)

Unlike standard deep prompting where each layer gets a fresh, isolated set of learnable tokens, ProVP establishes a "progressive connection." The prompt sent into layer $i$ is a weighted combination of a new learnable prompt and the output of the prompt from the previous layer ($i-1$).

Fig. 3: An overview of ProVP-Ref. Right: a full pipeline for our approach. It consists of two main parts Progressive Visual Prompt, in which we retain the outputs of the prompt via a progressive connection, and Contrastive Feature Re-formation: Using the frozen image encoder and the original image input, we can reformate the prompted features so that they can constitute a more similar representation with pre-trained CLIP. Left: a detailed view of Progressive Visual Prompt, new prompts will be combined with the output of the former embeddings before being sent to the encoder layer.

This design allows information to flow through the prompt tokens across the entire depth of the network. Because the prompt outputs are conditioned on the input image, this effectively makes the prompts instance-specific, helping the model adapt more dynamically to different images.

2. Contrastive Feature Re-formation (Ref)

To stop the model from "forgetting" its general pre-trained knowledge, the authors introduce a secondary loss function. They pass the image through both the prompted (trainable) encoder and the original frozen CLIP encoder. The "Ref" loss forces the prompted features to stay close to the original CLIP feature distribution in a contrastive manner. This prevents the learnable prompts from distorting the feature space so much that the text encoder can no longer recognize the results.

Datasets

The method was evaluated on 11 diverse image recognition datasets, covering generic objects, fine-grained categories, actions, and specialized domains:

  • Generic: ImageNet, Caltech101
  • Fine-grained: OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft
  • Scenes/Actions: SUN397, UCF101
  • Specialized: DTD (textures), EuroSAT (satellite imagery)

Key Insights and Ideas

  • Stability through Connectivity: By linking prompts across layers, ProVP eliminates the erratic performance drops seen in VPT. As shown in Figure 2, the training curve becomes significantly smoother and more reliable.
  • Visual vs. Text Prompts: A major "aha" moment is the discovery that visual prompts can actually beat text prompts, especially in datasets with large "domain shifts" (like satellite photos or specialized textures). In these cases, the visual pathway needs more adaptation than the text pathway can provide.
  • Feature Space > Logit Space: Unlike previous methods that try to match the predictions (logits) of the original model, ProVP-Ref works in the feature space. This provides more flexibility, allowing the model to learn task-specific details while still respecting the original distribution.
Fig. 2: Test accuracy curve of VPT-Deep and ProVP during training (we select the results of 8-shot learning on ImageNet). The Deep version of VPT shows serious training instability as the tested performance could be dropped several times even close to 0.

Key Results

ProVP-Ref achieved state-of-the-art (SOTA) results on 7 out of 11 datasets in both few-shot learning and base-to-new generalization settings.

  • Few-Shot Performance: In a 16-shot scenario, ProVP-Ref improved average accuracy by 2.83% over the previous SOTA (CoOp).
  • Domain Shift Gains: The improvements were most dramatic on datasets far removed from standard natural images. For example, it saw an absolute gain of +13.67% on FGVCAircraft and +9.63% on EuroSAT compared to CoCoOp.
  • Generalization: The method successfully balanced learning new tasks with maintaining zero-shot capabilities, achieving the highest "Harmonic Mean" score across the benchmark suite.
Absolute gains of ProVP-Ref over CoCoOp across various datasets.

Limitations and Future Work

The authors noted that ProVP-Ref performed slightly less impressively on datasets with a very high number of classes (like ImageNet and SUN397). They attribute this to the "ambiguity" of CLIP's frozen text features when dealing with 1,000+ categories.

To address this, they experimented with a multi-modal version (ProVP*-Ref) that allows for some text-side prompt learning as well, which successfully recovered the lost performance. Future work may involve exploring how these progressive visual prompts can be applied to video tasks or even more complex multi-modal reasoning.

Summary updated

BibTeX
@article{xu2025progressive,
  author = {Chen Xu and Yuhan Zhu and Haocheng Shen and Boheng Chen and Yixuan Liao and Xiaoxin Chen and Limin Wang},
  title = {{Progressive Visual Prompt Learning with Contrastive Feature Re-formation}},
  journal = {Int. J. Comput. Vis.},
  year = {2025},
  doi = {10.1007/s11263-024-02172-x},
}
Figure