Understanding and Improving Visual Prompting: A Label-Mapping Perspective

Aochuan Chen, Yuguang Yao, Pin-Yu Chen, Yihua Zhang, Sijia Liu
11/21/2022
cs.CV

Official code: OPTML-Group/ILM-VP (52 stars, Python, MIT, last commit 2023-09-17).

Abstract

We revisit and advance visual prompting (VP), an input prompting technique for vision tasks. VP can reprogram a fixed, pre-trained source model to accomplish downstream tasks in the target domain by simply incorporating universal prompts (in terms of input perturbation patterns) into downstream data points.

Show full abstract

Yet, it remains elusive why VP stays effective even given a ruleless label mapping (LM) between the source classes and the target classes. Inspired by the above, we ask: How is LM interrelated with VP? And how to exploit such a relationship to improve its accuracy on target tasks? We peer into the influence of LM on VP and provide an affirmative answer that a better 'quality' of LM (assessed by mapping precision and explanation) can consistently improve the effectiveness of VP. This is in contrast to the prior art where the factor of LM was missing. To optimize LM, we propose a new VP framework, termed ILM-VP (iterative label mapping-based visual prompting), which automatically re-maps the source labels to the target labels and progressively improves the target task accuracy of VP. Further, when using a contrastive language-image pretrained (CLIP) model, we propose to integrate an LM process to assist the text prompt selection of CLIP and to improve the target task accuracy. Extensive experiments demonstrate that our proposal significantly outperforms state-of-the-art VP methods. As highlighted below, we show that when reprogramming an ImageNet-pretrained ResNet-18 to 13 target tasks, our method outperforms baselines by a substantial margin, e.g., 7.9% and 6.7% accuracy improvements in transfer learning to the target Flowers102 and CIFAR100 datasets. Besides, our proposal on CLIP-based VP provides 13.7% and 7.1% accuracy improvements on Flowers102 and DTD respectively. Our code is available at https://github.com/OPTML-Group/ILM-VP.

View on arXivView PDF

Code Implementations(1)

OPTML-Group/ILM-VPOfficial100%
MIT

[CVPR23] "Understanding and Improving Visual Prompting: A Label-Mapping Perspective" by Aochuan Chen, Yuguang Yao, Pin-Yu Chen, Yihua Zhang, and Sijia Liu

5213PythonNov 22, 20223 years agoMIT

Similar Papers

Cite this paper

@article{chen2022understanding,
  title  = {Understanding and Improving Visual Prompting: A Label-Mapping Perspective},
  author = {Aochuan Chen and Yuguang Yao and Pin-Yu Chen and Yihua Zhang and Sijia Liu},
  year   = {2022},
  eprint = {2211.11635},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.11635}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.11635.svg)](https://codeofpaper.com/paper/2211.11635)

Discussion