Skip to content

Study evaluates GradSafe's jailbreak detection vulnerability in multi-turn dialoguesDoes the Unsafe Gradient Survive a Conversation? On the Fragility of Gradient-Based Jailbreak Detection in Multi-Turn Dialogue

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2609.36849· ACM Workshop on Large AI Systems and Models with Privacy and Safety Analysis· Omar Sheta, Rinku Deuja, Hadi Masoudi, Minghong Fang·Indexed by this site · 2026-09-30· Originally publishedDefenses

Quick read

Evaluation and benchmarks

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

The authors extend GradSafe to multi-turn dialogues using a Context Window Scanner, finding that on WildChat, Llama 3.1 achieves a ROC-AUC of 0.8101 for W=1, and after transferring a synthetic threshold, the FPR reaches 90.85%.

Questions
Safety-aligned models are often deployed as multi-turn assistants, and malicious intent can be dispersed across turns. Gradient detectors such as GradSafe are designed for single prompts; whether unsafe gradients remain separable in multi-turn dialogues is unclear.
Methods
The authors fix GradSafe scoring, use the Context Window Scanner with right-anchored fixed windows over user turns, take the maximum window score as the dialogue score, and compare with single-turn and full-context accumulation.
Experiments and results
ROC-AUC on synthetic benign W=3 is 0.9836; on stratified WildChat it drops to 0.7614, with a synthetic threshold transfer FPR of 90.85%. Under real traffic, shorter windows are stronger, and on successful Crescendo and Qwen2.5 separability is near random or rank-inverted.
Limitations and future work
The authors state the scope is separability and threshold behavior, not adaptive attacks against the gradient score, nor a complete interception system. Experiments cover Llama 3.1 8B Instruct and Qwen2.5-7B-Instruct, MHJ and Crescendo, and synthetic and WildChat benign dialogues.
Experimental setupLlama 3.1 8B Instruct、Qwen2.5-7B-Instruct · MHJ(537)、Crescendo on HarmBench(200 objectives,149 confirmed successes) et al. · ROC-AUC、AP et al.
Threat model
The attacker controls multi-turn user inputs through the chat interface and disperses malicious intent, knowing that a detector may exist but not the unsafe reference direction or threshold. The defender performs prompt-only detection using white-box gradients before generation, without looking at assistant replies.
Evaluated models
Llama 3.1 8B InstructQwen2.5-7B-Instruct
Benchmarks
MHJ(537)Crescendo on HarmBench(200 objectives,149 confirmed successes)WildChat stratified sample(2,000)synthetic benign(183)
Metrics
ROC-AUCAPBest F1TPR@10%FPRTransfer FPR95% bootstrap CI
AI summaryThe researchers evaluated the gradient-based jailbreak detector GradSafe in multi-turn dialogue scenarios and extended it with a Context Window Scanner, using the maximum score over fixed-size windows of user turns as the score for the entire conversation.

