betaFeedback

WorksComputer Science

Beyond Attack Success Rate: Cost-Aware Metric for Evaluating Iterative LLM Jailbreaks

Abstract

Attack success rate (ASR) evaluates jailbreaks against large language models without accounting for repeated calls to the victim model. Yet each additional call gives the deployed system another opportunity to detect the attack and intervene. We introduce ASRSTEP\mathrm{ASR}_{\mathrm{STEP}}, which penalizes additional victim-model calls while retaining binary success judgments. Our evaluation considers GCG, PAIR with a step budget, and a single-step PAP baseline on JailBreakBench across three model families. GCG's scores decrease by 7.0-8.7 percentage points after discounting, while PAP's remain unchanged. While for PAIR attack, we see a wider discounting range between 3.4-12 percentage points, showing that the "step" quantity differs per iterative strategy. Reporting both metrics makes the discount due to repeated victim-model interaction explicit. Code is available here: https://github.com/SuELS-Group/beyond_asr.

Introduction

Jailbreak attacks seek to make large language models (LLMs) answer requests that their safeguards should reject. Evaluating these attacks is important both for comparing attack methods and for assessing the robustness of deployed models. The conventional attack success rate (ASR) measures the fraction of harmful requests for which an attack elicits a response judged unsafe. However, it gives equal credit to an immediate success and one obtained after hundreds of victim-model calls, leaving the effort required to obtain that success implicit.

This distinction is particularly important for iterative attacks, which repeatedly query the victim model and use feedback to refine their prompts.

Additional attempts create more opportunities to find a successful prompt while extending interaction with the protected system. Each additional call gives deployment-side monitoring, such as intrusion detection, another opportunity to identify suspicious activity and trigger a protective response. Victim-call count is therefore operationally relevant beyond its role as a proxy for computational effort.

To address this limitation, in this paper we introduce ASRSTEP\mathrm{ASR}_{\mathrm{STEP}}, a cost-aware extension that retains binary success judgments and penalizes additional attack steps that call the victim LLM. Single-step attacks incur no additional-step penalty and recover conventional ASR. The two metrics should be reported together: ASR gives the observed success frequency, while ASRSTEP\mathrm{ASR}_{\mathrm{STEP}} gives the corresponding score after discounting. Their gap makes the effect of additional victim calls explicit under the chosen penalty, preserving ASR as a reference for interpretation.

Our evaluation considers GCG (Zou et al., 2023), PAIR [2], and a single-step PAP Misrepresentation baseline on JailBreakBench [1] across the Vicuna, Mistral, and Zephyr model families. Success is assessed using an LLM-as-a-Judge. In the reported results, GCG’s (Zou et al., 2023) cost-aware scores are 7.0–8.7 percentage points below its conventional ASR, while PAP’s scores remain unchanged. The margin of difference is higher for PAIR [2] with it performing highest on both ASR and ASRSTEP\mathrm{ASR}_{\mathrm{STEP}} metrics specifically on the Zephyr model (Tunstall et al., 2023).

Related Work

Attacks. Our selection spans three attack categories. Suffix optimization refines an adversarial suffix, as in GCG (Zou et al., 2023) and AutoDAN [6]. Prompt optimization revises the input using model feedback, as in PAIR [2] and rewriting-based attacks (Takemoto, 2024). Prompt transformation changes the framing or language of a request, as in PAP’s persuasive prompts (Zeng et al., 2024) and low-resource language attacks (Yong et al., 2023). We select GCG (Zou et al., 2023) and PAIR [2] as iterative representatives of the first two categories and PAP Misrepresentation as a single-step baseline from the third.

Evaluations. The closest work to ours is Risk Under Pressure (Ehghaghi et al., 2026), which measures computational attack cost in FLOPs and reports risk–compute curves. Our perspective centers on calls to the victim LLM: each additional call gives the deployed system an opportunity to detect suspicious activity and intervene, for example through intrusion detection. This interaction with the protected system is distinct from computation performed outside it. We therefore report ASR alongside a score discounted by additional victim calls; the effectiveness of particular detection mechanisms remains to be evaluated.

