Multi-round jailbreak attack on large language models

Yi‐Hua Zhou, Xiaochuan ShiarXiv 2024 · DOI · arXiv

TL;DR

This paper introduces a novel "multi-round jailbreak attack" that decomposes dangerous prompts into a series of less harmful sub-questions. This approach successfully bypasses LLM safety filters by incrementally guiding the model towards generating harmful content, achieving a remarkable 94.45% success rate on the Llama2-7B model.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly powerful and widely used, making their safety and alignment with human values paramount. While LLMs are designed to refuse harmful queries, they remain vulnerable to "jailbreak" attacks. Traditional single-round attacks often fail as LLMs are further fine-tuned or when static filters are in place to block hazardous keywords. These existing methods struggle to circumvent defenses that adapt to evolving LLM safety mechanisms. This paper addresses the limitation of single-round attacks by proposing a more sophisticated, multi-stage approach that can overcome these defenses.

Methods

The core innovation is the multi-round jailbreak attack. This method involves:

  1. Decomposition: A separate LLM is fine-tuned to decompose a hazardous prompt into a sequence of progressively less harmful sub-questions. This fine-tuning uses a dataset derived from naturally safe questions, but with prompts designed to encourage the LLM to bypass moral constraints.
  2. Iterative Querying: The fine-tuned "attacker LLM" then presents these sub-questions sequentially to the "victim LLM."
  3. Adaptive Refinement: If the victim LLM rejects a sub-question, the attacker LLM generates a new decomposition, and the process repeats. This iterative refinement continues until the victim LLM produces the desired harmful output or a set number of interactions is reached.

The authors also detail the fine-tuning process for LLMs, explaining how task-specific data is used to minimize a loss function and adapt the model's parameters. They formalize the multi-round attack mathematically, aiming to minimize the divergence between the current answer and the target answer through iterative question formulation.

Datasets

The paper utilized two datasets:

  • Training Dataset: Generated by selecting questions from the "Questions about the world" subset of the ultrachat dataset. LLMs were used to break these questions down into three progressive sub-questions, creating a complete training dataset for the attacker LLM.
  • Testing Dataset: The advbench dataset, containing 520 examples of harmful behavior, was used for testing the effectiveness of the attack.

Key Insights and Ideas

  • Decomposition is Key: The most significant insight is that breaking down a complex, harmful request into a series of seemingly innocuous sub-questions is a highly effective way to bypass LLM safety mechanisms. This exploits the LLM's ability to handle conversational context and incremental information.
  • Fine-tuning for Attack: The paper demonstrates that fine-tuning an LLM specifically for the task of decomposing and generating sequential prompts can create a potent attack tool, even without explicit "dangerous" training data.
  • Adaptability of LLMs: The success of this multi-round approach highlights the inherent adaptability of LLMs, which, while beneficial for many tasks, can be exploited for malicious purposes.
  • Limitations of Static Defenses: The research underscores that static rule-based filters and even basic prompt engineering are insufficient against sophisticated, multi-turn adversarial attacks.

Key Results

  • High Attack Success Rate: The multi-round jailbreak attack achieved an impressive 94.45% Attack Success Rate (ASR) on the Llama2-7B model.
  • Superiority over Baseline: This significantly outperforms the baseline GCG (Generative Controlled Guidance) method, which only achieved a 20% ASR on the same model.
  • Effectiveness Against Filters: The approach demonstrated effectiveness in circumventing static rule-based filters.

Limitations and Future Work

The authors acknowledge the following:

  • Vulnerability of Llama2-7B: The high ASR on Llama2-7B suggests this specific model is particularly vulnerable, and further research is needed to understand its susceptibility across different LLMs.
  • Need for Further Research: The paper calls for several avenues for future research and development:
  • Enhanced Monitoring of Dialogue Contexts: Developing sophisticated systems to analyze multi-turn dialogue context for patterns leading to harmful outputs.
  • Dynamic Response Adjustment: Creating mechanisms that dynamically adjust LLM responses based on detected conversational trajectories, potentially by introducing friction or redirecting topics.
  • Improved Training Regimes: Training LLMs with a broader set of adversarial examples, specifically designed to include multi-turn interaction scenarios, to improve their resistance to manipulative querying.

Summary updated

Abstract

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.
BibTeX
@misc{zhou2024multi,
  author = {Yi‐Hua Zhou and Xiaochuan Shi},
  title = {{Multi-round jailbreak attack on large language models}},
  year = {2024},
  eprint = {2410.11533},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.11533},
}
Figure