arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2405.18540cs.CLcs.CRcs.LG
收藏

针对大语言模型学习多样化攻击以用于鲁棒红队测试与安全调优

Learning diverse attacks on large language models for robust red-teaming and safety tuning

KAIST(韩国科学技术院);Mila – Québec AI Institute(米拉-魁北克人工智能研究所);Université de Montréal(蒙特利尔大学);McGill University(麦吉尔大学);National University of Singapore(新加坡国立大学);University of Edinburgh(爱丁堡大学);CIFAR(加拿大高级研究所)

Seanie Lee, Minsu Kim, Lynn Cherif, David Dobre, Juho Lee, Sung Ju Hwang, Kenji Kawaguchi, Gauthier Gidel, Yoshua Bengio, Esmeralda S. Whitammer, Moksh Jain

AI总结:

该研究针对现有红队测试方法存在的模式崩塌或攻击有效性不足问题,提出GFlowNet微调加二次平滑的方法生成多样化攻击提示,其攻击对各类LLM有效且可迁移,用该攻击提示调优的模型对其他攻击方法具有鲁棒性。

摘要:

红队测试(即识别能引发有害响应的提示)是确保大语言模型(LLMs)安全且负责任部署的关键步骤。针对多种攻击提示模式开发有效防护手段,需要发现多样化的攻击方式。自动化红队测试通常使用强化学习来微调攻击者语言模型,使其生成能从目标LLM引出不良响应的提示,例如可通过辅助毒性分类器进行衡量。我们发现,即便采用明确的正则化手段以鼓励新颖性和多样性,现有方法仍会出现模式崩塌或无法生成有效攻击的问题。作为一种灵活且具有概率性原则的替代方案,我们提出使用GFlowNet微调,随后进行二次平滑阶段,以训练攻击者模型生成多样化且有效的攻击提示。我们发现,我们方法生成的攻击对多种目标LLM均有效,无论这些LLM是否经过安全调优,且在不同目标LLM之间具有良好的迁移性。最后,我们证明,使用由我们方法生成的红队提示数据集进行安全调优的模型,对其他基于强化学习的红队测试方法的攻击具有鲁棒性。

英文摘要:

Red-teaming, or identifying prompts that elicit harmful responses, is a critical step in ensuring the safe and responsible deployment of large language models (LLMs). Developing effective protection against many modes of attack prompts requires discovering diverse attacks. Automated red-teaming typically uses reinforcement learning to fine-tune an attacker language model to generate prompts that elicit undesirable responses from a target LLM, as measured, for example, by an auxiliary toxicity classifier. We show that even with explicit regularization to favor novelty and diversity, existing approaches suffer from mode collapse or fail to generate effective attacks. As a flexible and probabilistically principled alternative, we propose to use GFlowNet fine-tuning, followed by a secondary smoothing phase, to train the attacker model to generate diverse and effective attack prompts. We find that the attacks generated by our method are effective against a wide range of target LLMs, both with and without safety tuning, and transfer well between target LLMs. Finally, we demonstrate that models safety-tuned using a dataset of red-teaming prompts generated by our method are robust to attacks from other RL-based red-teaming approaches.

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

↑