Skip to content

SRD-GUARD: An LLM defense framework that exposes potential intent through semantic rewriting and multi-model joint scoringSRD-GUARD: A Defense Framework of LLMs via Semantic Rewriting and Joint Multi-Model Scoring for Latent Intent Exposure

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2609.06540· Qi Wang, Chengcheng Wan, Jiangtao Wang·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

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

SRD-GUARD uses rewriting and joint scoring to defend against jailbreaks, with an average DSR of 91.44% for Llama-3-8B-Uncensored.

Threat modelAttackers only use public interfaces, using contextual wrapping to induce the target LLM to generate harmful or policy-violating content, without access to parameters, training data, hidden system prompts, internal representations, or safety mechanisms. SRD-GUARD is an external black-box layer that does not modify the target model and only sees the input and the outputs of rewriting and scoring.

Questions
Jailbreaks wrap harmful requests in role-play, fiction, or seemingly benign motives, which surface-level detection easily misses, while conservative blocking rejects sensitive but legitimate requests. The authors aim to simultaneously improve defense and reduce over-refusal without modifying the target model.
Methods
SRD-GUARD generates five rewrites that remove excess wrapping while preserving the goal, and averages scores from four LLMs on a 0–10 scale. If the risk is ≥6.0, it blocks; if all are <3.0, it allows; in the gray zone, it compares the risk difference between the rewrite and the original text: if it rises, it returns the highest-risk rewrite with a warning; otherwise, it keeps the original text with a warning.
Experiments and results
On Llama-3-8B-Uncensored, DSR across the three attacks is 91.00%, 85.00%, 98.33%, averaging 91.44%; on DeepSeek-V4-Flash, all are 100%. ORR on OR-Bench-Hard is 8.00% and 12.00%.
Limitations and future work
The authors note that scoring uses four local LLMs, requiring additional memory and computation, and cannot be replaced with binary classifiers; nor can it simultaneously achieve zero over-refusal and full defense success. The evaluation includes two target models, three attacks, and 300 instances each from AdvBench and OR-Bench-Hard; the criteria and number of repetitions are not reported.
Experimental setupLlama-3-8B-Uncensored、DeepSeek-V4-Flash · AdvBench、OR-Bench-Hard · DSR、ORR
Evaluated models
Llama-3-8B-UncensoredDeepSeek-V4-Flash
Benchmarks
AdvBenchOR-Bench-Hard
Metrics
DSRORR
AI summarySRD-GUARD is a parameter-free, black-box LLM jailbreak defense framework that exposes hidden intent wrapped in role-play or fictional scenarios through semantic rewriting and multi-model consensus scoring. It generates five semantically related rewrites of the input prompt, removing extraneous contextual wrapping while preserving the original goal, and then multiple independent LLM safety scorers jointly evaluate the original prompt and the rewritten versions on a continuous risk scale. The decision module combines an absolute risk threshold with the relative risk change between the original and rewritten prompts to adaptively block, allow, or warn about requests.

