SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.10556 · 2022

Unleashing the Power of Visual Prompting At the Pixel Level

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ucsc-vlaa/evp canonical 2 of 4
FunctionStatusWhere it lives
add_weight_decay Ran ucsc-vlaa/evp/util/tool.py
code served (permissive licence) · get_code("2b0c6c7780d77be3")
topk Ran ucsc-vlaa/evp/util/tool.py
code served (permissive licence) · get_code("228b4da98f348fbe")
get_index Not yet run ucsc-vlaa/evp/util/get_index.py
code served (permissive licence) · get_code("c047c720207b8201")
refine_classname Not yet run ucsc-vlaa/evp/util/tool.py
code served (permissive licence) · get_code("b32782e33156c848")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2212.10556")
get_code_for_paper("2212.10556")
have("2212.10556")

Connect an agent — have() is free.