arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.01850cs.CL
收藏

利用对抗性防御者训练对大语言模型进行紫队测试

Purple-teaming LLMs with Adversarial Defender Training

The Chinese University of Hong Kong(香港中文大学)

Jingyan Zhou, Kun Li, Junan Li, Jiawen Kang, Minda Hu, Xixin Wu, Helen Meng

AI总结:

本文提出 PAD 框架,通过自我博弈融合红队攻击与蓝队安全训练,并以生成对抗方式同步更新攻击者和防御者,从而主动发现 LLM 漏洞并构建兼顾模型质量的安全护栏。

摘要:

现有保护大语言模型(LLM)的工作在主动暴露目标 LLM 漏洞以及迅速适应新出现的安全风险方面存在局限。为解决这一问题,我们提出了利用对抗性防御者训练对 LLM 进行紫队测试的方法(Purple-teaming LLMs with Adversarial Defender training,PAD),这是一条通过新颖地融合红队测试(攻击)与蓝队测试(安全训练)技术来保护 LLM 的流程。在 PAD 中,我们以自我博弈的方式自动收集围绕特定安全风险、覆盖某一 LLM 漏洞的对话数据,其中攻击者旨在诱导不安全回复,防御者则针对这些攻击生成安全回复。随后,我们以生成对抗网络的方式更新两个模块:训练攻击者诱导更多不安全回复,并更新防御者以识别这些回复并解释不安全原因。实验结果表明,PAD 在发现有效攻击和建立稳健安全护栏方面均显著优于现有基线。此外,研究结果显示 PAD 擅长在安全性与整体模型质量之间取得平衡。我们还揭示了保护 LLM 时的关键挑战,包括防御多轮攻击,以及需要更精细的策略来识别特定风险。

英文摘要:

Existing efforts in safeguarding LLMs are limited in actively exposing the vulnerabilities of the target LLM and readily adapting to newly emerging safety risks. To address this, we present Purple-teaming LLMs with Adversarial Defender training (PAD), a pipeline designed to safeguard LLMs by novelly incorporating the red-teaming (attack) and blue-teaming (safety training) techniques. In PAD, we automatically collect conversational data that cover the vulnerabilities of an LLM around specific safety risks in a self-play manner, where the attacker aims to elicit unsafe responses and the defender generates safe responses to these attacks. We then update both modules in a generative adversarial network style by training the attacker to elicit more unsafe responses and updating the defender to identify them and explain the unsafe reason. Experimental results demonstrate that PAD significantly outperforms existing baselines in both finding effective attacks and establishing a robust safe guardrail. Furthermore, our findings indicate that PAD excels in striking a balance between safety and overall model quality. We also reveal key challenges in safeguarding LLMs, including defending multi-turn attacks and the need for more delicate strategies to identify specific risks.

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

↑