Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

PIP: Detecting Adversarial Examples in Large Vision-Language Models via Attention Patterns of Irrelevant Probe Questions

About

Large Vision-Language Models (LVLMs) have demonstrated their powerful multimodal capabilities. However, they also face serious safety problems, as adversaries can induce robustness issues in LVLMs through the use of well-designed adversarial examples. Therefore, LVLMs are in urgent need of detection tools for adversarial examples to prevent incorrect responses. In this work, we first discover that LVLMs exhibit regular attention patterns for clean images when presented with probe questions. We propose an unconventional method named PIP, which utilizes the attention patterns of one randomly selected irrelevant probe question (e.g., "Is there a clock?") to distinguish adversarial examples from clean examples. Regardless of the image to be tested and its corresponding question, PIP only needs to perform one additional inference of the image to be tested and the probe question, and then achieves successful detection of adversarial examples. Even under black-box attacks and open dataset scenarios, our PIP, coupled with a simple SVM, still achieves more than 98% recall and a precision of over 90%. Our PIP is the first attempt to detect adversarial attacks on LVLMs via simple irrelevant probe questions, shedding light on deeper understanding and introspection within LVLMs. The code is available at https://github.com/btzyd/pip.

Yudong Zhang, Ruobing Xie, Jiansheng Chen, Xingwu Sun, Yu Wang• 2024

Related benchmarks

TaskDatasetResultRank
Adversarial DetectionNIPS to Medical cross-domain 17
Precision (SSA-CWA)97.8
10
Adversarial DetectionLLaVA to Medical cross-domain
SSA-CWA Precision97.8
10
Adversarial Attack DetectionNIPS M-Attack in-domain 17
Precision97.8
10
SSA-CWA to FOA-Attack Cross-Attack Detectionmedical
Precision97.8
6
SSA-CWA to M-Attack Cross-Attack Detectionmedical
Precision97.8
6
SSA-CWA to FOA-Attack Cross-Attack Detectionllava
Precision97.8
6
SSA-CWA to M-Attack Cross-Attack Detectionllava
Precision97.8
6
SSA-CWA to FOA-Attack Cross-Attack DetectionNIPS 17
Precision96.9
6
SSA-CWA to M-Attack Cross-Attack DetectionNIPS 17
Precision97.2
6
Adversarial Attack DetectionNIPS LLaVA and Medical Cross-domain 17 (test)
Precision96.8
5
Showing 10 of 19 rows

Other info

Follow for update