Towards Robust Prompts on Vision-Language Models

Jindong Gu, Ahmad Beirami, Xuezhi Wang, Alex Beutel, Philip Torr +1 more
4/17/2023
cs.CV

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

With the advent of vision-language models (VLMs) that can perform in-context and prompt-based learning, how can we design prompting approaches that robustly generalize to distribution shift and can be used on novel classes outside the support set of the prompts? In this work, we first define two types of robustness to distribution shift on VLMs, namely, robustness on base classes (the classes included in the support set of prompts) and robustness on novel classes. Then, we study the robustness of existing in-context learning and prompt learning approaches, where we find that prompt learning performs robustly on test images from base classes, while it does not generalize well on images from novel classes. We propose robust prompt learning by integrating multiple-scale image features into the prompt, which improves both types of robustness. Comprehensive experiments are conducted to study the defined robustness on six benchmarks and show the effectiveness of our proposal.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gu2023towards,
  title  = {Towards Robust Prompts on Vision-Language Models},
  author = {Jindong Gu and Ahmad Beirami and Xuezhi Wang and Alex Beutel and Philip Torr and Yao Qin},
  year   = {2023},
  eprint = {2304.08479},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.08479v1}
}

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/2304.08479.svg)](https://codeofpaper.com/paper/2304.08479)

Discussion