Skip to content

Knowledge-driven multi-turn jailbreak for large language modelsKnowledge-Driven Multi-Turn Jailbreaking on Large Language Models

arXiv· arXiv:2601.05445· Songze Li, Ruishi He, Xiaojun Jia, Jun Wang, Zhihui Fu·Indexed by this site · 2026-10-12· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

Mastermind performs knowledge-driven attacks for multi-turn jailbreaks, with an average ASR of 87% across 15 models on HarmBench and 60% for GPT-5.

Threat modelIn the black-box setting, the target is a safety-aligned LLM M. Given a harmful query and a turn budget N, the attack strategy generates the next turn's input based on the true history, and success is achieved when the discriminator D exceeds a preset threshold in any turn. It can query and observe text, look back through local history, and use auxiliary LLMs; it has no weights, logits, or losses, and cannot modify the history or system prompt. The methods section calls the fuzzing grey-box.

Questions
Multi-turn jailbreaks split harmful intent across long conversations. The authors state that existing methods struggle to maintain long-range coherence, fixed trajectories break upon refusal, and they rely on manual strategies. Multi-turn interaction has already been used in chatbots, assistants, and agents.
Methods
Mastermind works in two phases: it explores in a sandbox and distills abstract strategies, then retrieves and combines strategies by semantics. The planner sets the steps, the executor writes the current turn's input, and the controller decides whether to continue, rewrite, or abort; on failure, it crosses and mutates over the strategy vectors.
Experiments and results
On HarmBench, the average ASR across 15 models is 87%; on StrongReject, the average ASR across five models is 91%, with GPT-5 at 60%. In Table 4, the three defenses have average ASRs of 80%, 85%, and 87%.
Limitations and future work
The paper does not specifically discuss limitations. The evaluation includes 15 models on 200 HarmBench items and 5 models on 60 StrongReject items, plus three defenses. It does not report the number of repetitions, τ, pm, K, or reviewer-human agreement.
Experimental setupLlama 3.1 8B Instruct、Llama 3.3 70B Instruct et al. · HarmBench、StrongReject et al. · ASR、HR
Evaluated models
Llama 3.1 8B InstructLlama 3.3 70B InstructQwen 2.5 7B InstructQwen 2.5 14B InstructQwen 2.5 72B InstructDeepseek V3GPT-4oGPT-4.1Deepseek R1o3 Minio4 MiniGemini 2.5 FlashGemini 2.5 ProClaude 3.7 SonnetGPT-5Claude 4 Sonnet
Benchmarks
HarmBenchStrongRejectauxiliary harmful-query dataset
Metrics
ASRHR
AI summaryThe paper proposes Mastermind, a multi-turn jailbreak framework for large language models that autonomously accumulates and reuses attack patterns through a closed loop of planning, execution, and reflection. The framework adopts hierarchical planning, decoupling high-level attack goals from low-level tactical execution to maintain coherence in long-range conversations; its knowledge base automatically discovers and improves effective attack patterns through reflective interaction experience, then dynamically recombines attack vectors. The authors state that experiments on models such as GPT-5 and Claude 3.7 Sonnet show that Mastermind's attack success rate and harmfulness scores are significantly higher than existing baselines, and it demonstrates resilience against various advanced defense mechanisms.

