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

SecPO:针对提示注入安全的原则性对抗训练

SecPO: Principled Adversarial Training for Prompt Injection Security

UC Berkeley(加州大学伯克利分校);Anthropic;Google DeepMind(谷歌DeepMind)

Sizhe Chen, Yibo Peng, Jaewon Chang, Chawin Sitawarin, David Wagner

AI总结:

本文提出SecPO原则性对抗训练方法,结合高效对抗训练流程,大幅降低大语言模型的提示注入攻击成功率,且不损失良性效用,发布了相关代码、数据与模型。

摘要:

提示注入被视为对智能体的顶级威胁,它允许来自不可信数据(电子邮件、文档、网站)的指令操纵智能体的操作。现有防御最佳的大语言模型Meta-SecAlign采用DPO损失训练,但在自适应提示注入下仍面临接近100%的攻击成功率(ASR),原因之一是DPO将模型锚定在未防御的参考模型周围,而该参考模型本身不安全。本文发现,一种理想化的参考模型——注入不变、效用保留的“神谕”——可被近似,因为其训练中的输出分布可被访问,这一观察催生了理论上原则性的SecPO损失。Meta-SecAlign的另一缺点是其在弱模拟攻击上训练,本文实现了高效的对抗训练(AT)流程,合成强注入输入(best@240)并在其上训练模型。与Meta-SecAlign相比,本文的AT在三个SOTA自适应攻击上将ASR降低1.5-14.5倍;与使用DPO损失相比,SecPO损失进一步将ASR降低2.4-4.6倍。在智能体工作流中,本文的SecPO+AT Qwen3.6-27B比Meta-SecAlign安全得多:在AttackerMovesSecond攻击下,AgentDojo ASR@800为8.8%,而Meta-SecAlign为78.8%。此外,本文的防御模型在覆盖智能体工具调用、指令遵循、科学和数学的九个基准中,良性效用无明显下降。本文发布了代码、训练数据(含AT生成的优化注入)和模型。

英文摘要:

Recognized as a top threat to AI agents, prompt injection allows instructions from untrusted data (email, documents, websites) to manipulate the agent's operation. The existing best-defended LLM, Meta-SecAlign, is trained with the DPO loss but still suffers from attack success rates (ASRs) approaching 100% under adaptive prompt injections. One reason is that DPO anchors the model around the undefended reference model, which is insecure. We show an idealized reference model---an injection-invariant, utility-preserving oracle---can nevertheless be approximated, as its output distribution in training is interestingly accessible. This new observation motivates a theoretically principled SecPO loss. Another Meta-SecAlign shortcoming is that it trains on weak simulated attacks. We implement an efficient adversarial training (AT) pipeline that synthesizes strong injected inputs (best@240), and train the model on them. Our AT reduces ASRs by 1.5-14.5$\times$ across three SoTA adaptive attacks, compared with Meta-SecAlign; the SecPO loss reduces them by a further 2.4-4.6$\times$ compared with using DPO loss. In agentic workflows, our SecPO + AT Qwen3.6-27B is much more secure than Meta-SecAlign: 8.8% vs. 78.8% AgentDojo ASR@800 under the AttackerMovesSecond attack. Moreover, our defended model shows no noticeable reduction in benign utility in nine benchmarks covering agentic tool calling, instruction following, science, and math. We release our $\href{//github.com/Sizhe-Chen/SecPO}{\text{code}}$, $\href{//huggingface.co/datasets/Sizhe-Chen/Qwen3.6-27B-Instruct-SecPO-trainset}{\text{training data}}$ (with optimized injections from AT), and $\href{//huggingface.co/Sizhe-Chen/Qwen3.6-27B-Instruct-SecPO}{\text{model}}$.

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

↑