[论文解读] AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
AutoDAN 自动使用分层遗传算法生成语义上有意义的越狱提示,在攻击强度和隐蔽性方面优于基线,同时能迁移到黑盒模型。
The aligned Large Language Models (LLMs) are powerful language understanding and decision-making tools that are created through extensive alignment with human feedback. However, these large models remain susceptible to jailbreak attacks, where adversaries manipulate prompts to elicit malicious outputs that should not be given by aligned LLMs. Investigating jailbreak prompts can lead us to delve into the limitations of LLMs and further guide us to secure them. Unfortunately, existing jailbreak techniques suffer from either (1) scalability issues, where attacks heavily rely on manual crafting of prompts, or (2) stealthiness problems, as attacks depend on token-based algorithms to generate prompts that are often semantically meaningless, making them susceptible to detection through basic perplexity testing. In light of these challenges, we intend to answer this question: Can we develop an approach that can automatically generate stealthy jailbreak prompts? In this paper, we introduce AutoDAN, a novel jailbreak attack against aligned LLMs. AutoDAN can automatically generate stealthy jailbreak prompts by the carefully designed hierarchical genetic algorithm. Extensive evaluations demonstrate that AutoDAN not only automates the process while preserving semantic meaningfulness, but also demonstrates superior attack strength in cross-model transferability, and cross-sample universality compared with the baseline. Moreover, we also compare AutoDAN with perplexity-based defense methods and show that AutoDAN can bypass them effectively.
研究动机与目标
- 评估现有越狱方法的局限性(可扩展性和隐蔽性)。
- 提出一种自动方法来生成隐蔽的越狱提示。
- 利用手工提示作为初始化以引导遗传搜索。
- 开发适用于结构化离散文本数据的分层遗传算法。
- 评估跨模型的可迁移性、普遍性以及对基于困惑度的防御的规避。
提出的方法
- 用手工设计的越狱提示初始化搜索,形成多样的初始族群。
- 使用目标越狱响应的负对数似然作为适应度函数。
- 使用分层遗传算法(AutoDAN-HGA),在句子级和段落级进行交叉/变异。
- 将基于LLM的变异融入以在保持语义的前提下丰富提示。
- 采用基于动量的词得分来引导细粒度的单词替换。
- 基于迭代次数或模型回应中的拒绝信号进行终止。
实验结果
研究问题
- RQ1自动方法能否生成在保持语义意义的同时隐蔽的越狱提示?
- RQ2分层遗传算法是否改善文本提示的收敛性并逃离局部最优?
- RQ3与基线相比,AutoDAN 在跨模型迁移性和跨样本普遍性方面的表现如何?
- RQ4AutoDAN 能否绕过针对逐词越狱的困惑度防御?
- RQ5以手工提示初始化对可扩展性和有效性的影响是什么?
主要发现
- AutoDAN 在跨模型设置下对开源LLMs(Vicuna-7b、Guanaco-7b、Llama2-7b-chat)和 GPT-3.5-turbo 的攻击成功率高于基线。
- AutoDAN-HGA(分层GA)比 AutoDAN-GA 收敛更好且避免局部极小值。
- AutoDAN 提示的困惑度低于 GCG,显示更强隐蔽性,且与手工提示相当。
- AutoDAN 对黑盒模型具有更好的可迁移性,跨样本普遍性良好。
- 困惑度防御显著降低了令牌级别的越狱(GCG),但对 AutoDAN 和手工 DAN 的语义级提示效果较弱的防御效果较弱。
- 消融显示 DAN 初始化、LLM 基于的变异和分层 GA 各自提升了性能和速度。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。