SRD-GUARD is a parameter-free, black-box LLM jailbreak defense framework that exposes hidden intent wrapped in role-play or fictional scenarios through semantic rewriting and multi-model consensus scoring. It generates five semantically related rewrites of the input prompt, removing extraneous contextual wrapping while preserving the original goal, and then multiple independent LLM safety scorers jointly evaluate the original prompt and the rewritten versions on a continuous risk scale. The decision module combines an absolute risk threshold with the relative risk change between the original and rewritten prompts to adaptively block, allow, or warn about requests.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Contextual wrapping can conceal harmful intent; SRD-GUARD uses rewriting and joint scoring as a black-box defense.

    Jailbreaks can wrap harmful requests in role-playing, fictional scenarios, or seemingly benign motives, making it easy for defenses to miss detection or over-refuse during inference.

    • Scenario: The authors state that after LLMs are used in safety-critical applications, surface prompts may not equal underlying intent; being too strict rejects sensitive but legitimate requests, while being too loose lets disguised requests through (Section 1.1).
    • Limitations: The authors state that prompt augmentation, intention analysis, and self-reminder typically do not compare the risk difference between the original and rewritten text.
    • Challenges: The authors list: no clear boundary between legitimate constraints and disguise; a single scorer may miss detections or increase false refusals; high DSR and low ORR are hard to balance in the gray zone.
    • Approach: SRD-GUARD is a parameter-free, black-box defense: five de-wrapping rewrites, multi-scorer consensus, then routing to block, allow, or return with a warning based on thresholds and risk difference.
    • Threat model
      • Goal: Induce the target LLM to produce harmful, unsafe, or policy-violating content (Section 3.1).
      • Knowledge: Only public interfaces; no parameters, training data, hidden system prompts, internal representations, or safety mechanisms.
      • Capability: Can use role-playing, fictional scenarios, hypothetical settings, indirect instructions, or other wrapping to hide intent.
      • Defense: An external layer between the user and the target model; does not modify parameters, architecture, or inference; only sees the input and auxiliary rewrites and scoring outputs, requiring no gradients, hidden states, or internal safety classifiers (Section 3.2).
  2. What related research exists?

    Related work is divided into input-level, intention analysis, and multi-model review; the authors distinguish their work by using relative risk routing.

    Prompt attacks

    • Chen and Yao (2024), Yu et al. (2024), and Yao et al. (2024) embed harmful requests into roles, fiction, hypotheses, or other instructions to bypass safety mechanisms.
    • Bhardwaj and Poria (2023) use chains of utterances for red-teaming. The authors state that such attacks do not depend on parameters, are easy to deploy, and are close to real attack scenarios, so they are commonly used in red-teaming.
    • The introduction cites Wei et al. (2023): judging whether a request should be answered remains difficult; Geng et al. (2026) survey methods, causes, and defenses for prompt injection.

    Layered defenses

    • Kumar et al. (2023) inspect or transform prompts before sending them to the target model; Inan et al. (2023) inspect generated output and suppress or modify unsafe content.
    • Ouyang et al. (2022) use additional training or alignment to change parameters or safety behavior. The authors state that model-level training is computationally expensive, while input-level and output-level methods typically do not require retraining.

    Input-level transformation and intention analysis

    • SmoothLLM (Robey et al., 2023) applies random perturbations to multiple input copies and aggregates predictions; Xie et al. (2023)'s self-reminder and Xiong et al. (2025)'s defensive prompts use safety prompts to reinforce policies. The authors state that these methods mainly rely on surface cues and may increase ORR when improving DSR due to conservative handling of suspicious inputs.
    • Li et al. (2025) and Intention Analysis (Zhang et al., 2025) analyze core intent before generation. The authors state that IA relies on a single inferred intent and does not compare the original text against multiple semantic representations.

    Multi-model review

    • AutoDefense (Zeng et al., 2024) uses multiple LLM agents to collaboratively analyze potentially harmful inputs. The authors state that existing approaches typically make absolute safety judgments on a single representation, without continuous risk scores or explicit relative risk comparison.

    Baselines and benchmarks: Experimental baselines are DPP, IA, and SR. Harmful requests come from AdvBench, transformed with DeepInception, CIPHER, and UNIATTACK; over-refusal uses OR-Bench-Hard.

    The authors position SRD-GUARD beyond these works: using multiple semantic rewrites to expose intent hidden by wrapping, multiple independent scorers reaching consensus on a unified 0–10 scale, then routing based on absolute risk and relative risk changes.

  3. How does the paper address this problem?

    Five rewrites plus four-model continuous scoring, then routed by thresholds 6.0, 3.0, and risk difference Δ.

    SRD-GUARD operates outside the target model in three stages: semantic rewriting, multi-model joint scoring, and routing by absolute and relative risk (Figure 2).

    Setup and scores

    • The input is the user prompt x, and the rewriting module produces five variants x1–x5. The scoring range is 0–10, with higher meaning greater potential harm.
    • The original joint score is the average of four scorers: S0=1/4∑j=14s0,j. Each variant Si likewise takes the average of four scorers, and Svar is the average of the five Si values.
    • The risk difference is Δ=Svar−S0. The authors assume that for wrapped malicious prompts, rewrites usually score higher once the wrapping is removed; Δ>0 is treated as a signal that the original context may be masking harmful intent.
    • The low-risk threshold is 3.0 and the danger threshold is 6.0. Cases that trigger neither hard blocking nor uniformly low risk are called the gray zone by the authors and written as 3.0–5.9.

    Rewrite Module

    • Rewriting preserves the user's actual goal and writes it as a more direct, concise, explicit request, rather than mechanically restating the surface.
    • Role-play, fiction, research purposes, safety statements, defensive motives, or extra constraints can be either legitimate or wrapping. The module does not assume a class of contexts is always deleted or always kept.
    • It must not introduce goals, actions, entities, or intents absent from the original, nor change an explicitly harmful goal into a benign one to lower risk.
    • The five variants reduce dependence on a single rewrite. Implemented as system-level prompting of deepseek-v4-flash-thinking with one-shot demonstrations, without parameter updates.

    Scoring Module

    • Four independent scoring models: Gemma2-9B, Llama3-8B, Mistral-Nemo, Qwen2.5-7B. The original and each rewrite are each scored by all four and then averaged.
    • The authors state different scorers have different sensitivity to harmful content and context, and a single evaluator makes judgments unstable; averaging is used to reduce individual errors or biases.
    • Scoring likewise uses system prompts with one-shot demonstrations and no parameter updates. The text does not list the scoring rubric items.

    Decision Module

    1. If S0≥6.0, or any Si≥6.0, block directly without sending to the target model.
    2. If S0<3.0 且所有变体都 <3.0,原文不修改返回。
    3. 其余情况若 Δ>0, return the highest-risk rewrite with an explicit warning. The authors state that if the highest-risk variant is harmful, it is easier for the target model to recognize and refuse, so the lowest-risk variant is not returned; separate numbers for this comparison are not listed in the text.
    4. If Δ≤0, keep the original with an explicit safety warning. Gray-zone requests are not rejected merely for being in the gray zone.
  4. What experiments did the paper conduct?

    Average DSR across three attacks for the two models is 91.44% and 100%, with ORR of 8.00% and 12.00%.

    Experimental setup

    • Target models: Llama-3-8B-Uncensored and DeepSeek-V4-Flash. The authors use the former to isolate the external defense and the latter to see cooperation with existing alignment and refusal. Both are treated as black-box, with no parameter or internal representation changes; they only receive prompts produced by the corresponding defense.
    • Data: 300 random items from AdvBench and 300 random items from OR-Bench-Hard, each evaluated independently. Under the adversarial setting, each AdvBench prompt is instantiated once by each attack.
    • Attacks: three black-box jailbreaks: UNIATTACK, CIPHER, DeepInception.
    • Baselines: DPP, IA, SR. The rewriting model is deepseek-v4-flash-thinking, whose name differs from the target model DeepSeek-V4-Flash; the scoring models are Gemma2-9B, Llama3-8B, Mistral-Nemo, Qwen2.5-7B.
    • Metrics: DSR is the proportion of malicious attack prompts that fail to elicit a harmful output; ORR is the proportion of benign requests incorrectly rejected. The paper does not state whether harmful outputs or refusals are judged by rules, humans, or which model.
    • Repetitions: the number of repetitions for the main experiments is not stated. Table 1 gives means and ±, without stating whether ± is standard deviation or standard error.

    Main results

    Per Sections 5.2–5.3. DSR comes from AdvBench transformed by each attack; ORR comes from OR-Bench-Hard. Per-attack numbers for DPP and SR appear only in Figure 3 and are not given in the text, so they are not filled in.

    Swipe horizontally to read the table

    Method and target modelUNIATTACKCIPHERDeepInceptionORR
    SRD-GUARD, Llama-3-8B-Uncensored91.00%85.00%98.33%8.00%
    IA, Llama-3-8B-Uncensored97.89%68.33%87.56%45.67%
    SRD-GUARD, DeepSeek-V4-Flash100%100%100%12.00%
    IA, DeepSeek-V4-Flash97.50%99.17%99.50%38.33%
    • The authors state that on Llama-3-8B-Uncensored, SRD-GUARD is higher than DPP and SR and comparable to IA; DSR on CIPHER and DeepInception is 16.67 and 10.77 percentage points higher than the strongest baseline. On UNIATTACK, IA is 97.89%, higher than 91.00%.
    • The authors state that on DeepSeek-V4-Flash only SRD-GUARD reaches 100% DSR on all three attacks. The authors state the system can identify nearly 93% of malicious attacks but only blocks inputs with a risk score of at least 6, returning prompts with warnings in the gray zone; the paper does not give a per-attack table for 93%.
    • The abstract and conclusion write average DSR as 91.44% and 100%, and ORR as 8.00% and 12.00%. Section 1.2 states that relative to no defense, ORR increases by 2.33 and 2.00 percentage points on the two models, and DSR improves by 70.06–89.07 and 14.83–52.50 percentage points; relative to the evaluated baselines, average DSR is 30.30 and 15.67 percentage points higher, and ORR is 10.04 and 10.22 percentage points lower. Sections 5.2–5.3 write the same differences with percent signs.

    Ablations (Table 1)

    • Removing Rewrite: on Llama-3-8B-Uncensored, average DSR drops from 91.44% to 50.66% (41.58±3.46%, 47.03±3.51%, 63.37±2.77%); on DeepSeek-V4-Flash, from 100% to 64.52% (49.01±3.51%, 90.59±2.05%, 53.96±3.51%). ORR is 8.47±0.99% and 16.5±2.62%. The authors state the low ORR comes from a less aggressive intervention, at the cost of reduced defense.
    • Removing Joint Scoring: replaced with a single Llama3-8B. On Llama, UNIATTACK DSR is 100%, higher than the full system's 91±0.95%; CIPHER 75±3.06%, DeepInception 96±1.39%. ORR rises to 37±3.42% and 50±3.54%. The authors state Llama3-8B tends to give high risk scores, and the DSR increase comes with worse benign retention.
    • Removing Decision: on Llama, average DSR 79.33%, ORR 24.50%; on DeepSeek-V4-Flash, 79.50% and 32.50%. The authors state that without relative risk routing, intervention discrimination on sensitive inputs decreases. In the table, the Llama row reads w/o Decision Module and the DeepSeek row reads w/o Decision Algorithm.

    Sensitivity (Table 2)

    Only on Llama-3-8B-Uncensored and CIPHER, varying the number of rewrites or the number of scoring models.

    • Number of rewrites 1/3/5/7: DSR 80%, 81%, 85%, 82%; ORR 24%, 16%, 8%, 12%. The authors consider five a reasonable balance between representation diversity and decision stability, with no additional benefit from increasing to seven.
    • Number of scoring models 1–5: DSR 75%, 71%, 74%, 85%, 66%; ORR 37%, 17%, 26%, 8%, 32%. The fifth is Phi-3-Mini. The authors argue that larger ensembles do not necessarily improve estimation, and additional scorers' risk judgments may be less compatible.
    • The authors state performance could improve with stronger scoring or rewriting models; the paper does not report numbers after replacement.

    Other ablations and analyses

    • Relative to no defense, Section 1.2: Llama ORR +2.33 percentage points, DSR +70.06–89.07 percentage points; DeepSeek-V4-Flash ORR +2.00 percentage points, DSR +14.83–52.50 percentage points.
    • Sections 1.2 and 5.3: relative to the evaluated baselines, average DSR +30.30 and +15.67 percentage points, ORR 10.04 and 10.22 percentage points lower.
    • The authors state the system can identify nearly 93% of malicious attacks but does not block all gray-zone cases; the paper does not give a per-attack calculation table.
    • In the ablation discussion, the authors state UNIATTACK interception rate 100% and DeepInception 86%; it is not stated which target model this corresponds to, nor whether it is the full system or a single-scorer variant.
    • Table 1 full system: Llama 91±0.95%, 98.33±0.43%, 85±1.19%, ORR 8±0.91%; DeepSeek 100% on all three attacks, ORR 12±1.09%.
    • The paper does not report per-attack percentages for DPP and SR, the DSR/ORR judgment protocol, the number of repetitions, or runtime.
  5. What are some points that can be further explored?

    The authors point out the deployment overhead of four-model scoring, and the inability to simultaneously achieve zero refusal and full defense success.

    Limitations and future directions noted by the authors

    • Deployment overhead (Discussion): The scoring module uses four local LLM evaluators rather than lightweight binary classifiers, and must process both the original and rewritten text, thus requiring additional memory and computation. The authors state that it cannot be replaced with a classifier that only outputs binary labels, because it relies on continuous risk scores and predefined scoring criteria; compared to a single classifier or rule-based filtering, deployment may require more hardware. Future directions include smaller instruction-following models or hybrid lightweight evaluators.
    • Ambiguous safety boundaries (Discussion): The authors state that prompts like those in OR-Bench tie sensitive behaviors to legitimate contexts, making it difficult to distinguish harmful intent from acceptable use under a unified risk standard. Absolute risk plus relative risk still cannot always distinguish them. The authors state that it is impossible to simultaneously reduce over-refusal to zero and make all defenses successful: increasing sensitivity to hidden harmful intent may affect benign requests on the boundary, while relaxing defenses may leave some harmful requests unblocked. The authors state that harm and benign utility often form a continuum rather than a strictly separable boundary.

    Experimental coverage

    • Target models are Llama-3-8B-Uncensored and DeepSeek-V4-Flash, both used as black-box without modifying parameters (Section 5.1.2).
    • The harmful side uses 300 random AdvBench instances, instantiated with UNIATTACK, CIPHER, and DeepInception respectively; the over-refusal side uses 300 random OR-Bench-Hard instances (Section 5.1.1).
    • Baseline defenses are DPP, IA, and SR; metrics are DSR and ORR (Sections 5.1.4–5.1.5). The main text reports per-attack numbers for SRD-GUARD and IA.
    • Ablations remove Rewrite, four-model joint scoring, and Decision on both target models (Table 1). The number of rewrites and scoring models is reported only on Llama-3-8B-Uncensored with CIPHER (Table 2), with the fifth scorer being Phi-3-Mini.
    • The paper does not report the criteria for DSR/ORR, the number of repetitions in main experiments, or the query count or time during deployment (Section 5.1.5; Discussion only qualitatively discusses overhead).
  6. Summarize the main content of the paper

    Using rewriting, consensus scoring, and relative risk routing as a black-box defense, average DSR for the two models is 91.44% and 100%.

    SRD-GUARD is a parameter-free, black-box defense placed between the user and the target LLM to handle jailbreaks hidden by contextual wrapping and to reduce refusals of sensitive but benign requests.

    • Problem: Surface prompts may either hide harmful intent or simply be legitimate sensitive contexts; looking only at the original text or refusing everything makes it hard to balance DSR and ORR.
    • Method: deepseek-v4-flash-thinking generates five more direct rewrites; Gemma2-9B, Llama3-8B, Mistral-Nemo, and Qwen2.5-7B average scores on a 0–10 scale. If the average reaches 6.0, it is blocked; if all are below 3.0, it is allowed; in the gray zone, the rewrite mean minus the original score is used: if it rises, the highest-risk rewrite is sent with a warning; otherwise, the original is kept with a warning.
    • Main results: 300 random AdvBench instances, instantiated with UNIATTACK, CIPHER, and DeepInception. For Llama-3-8B-Uncensored, DSR is 91.00%, 85.00%, 98.33% (average 91.44%), and ORR on OR-Bench-Hard is 8.00%. For DeepSeek-V4-Flash, DSR is 100% for all three attacks, and ORR is 12.00%.
    • Comparison: For IA given in the same paper, ORR is 45.67% and 38.33% for the two models; on Llama with UNIATTACK, IA's DSR is 97.89%, higher than SRD-GUARD. The authors state that relative to no defense, DSR improves by 70.06–89.07 and 14.83–52.50 percentage points, while ORR increases by only 2.33 and 2.00 percentage points.
    • Ablations and conclusion: Removing rewriting reduces average DSR to 50.66% and 64.52%; using a single Llama3-8B scorer raises ORR to 37% and 50%. The authors state that effective defense does not require modifying the target model or using a uniformly tightened boundary.

Related papers

Show 3 more papers
Read originalarxiv.org