用无关提问的注意力模式,高效检测大模型视觉问答中的对抗样本。
PIP: Detecting Adversarial Examples in Large Vision-Language Models via Attention Patterns of Irrelevant Probe Questions
- 通过随机无关问题的注意力分布区分对抗样本与正常样本。
- 黑盒攻击下仍达98%召回率,精度超90%。
- 仅需一次额外推理,适合快速部署于实际系统。
大型视觉语言模型(LVLMs)展现出强大的多模态能力,但其安全问题严峻,对手可通过精心设计的对抗样本引发鲁棒性问题。因此,亟需有效的对抗样本检测工具以防止错误响应。本文首次发现,当对干净图像提出探测问题时,LVLMs会表现出规律性的注意力模式。我们提出一种非传统方法PIP,仅需对测试图像和一个随机无关的探测问题(如“有没有钟?”)进行一次额外推理,即可成功识别对抗样本。无论测试图像和对应问题如何,该方法均只需一次推理。即使在黑盒攻击和开放数据集场景下,结合简单SVM分类器,PIP仍实现超过98%的召回率和90%以上的精度。这是首次通过简单无关探测问题检测LVLM对抗攻击的研究,为深入理解与内省大型视觉语言模型提供了新视角。代码已公开于https://github.com/btzyd/pip。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。