MPIDetector:基于大语言模型推理的多模态提示注入检测 MPIDetector: Detecting Multi-modal Prompt Injection via LLM-based Reasoning 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-10-21
⬇️ 2 次下载
👁️ 预览文献
💡 AI 中文简介
多模态大模型在应用中面临提示注入攻击,攻击者可将恶意指令藏在文字或图片中绕过安全机制。现有基于特征匹配的方法难以检测复杂的跨模态攻击。本文提出MPIDetector框架,利用大语言模型的推理能力,通过少样本上下文学习,让模型审视输入语义意图来识别攻击。在多个主流模型上测试,文本任务准确率最高90.91%,视觉任务准确率最高99.28%,对高度混淆的网页代理注入检测率达99.80%,优于基线方法。
领域人工智能安全 / 多模态大模型安全
适合谁读需要一定专业背景(了解大语言模型和提示注入基本概念)
核心贡献1. 提出MPIDetector框架,首次利用LLM的少样本上下文学习推理能力进行跨模态提示注入检测,无需微调;2. 构建了涵盖8类文本和7类视觉恶意攻击的综合评测基准,并在多个主流LLM上验证了方法的有效性和泛化性。
关键数据文本任务准确率最高90.91%,召回率100%;视觉任务准确率最高99.28%,精确率100%;对500个高度混淆的WebInject攻击检测率最高99.80%。
推荐理由如果你关心大模型安全,这篇工作用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.