arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.16873cs.CRcs.AIcs.CLcs.LG
收藏

AdvPrompter:面向大语言模型的快速自适应对抗提示生成

AdvPrompter: Fast Adaptive Adversarial Prompting for LLMs

Meta;FAIR at Meta(Meta FAIR)

Anselm Paulus, Arman Zharmagambetov, Chuan Guo, Brandon Amos, Yuandong Tian

AI总结:

本文提出 AdvPrompter,通过交替优化训练另一个大语言模型快速生成人类可读的对抗提示后缀,在保持指令原意的同时诱使目标模型产生有害响应,并证明该方法在多个基准上效果优异且可迁移至黑盒模型,同时可用于提升模型鲁棒性。

摘要:

大语言模型(LLMs)容易遭受越狱攻击,导致生成不当或有害内容。人工红队测试需要耗费大量时间搜索对抗性提示,而自动对抗提示生成往往产生语义无意义的攻击,难以规模化应用。本文提出一种新方法,利用另一个大语言模型(称为 AdvPrompter)在数秒内生成人类可读的对抗提示。AdvPrompter 通过交替优化算法训练,生成能够掩盖输入指令但不改变其含义的后缀,从而诱使 TargetLLM 给出有害响应。在流行的开源 TargetLLM 上的实验结果表明,该方法在 AdvBench 和 HarmBench 数据集上取得了极具竞争力的结果,并且能够迁移到闭源黑盒大语言模型。我们还表明,利用 AdvPrompter 生成的对抗后缀进行训练,是提高大语言模型对越狱攻击鲁棒性的一种有前景的策略。

英文摘要:

Large Language Models (LLMs) are vulnerable to jailbreaking attacks that lead to generation of inappropriate or harmful content. Manual red-teaming requires a time-consuming search for adversarial prompts, whereas automatic adversarial prompt generation often leads to semantically meaningless attacks that do not scale well. In this paper, we present a novel method that uses another LLM, called AdvPrompter, to generate human-readable adversarial prompts in seconds. AdvPrompter, which is trained using an alternating optimization algorithm, generates suffixes that veil the input instruction without changing its meaning, such that the TargetLLM is lured to give a harmful response. Experimental results on popular open source TargetLLMs show highly competitive results on the AdvBench and HarmBench datasets, that also transfer to closed-source black-box LLMs. We also show that training on adversarial suffixes generated by AdvPrompter is a promising strategy for improving the robustness of LLMs to jailbreaking attacks.

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

↑