通过多轮分解提示词,突破大模型安全限制,成功率超94%。
Multi-round jailbreak attack on large language models
- 用大模型自身拆解危险问题为多步温和子问题。
- 在Llama2-7B上实现94%攻击成功率,绕过静态过滤规则。
- 适合研究模型安全漏洞或对抗攻防的学者参考。
保障大语言模型与人类价值观对齐对生成有益内容至关重要。尽管大模型能识别并规避有害查询,仍易受‘越狱’攻击——精心设计的提示可诱导其生成有毒内容。传统单轮越狱攻击(如GCG、AutoDAN)不修改危险词汇,仅靠提示工程临时绕过防护,但随着模型进一步微调,成功率急剧下降,且无法有效绕过基于关键词的静态过滤器。本研究提出一种多轮越狱方法:利用大模型将危险提示分解为一系列渐进式低风险子问题,通过微调Llama3-8B实现该分解能力。随后用该模型分解目标提示,逐个向目标模型提问;若某子问题被拒绝,则重新分解,循环直至达成最终目标。实验表明,该方法在Llama2-7B上成功率达94%,有效绕过静态规则过滤。
原文摘要 · Abstract (English)
Ensuring the safety and alignment of large language models (LLMs) with human values is crucial for generating responses that are beneficial to humanity. While LLMs have the capability to identify and avoid harmful queries, they remain vulnerable to "jailbreak" attacks, where carefully crafted prompts can induce the generation of toxic content. Traditional single-round jailbreak attacks, such as GCG and AutoDAN, do not alter the sensitive words in the dangerous prompts. Although they can temporarily bypass the model's safeguards through prompt engineering, their success rate drops significantly as the LLM is further fine-tuned, and they cannot effectively circumvent static rule-based filters that remove the hazardous vocabulary. In this study, to better understand jailbreak attacks, we introduce a multi-round jailbreak approach. This method can rewrite the dangerous prompts, decomposing them into a series of less harmful sub-questions to bypass the LLM's safety checks. We first use the LLM to perform a decomposition task, breaking down a set of natural language questions into a sequence of progressive sub-questions, which are then used to fine-tune the Llama3-8B model, enabling it to decompose hazardous prompts. The fine-tuned model is then used to break down the problematic prompt, and the resulting sub-questions are sequentially asked to the victim model. If the victim model rejects a sub-question, a new decomposition is generated, and the process is repeated until the final objective is achieved. Our experimental results show a 94\% success rate on the llama2-7B and demonstrate the effectiveness of this approach in circumventing static rule-based filters.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。