AgentSafeEvo:面向LLM智能体安全的对抗协同演化

·

研究论文 · 2026/10/15

大语言模型(LLM)智能体通过多轮交互与外部工具完成复杂任务,但用户查询、工具描述或环境观察中嵌入的恶意内容可能操纵其决策并引发不安全行为。对抗性协同演化已成为增强LLM安全性的有效方法,但现有工作主要关注语言层面的安全或网页任务中的间接提示注入。本文提出AgentSafeEvo,一个基于攻击者-防御者博弈的协同演化强化学习框架,涵盖多种任务和攻击类型。攻击者学习构建对抗性智能体任务,以暴露防御者工具使用中的弱点,而防御者学习在这些攻击下安全完成任务。我们进一步引入可学习性引导的任务加权,利用任务内防御者奖励变异性来调整每个任务对攻击者和防御者更新的贡献。在智能体安全性和通用能力基准上的大量实验表明,我们的方法在保持通用智能体能力的同时提高了对抗鲁棒性。

该研究针对LLM智能体在工具使用中的安全漏洞,提出了创新的协同演化强化学习框架,并通过可学习性引导的任务加权优化训练过程。实验证明其在提升对抗鲁棒性的同时保持了通用能力,对智能体安全领域具有重要参考价值。

Large language model (LLM) agents accomplish complex tasks through multi-turn interactions with external tools. However, malicious content embedded in user queries, tool descriptions, or environment observations can manipulate their decisions and induce unsafe actions. Adversarial co-evolution has emerged as an effective approach to strengthening LLM safety, but existing work primarily focuses on language-level safety or indirect prompt injection in web tasks. In this paper, we introduce AgentSafeEvo, a co-evolutionary reinforcement learning framework for agent safety built on an attacker-defender game spanning diverse tasks and attack types. The attacker learns to construct adversarial agent tasks that expose weaknesses in the defender's tool use, while the defender learns to complete tasks safely under these attacks. We further introduce learnability-guided task weighting, which uses within-task defender-reward variability to adjust each task's contribution to attacker and defender updates. Extensive experiments on agent safety and general capability benchmarks demonstrate that our method improves adversarial robustness while maintaining general agent capabilities.

阅读原文

参与讨论