Indirect prompt injection attacks (IPIAs), where large language models (LLMs) follow malicious instructions hidden in input data, pose a critical threat to LLM-powered agents. In this paper, we present IntentGuard, a general defense framework based on instruction-following intent analysis. The key insight of IntentGuard is that the decisive factor in IPIAs is not the presence of malicious text, but whether the LLM intends to follow instructions from untrusted data. Building on this insight, IntentGuard leverages an instruction-following intent analyzer (IIA) to identify which parts of the input prompt the model recognizes as actionable instructions, and then flag or neutralize any overlaps with untrusted data segments. To instantiate the framework, we develop an IIA that uses three "thinking intervention" strategies to elicit a structured list of intended instructions from reasoning-enabled LLMs. These techniques include start-of-thinking prefilling, end-of-thinking refinement, and adversarial in-context demonstration. We evaluate IntentGuard on two agentic benchmarks (AgentDojo and Mind2Web) using two reasoning-enabled LLMs (Qwen-3-32B and gpt-oss-20B). Results demonstrate that IntentGuard achieves (1) no utility degradation in all but one setting and (2) strong robustness against adaptive prompt injection attacks (e.g., reducing attack success rates from 100% to 8.5% in a Mind2Web scenario).


翻译:间接提示注入攻击(IPIAs)是指大型语言模型(LLMs)遵循输入数据中隐藏的恶意指令,这对基于LLM的智能体构成了严重威胁。本文提出IntentGuard,一种基于指令遵循意图分析的通用防御框架。IntentGuard的核心洞见在于:IPIAs的决定性因素并非恶意文本的存在,而是LLM是否意图遵循来自不可信数据的指令。基于这一洞见,IntentGuard利用指令遵循意图分析器(IIA)识别模型将输入提示的哪些部分视为可执行指令,并标记或消除与不可信数据段的重叠部分。为实例化该框架,我们开发了一种IIA,采用三种“思维干预”策略从具备推理能力的LLMs中提取结构化的预期指令列表。这些技术包括思维起始预填充、思维终止精炼和对抗性上下文演示。我们在两个智能体基准测试(AgentDojo和Mind2Web)上使用两种具备推理能力的LLMs(Qwen-3-32B和gpt-oss-20B)评估IntentGuard。结果表明,IntentGuard实现了(1)除一种设置外均无性能下降,以及(2)对自适应提示注入攻击的强大鲁棒性(例如在Mind2Web场景中将攻击成功率从100%降至8.5%)。

0
下载
关闭预览

相关内容

DeepSeek模型综述:V1 V2 V3 R1-Zero
专知会员服务
116+阅读 · 2月11日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
132+阅读 · 2020年5月14日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
多项NLP任务新SOTA,Facebook提出预训练模型BART
机器之心
22+阅读 · 2019年11月4日
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
51+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
VIP会员
相关资讯
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
多项NLP任务新SOTA,Facebook提出预训练模型BART
机器之心
22+阅读 · 2019年11月4日
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
51+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员