Skip to content

JailbreakOPT: a tool-assisted iterative jailbreak prompt optimization frameworkJailbreakOPT: Tool-Assisted Iterative Jailbreak Prompt Optimization

Paper Tracker· arXiv:2606.11425· Ge Shi, Jun Yin, Donglin Xie, Fangyi Liu, Yucan Li, Menglin Liu·Indexed by this site · 2026-10-08· Originally publishedAttacks

Quick read

Attacks

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

JailbreakOPT improves Claude's TAP ASR from 0.96% to 56.54% on AdvBench.

Threat modelBlack-box compatible stateless single-turn: each time a single standalone prompt is submitted to the target LLM, without relying on dialogue state. The attacker composes atomic tools from the tool library, maximizing ASR within a query budget while reducing No.A. Success is determined by an LLM judge; a score above a preset threshold counts as success; the paper does not provide that threshold.

Questions
Fixed-template single-turn jailbreaks are easily suppressed by guardrails, while iterative rewriting requires many target queries, and experience is rarely reused across attack rounds. The authors, in a stateless single-turn setting, simultaneously pursue higher ASR and lower number of queries before success.
Methods
JailbreakOPT collects atomic jailbreak tools into a library, composes them into still-standalone prompts via nested encoding and reverse-order decoding, and searches within a turn; between turns, it uses contextual Thompson sampling to select the next tool based on historical trajectories.
Experiments and results
On AdvBench, TAP with random tool selection improves Claude's ASR from 0.96% to 56.54% and GPT-5.1 from 29.46% to 83.46% (Table 1). With width 3 depth 8 and contextual sampling, Gemini's ASR is 98.08% (Table 2).
Limitations and future work
The authors note that per-result repeated trials and statistical tests are not reported, no direct comparison is made with multi-turn jailbreaks or full defense suites; the tool library is manually constructed, and evaluation is text-only. Experiments use the 8 target models from Section 4.1, as well as AdvBench and HarmBench.
Experimental setupVicuna-13b-v1.5、LLaMA-3-8b et al. · AdvBench、HarmBench · ASR、No.A
Evaluated models
Vicuna-13b-v1.5LLaMA-3-8bGPT-4oGPT-5.1Gemini-3-flashClaude-haiku-4-5-20251001Qwen3-235b-a22b-instruct-2507DeepSeek-v3.2
Benchmarks
AdvBenchHarmBench
Metrics
ASRNo.A
AI summaryJailbreakOPT organizes multiple atomic jailbreak prompts into an attack tool library, combines them through a unified single-round optimization abstraction to generate stronger standalone attack prompts, and models tool selection as a contextual bandit problem, using contextual Thompson sampling to guide exploration and exploitation. On multiple target LLMs and attack targets, this framework improves attack success rate (ASR) compared to atomic single-round attacks and existing iterative optimization baselines, while reducing the number of attacks needed for success (No.A).