The paper proposes Mastermind, a multi-turn jailbreak framework for large language models that autonomously accumulates and reuses attack patterns through a closed loop of planning, execution, and reflection. The framework adopts hierarchical planning, decoupling high-level attack goals from low-level tactical execution to maintain coherence in long-range conversations; its knowledge base automatically discovers and improves effective attack patterns through reflective interaction experience, then dynamically recombines attack vectors. The authors state that experiments on models such as GPT-5 and Claude 3.7 Sonnet show that Mastermind's attack success rate and harmfulness scores are significantly higher than existing baselines, and it demonstrates resilience against various advanced defense mechanisms.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Existing multi-turn jailbreaks struggle to maintain long-range coherence and adapt to conversation state; Mastermind uses knowledge-driven hierarchical planning to do so.

    Existing multi-turn jailbreaks struggle to simultaneously maintain long-range goals and adapt to the model's current-turn state.

    • Scenario: The authors state that multi-turn dialogue has been used in chatbots, virtual assistants, programming assistants, and autonomous agents. When harmful intent is split across multiple turns, it can bypass guardrails that block immediate harm, and the authors state that traditional detection struggles to handle this.
    • Existing methods: The authors state that dynamic attacks focus on the immediate reply and drift to irrelevant or harmless subtopics in long conversations; predefined trajectories break upon refusal or derailment; manual strategies limit diversity and make it hard to discover non-obvious vulnerabilities.
    • This paper's approach: It proposes Mastermind, which frames attacks as a closed loop of planning, execution, and reflection, uses hierarchical agents to separate high-level goals from low-level execution, and distills successful trajectories into recombinable strategy knowledge.
    • Threat model:
      • Goal: For a safety-aligned model M, given a harmful query qharm and a turn budget N, make any turn's discriminator D exceed a preset threshold.
      • Knowledge: Black-box; weights, logits, and losses are not visible; the system prompt is neither visible nor modifiable.
      • Capabilities: It can submit inputs and observe generated text; it can save history locally and return to Hk to retry with a different prompt; it can use auxiliary LLMs.
      • History constraints: It cannot tamper with Ht, cannot pre-fill or forge history; the context can only consist of M's real outputs.
  2. What related research exists?

    The paper groups work into single-turn, multi-turn, defenses, and agents, and criticizes multi-turn methods as myopic, rigid, and dependent on manual priors.

    Related work is divided into single-turn jailbreaks, multi-turn jailbreaks, defenses, and LLM-based agents; multi-turn is further divided into context-free and context-aware based on whether it observes real-time replies.

    Single-turn jailbreaks

    • Empirical: Wei et al. (2023) and subsequent work use handcrafted prompts such as prefix injection, encoding, puzzles, psychological strategies, and low-resource languages to bypass alignment. The paper only categorizes these.
    • Optimization-based: Zou et al. (2023)'s GCG uses white-box gradients to increase the likelihood of the target reply's beginning; Liu et al. (2023)'s AutoDAN uses a hierarchical genetic algorithm, with later work adding momentum, acceleration, or readable prompt generation.
    • LLM-generated: PAIR (Chao et al., 2023) interacts with the target and rewrites prompts; Mehrotra et al. (2024) use branching and pruning search; AutoDAN-Turbo (Liu et al., 2024) stores effective strategies in a repository without requiring predefined strategies or internal access.

    Multi-turn jailbreaks

    • Context-free: MSJ (Anil et al., 2024) inserts large amounts of fabricated dialogue into a long context; CFA (Sun et al., 2024) automatically generates deceptive context and builds sentences turn by turn; ActorAttack (Ren et al., 2024) uses an actor network to decompose goals, but mostly sets sub-queries before the conversation starts. The paper notes that ASJA (Du et al., 2025) assumes history can be forged and therefore does not apply to web chatbots where previous replies cannot be forged.
    • Context-aware: Crescendo (Russinovich et al., 2024) has an attacking LLM generate the next question turn by turn; COA (Yang et al., 2024) uses cosine similarity feedback; MUSE (Yan et al., 2025) performs Monte Carlo tree search over expansion, decomposition, and redirection; X-Teaming (Rahman et al., 2025) uses multi-agent plan revision. There are also RACE (Ying et al., 2025), NEXUS (Asl et al., 2025), and attack models fine-tuned or preference-optimized on successful trajectories (Wang et al., 2024; Zhang et al., 2024; Siren by Zhao et al., 2025).
    • The paper's critique: Dynamic methods have strategic shortsightedness; the paper specifically names Crescendo-like approaches as drifting from the final harmful goal; predefined trajectories (the paper cites Zhou et al., 2024, among others) break upon refusal; MUSE, X-Teaming, and training-based methods remain limited by predefined actions or human priors, and the authors state that they therefore cannot autonomously produce attack vectors beyond existing heuristics.

    Defenses, agents, and experimental comparisons

    • Defenses: Model-level ones include SFT, RLHF, DPO, RLAIF; prompt-level ones include perplexity filtering, SmoothLLM, RA-LLM, and Self-Reminder; agent-level ones include Llama Guard and several commercial moderation APIs. This section is categorization, with no numerical comparison against Mastermind.
    • Agents: ReAct interleaves reasoning and action; Reflexion and Voyager write reflection or skills into memory; CAMEL, AutoGen, MetaGPT, and ChatDev do division of labor or hierarchical collaboration. The paper states that writing feedback into memory is related to knowledge-driven frameworks.
    • Baselines and benchmarks: The experimental comparisons are Crescendo, ActorAttack, X-Teaming, and Siren; the data are HarmBench and StrongReject.

    The authors argue that long-range coherence from hierarchical planning, adaptability from dynamic interaction, and strategy discovery without human priors are all needed simultaneously; Mastermind addresses these three points with hierarchical multi-agent design, automatic distillation, and strategy-space fuzzing.

  3. How does the paper address this problem?

    Mastermind is divided into knowledge accumulation and strategy-space fuzzing, using a closed-loop attack with a planner, executor, and controller.

    Mastermind has two phases: first, successful trajectories are distilled into abstract strategies on a sandbox, then a search is performed over strategy combinations rather than modifying raw tokens. The threat model says black-box; Sec 4.3 calls this search grey-box fuzzing, and the paper does not explain the difference between the two terms.

    Problem setup and single attack loop

    • At turn t, the history is Ht-1, and the target model M generates rt from the system prompt, history, and current input ut. H0 is empty.
    • The attack goal is to maximize the expected maximum discriminator score within budget N, i.e., π∗=argmaxπ𝔼[maxt D(rt,qharm)]. Success is achieved when D exceeds a preset threshold in any turn; the threshold value is not given.
    • In one run, the planner gives a plan P, the executor generates ut, and the controller audits rt. Within the loop, a judge gives Jt on a scale of 1 to 10, and the session score is the maximum across turns. When J is below τ, the planner rewrites the plan based on the failure history; τ is not given a value.
    • The controller has only three actions: Proceed writes the current turn into the history and moves to the next step; Refine analyzes the failure reason and rewrites the same turn's ut; when consecutive Refines reach a preset limit, Abort is triggered and replanning occurs. That limit is not given. Figure 2 shows a Refine example; the specific prompts are not reproduced.

    Three agents

    • Planner: Takes qharm and optional retrieved strategies as input, and outputs a step-by-step natural language plan, with each step containing tactical instructions and expected behavior. Without retrieval, it uses only qharm. Implemented with DeepSeek V3.
    • Executor: Writes the current turn's ut according to the plan, the harmful query, and Ht-1. Implemented with Gemma 3 27B.
    • Controller: Compares rt with the current step's expected behavior and decides whether to continue, rewrite, or abort. The paper does not name the models for the controller and distiller.
    • The attack agents and victim model have temperature 0, and the interaction budget is Tmax=10.

    Knowledge accumulation

    • The auxiliary set is 200 harmful queries generated by commercial LLMs, with no overlap with the test set; the commercial LLMs are not named. The sandbox is fixed as Llama 3.3 70B Instruct.
    • The planner first explores without strategy guidance. On failure, it uses a reflection prompt to generate the next version of the plan from the failure history, in order to obtain successful trajectories that can be distilled.
    • After success, the distiller extracts atomic strategy texts from the successful plan and history, embeds them, stores them in a vector database, and saves the correspondence between queries and strategies.
    • During consolidation, strategies are divided into K clusters by cosine similarity, and the distiller then removes redundancy while keeping functional variants until the count stabilizes. K and the final count are not reported.

    Strategy-space fuzzing

    • Repository strategies are represented as binary vectors, where xk=1 means the k-th strategy is enabled. The goal is to maximize the execution oracle score, i.e., x∗=argmaxx F(x;qtarget). F turns the vector into a plan, runs multiple turns, and returns the Judge's highest severity score.
    • Seeds are not randomly initialized: sentence vectors are used to find historical queries similar to the current query, and the top-K of their successful configurations are used as the initial population. K is not given.
    • Evolution includes tournament selection, bitwise crossover, and bitwise mutation. During crossover, each bit comes from either parent with probability 0.5; during mutation, each bit flips with probability pm. pm and the population size are not given.
    • If the current combination fails to jailbreak, failed strategies are replaced or new strategies are added before trying again. The specific prompts for retrieval, replanning, and mutation are given symbolically in the main text, without the full text.
  4. What experiments did the paper conduct?

    On HarmBench, the average ASR across 15 models is 87%; on StrongReject, the average ASR across five models is 91%, with GPT-5 at 60%.

    Experimental setup

    • Victim models: Table 1 has 15: Llama 3.1 8B Instruct, Llama 3.3 70B Instruct, Qwen 2.5 7B/14B/72B Instruct, DeepSeek V3, GPT-4o, GPT-4.1, DeepSeek R1, o3-mini, o4-mini, Gemini 2.5 Flash, Gemini 2.5 Pro, Claude 3.7 Sonnet, GPT-5. Sec 5.1 says Llama 3 series (7B, 70B), which is inconsistent with the table's 3.1 8B and 3.3 70B; the table is authoritative below. Figure 3's legend additionally lists Claude 4 Sonnet, which is not in the list or table, and has no numbers.
    • Data: 200 items from the HarmBench standard subset, with categories including cybercrime, chemical threats, hate speech, and misinformation; 60 items from StrongReject's custom small set. Main results and defenses use the full datasets; ablations use a stratified random 50 items from HarmBench. The auxiliary set has 200 items.
    • Baselines and roles: Crescendo, ActorAttack, X-Teaming, Siren. Planner is DeepSeek V3, executor is Gemma 3 27B, and the sandbox is only Llama 3.3 70B Instruct. That sandbox model is also a tested target.
    • Metrics: GPT-4o is used as LLM-as-Judge for reporting. ASR is binary, measuring whether the response provides executable information without refusing. HR is 0–5, measuring potential harm and toxicity. The paper says the two can vary independently. Within the loop there is also a 1–10 judge, which is not stated to be GPT-4o, and no threshold corresponding to ASR is given.
    • Other settings: Tmax=10, and the attacker and victim models have temperature=0. The paper does not report the number of repetitions, nor agreement between reviewers and humans.

    Main results

    The table below lists only part of Table 1, including GPT-5 with the lowest ASR. X-Teaming is the baseline with the highest average ASR in that table.

    Swipe horizontally to read the table

    ModelMastermind ASRX-Teaming ASRMastermind HR
    GPT-560%44%3.71
    Claude 3.7 Sonnet67%52%3.42
    o4-mini78%60%3.59
    Llama 3.1 8B Instruct96%64%3.42
    Qwen 2.5 72B Instruct95%74%4.10
    DeepSeek V394%79%4.12
    GPT-4o93%81%3.97
    Average (15 models)87%70%3.84
    • According to Table 1, Mastermind's ASR in every row is higher than all four baselines. The average ASR is 87% and HR is 3.84; baseline average ASRs are Crescendo 37%, ActorAttack 31%, X-Teaming 70%, and Siren 55%. Mastermind ASRs for omitted rows: Llama 3.3 70B Instruct 92%, Qwen 2.5 7B 89%, 14B 92%, GPT-4.1 93%, DeepSeek R1 89%, o3-mini 90%, Gemini 2.5 Flash 91%, Gemini 2.5 Pro 90%.
    • In Table 2 (StrongReject, 5 models), Mastermind's average ASR is 91% and HR is 3.79; X-Teaming is 82% and Crescendo is 79%. Mastermind has the highest ASR in all five rows. On Qwen 2.5 72B Instruct, Mastermind is 93% and Siren is 67%. The lowest Mastermind ASR in that table is Gemini 2.5 Flash's 88%.
    • Knowledge accumulation uses only Llama 3.3 70B Instruct. Its ASR on HarmBench is 92%, where the target is the sandbox itself. The authors say the strategies transfer to other architectures, giving Qwen 2.5 72B Instruct 95%, DeepSeek V3 94%, and GPT-4o 93% (all from Table 1). In the same table, GPT-5 is 60% and Claude 3.7 Sonnet is 67%; the authors do not include those two rows in the above comparison. Figure 3's x-axis is turns 0–10, the y-axis is cumulative ASR, and the tick text is 0.0–1.0; the authors say standard models saturate in the first few turns while GPT-5 uses the full budget. The figure has no endpoint values.

    Components and knowledge base size

    • Table 3 states the target is GPT-5, located in the ablation section using 50 HarmBench items. Executor-only ASR is 30% and HR is 3.40; adding the planner gives 46% and 3.56; adding the controller (Phase 1) gives 56% and 3.34; adding the knowledge base (Phase 1+2) gives 66% and 3.78. The authors say the planner is used to keep the target on track, the controller does error correction, and the knowledge base provides distilled strategies.
    • Phase 1's HR of 3.34 is lower than executor-only's 3.40 and planner-added's 3.56, while ASR rises to 56%. The paper does not separately explain this HR drop. Table 3's 66% also does not equal GPT-5's 60% on full HarmBench in Table 1.
    • Figure 5's x-axis is strategy retention ratio 0%–100%, the left axis is scaled 0.0–1.0 and labeled ASR (%), and the right axis HR is 3.0–4.0. The main text says that without historical strategies, ASR is about 36% and HR about 3.3, and with the full repository, ASR is 66% and HR about 3.8. The authors say the full repository nearly doubles the success rate. The caption does not state the model; that 66% matches the full framework in Table 3, and the paper does not state whether it is the same setting. There are no main-text numbers for 20%–80%.

    Attacks under defenses

    • The authors say the selected defenses were originally single-turn, and the experiments adapted them: Self-Reminder puts the safety prefix as the initial system prompt and appends the suffix to the last user query; SmoothLLM applies character perturbation to the most recent user query; Llama Guard 4 checks the entire history before each message is sent, treating a detection as a refusal. Sec 5.1 says defense experiments use the full dataset. Table 4's caption does not name the benchmark, and its no-defense column matches the corresponding rows in Table 1.

    Swipe horizontally to read the table

    ModelNo defenseSelf-ReminderSmoothLLMLlama Guard
    Llama 3.3 70B Instruct92%77%88%86%
    Qwen 2.5 72B Instruct95%87%91%87%
    GPT-4o93%72%85%92%
    o3-mini90%87%84%87%
    Gemini 2.5 Flash91%79%79%81%
    Average92%80%85%87%
    • The table above is Table 4's ASR. Self-Reminder's average HR drops from 3.87 to 3.24, and GPT-4o's HR is 2.95. The authors say it is the most effective of the tested defenses. SmoothLLM's average HR is 3.64, with Qwen 2.5 72B Instruct at 3.87. Llama Guard's average HR is 3.66; Llama 3.3 70B Instruct's HR is 3.44, and without defense it is 3.41.
    • The authors say Llama Guard is the least effective in this setting. The main text says GPT-4o's success rate under this defense is 94%, while Table 4 says 92%; the table is authoritative. The authors say the average ASR after defenses is still above 80%; in Table 4, Self-Reminder's average is 80%, and Llama 3.3 70B Instruct is 77%.

    Planner and executor selection

    • Figure 4's planners are DeepSeek V3, Gemini 2.5 Flash, and Llama 3.3 70B Instruct; executors are Gemma 3 27B, Llama 3.3 70B Instruct, and Gemini 2.5 Flash; victim models are Llama 3.3 70B Instruct, Gemini 2.5 Flash, and GPT-5 from the latter three. The y-axis is ASR (%) with ticks 0, 50, 100. The main text does not give all cell numbers.
    • The authors say the planner is the main factor: DeepSeek V3 is about 65% against GPT-5, and Llama 3.3 70B Instruct as planner is about 30%. They also say Gemma 3 27B, the executor used for knowledge accumulation, reaches 98% against the Llama 3.3 70B target.
    • The authors say that even with agents not involved in discovery, ASR against standard targets exceeds 75%. Which cells count as standard targets is not mapped cell by cell in the paper.

    Other ablations and analyses

    • The paper gives no numerical experiments for pm, K, τ, the consecutive Refine limit, population size, or top-K.
    • Mastermind's highest HR on HarmBench is DeepSeek V3's 4.12; on StrongReject it is Gemini 2.5 Flash's 3.93 (Table 1, Table 2).
    • The main text uses ActorAttack's 28% and Crescendo's 44% on GPT-4o as comparisons, consistent with that row in Table 1, not the full-table average.
  5. What are some points that can be further explored?

    The paper has no dedicated section for limitations or future work, and the conclusion does not list the method's own limitations.

    Limitations and future directions noted by the authors

    • The paper has no dedicated Limitations, Discussion, or Future Work section, and the conclusion does not state the method's own limitations or planned follow-up experiments. The conclusion only states that current safety alignment still has gaps and describes the framework as an automated red-teaming paradigm that could be used to enhance model robustness in the future (Sec 6).

    Experimental coverage

    • Table 1 reports ASR and HR on the HarmBench standard subset (200 items) for 15 target models; Table 2 reports results on StrongReject custom small (60 items) for 5 of those models.
    • The comparison methods are Crescendo, ActorAttack, X-Teaming, and Siren. The knowledge-accumulation sandbox uses only Llama 3.3 70B Instruct, and the 200 auxiliary queries were generated by an unnamed commercial LLM.
    • The defense experiments use adapted Self-Reminder, SmoothLLM, and Llama Guard 4; Table 4 covers 5 target models. The ablation uses a stratified random 50-item HarmBench subset, and Table 3's target is stated as GPT-5.
    • The implementation states that the planner is DeepSeek V3, the executor is Gemma 3 27B, and the reviewer reporting metrics is GPT-4o, with Tmax=10 and temperature=0. Figure 3's legend includes Claude 4 Sonnet, but Table 1 and Sec 5.1's model lists do not include that name, nor is there a corresponding number.
    • The paper does not report the number of repetitions, the discrimination threshold τ, the cap on consecutive Refine calls, the mutation probability pm, the cluster count K, the population size, the number of distilled strategies, or reviewer-human agreement. The in-loop judge, controller, and distiller models are unnamed.
  6. Summarize the main content of the paper

    Mastermind performs knowledge-driven multi-turn jailbreaks, with an average ASR of 87% across 15 models on HarmBench and 60% for GPT-5.

    Mastermind is a black-box multi-turn jailbreak framework for safety-aligned LLMs; the methods section also calls the strategy search grey-box fuzzing.

    • Problem: Long conversations must both keep track of the harmful query and rewrite after refusals. The authors say that generating turn by turn easily goes off track, that a chain fixed before the conversation starts breaks when a refusal occurs, and that manual strategies also limit the patterns that can be discovered.
    • Approach: A planner defines the steps, an executor writes the current turn's input, and a controller decides whether to continue, rewrite, or abort. Successful trajectories on the sandbox Llama 3.3 70B Instruct are distilled into a vector database; for new queries, similar strategies are first retrieved, then selection, crossover, and mutation are applied to the strategy switches. The turn budget is 10 and the temperature is 0.
    • HarmBench: Across 15 models, Mastermind has an average ASR of 87% and HR of 3.84 (Table 1), and every row's ASR is higher than Crescendo, ActorAttack, X-Teaming, and Siren. GPT-5 is 60%, Claude 3.7 Sonnet is 67%, and Llama 3.1 8B Instruct is 96%.
    • StrongReject and transfer: Across 5 models, the average ASR is 91% and HR is 3.79 (Table 2). The sandbox model itself is 92% on HarmBench; the authors say that when transferred to Qwen 2.5 72B Instruct, DeepSeek V3, and GPT-4o, it is 95%, 94%, and 93%.
    • Ablations and defenses: On a 50-item subset of HarmBench, GPT-5 goes from 30% with executor-only to 66% with the full framework (Table 3). Table 4's five-model average ASR: 92% without defense, 80% with Self-Reminder, 85% with SmoothLLM, and 87% with Llama Guard. The main text says GPT-4o is 94% under Llama Guard, while the table says 92%.
    • Authors' conclusion: The authors say the framework achieves higher ASR and HR on the listed models, and that the three adapted defenses do not push its average ASR below 80% in the table averages; they also say current safety alignment still has gaps. The paper does not discuss the method's own limitations.

Related papers

Show 3 more papers
Read originalarxiv.org