arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01539cs.AIcs.CLcs.LGcs.MA
收藏

MAGIC: 一种共进化攻击者-防御者对抗游戏用于鲁棒大语言模型安全

MAGIC: A Co-Evolving Attacker-Defender Adversarial Game for Robust LLM Safety

Shanghai AI Laboratory(上海人工智能实验室);Shanghai Jiao Tong University(上海交通大学);Zhejiang University(浙江大学)

Xiaoyu Wen, Zhida He, Han Qi, Ziyu Wan, Zhongtian Ma, Ying Wen, Tianhang Zheng, Xingcheng Xu, Chaochao Lu, Qiaosheng Zhang

AI总结:

MAGIC通过共进化对抗游戏提升大语言模型的安全性,攻击者与防御者智能体在多轮强化学习中相互演化,有效识别并抵御未知攻击模式。

摘要:

确保鲁棒的安全对齐对于大语言模型(LLMs)至关重要,但现有防御措施往往落后于不断演变的对抗性攻击,因为它们依赖于静态的、预先收集的数据分布。在本文中,我们引入了MAGIC,一种新的多轮多智能体强化学习框架,将LLM安全对齐 formulation 为对抗性非对称游戏。具体而言,攻击者代理学习将原始查询迭代地改写成欺骗性提示,而防御者代理同时优化其策略以识别并拒绝此类输入。这一动态过程触发了共进化,攻击者的不断变化的策略持续揭示长尾漏洞,推动防御者泛化到未见的攻击模式。值得注意的是,我们观察到攻击者在初始推理能力下,通过迭代RL训练发展出新的、前所未见的组合策略,凸显了我们方法的显著潜力。理论上,我们提供了更稳健的游戏均衡的见解并推导了安全保证。广泛的实验验证了我们框架的有效性,证明了在不损害模型有用性的情况下,防御成功率更优。我们的代码可在https://github.com/BattleWen/MAGIC上获得。

英文摘要:

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.

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

↑