BOSS: Improving GCG Jailbreak Optimization with Breadth-First Suffix SearchBreadth Beats Depth: Improving GCG-Based Jailbreak Optimization with Breadth-Oriented Suffix Search
BOSS uses multiple short trajectories and TFAL to improve GCG suffix optimization; on Llama-2 source, GCG average T-ASR rises from 52.5% to 69.7%.
Optimize a single adversarial suffix on a white-box source model, then transfer to an unseen target model. The attacker uses source model gradients to update the suffix, to increase the likelihood of affirmative response prefixes on harmful behaviors. The target is only evaluated after the final suffix is selected, and provides no optimization feedback.
- GCG-style jailbreaks optimize adversarial suffixes on a white-box source model, but the average adversarial loss lets easy behaviors that can already be jailbroken continue to dominate optimization, and a single greedy deep search may also miss more effective suffixes. The authors believe broader exploration may be better under a fixed budget.
- BOSS retains local GCG-style updates, first runs multiple short trajectories to obtain terminal suffixes, then uses behavior coverage as a threshold, combines standard source loss and TFAL to select parent suffixes for continued search, and finally selects from the merged terminal set the suffix used for target evaluation.
- When the source is Llama-2-7B-Chat, the average T-ASR of GCG, I-GCG, and GJO rises from 52.5%, 52.7%, 59.1% to 69.7%, 69.3%, 71.6% (Table 1). The time cost drops from 471, 410, 340 minutes to 195, 172, 166 minutes.
- The authors state that they mainly rely on source-side diagnostics, and transferability remains uncertain; when the source and target differ greatly in architecture, training data, alignment, or refusal behavior, the diagnostics may predict poorly. Future work could add transferability objectives and avoid target-test leakage. Two source models, HarmBench; the paper does not provide τc, δc, and the standard deviations in Table 4 are placeholders.
- Evaluated models
- Llama-2-7B-ChatYi-1.5-9B-ChatQwen2-7B-InstructVicuna-7B-v1.5Gemma-7B-ItMistral-7B-InstructGemini-2.5-Flash-LiteGPT-3.5-Turbo-0125
- Benchmarks
- HarmBench
- Metrics
- ASRS-ASRT-ASRBERTScore-F1wall-clock search time
The researchers propose BOSS, a plug-and-play framework that improves GCG-based jailbreak optimization through breadth-oriented suffix search. Existing GCG methods rely on average adversarial loss and deep greedy search, which can overemphasize easily jailbroken behaviors and overlook promising regions of the suffix space. BOSS uses Tail-Focused Adversarial Loss (TFAL), standard source loss, and behavior coverage to select terminal suffixes, then explores multiple short trajectories and selectively continues promising suffixes. Experiments on public benchmarks show that BOSS improves attack success rates across various GCG-based methods while reducing optimization time.
Paper analysis
What problem does this paper attempt to solve?
Average loss and a single deep search bias toward easy behaviors and miss good suffixes; BOSS uses TFAL and multiple short trajectories to improve GCG-style optimization.
Existing GCG-style methods optimize the suffix with average adversarial loss and a single greedy deep search, which both overweights easy-to-jailbreak behaviors and may miss better suffixes.
- Scenario: The authors state that although large models have safety alignment and content moderation, they can still be induced by specially crafted inputs to follow harmful instructions; optimization-based jailbreaks have attracted attention due to their effectiveness and transferability.
- Existing shortcomings: The average source loss can still be nonzero after a behavior can already be jailbroken, so easy behaviors continue to dominate optimization while hard behaviors receive insufficient attention. The authors state that the suffix with the lowest current source loss does not necessarily lead to the best final suffix, and use Figure 1 to illustrate that the final suffix deviates from suffixes with lower reachable loss during search.
- Hypothesis: The authors believe that under a fixed budget, deeper greedy search misses promising regions of the suffix space, and broader exploration may be more effective.
- This paper's approach: Propose a plug-and-play framework BOSS (Breadth-Oriented Suffix Search) and Tail-Focused Adversarial Loss (TFAL), retaining local GCG-style updates while changing the retention, selection, and continued search of terminal suffixes.
- Threat model:
- Goal: Induce the model to follow harmful instructions. The source side matches a predetermined affirmative response prefix; success on the target model is determined by the ASR of the HarmBench classifier.
- Knowledge: Optimize on a white-box source model, then transfer to an unseen target model. The authors state in Limitations that this is the standard GCG-based transfer setting.
- Capability: Optimize one adversarial suffix, using source model gradients for discrete token replacement; other evaluated candidates by default do not receive continued search budget.
- Feedback boundary: The target model is evaluated only after the final suffix is selected, and is not used as optimization feedback. The experimental source models are Llama-2-7B-Chat or Yi-1.5-9B-Chat.
What related research exists?
Related work is divided into suffix attacks and budget allocation; BOSS retains local GCG updates, and changes the retention, selection, and continued search of terminal suffixes.
Discrete suffix jailbreaks
- Wallace et al. (2019): Use gradient-guided discrete token search to construct universal adversarial triggers for NLP models.
- GCG (Zou et al., 2023): On aligned LLMs, append an adversarial suffix to harmful prompts, pushing with source model gradients toward an affirmative target response.
- Subsequent suffix methods: I-GCG changes the target template, coordinate updates, and initialization (Jia et al., 2025); AmpleGCG trains a generator with successful GCG suffixes (Liao and Sun, 2024); DSN adds refusal suppression in source model optimization (Zhou et al., 2025); GJO removes redundant response patterns and token tail constraints (Yang et al., 2025); SlotGCG studies adversarial token insertion positions (Jeong et al., 2026). The authors state these works mainly change the objective, initialization, generation, or placement, and this paper is orthogonal to them.
Search trajectories and budget allocation
- Multiple hypotheses and trial allocation: beam search keeps multiple hypotheses (Wiseman and Rush, 2016); random search (Bergstra and Bengio, 2012) and Bayesian optimization (Snoek et al., 2012) allocate evaluations across multiple trials.
- Biasing budget by partial evaluation: best-arm identification, successive halving, Hyperband, ASHA, and population-based training (Audibert et al., 2010; Karnin et al., 2013; Jamieson and Talwalkar, 2016; Li et al., 2018, 2020, 2019). The authors state these inspired allocating budget across candidates, but do not directly handle terminal adversarial suffixes produced by gradient-guided discrete optimization.
- Multi-start jailbreaks: Andriushchenko et al. (2025)'s multi-start and random-search jailbreaks introduce more initial states. The authors contrast that BOSS places budget allocation inside source model suffix optimization: short trajectories, source-side diagnostics to select parents, continued search, then final suffix selection before target evaluation.
Baselines and benchmarks
- Baseline methods: GCG, I-GCG, GJO. I-GCG uses diverse target templates, automatic multi-coordinate updates, and easy-to-hard initialization; GJO removes redundant response patterns and token tail constraints from the optimization objective.
- Benchmark/dataset: HarmBench (Mazeika et al., 2024). Following Yang et al. (2025), optimize on a training subset of 20 behaviors and evaluate on the standard 200-behavior test set.
The authors position BOSS as a plug-and-play search framework: retaining the local GCG-style optimizer while changing how terminal suffixes from multiple short trajectories are retained, selected, and continued.
How does the paper address this problem?
BOSS first runs multiple short trajectories, then uses coverage, source loss, and TFAL to select parent suffixes for continued search and final selection.
BOSS does not replace local GCG-style updates, but instead changes a fixed update budget from one long greedy trajectory into multiple short trajectories, then uses source-side diagnostics to decide which suffixes to continue searching and which final suffix to select. The process has three steps: short runs form an initial terminal set, parent suffixes are selected for continued search, and a suffix for target evaluation is selected from the merged terminal set (Figure 2).
Problem setting
- Optimize a suffix of length L on a white-box source model Ms, with training behavior set Xtr, tokens from vocabulary V. Prompts are composed by a constructor Φ(x, z).
- The source-side loss for each behavior is the negative log-likelihood of the affirmative response prefix under Ms; the source loss is the average of this loss over Xtr.
- The authors state that jailbreak optimization is generative objective matching: when a behavior can already be jailbroken, the target sequence loss can still be nonzero, and the averaged objective lets easy behaviors continue to occupy optimization.
- Appendix A gives the evaluation template: the adversarial prompt is placed before the behavior question, followed by a fixed target response prefix; the appendix gives the full template. Optimization and suffix selection use only source model signals.
Base optimizer and initial pool
- At each step, for each coordinate and each candidate token, a first-order approximation estimates the source loss decrease, and the top-κ is taken as the replacement set. Gradients only propose replacements.
- Sample coordinates according to the coordinate distribution qt, uniformly draw tokens from the corresponding replacement sets, forming a candidate set of size B, then use the full source loss to select the next incumbent.
- The sequence of incumbents in one run is called a trajectory, and the suffix after a fixed number of steps is called a terminal suffix. The base optimizer only continues one incumbent; other candidates do not enter the terminal set.
- The initial pool consists of N independent runs of T1 steps, with randomness in each coming from candidate sampling.
Parent suffix selection
- Behavior coverage is the proportion of training behaviors whose per-behavior loss does not exceed threshold τc. The feasible set requires coverage no lower than the maximum of that terminal set minus tolerance δc.
- TFAL only averages the hard tail: Lhard(z)=1/(|Hqh(z)|)∑x∈ Hqh(z)ℓs(x,z), i.e., the average source loss over the ⌈qh|Xtr|⌉ behaviors with the highest loss.
- Within the current terminal set, min-max normalize source loss and TFAL. Feasible suffixes are ranked by SA(z)=λsL̄src,A(z)+λhL̄hard,A(z), and the parent set takes the K suffixes with the lowest scores.
- If fewer than K pass the coverage threshold, keep all feasible suffixes, then fill the remainder from outside the set using the same score.
Continued search, final selection, and default parameters
- Each parent suffix runs another T2 steps. Recompute the same diagnostics on the union of the initial pool and continued search results; the final suffix is the one with the lowest score in the feasible set. Algorithm 1 summarizes the process.
- The target model is queried only after a fixed suffix is returned. The paper does not write target model loss into the selection score.
- Suffix length 20, total updates 500, B=128. Defaults: N=10, T1=30, K=4, T2=50. Appendix B: κ=256, qh=0.5, λs=0.45, λh=0.20.
- The paper does not give numerical values for τc, δc, nor the specific distribution of qt. The initial suffix follows the base optimizer; BOSS does not define a separate initialization.
What experiments did the paper conduct?
On the Llama-2 source, the average T-ASR for the three methods rises to 69.7%, 69.3%, 71.6%; Gemma remains low, and time decreases.
Experimental setup
- Data: HarmBench. Suffixes are optimized on a training subset of 20 behaviors and evaluated on the standard 200-behavior test set.
- Models: Source models are Llama-2-7B-Chat and Yi-1.5-9B-Chat. Targets include Qwen2-7B-Instruct, Vicuna-7B-v1.5, Yi-1.5-9B-Chat, Gemma-7B-It, Mistral-7B-Instruct, and Gemini-2.5-Flash-Lite, GPT-3.5-Turbo-0125. Table 1 and Table 4 write the latter two as Gemini-2.5-flash, GPT-3.5-turbo.
- Baselines and variants: GCG, I-GCG, GJO. Base is the original optimizer. w/ parents and w/ final use coverage, standard source loss, and TFAL only in parent selection or only in final selection, with the other still using average source loss; w/ BOSS uses them in both.
- Metrics and judge: Primary metric is ASR, split into S-ASR and T-ASR. Judge is HarmBench-Llama-2-13B-cls. The paper does not specify the classification threshold. Also reports BERTScore-F1 between generated responses and HarmBench target responses, and wall-clock time to obtain the final suffix.
- Budget and hardware: Suffix length 20, total updates 500, B=128; default N=10, T1=30, K=4, T2=50. NVIDIA RTX 3090, 64 GB RAM.
- Replication: 3 random seeds per group, reporting mean and sample standard deviation. Table 4 states that its standard deviations are placeholders to be filled manually; these ± are not referenced below.
Main results
According to Table 1, suffixes are optimized on Llama-2-7B-Chat. Cells show Base→w/ BOSS ASR means (%). The first row is S-ASR, the rest are T-ASR.
Swipe horizontally to read the table
Model GCG I-GCG GJO Llama-2-7B-Chat (source) 43.7→78.7 29.8→66.8 64.3→82.7 Qwen2-7B-Instruct 72.2→86.0 43.0→80.0 80.2→88.5 Vicuna-7B-v1.5 73.8→75.0 74.8→84.3 78.5→85.2 Yi-1.5-9B-Chat 49.8→82.2 51.5→81.7 66.3→87.5 Gemma-7B-It 5.8→7.2 7.3→26.8 13.2→23.5 Mistral-7B-Instruct 79.0→93.2 90.5→90.2 68.8→92.3 Gemini-2.5-flash 44.8→56.7 43.2→46.7 41.7→54.2 GPT-3.5-turbo 43.3→80.5 71.8→82.2 63.2→83.5 - The authors state that BOSS improves performance on most models. Target Model Avg.: GCG 52.5→69.7, I-GCG 52.7→69.3, GJO 59.1→71.6 (all w/ BOSS, Table 1).
- Exceptions in the table: I-GCG on Mistral-7B-Instruct has Base 90.5 and BOSS 90.2. Gemma-7B-It with BOSS remains 7.2, 26.8, 23.5.
- The authors use GJO, Yi-1.5-9B-Chat as an example: w/ parents 59.2, w/ final 73.3, BOSS 87.5, arguing that the gain comes from using coverage and TFAL in both parent selection and final selection, not just loss. The average T-ASR for the three methods is also higher with full BOSS than with either partial variant.
Changing the source model
- Table 4 uses Yi-1.5-9B-Chat as source, comparing Base and +Ours; the main text calls +Ours BOSS. Source model ASR: GCG 70.5→81.0, I-GCG 23.5→78.5, GJO 71.5→72.5.
- Average T-ASR: GCG 43.1→63.4, I-GCG 28.1→59.8, GJO 46.2→60.0. The authors believe this retention, continued search, and final selection are not tied to a single source model.
- Llama-2-7B-Chat as a target remains the lowest among targets: GCG 6.5→17.0, I-GCG 2.5→4.0, GJO 2.5→3.0. The direction of each target mean is upward. Standard deviations in this table are placeholders.
Search width and time
- Figure 3 varies the number of initial trajectories N with a fixed total update budget of 500, with N values 1, 5, 10, 15, 20, and adjusts the continued-search budget accordingly. The caption states that the thick red line is average T-ASR. The main text does not list ASR for each N.
- The authors state that multiple initial trajectories generally improve average T-ASR relative to N=1, but the gain is not monotonic in N, often peaking near N=10 across the three baselines, hence the default N=10. The authors believe that too much breadth dilutes the continued-search budget or introduces weaker terminal suffixes.
- Figure 4 and the main text give wall-clock times on Llama-2-7B-Chat to obtain the final suffix: GCG 471→195 minutes, I-GCG 410→172 minutes, GJO 340→166 minutes. The authors state this is a reduction of more than half, attributing it to first running short trajectories and then only continuing selected parent nodes, without increasing the total update budget. The paper does not report times for the Yi source.
Target response consistency
- Table 2 reports BERTScore-F1, with source Llama-2-7B-Chat. Average scores: GCG 62.33→67.72, I-GCG 62.13→68.51, GJO 66.22→66.67.
- Larger increases include I-GCG's Qwen2-7B-Instruct (53.78→72.94) and GCG's GPT-3.5-turbo (38.60→52.16). Decreases include GCG's Gemma-7B-It (53.82→52.15) and GJO's Qwen2-7B-Instruct (69.38→61.95); GJO's Gemini-2.5-flash is 51.12→51.11.
- The authors believe BOSS not only improves attack success but also makes transferred responses closer to the intended target responses; GCG and I-GCG show larger improvements, while GJO's average gain is smaller because its baseline is already closer to the target responses. Table 3 provides a truncated excerpt for the same behavior. The authors state that baseline GCG's transfer is unstable, with both refusals and partial following, while BOSS more consistently maintains the target response pattern, and they claim this aligns with Table 2.
Other ablations and analyses
- Table 1 average T-ASR: w/ parents, w/ final, w/ BOSS are GCG 57.0, 66.6, 69.7; I-GCG 57.9, 65.2, 69.3; GJO 64.1, 68.7, 71.6.
- Cells where w/ parents is lower than Base include GCG's Vicuna 71.5 vs. 73.8, I-GCG's Qwen2 40.8±30.9 vs. 43.0±2.3, Mistral 85.8 vs. 90.5, GJO's Qwen2 74.2 vs. 80.2, Yi 59.2 vs. 66.3, Gemma 4.7 vs. 13.2. The paper does not explain each cell.
- On the GJO source model, w/ final S-ASR is 62.8, lower than Base's 64.3; full BOSS is 82.7.
- Figure 1 has y-axis Target Model Avg. ASR (%) and x-axis GCG, I-GCG, GJO, with legend Final suffix and Best evaluated suffix. The figure text includes 69.4, 61.9, 59.1, 56.8, 52.5, 52.7; among these, 52.5, 52.7, 59.1 match the Base average T-ASR in Table 1. From plain text, it is not possible to verify which bar corresponds to which legend item.
- Appendix B gives κ, qh, λs, λh, without a corresponding ablation table. The paper does not report the number of target model queries.
What are some points that can be further explored?
The authors state that transferability remains uncertain, and source-side diagnostics may fail when source and target differ greatly, and suggest adding transferability objectives.
Limitations and future directions noted by the authors
- Diagnostic source: Selecting parent suffixes and the final suffix relies mainly on source-side diagnostics, i.e., source loss, TFAL, and behavior coverage (Limitations).
- Transfer setting: The method follows the standard GCG-based transfer setting, optimizing on a white-box source model and transferring to unseen targets (Limitations).
- Uncertainty: The authors state that experiments show improvements in ASR, but transferability remains uncertain (Limitations).
- Failure conditions: When the source and target differ greatly in architecture, training data, alignment process, or refusal behavior, source-side diagnostics may fail to predict target model performance (Limitations).
- Future directions: Future work could add explicit transferability objectives while avoiding target-test leakage (Limitations).
Experimental coverage
- Source models are Llama-2-7B-Chat (Table 1) and Yi-1.5-9B-Chat (Table 4); targets are the 5 open-source models and 2 closed-source models in the experimental setup, with S-ASR also reported for the source models themselves.
- Baselines are GCG, I-GCG, GJO, and include w/ parents and w/ final. Data: HarmBench training set of 20 behaviors, test set of 200; judge is HarmBench-Llama-2-13B-cls; 3 seeds per group.
- Default N=10, T1=30, K=4, T2=50, total updates 500. Figure 3 compares N=1, 5, 10, 15, 20 under a total budget of 500; the main text does not list ASR for each N.
- Also reports BERTScore-F1 (Table 2), wall-clock time on Llama-2-7B-Chat (Figure 4), and a truncated excerpt of one behavior in Table 3.
- The paper does not report values for τc, δc, or classifier thresholds; Table 4 notes that standard deviations are placeholders. The paper does not report the number of target model queries.
Summarize the main content of the paper
BOSS changes GCG-style optimization from a single deep search to multiple short trajectories plus source-side diagnostics; on HarmBench, average T-ASR increases and time decreases.
BOSS is a search framework inserted into GCG-style discrete suffix optimization: the local gradient updates remain unchanged; what changes is whether the fixed budget is spent on depth or breadth.
- Problem: The authors argue that average adversarial loss allows easy behaviors that already match the target prefix but still have non-zero loss to continue consuming budget; on a single greedy trajectory, the suffix with the lowest current source loss does not necessarily lead to the best terminal suffix.
- Approach: First run multiple short trajectories and keep terminal suffixes, use behavior coverage as a threshold, then use a weighted score of standard source loss and TFAL to select parent nodes for continued search, and finally use the same diagnostics on the merged terminal set to select the fixed suffix before querying the target model.
- Main results: On HarmBench, with source Llama-2-7B-Chat and averaged over 3 seeds, the average T-ASR for GCG, I-GCG, GJO increases from 52.5%, 52.7%, 59.1% to 69.7%, 69.3%, 71.6% (Table 1). On Gemma-7B-It, GCG+BOSS is 7.2%. I-GCG on Mistral-7B-Instruct goes from 90.5% to 90.2%.
- Other results: When the source is changed to Yi-1.5-9B-Chat, the average T-ASR for the three methods increases from 43.1%, 28.1%, 46.2% to 63.4%, 59.8%, 60.0% (Table 4 means; standard deviations in that table are placeholders). Search time on Llama-2-7B-Chat decreases from 471, 410, 340 minutes to 195, 172, 166 minutes (Figure 4). Average BERTScore-F1 increases, but GJO's Qwen2-7B-Instruct goes from 69.38 to 61.95 (Table 2).
- Authors' conclusion: The authors believe that broad suffix exploration and source-side diagnostics are useful designs for transferable jailbreak optimization; they also state that transferability remains uncertain, and when source and target differ greatly, source-side diagnostics may predict poorly.