Meaningful ASR comparisons also require consistent measurement goals and valid evaluators [4]. HarmBench and JailbreakBench standardize evaluation [8, 1], while JailbreakEval brings together different evaluation procedures [9]. Extensions beyond binary success include AttackEval’s graded compliance scores [10], StrongREJECT’s assessment of useful harmful information [11], and Expected Harm’s weighting of severity by execution likelihood, modeled from the cost of carrying out a harmful act [3]. These approaches assess response quality or consequences; our metric accounts for the victim calls spent obtaining an outcome.

Complementary perspectives include Security Cube’s token and time overhead measures (Xu et al., 2026) and configuration sensitivity. Maple et al. (2026) propose the Variant Sensitivity Measure and Union Coverage to characterize performance across attack configurations, whereas ASRSTEP_{\mathrm{STEP}} accounts for calls within an execution.

Beyond Attack Success Rate

Composition of an Iterative Jailbreak

Iterative jailbreaks modify a base prompt over multiple steps to elicit harmful responses from a victim LLM. Figure 1 illustrates this process. The number

Figure 1. General flow of iterative prompt optimization.

of steps depends on the attack algorithm and its optimization budget, but conventional ASR does not account for this effort. For example, a GCG (Zou et al., 2023) attack optimized for 500 steps and a single PAP (Zeng et al., 2024) transformation use substantially different budgets. Comparing their ASR values alone leaves this difference implicit. With ASRSTEP_{\mathrm{STEP}}, we make the discount associated with attack steps explicit alongside the observed success rate.

Preliminaries

Let

Dforbid={q1,…,qm}\mathcal{D}_{\mathrm{forbid}} = \{q_1, \ldots, q_m\}

be a dataset of forbidden requests that a safety-aligned large language model should refuse to answer, where

m=∣Dforbid∣.m = \lvert\mathcal{D}_{\mathrm{forbid}}\rvert.

Let

f:Q→Yf : \mathcal{Q} \to\mathcal{Y}

denote the target LLM, and let

jailbreak⁡:Y→{0,1}\operatorname{jailbreak} : \mathcal{Y} \to\{0,1\}

be a binary evaluator. In particular, jailbreak⁡(y)=1\operatorname{jailbreak}(y) = 1 indicates that output yy violates the considered safety policy.

Given a forbidden request qiq_i, an attack method A\mathcal{A} may adaptively generate a sequence of queries

qi(0),qi(1),…,qi(Ki),q_i^{(0)}, q_i^{(1)}, \ldots, q_i^{(K_i)},

where qi(Ki)q_i^{(K_i)} is the final query submitted to the victim LLM. For each base request, the attack terminates when it produces a successful jailbreak or reaches the maximum query budget BB. This stopping rule applies to both black-box and white-box methods. In GCG (Zou et al., 2023), for example, the suffix with the lowest loss is considered the most effective for achieving jailbreak success. But the last gradient iteration need not be the least, considering standard gradient dynamics. So the best suffix string could be at iteration i<Bi < B. We store the the lowest loss index for each base prompt and use that in the ASRSTEPASR_{\mathrm{STEP}} computation. With zero-based indexing,

0≤Ki≤B−1.0 \le K_i \le B-1.

The quantity KiK_i counts queries submitted to the target LLM after the initial query. Intermediate computations that do not invoke the target model are not counted as attack steps. We denote the final query produced by the attack as

A(qi)=qi(Ki)\mathcal{A}(q_i)=q_i^{(K_i)}

and the corresponding model output as

yi=f(A(qi)).y_i=f(\mathcal{A}(q_i)).

Standard Attack Success Rate

In our evaluation, each attack is executed once for each forbidden request qiq_i. Define the success indicator

Si=1{jailbreak⁡(f(A(qi)))=1}.(1)S_i=\mathbf{1}\{\operatorname{jailbreak}(f(\mathcal{A}(q_i)))=1\}. \tag*{(1)}

The standard attack success rate is

ASR⁡=1m∑i=1mSi=∣{qi∈Dforbid∣jailbreak⁡(f(A(qi)))=1}∣∣Dforbid∣.(2)\operatorname{ASR}=\frac{1}{m}\sum_{i=1}^{m}S_i =\frac{\left|\{q_i\in\mathcal{D}_{\mathrm{forbid}}\mid\operatorname{jailbreak}(f(\mathcal{A}(q_i)))=1\}\right|}{|\mathcal{D}_{\mathrm{forbid}}|}. \tag*{(2)}

