Meta-SecAlign: Training Large Language Models to Resist Prompt Injection to Build Robust Agents
Meta-SecAlign: Training LLMs against Prompt Injection for Robust Agents
Translation in progress — untranslated text is omitted.
Researchers from Meta FAIR and UC Berkeley propose a defense fine-tuning method, Meta-SecAlign, that trains large language models to resist prompt injection while preserving model utility. The paper's large-scale evaluation finds that the mainstream open-source defense SecAlign incurs notable utility loss, especially on agent tasks: after SecAlign defense, Llama-3.3-70B-Instruct's AgentDojo tool-calling utility drops from 59.8% to 6.2%. Meta-SecAlign avoids shortcut learning by randomizing the position of injections during training, and uses model self-generated responses as in-distribution training labels; on Llama-3.3-70B-Instruct, its maximum drop across 8 utility benchmarks is 2.7 percentage points, the WASP web navigation end-to-end attack success rate drops to 0%, the AgentDojo attack success rate drops from 14.7% to 1.9%, and it also outperforms SecAlign against GCG adaptive attacks.
- Prompt injection is listed as the top threat to AI agents. The authors find that the existing open-source defense SecAlign substantially reduces benign utility on large models and agent tasks, contrary to the purpose of defense.
- Two changes on top of SecAlign's DPO preference fine-tuning: randomize the injection position during training (about half placed at the beginning of the data) to avoid learning a position shortcut; use the initialized model to self-generate preference labels in place of outdated dataset annotations.
- Evaluated on 5 models and 6 prompt injection benchmarks. The authors state that Meta-SecAlign-70B has a maximum drop of 2.7 percentage points across the 8 utility benchmarks, AgentDojo ASR falls from 14.7% to 1.9%, WASP end-to-end ASR falls to 0%, but under GCG adaptive attacks ASR is still 47.1%.
- The authors point out: malicious user attacks are not defended against; reliance on input trustworthiness being known; still vulnerable to strong adaptive attacks; cumulative attacks across multiple untrusted messages are not evaluated. Experiments cover only the text modality, and Qwen3.6-27B was tested only in non-thinking mode.
The paper finds that the mainstream open-source defense SecAlign incurs significant utility loss on agent tasks, and proposes two utility-preserving improvements to defense fine-tuning.
Related events and news
2 events · 3 news mentions
- The reports mention Meta-SecAlign
LocalAlign:近目标对抗训练提升提示注入防御泛化
- The reports mention Meta-SecAlign
SRFT自我反思微调提升Agent抗提示注入能力
News that mentions this paper
LocalAlign:近目标对抗训练提升提示注入防御泛化
- 公众号 安全研究GoSSIPnames the paperG.O.S.S.I.P 阅读推荐 2026-11-05 LocalAlign,通过近目标对抗训练提升提示注入防御泛化能力
SecAlign 及 Meta-SecAlign 进一步通过偏好优化,让模型更倾向于可信指令对应的正确回答,而不是注入指令诱导的回答。
SRFT自我反思微调提升Agent抗提示注入能力
- 安全内参 / 模安局names the paper大模型自我反思微调,让 Agent 学会抵御未知的提示注入
StruQ、SecAlign、Meta-SecAlign 等研究,都从不同角度探索了如何强化模型对可信指令和不可信内容的区分能力。
- 公众号 模安局names the paper大模型自我反思微调 SRFT,让 Agent 学会抵御未知的提示注入
StruQ、SecAlign、Meta-SecAlign 等研究,都从不同角度探索了如何强化模型对可信指令和不可信内容的区分能力。
Related papers
Show 3 more papers
- Towards Safe Autonomy for Computer UseDefensesarXiv