无需训练即可检测恶意图像提示,提升视觉语言模型安全性
DE-FIVE: Detecting Malicious Image Prompts via Fourier Features and Image Vector Embeddings

- 利用傅里叶特征与视觉编码器隐藏状态进行双模检测
- 在少量恶意样本下仍保持高检测率,优于现有方法
- 适合关注模型安全、对抗攻击防御的研究者使用
视觉语言模型(VLMs)结合视觉与文本模态实现先进推理,但引入视觉模态也扩大了攻击面,易受对抗扰动和间接提示注入攻击。现有防御方法多需大量重训练数据或部署复杂分类器,尤其缺乏针对间接提示注入的专用机制。为此,本文提出DE-FIVE——一种无需训练的恶意图像提示检测框架,通过傅里叶特征与视觉编码器生成的图像向量嵌入(image vector embeddings)跨扰动检测。设计黑盒检测器(基于傅里叶域特征)与白盒检测器(仅需少量恶意样本)。大量实验表明,该框架在抵御恶意图像提示方面持续优于当前最优基线。
原文摘要 · Abstract (English)
Vision language models (VLMs) employ both visual and textual modalities to enable advanced vision-language inference. However, incorporating visual modalities expands the attack surface of VLMs, making them more susceptible to security threats such as adversarial perturbations and indirect prompt injection, wherein crafted malicious image prompts can elicit unintended model outputs. Existing defense methods against malicious image prompts remain insufficient as they typically demand extensive datasets for retraining or the deployment of additional, complex classifiers. Most critically, there is a profound lack of specialized defense mechanisms specifically targeting indirect prompt injections, a gap that serves as a primary motivation for this work. To address these limitations, we introduce DE-FIVE, a novel training-free framework for detecting malicious image prompts by leveraging Fourier features and the hidden state representations of the visual encoder (image vector embeddings) across perturbations. Specifically, we develop a hybrid detection strategy consisting of a black-box detector that operates on Fourier-domain features and a white-box detector that exploits image vector embeddings derived from only a few-shot malicious set. Extensive experiments demonstrate that the proposed framework consistently outperforms state-of-the-art baselines against malicious image prompts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。