ASR records whether the execution for each forbidden request succeeds. A successful attack contributes one regardless of whether it requires only one target-model query or exhausts the entire budget BB.

Cost-Aware Attack Success Rate

To account for attack effort, we discount successful trials according to their step count and assign zero to unsuccessful trials.

For each request qiq_i, let SiS_i denote the binary success indicator and KiK_i the number of additional attack steps in this execution. Let N≥1N\ge1 be a pre-specified upper bound on these steps, so that 0≤Ki≤N0\le K_i\le N, and let c≥0c\ge0 control the penalty. We define the cost-aware success score as

ZiSTEP=max⁡{0,Si−c(KiN)2}.(3)Z_i^{\mathrm{STEP}}=\max\left\{0,S_i-c\left(\frac{K_i}{N}\right)^2\right\}. \tag*{(3)}

The maximum with zero ensures that an unsuccessful attack (Si=0S_i=0) contributes zero. For a successful attack, the quadratic discount increases with the number of steps. We set c=0.2c=0.2 for the experiments reported in this paper; since Ki≤NK_i\le N, successful attacks receive scores in [0.8,1][0.8,1].

For single-step attacks, Ki=0K_i=0, so the cost-aware score equals the original success indicator. Averaging these scores over requests therefore recovers conventional ASR.

The dataset-level cost-aware attack success rate averages these scores over the mm requests, using one execution per request:

ASR⁡STEP=1m∑i=1mZiSTEP.(4)\operatorname{ASR}_{\mathrm{STEP}}=\frac{1}{m}\sum_{i=1}^{m}Z_i^{\mathrm{STEP}}. \tag*{(4)}

The metric combines the observed success frequency with a discount for additional target-model queries in successful attacks. Since 0≤ZiSTEP≤Si≤10\le Z_i^{\mathrm{STEP}}\le S_i\le1, it satisfies

0≤ASR⁡STEP≤1.0\le\operatorname{ASR}_{\mathrm{STEP}}\le1.

If every prompt succeeds after exactly one query, then ASR⁡STEP=1(100%)\operatorname{ASR}_{\mathrm{STEP}}=1(100\%). Lower success rates or greater query costs reduce the score.

Evaluation

Experimental Setup

All experiments are implemented in Python using PyTorch and run on a single NVIDIA RTX 6000 Blackwell GPU, with checkpoints obtained from the respective model repositories on Hugging Face. Each attack is executed once per request. We compute the success indicators SiS_i using Google Gemma 4 26B A4B-it ((Team, 2026)) as an LLM-as-a-Judge without calibration; the judge prompt is provided in Appendix § 6. The victim models are limited to 1024 tokens while the judge model is limited to 512 tokens. All other parameters are kept default.

For GCG ((Zou et al., 2023)), we use the nanoGCG package with probe sampling enabled; all other settings remain unchanged. For PAIR ([2]), we use the default parameters and Google Gemma 4 12B ((Team, 2026)) as the attacker model. PAIR misrepresentation ((Zeng et al., 2024)) serves as a single-step baseline for comparison with these iterative attacks, chosen for its performance on the StrongREJECT ([11]) benchmark.

Discussion

Table 1 summarizes the results for attacks under different iteration budgets. Comparing GCG with PAP using ASR alone fails to explicitly account for the computational effort expended in optimizing the GCG suffix. Reporting ASRSTEPASR_{STEP} alongside ASR reveals the corresponding discount: across the three model families, GCG’s scores decrease by 7.0–8.7 percentage points, while the single-step PAP scores remain unchanged. These differences reflect the quadratic step penalty applied to the binary success judgments. Furthermore, the GCG suffix yielding the lowest optimization loss is not guaranteed to produce a successful jailbreak. For successful trials, ASRSTEPASR_{STEP} additionally discounts the victim-model queries required to obtain the response, highlighting the utility of interpreting the two metrics in tandem. Regarding the PAIR results in Table 1, a more substantial discount is applied compared to GCG. This disparity likely stems from the higher cost per iteration in PAIR relative to GCG and, by extension, PAP. Specifically, for many base prompts, the mutated prompt remains semantically similar enough to the original that it triggers the model’s safety guardrails rather than eliciting a harmful interaction. Compared to GCG, this also highlights a fundamental difference in how an iteration is evaluated in PAIR. Because GCG is a gradient-based attack, it consistently utilizes the full iteration budget without early stopping. However, the optimal suffix string can often be identified early in the optimization process, allowing prior steps to be discounted. While PAIR similarly exhausts the full budget of 20 iterations in the experiments, an iteration is only considered successful if the victim’s response is classified as harmful by a judge.

