让攻击者和防御者在对抗中不断进化,提升大模型安全防护能力。
MAGIC: A Co-Evolving Attacker-Defender Adversarial Game for Robust LLM Safety
- 构建攻防双智能体动态对抗框架,实现持续演化。
- 防御成功率显著提升,且不降低模型帮助性。
- 适合关注大模型安全与对抗训练的研究者。
保障大语言模型的鲁棒安全对齐至关重要,但现有防御方法因依赖静态预收集数据分布,常落后于不断演化的对抗攻击。本文提出MAGIC,一种多轮多智能体强化学习框架,将大模型安全对齐建模为不对称对抗游戏。攻击者智能体通过迭代重写原始查询生成欺骗性提示,防御者智能体则同步优化策略以识别并拒绝此类输入。该动态过程引发协同演化:攻击者不断暴露长尾漏洞,推动防御者泛化至未见攻击模式。值得注意的是,具备初始推理能力的攻击者在迭代强化学习中演化出前所未有的组合策略,凸显本方法的巨大潜力。理论上,我们揭示了更鲁棒的博弈均衡并推导出安全保证。大量实验验证框架有效性,防御成功率更高,且不影响模型助人能力。代码已开源。
原文摘要 · Abstract (English)
Ensuring robust safety alignment is crucial for Large Language Models (LLMs), yet existing defenses often lag behind evolving adversarial attacks due to their \textbf{reliance on static, pre-collected data distributions}. In this paper, we introduce \textbf{MAGIC}, a novel multi-turn multi-agent reinforcement learning framework that formulates LLM safety alignment as an adversarial asymmetric game. Specifically, an attacker agent learns to iteratively rewrite original queries into deceptive prompts, while a defender agent simultaneously optimizes its policy to recognize and refuse such inputs. This dynamic process triggers a \textbf{co-evolution}, where the attacker's ever-changing strategies continuously uncover long-tail vulnerabilities, driving the defender to generalize to unseen attack patterns. Remarkably, we observe that the attacker, endowed with initial reasoning ability, evolves \textbf{novel, previously unseen combinatorial strategies} through iterative RL training, underscoring our method's substantial potential. Theoretically, we provide insights into a more robust game equilibrium and derive safety guarantees. Extensive experiments validate our framework's effectiveness, demonstrating superior defense success rates without compromising the helpfulness of the model. Our code is available at https://github.com/BattleWen/MAGIC.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。