arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.11533cs.CLcs.AI
收藏

针对大语言模型的多轮越狱攻击

Multi-round jailbreak attack on large language models

Yihua Zhou, Xiaochuan Shi

AI总结:

本文提出一种多轮越狱攻击方法,通过微调Llama3-8B将危险提示分解为递进子问题,依次诱导受害模型,在llama2-7B上达到94%成功率,并能有效绕过静态规则过滤器。

摘要:

确保大语言模型(LLMs)的安全性和与人类价值观的对齐,对于生成有益于人类的响应至关重要。尽管LLMs具备识别和避免有害查询的能力,但它们仍然容易受到“越狱”攻击的影响,即精心构造的提示可以诱导生成有毒内容。传统的单轮越狱攻击,如GCG和AutoDAN,不会改变危险提示中的敏感词。虽然它们可以通过提示工程暂时绕过模型的安全防护,但随着LLM的进一步微调,其成功率显著下降,并且它们无法有效规避基于规则的静态过滤器,这些过滤器会移除危险词汇。在本研究中,为了更好地理解越狱攻击,我们引入了一种多轮越狱方法。该方法可以改写危险提示,将其分解为一系列危害较小的子问题,以绕过LLM的安全检查。我们首先使用LLM执行分解任务,将一组自然语言问题分解为一系列逐步递进的子问题,然后用这些子问题微调Llama3-8B模型,使其能够分解危险提示。随后使用微调后的模型分解问题提示,并将生成的子问题依次向受害模型提问。如果受害模型拒绝某个子问题,则生成新的分解,并重复该过程,直到实现最终目标。我们的实验结果显示,在llama2-7B上取得了94%的成功率,并证明了该方法在规避基于规则的静态过滤器方面的有效性。

英文摘要:

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.

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

↑