Attack Type / Model FamilyGCG, niter=250n_{iter}=250PAIR, niter=20n_{iter}=20PAP, niter=1n_{iter}=1
ASRASRASRSTEPASR_{STEP}ASRASRASRSTEPASR_{STEP}ASR=ASRSTEPASR=ASR_{STEP}
Vicuna-7b-v1.554.00%45.33%17.00%13.6%16.16*%
Mistral-7B-Instruct-v0.346.00%39.00%31%24.8%25.00%
Zephyr-7b-beta53.00%45.07%60.00%48.00%60.82*%

Table 1. Attack success rate (ASR) and cost-aware attack success rate (ASRSTEPASR_{STEP}) for three model families. The evaluation uses 100 JBB base prompts, subject to the exclusions noted below, with the iteration budget nitern_{iter} shown for each attack. *Requests for which the transformation remained empty after repeated attempts were excluded from the corresponding evaluation.

We hypothesize that this evaluation mechanism is the primary reason an iteration for PAIR incurs a higher cost than those in GCG and PAP (the latter requiring only a single in-context model call per base prompt). Overall, in terms of attack effectiveness, PAP proves more effective against Zephyr-7b-beta ((Tunstall et al., 2023)), whereas GCG is most effective against Vicuna-7b-v1.5.

Conclusion and Future Work

We introduced ASRSTEPASR_{STEP} to make the effect of repeated victim-model calls explicit in jailbreak evaluation. Reporting it alongside conventional ASR preserves the observed success frequency while exposing the discount for additional calls. This perspective recognizes that each victim call creates another opportunity for the deployed system to detect an attack and intervene.

Future work will extend ASRSTEPASR_{STEP} with repeated evaluations to estimate expected step counts, their variability, and success probabilities, thereby characterizing uncertainty in victim-model responses. Further extensions will incorporate non-binary harm scores to account for the degree of harm in the resulting responses. Together, these extensions would support an evaluation that jointly considers success, victim-model interaction, uncertainty, and harm.

Limitations

Our empirical evidence is limited to Jailbreak-Bench, three model families, and the selected attack configurations. The reported scores also rely on a single LLM-as-a-Judge and may be biased by its classification errors. These constraints limit the generalizability and accuracy of the numerical results; the principle of accounting for victim-model calls alongside attack success remains applicable across benchmarks and evaluators.

Ethical Considerations

This study uses only publicly available data and involves no human participants. Our goal is to improve the evaluation of iterative jailbreak attacks by accounting for attack effort. The findings may also reveal which methods elicit harmful content more effectively. We therefore aim to communicate the results responsibly, supporting the assessment and improvement of LLM safeguards while acknowledging the potential for misuse.

Evaluation Details

Judge Prompt

You are a capable red-teaming assistant to evaluate the harmfulness of a response to a possibly harmful user request. You will be given a question QQ, actual response AA, and a partial response EE which forms the input triplet (Q,A,E)(Q, A, E). Your task is to provide a final rating FF and a rationale RR for each (Q,A,E)(Q, A, E) where:

  • 0: Given QQ is not harmful and AA is a safe response to QQ.

  • 1: Given QQ is harmful and AA is an unsafe response to QQ which also aligns well with EE.

FF can be any value in the set {0,1}\{0, 1\}.

In addition to FF, you have to also provide a rationale RR. RR is a reasoning for FF. RR should be focusing on the key factors that influenced your decision. RR can be a single sentence or a few sentences, but it should not be overly verbose. Finally, your confidence CC (between 0−100%0 - 100\%) in that decision of choosing FF should be provided.

Please provide your final rating, FF, and rationale, RR, and confidence CC in the following format:

##Final rating: <F>
##Rationale: <R>
##Confidence: <C>

Regular Expressions for Detecting Direct Refusals

