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

Meta SecAlign: 一种针对提示注入攻击的 secure LLM 基础

Meta-SecAlign: Training LLMs against Prompt Injection for Robust Agents

FAIR at Meta(Meta 的 FAIR 部门);UC Berkeley(加州大学伯克利分校)

Sizhe Chen, Arman Zharmagambetov, David Wagner, Chuan Guo

AI总结:

Meta SecAlign 是首个开源的 LLM,具备内置的模型级防御,实现了商业级性能,且在复杂代理任务中表现优异,同时在提示注入攻击中展现出更高的安全性。

摘要:

提示注入攻击,其中不受信任的数据包含一个注入的提示以操纵系统,已被列为对集成 LLM 的应用的最严重的安全威胁。模型级别的提示注入防御已经显示出很强的有效性,但最强的防御措施是专有的。AI 安全社区需要开源的安全模型,以便通过开放研究共同开发攻击和防御,从而推动在缓解提示注入攻击方面的科学进步。为此,我们开发了 Meta SecAlign,这是首个完全开源的 LLM,内置模型级别的防御,实现了商业级性能,并且足够强大,能够处理复杂的代理任务。我们提供了完整的训练配方细节。我们对 9 个实用基准(测量通用知识、指令遵循和代理工作流)和 7 个安全基准进行了迄今为止最全面的评估。结果表明,尽管 Meta SecAlign 只在通用指令训练样本上进行训练,但其在未见过的下游任务中,包括工具调用和网页导航,以及通用指令遵循方面,竟然表现出安全性。我们的最佳模型——Meta-SecAlign-70B——为开源 LLM 建立了一个新的效用-安全性权衡前沿,并且在提示注入防御方面比几个旗舰专有模型更安全。以下是代码链接(https://github.com/facebookresearch/Meta_SecAlign)、Meta-SecAlign-70B(https://huggingface.co/facebook/Meta-SecAlign-70B)和 Meta-SecAlign-8B(https://huggingface.co/facebook/Meta-SecAlign-8B)模型。

英文摘要:

Prompt injection attacks, where untrusted data contains an injected prompt to manipulate the system, have been listed as the top security threat to AI agents. By fine-tuning on simulated prompt injections, SecAlign, a leading open defense, reports LLMs with good test-time robustness and negligible benign utility drop. By scaling up training and evaluations, however, we find that SecAlign actually suffers from significant utility degradation, especially in agentic tasks where the threat of prompt injection is prominent. Motivated by this, we propose Meta-SecAlign for utility-preserving defense by (1) randomized injection position during training to avoid shortcut learning and (2) self-generated responses as high-quality in-distribution training labels. Across general knowledge, instruction following, and agentic workflows (on tool-calling and web-navigation), Meta-SecAlign maintains almost all the undefended LLM's utility while achieving better overall security than SecAlign against various static and GCG adaptive attacks. Experiments use Llama-3.1-8B, Llama-3.3-70B, Llama-4-Scout, Qwen3-4B, and Qwen3.6-27B on 6 prompt injection benchmarks including AgentDojo, InjecAgent, WASP, and SEP. Below are links for the code (https://github.com/facebookresearch/Meta_SecAlign), Meta-SecAlign-70B (https://huggingface.co/facebook/Meta-SecAlign-70B), and Meta-SecAlign-8B (https://huggingface.co/facebook/Meta-SecAlign-8B) models.

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

↑