The researchers evaluated the gradient-based jailbreak detector GradSafe in multi-turn dialogue scenarios and extended it with a Context Window Scanner, using the maximum score over fixed-size windows of user turns as the score for the entire conversation.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    In multi-turn dialogues, is GradSafe's unsafe gradient signature still detectable?

    When malicious intent is distributed across multi-turn dialogues, do the unsafe gradient signatures of single-turn gradient jailbreak detectors remain separable?

    • Scenario: The authors state that large language models are increasingly deployed as dialogue systems. Attackers need not place the entire forbidden request in a single prompt; they can build context across turns, where the unsafe meaning of the final question depends on prior turns. Crescendo-style escalation, iterative jailbreak generation, and manual multi-turn jailbreaks all exploit this structure.
    • Limitations of existing methods: The authors state that most jailbreak defenses target single prompts and assume relevant signals are local. Llama Guard, SmoothLLM, and GradSafe have been validated on isolated prompts, so they do not indicate behavior when input becomes a dialogue.
    • Core question: The central question the authors pose is whether internal unsafe gradient signatures remain detectable, weaken, or disappear when malicious intent is distributed across a dialogue.
    • This work: The authors adapt GradSafe to multi-turn inputs, proposing a Context Window Scanner (CWS): slide a fixed-size window over user turns, score each window with GradSafe, and take the maximum as the dialogue-level score. They compare with a full-context cumulative variant and a single-turn baseline.
    • Threat model:
      • Attacker: Accesses the aligned target model through a chat interface, controls a sequence of user turns, and deliberately distributes malicious intent so individual turns can appear benign, vague, or incomplete. The attacker knows a safety detector may exist but does not know the specific unsafe reference direction or operating threshold.
      • Defender: Aims to catch unsafe dialogues before the model produces harmful output. GradSafe-based scoring requires white-box access to compute gradients on safety-critical parameters. The detector is prompt-only: it scores user turns before generation and never looks at assistant replies.
      • Design rationale: The authors state that once harmful content is generated, it may already be seen, logged, cached, or copied; in agent and tool-use deployments, a single reply can also trigger external API calls, code execution, file writes, or downstream tool calls. Therefore, they choose to intercept before the first generated token. The cost is that the detector cannot rely on evidence that appears only in replies.
      • Scope: The authors state they study detector separability and threshold behavior, not a complete interception system, and do not claim robustness against attackers who directly optimize the gradient score. An attacker knowing the unsafe reference direction could in principle reduce cosine similarity while maintaining a harmful goal, but multi-turn optimization also requires maintaining coherent context and eliciting unsafe behavior, which is out of scope.
  2. What related research exists?

    Related work is divided into single-turn attacks, multi-turn attacks, and jailbreak defenses by intervention position.

    The paper in Section 2 divides related work into three groups: single-turn attacks, multi-turn attacks, and jailbreak defenses.

    Single-turn jailbreak attacks

    • GCG (Zou et al., 2023) — uses white-box gradients to search for adversarial suffixes that maximize the probability of an affirmative response to a harmful request; the authors state the found suffixes transfer to open and proprietary systems.
    • Tree of Attacks with Pruning (2024) — an attack model expands and prunes candidate prompts in a tree; the authors state it achieves similar success rates with far fewer queries than GCG.
    • In-the-wild attacks and benchmarks: Shen et al. (2024) catalog role-play, privilege escalation, and prompt injection patterns that ordinary users can write without gradients. HarmBench and JailbreakBench unify attack, target behavior, and refusal metrics for reproducible comparison.

    Multi-turn jailbreak attacks

    • PAIR (Chao et al., 2024) — an attack model improves jailbreak prompts through a feedback loop with a black-box target; the authors state success in about twenty queries, treating each improvement as a step in an adversarial dialogue.
    • Crescendo (Russinovich et al., 2025) — gradually escalates a series of seemingly harmless requests so that no single turn appears unsafe, with harmful content appearing only after sufficient shared context.
    • MHJ and indirect injection: The MHJ dataset (Li et al., 2024) contains 537 human multi-turn jailbreak dialogues, categorized by strategies such as obfuscation, hidden intent structuring, injection, output formatting, request framing, echo, and direct requests; the authors state that skilled humans exploit conversational coherence in ways that single-turn automation cannot replicate. Greshake et al. (2023) extend the attack surface to indirect prompt injection: instructions in retrieved third-party content can hijack the model within a session without explicit attacker turns. The authors argue that detectors must reason over dialogue history, because scoring only a single prompt fails to capture intent split across turns or buried in retrieved context.

    Jailbreak defenses

    • Input-level and classifiers: SmoothLLM (Robey et al., 2023) flags attacks when random perturbations of the prompt change model behavior; perplexity filtering (Jain et al., 2023) exploits the abnormally high perplexity of GCG-style suffixes. Llama Guard (Inan et al., 2023) frames safety as taxonomy-based classification of prompts and replies; Llama Guard 3 is released with the Llama 3 family and updates the taxonomy.
    • Internal gradient signals: GradSafe (Xie et al., 2024) observes that unsafe prompts paired with a compliant token induce feature gradients on safety-critical parameters, and scores them by cosine similarity to a fixed unsafe reference direction. SafeQuant uses quantized gradients for the same idea; Gradient Cuff uses gradient norms under refusal-inducing suffixes to separate attacks without storing reference directions; Gradient-Controlled Decoding extends a single anchor to a pair of acceptance and refusal anchors, combining detection with first-token mitigation. Alignment-stage defenses modify parameters during safety alignment or fine-tuning (Antidote, Vaccine, TAR, and work mitigating alignment loss from fine-tuning); the authors state these are complementary to their inference-time setting.
    • Defenses and forensics: The authors note that jailbreak defenses identify or block unsafe requests before the model produces harmful output, whereas forensic attribution seeks causes after safety failures. The authors do not treat Gradient Cuff and Gradient-Controlled Decoding as baselines because their refusal losses and first-token mitigation protocols differ from this paper's prompt-only, pre-generation setting; they cite them only to position this study.

    Baseline methods and benchmarks: The main experiments compare CWS with its interpolation endpoints (single-turn max-over-turn, full-context accumulation) and the external classifier Llama Guard 3. Attack data are MHJ (537) and Crescendo run on 200 HarmBench targets; benign data are a stratified sample of 2,000 WildChat conversations and 183 synthetic benign dialogues.

    The authors position this work within the internal-gradient family but ask a multi-turn question that family has not addressed: after intent is dispersed across dialogue turns, are unsafe gradients still readable?

  3. How does the paper address this problem?

    Fix GradSafe scoring, use window scanning to take the maximum score, and attribute changes to context assembly.

    The authors keep GradSafe's scoring rule unchanged, only adding the Context Window Scanner (CWS) to apply it to dialogues. The authors state this separation is intentional: with single-turn scoring fixed, behavior changes can be attributed to how context is assembled, not to new detector design. CWS is positioned as a faithful extension of a single-turn detector to the multi-turn setting, not a complete defense.

    Problem setting and GradSafe scoring

    • Observation: Harmful requests leave a consistent trace in the gradients of safety-aligned models. When the input is paired with a short compliant token (e.g., "Sure"), unsafe inputs push a small subset of safety-critical parameters in one direction; that direction is stable across different unsafe prompts and is separable from the direction induced by benign inputs.
    • Reference signature: That direction is fixed once, denoted as the unsafe reference signature gunsafe, obtained by averaging over a set of unsafe seed prompts; attention is restricted to the safety-critical parameters θS where separation is most pronounced.
    • Score: For detector input x and compliant token t, the score is the cosine similarity between the induced gradient and the reference signature, S(x)=cos(∇θS L(x⊕ t, t),  gunsafe). Larger scores indicate closer to the unsafe reference. It is a scalar, requiring only one backward pass and no text generation, so it can serve as a pre-generation filter.
    • Implementation: The loss takes the full compliant suffix after the prompt, i.e., the separator token followed by "Sure"; both the reference signature and each evaluation score use the same suffix.

    Context Window Scanner

    • Keep only user turns: The defender is prompt-only, first discarding assistant turns to obtain the user-turn sequence H = ⟨h1, …, hm⟩.
    • Right-anchored causal windows: For each user turn t, the window size is W and ends at that turn, xt,W=joinδ(hmax(1,t−W+1),…,ht). Windows are causal and can be evaluated online as each turn arrives; the first W−1 windows are shorter only because earlier turns do not exist. Adjacent turns within a window are joined with a fixed separator δ, implemented as a horizontal rule separated by blank lines, keeping turn boundaries explicit in the scored text.
    • Dialogue score: GradSafe scores each window, and the dialogue takes the maximum window score, S_CWS,W(H) = max S(x_t,W). The authors state max pooling is a design choice: windows are a logical OR, and a single high-risk window suffices to flag the whole dialogue, corresponding to a deployment where one successful jailbreak turn counts as failure.
    • Endpoints of the window spectrum: W=1 degenerates to scoring each user turn in isolation; increasing W incorporates more history until a window covering all turns recovers full-context accumulation. The single-turn baseline and the accumulation baseline are the two ends of the context-length spectrum. A dialogue with m user turns costs m backward passes, one per window position, independent of W. The authors state the main risk of larger windows is mixing benign turns into the scored text.

    Evaluation data and comparisons

    • MHJ: 537 dialogues from the bundled HarmBench behavior files, each line being a multi-turn user sequence bound to a harmful behavior or policy.
    • Crescendo: Run on 200 HarmBench targets using PyRIT Crescendo, with a local 70B attack model against a Llama 3.1 8B endpoint, capped at 10 turns and 10 backtracking attempts, with 5-second intervals between targets. Success is not keyword-based but determined by a calibrated scorer rating the target reply as a scalar, converted to a boolean label at a threshold of 0.9. All 200 targets completed, 149 confirmed successful, for an attack success rate of 74.5%; successful dialogues average 3.13 user turns, median 3, minimum 1, maximum 7. The other 51 rows failed at runtime because attack prompts exceeded the 8,192-token endpoint limit; the authors do not count them as attack failures. For targets without completed transcripts, the all-attempt set stores only the original HarmBench target as a single user prompt. The main conclusions use the 149 confirmed successes; the authors state these 51 rows would degenerate into single-turn explicit harmful requests, producing strong local unsafe gradients and thus bypassing the studied context dilution, so they are excluded.
    • Benign data: The main benign benchmark is a stratified sample of 2,000 WildChat conversations. Sampling first discards one-turn dialogues, then matches MHJ's turn-count distribution on the remaining dialogues, yielding 740 short dialogues (two or three user turns), 680 medium dialogues, and 580 long dialogues. The synthetic benign set is 183 dialogues left from earlier evaluation, generated by Gemini 2.5 Pro on ordinary assistant topics such as cooking, travel, hobbies, general knowledge, and short writing, mostly two turns; the authors use it to quantify evaluation gaps, not to support deployment claims.
    • Models and baselines: The main experiments use Llama 3.1 8B Instruct; Qwen2.5-7B-Instruct serves as a cross-architecture target, with its reference signature optimized separately on the same unsafe seed prompts using the same pipeline. Baselines are single-turn max-over-turn (i.e., W=1), scoring once after accumulating all user turns, and Llama Guard 3 (meta-llama/Llama-Guard-3-8B). Llama Guard 3 uses the official chat template, under the same prompt-only, user-turn-only protocol, scoring W=3 user-turn windows and max-pooling, while the accumulation mode scores the concatenated user turns once, never incorporating assistant replies or harmful outputs.

    Metrics and success determination

    • Reported metrics: ROC-AUC, average precision (AP), best-F1 threshold, best F1, and true positive rate at a 10% false positive rate. AP follows the project convention: after sorting scores in descending order, precision is averaged at each positive example's rank, consistent with the artifact scripts, with possible minor differences from library implementations on ties.
    • Threshold transfer: Thresholds selected on the synthetic benchmark are applied to real WildChat traffic, measuring the resulting false positive rate.
    • Intervals: Nonparametric 95% bootstrap with 2,000 resamples; attacks and benign dialogues are resampled separately, and window-ablation differences use paired resampling on shared rows. Rows with scoring failures are excluded from metrics and noted as errors when they occur.
  4. What experiments did the paper conduct?

    Synthetic benign overestimates detector performance; on real WildChat, shorter windows are stronger, and separability collapses on Crescendo and Qwen.

    Experimental Setup

    • Models under test: Main experiments used Llama 3.1 8B Instruct; cross-architecture used Qwen2.5-7B-Instruct. The external classifier baseline was Llama Guard 3 (meta-llama/Llama-Guard-3-8B). Crescendo's attack model was a local 70B, with the target endpoint being Llama 3.1 8B.
    • Attack data: MHJ 537 segments. Crescendo ran on 200 HarmBench targets, with 149 confirmed successes (74.5%), and successful conversations averaged 3.13 user turns; 51 runtime-failure rows were used only for attribution, and the main conclusions excluded them.
    • Benign data: Stratified WildChat 2,000 entries (seed 13), matched to the MHJ turn distribution: short (≤3 user turns) 740, medium 680, long 580. Synthetic benign 183 entries, generated by Gemini 2.5 Pro, mostly two turns.
    • Method variants: GradSafe W=1 through W=7 and full-context accumulation (Accum.); Llama Guard 3 W=3 and Accum. Qwen's reference signatures were built separately using the same pipeline as for Llama 3.1.
    • Metrics and intervals: ROC-AUC, AP, Best F1, TPR@10%FPR, Transfer FPR. 95% bootstrap CI used 2,000 resamples (seed 20260514); paired window differences used seed 20260515. The Crescendo success determination threshold was 0.9. Gradient scoring used bfloat16 with automatic device mapping on NVIDIA H100.
    • Contamination handling: The authors manually inspected the stratified WildChat and found rows containing jailbreak templates, role-play safety tests, or other text that looked adversarial, and they retained these rows. The Echoing strategy had only 3 attack samples; Table 4 omits it and does not treat it as a trend.

    Main Results

    Table 2 is the main result for MHJ against stratified WildChat. Table 1 also gives synthetic benign and threshold transfer.

    Swipe horizontally to read the table

    MethodBenign setROC-AUCAPBest F1TPR@10%FPRTransfer FPR
    GradSafe W=1WildChat0.81010.51350.57490.5084Not reported
    GradSafe W=2WildChat0.78730.46470.55360.4227Not reported
    GradSafe W=3WildChat0.76140.42780.52600.40040.9085
    GradSafe Accum.WildChat0.73760.40430.50390.32030.9065
    Llama Guard W=3WildChat0.45280.21180.34940.0838Not reported
    Llama Guard Accum.WildChat0.44090.20360.34940.0615Not reported
    GradSafe W=3Synthetic0.98360.99490.9740Not reported0.0874
    GradSafe Accum.Synthetic0.97770.99290.9576Not reported0.1530

    Per Table 1, Table 2. In the Transfer FPR column, the synthetic rows give that threshold's FPR on the synthetic set, and the WildChat rows give the FPR after transferring the same threshold to WildChat. 95% CI for W=3: synthetic [0.9750, 0.9909], WildChat [0.7379, 0.7843].

    • Authors' interpretation of the ordering: On the real benchmark, the strongest GradSafe setting was the single-turn window (0.8101), followed by two turns; three turns was still usable but weaker, and full-context accumulation was weakest, so shorter windows were stronger overall.
    • Llama Guard 3: AUC was below 0.5 in both modes. The authors said this does not indicate Llama Guard is generally weak, but rather a task mismatch: taxonomy-based prompt classification is not designed to catch intentions still hidden before generation. Figure 1 plots ROC for several methods on WildChat, with the legend labeling GradSafe W=1 (0.810), W=3 (0.761), Accum. (0.738), Llama Guard W=3 (0.453).
    • Thresholds do not transfer: The three-turn threshold flagged only 8.74% of synthetic benign conversations but flagged 90.85% of real conversations; the accumulation threshold behaved the same way. The authors said the operating point the synthetic benchmark hands to users would reject almost all legitimate traffic. The Figure 2 caption states that real benign scores overlap heavily with attack scores.

    Window Length and Strategy

    • Window ablation (Table 3, MHJ vs WildChat): AUC decreased monotonically from 0.8101 at W=1 to 0.7362 at W=7; Accum. was 0.7376, close to the seven-turn window. Paired differences relative to W=3: W=1 was +0.0487 (95% CI [0.0329, 0.0643]), W=2 was +0.0258, W=5 was −0.0111, W=7 was −0.0252, Accum. was −0.0238. The authors said the most consistent explanation is dilution: additional benign or irrelevant turns add gradients that are not aligned with the unsafe reference, thereby diluting the signal.
    • By length (Figure 3): Short windows were stronger globally and still stronger on long conversations. The authors said that for conversations with seven or more user turns, the two-turn and one-turn windows reached 0.8625 and 0.8622 AUC, three turns 0.8370, and accumulation 0.7411. The authors argued that long conversations do not require scoring the entire history, and deployment should pair short-window scoring with length-calibrated thresholds. The Figure 3 x-axis is short ≤3, medium 4–6, long ≥7, very long >7, with legend W=1, W=2, W=3, W=7, Accum.
    • Strategy level (Table 4, each strategy subset against all WildChat): The one-turn window was strongest on every listed strategy group. W=1 / W=3 / W=7: Direct Request (n=146) 0.7616 / 0.7277 / 0.7297; Hidden Intention Streamline (n=109) 0.8006 / 0.7538 / 0.7014; Injection (n=32) 0.9044 / 0.8727 / 0.8648; Obfuscation (n=156) 0.7905 / 0.7235 / 0.6948; Output Format (n=23) 0.8895 / 0.8641 / 0.8273; Request Framing (n=68) 0.8980 / 0.8388 / 0.8027. The authors said this does not mean a single turn contains all malicious intent, but rather that the signature reacts most strongly to the local turn closest to the unsafe target, and surrounding context tends to dilute that signal.

    Attack Families and Cross-Model

    • Crescendo (Table 5, against the same WildChat): MHJ (n=537) was 0.8101 / 0.7614 / 0.7376 at W=1 / W=3 / Accum. Crescendo-success (n=149) was 0.5018 / 0.3050 / 0.3161; W=2 was 0.3654, W=7 was 0.3008. Crescendo-all (n=200) was 0.5856 at W=1, higher than the 0.5018 for the success-only subset. The authors said the three-turn interval for successful Crescendo was overall below random ordering, with 95% CI [0.2608, 0.3503]; the one-turn window was indistinguishable from random, with 95% CI [0.4482, 0.5530]. Figure 4 labels successful Crescendo at W=1 as 0.502, W=3 as 0.305, and Accum. as 0.316. The authors argued that below-random AUC is not a useful inverse detector: under this reference signature and prompt-only protocol, successful Crescendo user turns scored lower than ordinary WildChat. The authors said Crescendo was not optimized against GradSafe, so this is not evidence of adaptivity, but rather that automated context-building attacks can avoid producing the local unsafe cues that MHJ often contains.
    • Four reasons given by the authors: neutral, formal wording without the imperative phrasing, high-perplexity suffixes, or explicit jailbreak markers that the reference signature is meant to capture; unsafe content usually appears in model replies, and prompt-only scoring cannot see assistant turns; early Crescendo turns are benign on their own, and merging them with turns carrying harmful intent dilutes the residual unsafe cues on the prompt side; real WildChat can contain emotionally intense, adversarial-looking, or policy-related discussions whose safety gradients can be stronger than polished Crescendo prompts.
    • Llama Guard 3 on Crescendo (Table 6): For Crescendo-success, AUC was 0.1389 at W=1, 0.1478 at W=3, and 0.1943 at Accum., with TPR@10%FPR of 0.0000 for all three. Crescendo-all was 0.2314 / 0.2614 / 0.3435. The authors said this does not indicate how Llama Guard would behave if it could read harmful replies; it only indicates that both pre-generation detectors lack a reliable signal on this attack family's user turns.
    • Qwen2.5-7B-Instruct (Table 7, same 537 MHJ and 2,000 WildChat, no rows discarded due to errors): The best setting was Accum., with AUC 0.5908 (95% CI [0.5669, 0.6162]); window settings ranged from 0.5545 to 0.5730, with W=1 at 0.5613 and W=3 at 0.5730. The authors said separability almost disappeared, and the ordering was the opposite of Llama 3.1: on Llama, AUC decreased monotonically from 0.8101 at one turn to 0.7362 at seven turns, with accumulation worst; on Qwen, accumulation was best, and one turn was among the weaker settings. Transferring Llama 3.1's synthetic threshold of 0.0205 to Qwen gave Transfer FPR from 0.3880 for accumulation to 0.8290 for one turn. The authors argued that gradient detector behavior depends on the model it is calibrated on, not a fixed property of the method; and they said they do not claim Qwen is fundamentally harder, or that the Llama results establish a robust method, because each result is one signature implementation against one benign benchmark.

    Other Ablations and Analyses

    • Intuitive extensions (Table 8): On real WildChat, the W=3 baseline had AUC 0.7614 and AP 0.4278; contrastive raw delta was 0.6672 / 0.3094; contrastive projection delta was 0.7174 / 0.3481; contrastive ratio was 0.6754 / 0.3149. All three were below that baseline.
    • Subspace pilot: attack n=120, benign n=120, baseline AUC 0.7793, subspace residual cosine 0.7042 (AP n/a).
    • Multi-turn reference: attack n=20, benign n=20, baseline AUC 0.7812, multi-turn reference 0.7512 (AP n/a).
    • Authors' interpretation: The contrastive variants, which subtract or normalize a context baseline, were worse; the authors argued subtraction removes useful unsafe signal along with benign context. The subspace variant, which estimates and removes a benign direction, was worse than its pilot baseline; the authors argued benign conversational structure overlaps with the attack signal it was meant to preserve. Constructing a multi-turn reference direction substantially changes the reference but still does not beat the baseline. The authors said the failures cannot be attributed to simple post-hoc adjustments.
    • WildChat unfiltered: The authors retained rows containing jailbreak templates and role-play safety tests, and said the headline numbers are driven by the unfiltered distribution, not by a cleaned subset.
  5. What are some points that can be further explored?

    The authors limit the research scope to separability and thresholds, excluding adaptive attacks against the gradient score.

    Limitations and future directions noted by the authors

    • Not a complete interception system: Section 3 Scope states the study concerns detector separability and threshold behavior, not a complete interception system (Section 3).
    • No claim of robustness against adaptive attacks on the gradient score: The same section states no claim of robustness against attackers who directly optimize the gradient score; an attacker knowing the unsafe reference direction could in principle lower cosine similarity while maintaining the harmful goal, but that optimization is out of scope (Section 3).
    • Cost of prompt-only: The detector cannot rely on evidence that appears only in replies; Section 7 also states that pre-generation interception is valuable precisely because it acts before output exists, but therefore cannot use evidence available only in replies (Section 3, Section 7).
    • Still far from a deployable operating point: Section 7 states that even the best setting, once real benign dialogues are included, remains far from a deployable operating point; results do not indicate the problem is solved (Section 7).
    • Attack families do not transfer reliably: Section 7 states that the short-window signal observed on MHJ does not transfer reliably across multi-turn jailbreak families; on successful Crescendo the same score is near or below random, and longer windows rank attacks below benign traffic (Section 7).
    • How evaluation should be done: Section 8 conclusion states that multi-turn gradient detection should be evaluated with real benign data, multiple context lengths, diverse attack families, and different model architectures (Section 8). Section 7 also gives practitioners five rules: windows and aggregation need validation per model family, thresholds should be tuned on the deployment's own benign distribution, long dialogues need length-based thresholds or auditing, deployments should watch for attack-family drift, and prompt-only detectors should be evaluated separately from reply-side moderation (Section 7).

    Experimental coverage

    • Models: Main results on Llama 3.1 8B Instruct; cross-architecture replication on Qwen2.5-7B-Instruct using separately constructed reference signatures (Section 5, Table 7). Crescendo's attack model is a local 70B.
    • Attack and benign data: Attacks are MHJ 537 dialogues and Crescendo on 200 HarmBench targets (149 confirmed successes enter the main conclusions). Benign data are 183 synthetic dialogues and 2,000 WildChat dialogues stratified by turn count (Section 5).
    • Context variants: GradSafe reports W=1, 2, 3, 4, 5, 7, and full-context accumulation; Llama Guard 3 reports W=3 and accumulation, and both use only user turns, not assistant replies (Table 2, Table 3, Table 6).
    • Extensions and small-sample pilots: Table 8 comparison variants use all 537 vs. 2,000; the subspace pilot is 120 vs. 120; the multi-turn reference is 20 vs. 20. The paper does not report replication counts for these pilots.
    • Intervals and randomness: Main metrics carry 95% CIs from 2,000 resamples. The paper reports seeds for sampling and bootstrap, as well as Crescendo's turn limit, backtracking cap, and 0.9 success threshold.
  6. Summarize the main content of the paper

    CWS shows unsafe gradients weaken in real multi-turn traffic and vary with attack family and model.

    The authors evaluate how much separability remains when gradient-based jailbreak detection moves from single prompts to multi-turn dialogues, by applying GradSafe unchanged to user-turn windows using a Context Window Scanner.

    • Problem: When aligned models are deployed as multi-turn assistants, malicious intent can be split across turns, making individual turns appear benign. GradSafe detects unsafe prompts via the cosine similarity between input-induced gradients and a fixed unsafe reference direction, but whether it remains readable in dialogues is unclear.
    • Approach: Drop assistant turns, scan user turns with a right-anchored window of size W, and take the maximum window score as the dialogue score. W=1 is the single-turn baseline; covering all turns is full accumulation. Detection occurs before generation, requires white-box gradients on safety-critical parameters, and does not look at model replies.
    • Benign data determines apparent strength: On 537 MHJ, with synthetic benign data, W=3 achieves a ROC-AUC of 0.9836 and cumulative 0.9777; with 2,000 stratified WildChat samples, the same settings drop to 0.7614 and 0.7376. A three-turn threshold selected on the synthetic set, when transferred to WildChat, yields an FPR of 90.85% (Table 1).
    • Shorter windows are stronger, but only on Llama: On WildChat, GradSafe's W=1 is 0.8101, higher than W=3's 0.7614 and cumulative's 0.7376; Llama Guard 3 under the same user-turn-only protocol gives 0.4528 and 0.4409 (Table 2). On dialogues with seven or more user turns, one- and two-turn windows remain around 0.862. The authors attribute this pattern to gradient dilution.
    • Cannot extrapolate across attack families and architectures: On 149 confirmed successful Crescendo attacks against the same WildChat, W=1 ROC-AUC is 0.5018 and W=3 is 0.3050 (Table 5). On Qwen2.5-7B-Instruct, window AUCs range from 0.5545 to 0.5730, with cumulative best at 0.5908, reversing the ordering seen with Llama 3.1 (Table 7). Three intuitive extensions do not exceed the W=3 baseline (Table 8).

    The authors conclude that gradient signals can support multi-turn jailbreak detection, but reliable deployment requires calibration on real benign dialogues, short-window scoring, length-based thresholds, and evaluation across attack types and model architectures. They also believe that even the best settings remain far from a deployable operating point when real benign dialogues are included.

Related papers

Read originalACM Workshop on Large AI Systems and Models with Privacy and Safety Analysis