Few-Shot Adversarial Prompt Learning on Vision-Language Models

Yiwei Zhou, Xiaobo Xia, Zhiwei Lin, Bo Han, Tongliang Liu
3/21/2024
cs.CVcs.CLcs.CR

Official code: lionel-w2/FAP (19 stars, MIT, last commit 2024-10-20).

Abstract

The vulnerability of deep neural networks to imperceptible adversarial perturbations has attracted widespread attention. Inspired by the success of vision-language foundation models, previous efforts achieved zero-shot adversarial robustness by aligning adversarial visual features with text supervision. However, in practice, they are still unsatisfactory due to several issues, including heavy adaptation cost, suboptimal text supervision, and uncontrolled natural generalization capacity. In this paper, to address these issues, we propose a few-shot adversarial prompt framework where adapting input sequences with limited data makes significant adversarial robustness improvement. Specifically, we achieve this by providing adversarially correlated text supervision that is end-to-end learned from adversarial examples. We also propose a novel training objective that enhances the consistency of multi-modal features while encourages differentiated uni-modal features between natural and adversarial examples. The proposed framework gives access to learn adversarial text supervision, which provides superior cross-modal adversarial alignment and matches state-of-the-art zero-shot adversarial robustness with only 1% training data. Code is available at: https://github.com/lionel-w2/FAP.

View on arXivView PDF

Code Implementations(1)

lionel-w2/FAPOfficial100%
MIT
193Shell, PythonOct 20, 20242 years agoMIT

Similar Papers

Cite this paper

@article{zhou2024fewshot,
  title  = {Few-Shot Adversarial Prompt Learning on Vision-Language Models},
  author = {Yiwei Zhou and Xiaobo Xia and Zhiwei Lin and Bo Han and Tongliang Liu},
  year   = {2024},
  eprint = {2403.14774},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2403.14774},
  url    = {http://arxiv.org/abs/2403.14774v2},
  journal = {NEURIPS 2024 2024}
}

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

Discussion