GRAF: Multi-turn Jailbreaking via Global Refinement and Active Fabrication

Hua Tang, Lingyong Yan, Yukun Zhao, Shuaiqiang Wang, Jizhou Huang, Dawei Yin

TL;DR

The paper introduces GRAF (Globally Refining and Adaptively Fabricating), a novel multi-turn jailbreaking framework designed to uncover safety vulnerabilities in Large Language Models (LLMs). By dynamically updating the entire conversation trajectory and actively removing safety warnings from intermediate histories, GRAF significantly increases the attack success rate across various state-of-the-art models, highlighting critical gaps in current multi-turn alignment defenses.

What Problem Does This Paper Address?

While single-turn jailbreaking methods—which attempt to bypass LLM safety guardrails in a single prompt—are increasingly well-defended by input filters, multi-turn jailbreaking presents a more complex challenge. Multi-turn attacks use a sequence of queries to gradually steer a target model toward generating restricted content without triggering immediate refusals.

However, existing multi-turn approaches often rely on rigid, pre-defined templates or only perform local updates to the immediate next query, which can cause the conversation to drift off-topic or fail when a model outputs a refusal. Furthermore, standard methods append intermediate safety warnings directly into the dialogue history, which reinforces the model's defensive alignment in subsequent turns.

Methods

The authors propose GRAF, which operates via two core mechanisms:

  1. Global Refinement: Instead of modifying only the next query when a refusal occurs, GRAF uses an auxiliary attacker LLM to initialize a full multi-turn query trajectory and dynamically refines all remaining queries simultaneously based on the evolving dialogue context. This keeps the attack vector tightly focused on the target objective.
  2. Active Fabrication: To prevent the target model from reinforcing its own safety boundaries, GRAF actively modifies the intermediate dialogue history. If a query is persistently rejected, the turn is discarded entirely. If a response contains partial information alongside safety-related warnings or hesitation phrases (e.g., "I'm sorry, but I must be responsible..."), an attacker model strips out the warnings and rephrases the core content smoothly before saving it to the dialogue history.

The overall workflow is illustrated in the paper's architecture diagram:

Figure 2: The workflow of GRAF. The attacker model first initialized a jailbreaking trajectory based on the jailbreaking task (denoted by the Gray arrow). For Global Refinement, at each turn, the query qi in the jailbreaking trajectory Q is first fed into the target model to obtain the answer ai. If the query qi is refused, the attacker model iteratively revises qi. If a successful response is not obtained after the maximum number of retries, the model then revises all subsequent queries Q≥i to redirect the current trajectory. Once a non-rejected response is returned, the attacker model globally refines all following queries Q>i using the dialogue history up to ai (denoted by the Red Arrow). For Active Fabrication, if qi continues to be rejected, the (qi, ai) pair is discarded, and the model proceeds to qi+1; In addition, any non-rejected response ai is post-processed to remove safety warnings (denoted by the Blue Arrow).

Datasets

The method was evaluated using the HarmBench dataset, a standardized evaluation framework containing various categories of harmful textual behaviors used for red-teaming and testing robust refusal mechanisms in language models.

Key Insights and Ideas

  • Dialogue History as a Safety Reinforcer: A key insight of the paper is that safety warnings and refusal prefixes generated by an LLM act as in-context reminders that increase the probability of subsequent refusals. Removing these warnings via "Active Fabrication" prevents the model's defense mechanisms from compounding across turns.
  • Representation Alignment Shift: By analyzing the internal hidden states of target models using Principal Component Analysis (PCA), the authors found that multi-turn interactions gradually shift the internal representations of adversarial queries closer to those of completely benign queries, effectively cloaking the intent within the model's embedding space.
Figure 3: Visualization of the hidden states of llama-3.1-8b and llama-3.1-70b with two-dimensional PCA. The plot displays five groups of points, corresponding to original harmful queries, harmless queries, and the attack queries generated using our method with different numbers of history turns. These groups are marked using different shapes and colors, and the decision boundary (gray dashed line) is derived from logistic regression.

Key Results

  • High Attack Success Rate (ASR): Evaluated across six state-of-the-art target models (including GPT-4o, Claude-3.5-Sonnet, and Llama-3.1-70B), GRAF achieved an average Attack Success Rate of 82.1% when evaluated by an LLM judge (GPT-Judge), substantially outperforming existing multi-turn baselines like Crescendo (8.9%) and Derail (66.3%).
  • Evasion of Defenses: The framework demonstrated robustness against standard safety guardrails, maintaining high success rates even when tested against the OpenAI Moderation Endpoint and token-filtering defenses like RA-LLM.
  • Computational Efficiency: GRAF achieved these high success rates with lower token costs compared to alternative multi-turn optimization baselines.

Limitations and Future Work

The authors note that while GRAF is highly effective at bypassing current alignment mechanisms, its success underscores the urgent need for more robust multi-turn defense frameworks. Future work includes developing advanced alignment techniques that can detect semantic steering across extended dialogue histories, rather than relying primarily on single-turn input filtering or localized context evaluation.

Summary updated

BibTeX
@misc{tang2025graf,
  author = {Hua Tang and Lingyong Yan and Yukun Zhao and Shuaiqiang Wang and Jizhou Huang and Dawei Yin},
  title = {{GRAF: Multi-turn Jailbreaking via Global Refinement and Active Fabrication}},
  year = {2025},
  eprint = {2506.17881},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.17881},
}
Figure