arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2610.30202cs.CRcs.AI
收藏

MPIDetector:基于大语言模型推理的多模态提示注入检测方法

MPIDetector: Detecting Multi-modal Prompt Injection via LLM-based Reasoning

University of Washington(华盛顿大学);Norwegian University of Science and Technology(挪威科技大学)

Yiheng Li, Jingyue Li

AI总结:

MPIDetector是一种基于LLM推理的多模态提示注入检测框架,通过少样本ICL审查跨模态输入语义,在文本、视觉及混淆WebInject任务中均实现了优异检测性能,防御效果优于现有基线方法。

摘要:

随着多模态大语言模型(MLLM)在实际应用中的快速集成,提示注入(PI)已成为一项关键的安全威胁。攻击者可将恶意指令隐藏在文本叙述或视觉输入中,以绕过安全对齐机制。现有方法如基于签名和困惑度的方法严重依赖模式匹配,无法检测复杂的跨模态PI载荷。本文提出一种名为MPIDetector的新型检测框架,利用大语言模型(LLM)的内在推理能力,通过少样本上下文学习(ICL)实现检测。该方法无需微调,仅为模型提供特定提示模板和代表性攻击示例,使其能够审查跨模态输入的语义意图。我们构建了包含8类文本恶意类别、7类视觉恶意类别的综合评估基准,并补充良性数据集以严格测试误报情况。在对Gemini-2.0-Flash、Qwen3-VL-32B-Instruct、Doubao-seed-1.6-flash等多个主流LLM的评估中,该方法展现出有效性和泛化性:文本任务准确率最高达90.91%、召回率100%;视觉领域准确率最高达99.28%,且所有评估模型的精度均保持100%。在对500个高度混淆的环境网络智能体注入(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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