将模型视为不可信组件:针对使用工具的智能体中的提示注入问题的确定性策略执行、人类批准与污点跟踪,以及在开放权重模型上的验证
Treating the Model as an Untrusted Component: Deterministic Policy Enforcement, Human Approval and Taint Tracking Against Prompt Injection in Tool-Using Agents, with Validation on Open-Weights Models
AI总结:
本研究将使用工具的LLM智能体的模型视为不可信组件,对比提示内防御与模型外确定性执行等措施,在开放权重模型上验证了任务绑定监视器等的防护效果,为提示注入防御提供了新方案。
摘要:
使用工具的大语言模型(LLM)智能体根据其读取数据中嵌入的指令采取行动,因此提示注入是结构性问题,而非提示措辞问题。我们将提示内防御措施(强化提示、聚焦提示、LLM检测器)与模型外的确定性执行措施(四种强度递增的参考监视器)、人类批准以及污点跟踪进行对比,通过一个独立于所有防御措施的基于效果的预言机,在包含13项任务和12种工具的可执行环境中,以参数模糊攻击者和严重程度加权的危害作为评判标准。在对真实开放权重模型(Qwen2.5-1.5B和Qwen2.5-7B;每种防御措施和模型各进行156次攻击回合)的评估中,在任务绑定监视器后,模型在64%和84%的攻击回合中提出了攻击者的调用,而该监视器仅允许1.3%和7.7%的此类调用;护栏效果取决于模型(针对静态攻击,提示护栏使服从率从67%降至65%、从86%降至55%,聚焦提示加检测器则降至12%和0%)。假设模型的模拟覆盖了真实运行未涉及的情况:在假设的侵蚀规律下,持续自适应攻击者或受损模型会使所有护栏堆栈的攻击成功率达到100.0%,而任务绑定监视器将严重行动控制在0.0%;其残余危害(0.69/10)在污点触发的人类审查下下降了62%,且若无确定性监视器,人类层会因批准垃圾邮件而失效,除非每个回合有确定性批准预算。实施质量至关重要:朴素监视器允许33种有效攻击变体中的18种,强化监视器允许6种,能力绑定监视器仅允许1种。真实模型证据仅限于两种开放权重模型和静态攻击,人类批准与污点结果仅为模拟所得,且较大模型的检测器堆栈与假设的侵蚀规律矛盾。本文提供了代码、数据、双评估者预言机审计以及用于重复真实模型评估的笔记本。
英文摘要:
Tool-using LLM agents act on instructions embedded in the data they read, so prompt injection is a structural rather than a prompt-wording problem. We compare in-prompt defences (hardened prompts, spotlighting, LLM detectors) with deterministic enforcement outside the model (four reference monitors of increasing strength), human approval and taint tracking, judged by one effect-based oracle independent of every defence in an executable environment of 13 tasks and 12 tools, with argument-fuzzing attackers and severity-weighted harm. In an evaluation with real open-weights models (Qwen2.5-1.5B and Qwen2.5-7B; 156 attack episodes per defence and model), the models proposed the attacker's call in 64% and 84% of attack episodes behind the task-bound monitor, which admitted 1.3% and 7.7%; guardrail effects depended on the model (a prompt guardrail moved obedience from 67% to 65% and from 86% to 55%, spotlighting plus a detector to 12% and 0%) against static attacks. Simulation with an assumed model covers what no real run did: under the assumed erosion law a persistent adaptive attacker or a compromised model drives every guardrail stack to 100.0% attack success, whereas the task-bound monitor holds severe actions at 0.0%; its residual (harm 0.69/10) falls by 62% under taint-triggered human review, and a human layer without a deterministic monitor fails against approval spamming unless each episode has a deterministic approval budget. Implementation quality matters: a naive monitor admits 18 of 33 effective attack variants, a hardened one 6 and a capability-bound one 1. The real-model evidence is limited to two open-weights models and static attacks, the human-approval and taint results are simulation-only, and the larger model's detector stack contradicts the assumed erosion law. Code, data, a two-rater oracle audit and a notebook for repeating the real-model evaluation are provided.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。