MoAPT: Mixture of Adversarial Prompt Tuning for Vision-Language Models

Shiji Zhao, Qihui Zhu, Shukun Xiong, Shouwei Ruan, Maoxun Yuan +6 more
5/23/2025
cs.CV
lora-peft-merging

No confident code implementation found for this paper.

Abstract

Large pre-trained Vision Language Models (VLMs) demonstrate excellent generalization capabilities but remain highly susceptible to adversarial examples, posing potential security risks. To improve the robustness of VLMs against adversarial examples, adversarial prompt tuning methods are proposed to align the text feature with the adversarial image feature without changing model parameters.

Show full abstract

However, when facing various adversarial attacks, a single learnable text prompt has insufficient generalization to align well with all adversarial image features, which ultimately results in overfitting. To address the above challenge, in this paper, we empirically find that increasing the number of learned prompts yields greater robustness improvements than simply extending the length of a single prompt. Building on this observation, we propose an adversarial tuning method named \textbf{Mixture of Adversarial Prompt Tuning (MoAPT)} to enhance the generalization against various adversarial attacks for VLMs. MoAPT aims to learn mixture text prompts to obtain more robust text features. To further enhance the adaptability, we propose a conditional weight router based on the adversarial images to predict the mixture weights of multiple learned prompts, which helps obtain sample-specific mixture text features aligning with different adversarial image features. Extensive experiments across 11 datasets under different settings show that our method can achieve better adversarial robustness than state-of-the-art approaches.

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. Any repos shown below are weak matches — 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{zhao2025moapt,
  title  = {MoAPT: Mixture of Adversarial Prompt Tuning for Vision-Language Models},
  author = {Shiji Zhao and Qihui Zhu and Shukun Xiong and Shouwei Ruan and Maoxun Yuan and Jialing Tao and Jiexi Liu and Ranjie Duan and Jie Zhang and Jie Zhang and Xingxing Wei},
  year   = {2025},
  eprint = {2505.17509},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.17509v2}
}

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

Discussion