JailbreakOPT organizes multiple atomic jailbreak prompts into an attack tool library, combines them through a unified single-round optimization abstraction to generate stronger standalone attack prompts, and models tool selection as a contextual bandit problem, using contextual Thompson sampling to guide exploration and exploitation. On multiple target LLMs and attack targets, this framework improves attack success rate (ASR) compared to atomic single-round attacks and existing iterative optimization baselines, while reducing the number of attacks needed for success (No.A).

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    In black-box compatible stateless single-turn jailbreaks, use tool composition and cross-round learning to improve ASR and reduce queries.

    How to simultaneously improve jailbreak success rate and reduce target queries before success in a black-box compatible stateless single-turn setting.

    • Scenario: The authors believe that with stronger alignment and defenses, many early jailbreaks no longer work, so a prompt generation framework that can combine attack strategies and serve automated red teaming is needed. This paper only handles black-box compatible stateless single-turn: each target query is a single standalone prompt.
    • Existing shortcomings: The authors believe atomic single-round methods are expressive but static, becoming brittle when fixed patterns are suppressed by guardrails; iterative single-round methods adapt to feedback but often rely on low-level or generic mutations, requiring many target queries. Both mainly optimize within a single episode and do not systematically reuse cross-round experience.
    • Goal: Frame jailbreak prompt generation as budget-constrained optimization, maximizing attack success rate (ASR) while minimizing number of attacks until success (No.A). An episode is one complete optimization under the same attack target, target model, and evaluation configuration.
    • Threat model:
      • Goal: Induce the target LLM to violate safety policy, and within budget improve ASR and reduce No.A.
      • Knowledge: The authors call it black-box compatible. The target sees only one standalone prompt at a time and does not retain victim dialogue state.
      • Capability: The attacker maintains a candidate frontier, selects atomic tools from the tool library and forms chains, queries the target, and uses evaluator feedback to update the search.
      • Victim system: The queried target LLM. The authors explicitly do not compare stateful multi-turn jailbreaks that rely on dialogue history on this benchmark.
    • Proposed: JailbreakOPT. Within a round, compose atomic single-round tools into stronger standalone prompts; across rounds, write tool selection as a contextual bandit, using contextual Thompson sampling to explore and exploit based on historical results.
  2. What related research exists?

    The paper separates single-round atomic attacks, iterative optimization, multi-turn dialogue, and cross-round red teaming, and uses a unified search abstraction to position this work.

    Single-turn jailbreaks

    • Atomic single-turn: Code Chameleon (Lv et al., 2024), Flip Attack (Liu et al., 2024b), Persuasion Attack—construct a single standalone prompt using templates or transformations. Related Work cites Persuasion as Zeng et al. (2024), Table 4 cites it as Yi et al. (2024).
    • Iterative single-turn: TAP (Mehrotra et al., 2024), AutoDAN (Liu et al., 2024a), GCG (Zou et al., 2023a) search over candidate standalone prompts; the methods section also places PAIR in the same search structure. The authors state these works motivated a unified abstraction, and ask whether expressive atomic tools can improve iterative optimization.
    • Earlier single-turn discussions: Appendix A.1 also mentions Jailbroken (Wei et al., 2023), GPTFuzzer (Yu et al., 2023), h4rm3l (Doumbouya et al., 2024), and M2S (Ha et al., 2025), which compresses multi-turn trajectories into single-turn prompts.

    Stateful multi-turn jailbreaks

    • Conversation-state attacks: Crescendo (Russinovich et al., 2024) escalates gradually from benign context; Li et al. (2024) and Wang et al. (2024) represent multi-turn human or agent jailbreaks. The authors state they rely on the dialogue context maintained by the target, and cannot be directly compared with stateless single-turn benchmarks that evaluate each turn independently. Appendix A.1 also lists RED QUEEN, MRJ-Agent, MultiBreak.

    Cross-turn learning and red teaming

    • Within-turn adaptation: The authors state existing iterative single-turn methods mainly adapt within one episode, rarely transferring experience to other attack targets or target configurations.
    • Memory-based red teaming: AutoDAN-Turbo (Liu et al., 2025a) and Auto-RedTeamer (Zhou et al., 2025a) retrieve past attack logs to guide subsequent attacks. The authors use contextual Thompson sampling (Cortes, 2019; Lu et al., 2010; Zhou, 2016) for comparative positioning. Appendix A.3 also discusses AutoDAN-Reasoning, ASTRA, JailExpert, MAJIC.

    Baselines and benchmarks

    • Baseline methods: Atomic baselines are Code Chameleon, Flip Attack, Persuasion; iterative baselines are TAP, AutoDAN, GCG. Tool-augmented variants are then compared with their no-tool versions.
    • Benchmarks: All 520 harmful instructions from AdvBench; the standard text subset of 200 from HarmBench.

    The authors position the paper on stateless single-turn optimization: unifying the search modules of multiple iterative algorithms, using a tool library for within-turn composition, and using a contextual bandit rather than log retrieval to reuse cross-turn experience.

  3. How does the paper address this problem?

    JailbreakOPT uses nested tool chains for within-round search and contextual Thompson sampling for cross-round tool selection.

    JailbreakOPT folds iterative single-turn jailbreaks into the same search abstraction, implements actions as an attack tool library, and feeds evaluated trajectories to a contextual bandit for tool selection.

    Unified within-round search

    • Objects: Iteration t maintains candidate frontier Ft and action pool A. The orchestrator gives allocation Pt = O(Ft, A, Ht), the mutator generates candidates Ct, the evaluator returns score s and auxiliary information e for target T, and the selector updates the next frontier and history.
    • Stopping: Algorithm 1, within budget B, returns the prompt if Success(e)=1, otherwise returns the highest-scoring one in the frontier. The authors state that PAIR, GCG, AutoDAN, and TAP differ only in actions and module instances, with correspondences in Table 3.
    • Scope: The authors state that this abstraction is not tied to a particular search topology or access assumption; beam search and particle swarm can also be written in; inspiration comes from modular toolkits like TextAttack.

    Tool library and nested chains

    • Single tool: Each atomic tool is a pair of encoding and decoding. Encoding turns the attack target into a seemingly harmless user prompt; decoding serves as an explanatory guide, often placed on the system prompt side. Appendix A.2 and Table 4 list 12 tools, divided into LLM-based and rule-based; the rewriting methods of each tool are not restated here.
    • Group chains: Each round appends one tool; when mutating, the entire chain is applied to the attack target, and the output is still a single standalone prompt. The composition of two tools is enc(a0,a1)=enca1∘ enca0, dec(a0,a1)=deca0∘ deca1: encoding from inside out, decoding in reverse order.
    • Legal order: The authors state that tools are generally non-commutative. Appendix A.2 uses each tool's forbidden-predecessor set B(a) for manual partial-order constraints; if a forbidden predecessor is already in the chain, it cannot be appended. The authors give examples: high-level role or persuasion wrappers can be outer layers, while low-level ciphers or flips may be closer to the original target.

    Tool-level genetic operations

    • Why move up: The authors state that AutoDAN-style token or sentence crossover breaks the encoding-decoding structure, so crossover and mutation are moved to the tool level.
    • Operations: Crossover cuts two chains into subchains and swaps suffixes before concatenating; mutation replaces one tool in a chain with another legal tool. Both are subject to the same legal-order constraints. Figure 2 compares single-tool and multi-tool chains.

    Cross-round contextual bandit

    • Trajectories: Each completed within-round search is written as an Action-History–Augmented Decision Process. Frontier width determines how many trajectories are expanded in parallel at the same depth; evaluation stops when the first successful depth is fully evaluated, or when the budget is exhausted.
    • Labels: Only successful trajectories at the stopping depth are positive examples; the remaining evaluated trajectories are negative. If there is no success throughout, the entire round is all negative. Appendix B.5 gives the recorded fields.
    • Decision: Tool selection is written as a contextual multi-armed bandit. Records are (c, a, y), where context c encodes the current candidate, full action history, target model identity, and optional evaluator statistics. The policy uses logistic Thompson sampling to incrementally update with all positive and negative records. Experiments in Section 4.3 use bootstrapped logistic Thompson sampling. Pseudocode is in Appendix B.1.
    • Difference from Section 4.2: The tool-augmented variants in Section 4.2 do not use a learned policy; the orchestrator samples uniformly at random over legal tools; the learned orchestrator is only evaluated in Section 4.3.

    How success is determined

    • Evaluation: Follows PAIR's LLM-judge. The evaluator gives a score from 1 to 10, and exceeding a preset threshold counts as success. The paper states this threshold but does not give the specific value used in experiments. The full evaluator prompt is in Appendix C.1.
    • Two metrics: ASR is the proportion of attack targets judged to violate safety constraints at least once within budget. No.A is averaged only over successful episodes and counts all evaluated candidates up to the stopping point, not just the length of the successful path.
  4. What experiments did the paper conduct?

    In Table 1, tool augmentation improves ASR on several difficult targets; Table 2 continues to improve under a smaller query budget.

    Experimental setup

    • Target models: Vicuna-13b-v1.5, LLaMA-3-8b, GPT-4o, GPT-5.1, Gemini-3-flash, Claude-haiku-4-5-20251001, Qwen3-235b-a22b-instruct-2507, DeepSeek-v3.2. Target and judge temperature is 0.0, attack generation temperature is 1.0, target max generation length is 512. Table 5 sets thinking to Low for some reasoning-capable targets.
    • Other models: Attack generation uses Qwen3-30B-A3B-Instruct-2507; judging uses gpt-oss:20b. Vicuna, LLaMA, and the judge model are self-hosted with vLLM; the rest are called via OpenRouter (Appendix B.3).
    • Data: AdvBench 520 items; HarmBench standard text subset 200 items. The paper states that HarmBench has 510 functional harmful behaviors in total, and this paper uses only the text subset.
    • Baselines and variants: Atomic tools are Code Chameleon, Flip Attack, Persuasion. Iterative baselines are TAP, AutoDAN (loss and LLM-judge), GCG, each with no-tool and with-tool versions. In Section 4.2, the orchestrator for the with-tool version is uniform random, not a bandit.
    • Budget: Section 4.2 uses frontier width 8, depth 8, up to 64 target queries per episode. Section 4.3 uses width 3, depth 8, up to 24; AdvBench is split into 10 folds with a fixed seed, 9 folds for training and 1 for held-out.
    • Metrics and judgment: ASR and No.A definitions are in question 3. The specific success threshold value is not given in the paper. The paper does not report the number of repetitions for the main results. In Table 1, GCG and AutoDAN (loss) only give numbers for Vicuna and LLaMA; others are –.

    Main results

    The table below shows ASR on AdvBench (Table 1). The with-tool rows in Section 4.2 use random tool selection.

    Swipe horizontally to read the table

    Target modelTAP no-toolTAP with-toolAutoDAN judge no-toolAutoDAN judge with-tool
    Vicuna99.62%99.81%99.62%99.23%
    LLaMA95.77%97.56%93.08%97.69%
    GPT-4o88.75%99.62%93.27%99.81%
    GPT-5.129.46%83.46%60.19%91.15%
    Gemini9.79%20.19%69.81%76.73%
    Claude0.96%56.54%0.38%59.81%
    Qwen380.96%100%16.15%100%
    DeepSeek98.08%99.62%91.35%100%
    • Atomic tools: The authors state that no single tool dominates across all targets. On AdvBench, Flip achieves 82.31% on GPT-4o, 99.23% on DeepSeek, and 0% on Claude; Code Chameleon achieves 40.77% on Claude and 63.65% on Gemini; Persuasion achieves 0% on Claude and 26.73% on Vicuna. All three have No.A of 1.
    • Authors' interpretation: The authors state that no-tool generic rewriting is uneven on strongly defended targets; adding the tool library improves ASR on difficult targets. There are exceptions in the table: on Vicuna, AutoDAN (LLM-judge) with tools has lower ASR than without tools.
    • Query counts: The authors state that No.A decreases in several settings, e.g., TAP on GPT-4o from 15.82 to 9.74, on GPT-5.1 from 29.01 to 13.86; GCG on Vicuna from 64 to 1.57, on LLaMA from 64 to 1.27. Not everywhere: AutoDAN (LLM-judge) on Vicuna increases No.A from 8.00 to 14.06, on LLaMA from 9.34 to 14.57. With tools, GCG's ASR on LLaMA goes from 92% to 90%, and on Vicuna remains 94%.

    HarmBench

    • What was tested: Table 7 uses the same within-turn settings as Table 1, comparing the same set of paradigms. The authors state that qualitative trends are consistent with AdvBench.
    • Results: The authors state that with-tool TAP improves ASR over no-tool TAP on GPT-5.1, Gemini, Claude, and DeepSeek; in the table, these correspond to 42.5% to 80.0%, 25.5% to 44.0%, 44.5% to 63.0%, and 94.0% to 99.5%. With-tool AutoDAN (LLM-judge) reaches 100% on GPT-4o, Qwen3, and DeepSeek, and on GPT-5.1 goes from 45.5% to 63.5%.
    • Exceptions: With-tool TAP's ASR is not higher on every model: GPT-4o goes from 78.5% to 78.11%, Qwen3 from 92.5% to 92.04%. The No.A for these two rows goes from 10.64 to 35.91 and from 13.19 to 53.72, respectively.

    Cross-turn tool selection

    • What was tested: Section 4.3 learns orchestration only on TAP, with the budget reduced to at most 24 queries, targeting GPT-5.1, Gemini, and Claude, which have lower within-turn ASR. The context is a binary vector of tool usage history and a one-hot encoding of target identity.
    • Results: In Table 2, no-context ASR is 19.23%, 30.77%, 5.77%. Adding only tool history raises it to 53.85%, 82.69%, 36.54%. Adding both gives 61.54%, 98.08%, 40.38%, with No.A of 13.83, 3.75, 17.35. Adding only target identity gives Claude 26.92%, lower than the 36.54% with only tool history.
    • Authors' interpretation: The authors state that lightweight execution-level context is sufficient to guide tool selection under a smaller budget, and that it remains competitive on difficult targets relative to the up-to-64-query setting in Table 1, especially for Gemini. Figure 4 does not provide per-fold endpoint values that can be transcribed; the authors state that increasing training trajectories generally improves ASR and may reduce No.A, single-target policies transfer only partially, and mixed training transfers more robustly.

    Budget, human agreement, and cost

    • Budget heatmap: Figure 3 varies width and depth from 1 to 8 on AdvBench. The authors state that ASR increases with either dimension, with width having a slightly larger marginal effect. The main text does not list per-cell values.
    • Human comparison: 4 PhD annotators rated 25 target responses on the same 1–10 scale. Spearman ρ = 0.660 (p < 0.0001), exact agreement 38%, and 63% within 1 point. Figure 5 shows the distribution of these 100 human ratings.
    • Cost: The authors only measured AutoDAN on Claude-Haiku-4.5: average 41.50 steps, wall-clock 304.9 seconds, estimated $3.38 per full episode. The authors state this is not a cross-method cost comparison, only to illustrate the roughly linear cost of additional attack attempts.

    Other ablations and analyses

    • Table 10: Adding judge scores on top of tool history plus target identity changes GPT-5.1 ASR from 61.54% to 48.08%, Claude from 40.38% to 30.77%, while Gemini remains 98.08% with No.A from 3.75 to 4.19.
    • Table 10 further adds target category: Claude ASR 38.46%, No.A 16.7, still lower than the 40.38% without these two additions.
    • Figure 10, Fold 9: frequency changes for flip_attack and code_chameleon_attack are +0.199, +0.179 for GPT-5.1, +0.179, +0.148 for Claude, +0.212, +0.204 for Gemini; the main text writes +0.20, +0.18, +0.18, +0.15, +0.21, +0.20.
    • Appendix D.2: Flip's average ASR is 98% on DeepSeek, 80% on GPT-4o, 0% on Claude, 4% on GPT-5.1; Code Chameleon ranges from 12% on GPT-5.1 to 94% on DeepSeek.
    • Figure 9: Code Chameleon and Flip ASR correlate at 0.9 across categories and 0.6 across target models; Persuasion correlates with them at -0.1 and -0.2 across target models.
    • On AdvBench, AutoDAN (loss) is only reported for two open-source models: no-tool Vicuna 98.27% (No.A 9.57), LLaMA 100% (8.25); with-tool 98.46% (8.50) and 100% (8.00).
  5. What are some points that can be further explored?

    The authors note that per-result statistical tests are not reported, the tool library is manually constructed, and no comparisons are made with multi-turn or full-defense suites.

    Limitations and future directions noted by the authors

    • Does not cover all adjacent settings: The authors write that due to page limits, target query costs, and compute, experiments cannot exhaust every adjacent threat model, benchmark, model version, decoding setting, or defense configuration (Section 6).
    • No per-result repetitions or intervals: The authors write that they did not report repeated trials, confidence intervals, or statistical tests for each result; random attack generation, judge noise, and model serving fluctuations may affect ASR and No.A (Section 6).
    • Comparison scope: Comparisons are limited to methods with stateless target-query semantics, not directly compared with stateful multi-turn jailbreaks that rely on dialogue history and interaction strategies; nor did they conduct large-scale empirical comparisons with every lifelong or automated red-teaming system (Section 6, pointing to Appendices A.1, A.3).
    • Only one bandit instantiated: Cross-turn learning uses only contextual Thompson sampling, without a full contextual-bandit sweep. The authors write that gains are not uniform; some configurations increase ASR but also increase No.A; one-hot features such as target identity or target category may not generalize to unseen models or harm categories without retraining (Section 6).
    • Tool library manually constructed: Legal order constraints are also manually specified; automatic library construction or constraint learning is not implemented. The authors state that future work could combine JailbreakOPT with AutoRedTeamer-style discovery to expand the tool library (Section 6; Appendix A.2 also lists automatic constraint learning as a future direction).
    • Defenses, judges, and modalities: The authors write that they did not benchmark against a suite of LLM defense mechanisms; evaluation relies on LLM judges, and although a small-scale human agreement study was conducted, obfuscation tools, combined prompts, and semantic drift can still make automatic judges noisy. Experiments are text-only, not covering multimodal, agentic, retrieval-augmented, or application-integrated systems (Section 6).

    Experimental coverage

    • Models: Section 4.1 evaluates 8 target LLMs; the attack generation model in Table 5 is Qwen3-30B-A3B-Instruct-2507, and the judge model is gpt-oss:20b.
    • Data and language: AdvBench uses all 520 items; HarmBench uses the standard text subset of 200 (Appendix B.2). The ethics statement states that this study covers only English natural language.
    • Budget and orchestration: Section 4.2 uses width 8, depth 8, up to 64 queries, with tool orchestration being uniform random. Section 4.3 uses width 3, depth 8, up to 24 queries, with AdvBench split into 10 folds, and the policy being bootstrapped logistic Thompson sampling.
    • Baseline coverage: Experimental baselines are Code Chameleon, Flip Attack, Persuasion, TAP, AutoDAN, GCG. In Table 1 and Table 7, GCG and AutoDAN (loss) only report numbers for Vicuna and LLaMA; other cells are –.
    • Judgment information not reported in the paper: The number of repetitions for the main ASR is not reported; the specific score threshold used for ASR is not given. Human agreement is from 4 annotators on 25 responses (Section 4.2). Appendix A.5 discusses the relationship between optimization-based attacks and different defenses; Section 6 states that no suite of defenses was evaluated.
  6. Summarize the main content of the paper

    JailbreakOPT uses a tool chain and contextual sampling for stateless single-turn jailbreak optimization, increasing ASR on difficult targets and reducing some queries.

    JailbreakOPT is a tool-assisted stateless single-turn jailbreak prompt optimization framework for black-box compatible standalone queries, not stateful multi-turn dialogue.

    • Problem addressed: Atomic templates are expressive but easily suppressed by fixed-pattern defenses; iterative rewriting adapts to feedback but often requires many target queries, and experience from one episode is rarely reused in the next. The authors frame the goal as simultaneously improving ASR and reducing No.A within budget.
    • Approach: Unify iterative single-round search with four modules: orchestrator, mutator, evaluator, and selector. Atomic tools are made into encoding-decoding pairs, chained with inside-out encoding and reverse-order decoding, with the output still a single standalone prompt, and order constrained by manual predecessor constraints. Section 4.2 selects randomly among legal tools; Section 4.3 writes selection as a contextual bandit, using Thompson sampling to read historical trajectories.
    • Within-round results: On AdvBench, width 8, depth 8, with random orchestration, tool-augmented TAP gives Claude ASR of 56.54%, vs. 0.96% without tools; GPT-5.1 gives 83.46%, vs. 29.46% without tools (Table 1). In the same table, AutoDAN (LLM-judge) with tools gives 59.81% and 91.15% for these two targets. The authors state that query counts decrease in some cells, e.g., GCG on Vicuna No.A from 64 to 1.57; there are also cells where ASR rises and No.A rises.
    • Cross-round results: With width 3, depth 8, and TAP as base, tool history plus target identity gives GPT-5.1, Gemini, and Claude ASR of 61.54%, 98.08%, and 40.38% (Table 2). The authors state that this setting with at most 24 queries remains competitive with the within-round setting of at most 64 queries, especially on Gemini.
    • Authors' conclusions: The authors state that the combination improves attack success rate and query efficiency relative to atomic tools and iterative baselines, and state that larger gains appear on stronger targets such as GPT-5.1, Gemini, and Claude. The authors also note that the tool library is handcrafted, no per-result statistical tests were performed, and multi-turn jailbreaks, full defenses, and non-text systems were not directly compared.

Related papers

Show 3 more papers
Read originalarxiv.org