数据源与状态仍在导航菜单中
arxiv.org·2026/10/23
针对多模态大模型(MLLM)面临的跨模态 Prompt Injection 威胁,作者提出检测框架 MPIDetector:不做微调,而以 few-shot In-Context Learning 与提示模板驱动 MLLM 充当“安全研究员”,逐步推理文本与图像输入的语义意图并输出结构化判定;为应对劫持视觉 web agent 的 WebInject 环境注入,专设 Visual-Semantic Decoupling 协议,依次经视觉渲染隔离、语义意图提取、跨层一致性调和暴露隐藏指令。在基于 WAInjectBench 扩充良性样本、覆盖多个商用与开源 MLLM 的评测中,Gemini-2.0-Flash 文本准确率达 90.91% 且无漏检,视觉域最高 99.28% 准确率且各模型均无误报,WebInject 检出率达 99.80%;消融实验中去掉解耦协议后,Gemini 准确率跌至 66.2%,证明该协议必要。相较困惑度过滤、PromptShield、OCR 规则匹配与 SnapGuard 等基线,其准确率全面领先、召回远高于统计与微调类方法。局限是 LLM 多步推理带来延迟与算力开销,作者建议把推理链蒸馏进小型本地模型。
为什么重要 给出可移植的零微调护栏协议与完整混淆矩阵;落地前需评估多步 ICL 延迟与文本域 25% 误报率适合 做智能体安全护栏与多模态输入过滤的工程师、安全研究员
随着多模态大语言模型(MLLMs)快速融入现实应用,Prompt Injection(PI)已成为关键安全威胁。攻击者可以将恶意指令隐藏在文本叙述或视觉输入中,以绕过安全对齐。
现有方法,例如基于签名和基于困惑度的方法,严重依赖模式匹配,使其不足以检测复杂的跨模态 PI 载荷。在本文中,我们提出一种名为 MPIDetector 的新型检测框架,通过 few-shot In-Context Learning(ICL)利用 LLM 的内在推理能力。
该方法不进行微调,而是向模型提供特定提示模板和代表性攻击示例,使其能够审查跨模态输入的语义意图。我们构建了一个综合评测基准,包含 8 个文本恶意类别和 7 个视觉恶意类别,并辅以良性数据集,以严格测试误报。
我们在多个领先 LLM 上进行了评估,包括 Gemini-2.0-Flash、Qwen3-VL-32B-Instruct 和 Doubao-seed-1.6-flash,证明了这种方法的有效性和泛化性。所提方法在文本任务上达到了最高 90.91% 的准确率和 100% 的召回率。
在视觉领域,它在所有受评模型中保持 100% 精确率的同时,达到了最高 99.28% 的准确率。关键的是,当针对 500 个高度混淆的环境 web-agent 注入(WebInject)进行评估时,MPIDetector 达到了最高 99.80% 的检测率。
与两种用于检测文本 PI 载荷的基线方法,以及两种用于视觉输入检测的额外方法相比,结果证明了 MPIDetector 的优越准确率。这些结果表明,LLM 驱动的推理为防御高级提示注入提供了一种鲁棒的跨模态方案。
With the rapid integration of Multi-modal Large Language Models (MLLMs) into real-world applications, Prompt Injection (PI) has emerged as a critical security threat.
Attackers can conceal malicious instructions within textual narratives or visual inputs to bypass safety alignment.
Existing approaches, such as signature- and perplexity-based methods, rely heavily on pattern matching, making them insufficient to detect sophisticated, cross-modal PI payloads.
In this paper, we propose a novel detection framework, called MPIDetector, that leverages LLMs' intrinsic reasoning capabilities via few-shot In-Context Learning (ICL).
Instead of fine-tuning, we provide the model with specific prompt templates and representative attack examples, enabling it to scrutinize the semantic intent of input across modalities.
We constructed a comprehensive evaluation benchmark comprising eight textual and seven visual malicious categories, supplemented with benign datasets to rigorously test for false positives.
Our evaluation across multiple leading LLMs, including Gemini-2.0-Flash, Qwen3-VL-32B-Instruct, and Doubao-seed-1.6-flash, demonstrates the efficacy and generalizability of this approach.
The proposed method achieves up to 90.91% accuracy and 100% recall on textual tasks.
In the visual domain, it achieves up to 99.28% accuracy while maintaining 100% precision across all evaluated models.
Crucially, when evaluated against 500 highly obfuscated environmental web-agent injections (WebInject), MPIDetector achieved a detection rate up to 99.80%.
Comparisons with two baseline approaches for detecting textual PI payloads, along with two additional methods for visual input detection, demonstrate MPIDetector's superior accuracy.
These results show that LLM-driven reasoning provides a robust, cross-modal defense against advanced prompt injections.
视觉准确率
Gemini,N=3072
文本准确率
Gemini,N=330
总样本
文本+视觉+WebInject
ICL 示例
2 良性 2 攻击
注释 · 自报结果,最佳模型为 Gemini-2.0-Flash出自 表 II–IV
注释 · N=1000:注入 500 + 良性对照 500,三模型 precision 均 100%出自 表 IV
EVIDENCE / METHODS
流程
三阶段解耦是核心创新:去掉后 Gemini 从 99.80% 跌到 66.2%
压制读文字的本能,只扫低层视觉特征:结构异常、高频噪声、隐写痕迹、排版异常
转入纯语义层:提取 OCR 文本、识别 UI 组件、解析表面指令,视作良性网页交互
对比两层输出,视觉呈现与语义意图不符即判定为环境注入
输出 Benign/Suspicious/Malicious 附推理理由;评测中 Suspicious 一律归 Malicious
注释 · 针对 WebInject 类环境注入的专用分析管线出自 §III-B
原版排版与图表 · 手机无法内嵌时可在浏览器打开。PDF 插件内选文不能传给网页助手。