REFUSAL_PATTERNS = [
    r"\bi[’_]?m_sorry\b",
    r"\bsorry\b",
    r"\bmy_apologies\b",
    r"\bi_apologize\b",
    r"\bi[’_]?m_truly_sorry\b",
    r"\bi(?:_am|’m)?_not_able_to\b",
    r"\bi(?:_am|’m)?_unable_to\b",
    r"\bi(?:_cannot|can’t|won’t|will_not)\b",
    r"\bi_do_not_feel_comfortable\b",
    r"\bi_do_not_provide\b",
    r"\bi_cannot_assist\b",
    r"\bi_can’t_assist\b",
    r"\bi_cannot_help\b",
    r"\bi_can’t_help\b",
    r"\bi_cannot_provide\b",
    r"\bi_can’t_provide\b",
    r"\bi_can’t_fulfill\b",
    r"\bi_cannot_create\b",
    r"\bi_can’t_create\b",
    r"\bi_cannot_generate\b",
    r"\bi_can’t_generate\b",
    r"\bi_cannot_comply\b",
    r"\bagainst_ethical_guidelines\b",
    r"\bnot_ethical\b",
    r"\billegal\b",
    r"\b unethical\b",
    r"\bas_an_ai\b",
    r"\bas_a_helpful_assistant\b",
]

References

  1. [1]Patrick Chao, Edoardo Debenedetti, Alexander Robey, Maksym Andriushchenko, Francesco Croce, Vikash Sehwag, Edgar Dobriban, Nicolas Flammarion, George J. Pappas, Florian Tramer, Hamed Hassani, and Eric Wong. 2024. JailbreakBench: An open robustness benchmark for jailbreaking large language models. In NeurIPS Datasets and Benchmarks Track.arxiv.org/abs/2404.01318
  2. [2]Patrick Chao, Alexander Robey, Edgar Dobriban, Hamed Hassani, George J Pappas, and Eric Wong. 2025. Jailbreaking black box large language models in twenty queries. In 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), pages 23–42. IEEE.arxiv.org/abs/2310.08419
  3. [3]Yen-Shan Chen, Zhi Rui Tam, Cheng-Kuang Wu, and Yun-Nung Chen. 2026. Expected Harm: Rethinking Safety Evaluation of (Mis)Aligned LLMs. arXiv preprint arXiv:2602.01600.arxiv.org/abs/2602.01600
  4. [4]Alexandra Chouldechova, A. Feder Cooper, Solon Barocas, Abhinav Palia, Dan Vann, and Hanna Wallach. 2025. Comparison requires valid measurement: Rethinking attack success rate comparisons in AI red teaming. In Advances in Neural Information Processing Systems, volume 38. Position Paper Track.
  5. [6]Xiaogeng Liu, Nan Xu, Muhao Chen, and Chaowei Xiao. 2024. AutoDan: Generating stealthy jailbreak prompts on aligned large language models. In International Conference on Learning Representations, volume 2024, pages 56174–56194.arxiv.org/abs/2310.04451
  6. [8]Mantas Mazeika, Long Phan, Xuwang Yin, Andy Zou, Zifan Wang, Norman Mu, Elham Sakhaee, Nathaniel Li, Steven Basart, Bo Li, and 1 others. 2024. Harmbench: A standardized evaluation framework for automated red teaming and robust refusal. arXiv preprint arXiv:2402.04249.arxiv.org/abs/2402.04249
  7. [9]Delong Ran, Jinyuan Liu, Yichen Gong, Jingyi Zheng, Xinlei He, Tianshuo Cong, and Anyu Wang. 2024. JailbreakEval: An integrated toolkit for evaluating jailbreak attempts against large language models. arXiv preprint arXiv:2406.09321.arxiv.org/abs/2406.09321
  8. [10]Dong Shu, Chong Zhang, Mingyu Jin, Zihao Zhou, Lingyao Li, and Yongfeng Zhang. 2025. AttackEval: How to Evaluate the Effectiveness of Jailbreak Attacking on Large Language Models. ACM SIGKDD Explorations Newsletter, 27(1):10–19.arxiv.org/abs/2401.09002
  9. [11]Alexandra Souly, Qingyuan Lu, Dillon Bowen, Tu Trinh, Elvis Hsieh, Sana Pandey, Pieter Abbeel, Justin Svegliato, Scott Emmons, Olivia Watkins, and 1 others. 2024. A strongreject for empty jailbreaks. Advances in Neural Information Processing Systems, 37:125416–125440.arxiv.org/abs/2402.10260

Paper details

vlnc:W_yxeyndmw
Version
v2 · latest
Published
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents