arXiv:2507.02735cs.CRcs.AI2025-07被引 68

开源首个具备商业级防护能力的抗提示注入大模型。

Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attacks

  • 通过指令微调构建内置防御机制,无需额外部署。
  • 70B模型在9项通用任务与7项安全测试中表现超越多数专有模型。
  • 适合关注大模型安全与可复现研究的开发者与研究人员。

提示注入攻击已成为集成大模型应用的首要安全威胁。虽有模型级防御方案效果显著,但最强防护多为专有技术。为推动安全攻防的开放协作,我们提出Meta SecAlign,首个完全开源、具备内建模型级防护的大型语言模型,达到商业级性能,足以胜任复杂智能体任务。我们公开完整训练方案,并在9个通用基准(涵盖常识、指令遵循、智能体工作流)和7个安全基准上进行最全面评估。结果显示,即使仅用通用指令数据训练,Meta SecAlign仍能有效防御未见下游任务中的提示注入攻击,包括工具调用与网页导航等场景。其中最优模型Meta-SecAlign-70B在开源模型中树立了新的效用-安全权衡标杆,其安全性优于多个主流专有模型。代码与模型已开源:https://github.com/facebookresearch/Meta_SecAlign,模型下载地址:https://huggingface.co/facebook/Meta-SecAlign-70B 及 https://huggingface.co/facebook/Meta-SecAlign-8B。

原文摘要 · Abstract (English)

Prompt injection attacks, where untrusted data contains an injected prompt to manipulate the system, have been listed as the top security threat to LLM-integrated applications. Model-level prompt injection defenses have shown strong effectiveness, but the strongest defenses are proprietary. Open-source secure models are needed by the AI security community so that co-development of attacks and defenses through open research can drive scientific progress in mitigating prompt injection attacks. To this end, we develop Meta SecAlign, the first fully open-source LLM with built-in model-level defense that achieves commercial-grade performance and is powerful enough for complex agentic tasks. We provide complete details of our training recipe. We perform the most comprehensive evaluation to date on 9 utility benchmarks (measuring general knowledge, instruction following, and agentic workflows) and 7 security benchmarks. Results show that Meta SecAlign, despite being trained only on generic instruction-tuning samples, surprisingly confers security in unseen downstream tasks, including tool-calling and web-navigation, in addition to general instruction-following. Our best model -- Meta-SecAlign-70B -- establishes a new frontier of utility-security trade-off for open-source LLMs, and is more secure than several flagship proprietary models with prompt injection defense. 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.

大模型安全提示注入开源模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。