Skip to main content
QUICK REVIEW

[Paper Review] Unleashing the Power of Visual Prompting At the Pixel Level

Junyang Wu, Xianhang Li|arXiv (Cornell University)|Dec 20, 2022
Domain Adaptation and Few-Shot LearningComputer Science13 citations
TL;DR

This paper proposes Enhanced Visual Prompting (EVP), a novel pixel-level visual prompting method that treats prompts as independent, warping them around a shrunk input image to preserve original features. By integrating adversarial training techniques like gradient normalization and input diversity, EVP achieves 82.5% average accuracy across 12 benchmarks—surpassing prior art by +5.2% and outperforming linear probing by +2.2% using CLIP.

ABSTRACT

This paper presents a simple and effective visual prompting method for adapting pre-trained models to downstream recognition tasks. Our method includes two key designs. First, rather than directly adding together the prompt and the image, we treat the prompt as an extra and independent learnable component. We show that the strategy of reconciling the prompt and the image matters, and find that warping the prompt around a properly shrinked image empirically works the best. Second, we re-introduce two "old tricks" commonly used in building transferable adversarial examples, i.e., input diversity and gradient normalization, into visual prompting. These techniques improve optimization and enable the prompt to generalize better. We provide extensive experimental results to demonstrate the effectiveness of our method. Using a CLIP model, our prompting method sets a new record of 82.8% average accuracy across 12 popular classification datasets, substantially surpassing the prior art by +5.6%. It is worth noting that this prompting performance already outperforms linear probing by +2.1% and can even match fully fine-tuning in certain datasets. In addition, our prompting method shows competitive performance across different data scales and against distribution shifts. The code is publicly available at https://github.com/UCSC-VLAA/EVP.

Motivation & Objective

  • To address the performance gap between visual prompting and linear probing in adapting pre-trained vision models.
  • To improve the generalization and optimization of pixel-level visual prompts by preserving original image information.
  • To investigate whether adversarial training techniques can enhance visual prompting performance.
  • To develop a parameter-efficient, effective alternative to full fine-tuning and linear probing for downstream vision tasks.

Proposed method

  • Treat the visual prompt as a separate, learnable component rather than adding it directly to the input image.
  • Shrink the original image and pad the learnable prompt around it to prevent feature corruption and enable independent optimization.
  • Apply gradient normalization (L2 norm on full image gradient) to stabilize training and improve generalization.
  • Introduce input diversity via data augmentation (e.g., random horizontal flip) to enhance robustness and optimization.
  • Use positional embeddings on learnable tokens to improve spatial awareness and performance.
  • Optimize the prompt end-to-end via standard backpropagation while keeping the backbone frozen.

Experimental results

Research questions

  • RQ1Can visual prompting at the pixel level outperform linear probing in downstream vision tasks?
  • RQ2How does prompt-image interaction design affect performance and feature preservation?
  • RQ3Can adversarial training techniques like gradient normalization and input diversity improve visual prompting generalization?
  • RQ4How does the method perform under data scarcity and distribution shift?
  • RQ5Can pixel-level prompting match or exceed the performance of full fine-tuning?

Key findings

  • EVP achieves 82.5% average top-1 accuracy across 12 standard vision benchmarks using CLIP-Base, outperforming the prior state-of-the-art visual prompting method (VPT) by +5.2%.
  • The method surpasses linear probing by +2.2% (80.3% vs. 82.5%), demonstrating that visual prompting can be more effective than simple feature-level adaptation.
  • EVP matches or exceeds fully fine-tuned performance on several datasets, indicating strong representational capacity.
  • Input diversity (e.g., RandomHorizontalFlip) improves performance by 0.7%, while stronger augmentations like RandAug or CutMix degrade results by 0.8–1.1%.
  • Gradient normalization using the full image gradient (L2-whole) yields 81.2% accuracy on CIFAR100, outperforming partial gradient normalization (79.4%).
  • Adding positional embeddings to learnable tokens boosts performance significantly, with V P1T achieving 84.8% average accuracy—+2.4% over VPT.

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.