Abstract
Large Language Models (LLMs) have achieved exceptional performance across a wide range of tasks. However, they still pose significant safety risks due to the potential misuse for malicious purposes. Jailbreaks, which aim to elicit models to generate harmful content, play a critical role in identifying the underlying security threats. Recent jailbreaking primarily focuses on single-turn scenarios, while the more complicated multi-turn scenarios remain underexplored. Moreover, existing multi-turn jailbreaking techniques struggle to adapt to the evolving dynamics of dialogue as the interaction progresses. To address this limitation, we propose a novel multi-turn jailbreaking method that refines the jailbreaking path globally at each interaction. We also actively fabricate model responses to suppress safety-related warnings, thereby increasing the likelihood of eliciting harmful outputs in subsequent questions. Experimental results demonstrate the superior performance of our method compared with existing single-turn and multi-turn jailbreaking techniques across six state-of-the-art LLMs.
Introduction
Large Language Models (LLMs) are equipped with safety filters designed to prevent the generation of harmful content, such as instructions for illegal acts or harassment. While "single-turn" jailbreaks—attempts to bypass safety filters in a single prompt—are well-studied and increasingly mitigated, "multi-turn" jailbreaking presents a more complex challenge. Multi-turn attacks use extended conversations to gradually steer a model toward a harmful goal, making them harder for static safety filters to detect.
Existing multi-turn methods often rely on rigid templates or local adjustments to the immediate next prompt. A significant hurdle is the "red flag" effect: if a model includes a safety warning in a partially helpful response, that warning remains in the dialogue history, increasing the probability of refusal in subsequent turns. The GRAF (Globally Refining and Adaptively Fabricating) method addresses these challenges by making attacks more adaptive and stealthy.
Methodology: Global Refinement and Active Fabrication
GRAF introduces two primary innovations to the multi-turn jailbreaking pipeline: Global Refinement and Active Fabrication.
Global Refinement
Instead of merely adjusting the next query, GRAF employs an "attacker LLM" to initialize a complete sequence of queries, known as a trajectory. At each turn, if the target model provides a non-rejective response, the attacker globally refines all remaining queries in the trajectory. This ensures the attack remains focused on the ultimate goal while adapting to the specific nuances of the ongoing conversation.
Active Fabrication
This technique involves "cleaning" the dialogue history to maintain the target model's helpful state.
- Warning Suppression: If the target model provides a successful response but includes a safety disclaimer (e.g., "I must remain responsible..."), the attacker proactively removes these warnings and rephrases the response into a neutral, confident tone before appending it to the history.
- History Pruning: If a query is persistently rejected, the failed interaction is discarded to prevent negative influence on future turns.
Experimental Evaluation
The effectiveness of GRAF was evaluated using HarmBench, covering categories such as biological weapons, cyberattacks, and chemical hazards. The method was tested against six state-of-the-art models: GPT-4o, GPT-4o-mini, Claude-3.5-Haiku, Claude-3.5-Sonnet, Llama-3.1-8B, and Llama-3.1-70B.
Key Results
GRAF achieved an average Attack Success Rate (ASR) of 82.1% across all tested models, significantly outperforming the previous state-of-the-art multi-turn method, Derail (66.3%).
The vulnerability was widespread: GRAF achieved a 94.0% ASR on Llama-3.1-70B and 95.0% on GPT-4o. Even against defenses like the OpenAI Moderation Endpoint and RA-LLM, GRAF remained markedly more effective than baseline attacks.
Analysis and Insights
Visualization of the models' hidden states using Principal Component Analysis (PCA) revealed that multi-turn attacks successfully shift the representation of harmful queries toward "harmless" clusters. As the dialogue progresses, the model's internal perception of intent becomes obscured, hindering safety mechanism triggers.
Furthermore, the study confirmed that safety warnings in the dialogue history act as strong signals for subsequent refusals. By fabricating a history devoid of these warnings, GRAF effectively "gaslights" the model into maintaining a helpful persona.
Conclusion
While GRAF demonstrates high efficacy, it is not a "silver bullet" and can be mitigated by advanced, multi-turn-aware defense techniques. This research highlights critical vulnerabilities in current LLM safety architectures, emphasizing the need for robust defenses that account for the dynamic nature of long-form interactions.
Summary updated