SENTINEL: Defending LLM jailbreaks through intent-aware input-output matchingReactivating Alignment: Defending LLMs from Jailbreaks via Intention-Aware Input-Output Matching
The authors propose SENTINEL, which matches input and output during generation to extract jailbreak intent; they report ASR below 5% on Mistral-7B-v0.2.
Attackers use adversarial context to conceal harmful intent, inducing LLMs to output harmful content. Evaluation includes GCG, AutoDAN, GPT-Fuzz, FewShot, PAIR, RADICAL, and DSA. Adaptive setting is full white-box access to the target LLM, optimizing 20 learnable embedding suffixes to evade intent matching and preserve harmful behavior.
- Jailbreaks use adversarial context to conceal harmful intent. The authors state token-level perturbations are hard to scale to long prompts like AutoDAN and GPT-Fuzz, safety prompts are easily overridden by instructions; two types of defenses rarely explicitly extract harmful intent, leading to unstable protection and high over-refusal.
- SENTINEL does not modify parameters. It performs sliding-window semantic matching between input and generated output, cleans by importance with multiple thresholds and deduplicates, then scores subsequences using refusal-direction projection; if exceeding a threshold predetermined from benign samples, it stops writing and appends a refusal. During generation, checks every 10 tokens, up to 10 times.
- In Table 1, GCG ASR for Mistral-7B-v0.2: no defense 90.00%, SENTINEL 4.00%. The authors state that weakly aligned models are below 5%. For Llama2-7B, OR-Bench FPR: SENTINEL 34.02%, higher than RPO's 23.45%.
- The authors state SENTINEL mainly operates in token space; future work could do intent matching in representation space. Main experiments use four open-source models, 300 samples per attack on HarmBench; adaptive attacks on Vicuna-7B-v1.5. The paper does not report number of repetitions, nor the dataset names used for refusal direction.
- Evaluated models
- Llama2-7BLlama3-8BMistral-7B-v0.2Vicuna-7B-v1.5Llama3.1-8BQwen-2.5-14B
- Benchmarks
- HarmBenchOR-BenchAlpacaEvalPuffinTriviaQAARC-CTruthfulQAGSM8K
- Metrics
- ASRSRFPRIPS
Researchers propose a generation-time jailbreak defense method SENTINEL, which reframes defense as an intent extraction problem, leveraging the input-output semantic consistency of instruction-tuned LLMs, matching semantically aligned regions to extract subsequences that expose intent, scoring with refusal-direction projection, and aborting generation when necessary. In experiments on HarmBench across multiple LLMs, SENTINEL reduces jailbreak success rate to near 5%, while maintaining low over-refusal and showing robustness against adaptive attacks.
Related events and news
1 events · 0 news mentions
- This event's paper
SENTINEL:意图感知的输入输出匹配越狱防御
Paper analysis
What problem does this paper attempt to solve?
SENTINEL matches input and output at generation time to extract intent and uses refusal-direction scoring to decide whether to stop writing.
How to explicitly extract the harmful intent in complex jailbreak prompts during generation, and stop generation in time while controlling over-refusal.
- Deployment scenario: with the spread of chat and copilots, attackers disguise harmful intent with adversarial context to bypass guardrails and obtain harmful instructions or propaganda. The authors say secure deployment is therefore more urgent.
- Limitations of existing work: the authors say token perturbation struggles to cover long prompts like AutoDAN and GPT-Fuzz, and safety prompts and suffix optimization are easily overwritten by instructions. Both mostly suppress harmful outputs rather than model intent location, so protection is unstable and over-refusal is high.
- Core observation: instruction-tuned LLMs have input–output semantic consistency: no matter how complex the jailbreak, the output still tends to reflect the attacker's true intent.
- This paper's approach: propose SENTINEL, a plug-and-play generation-time defense that does not change parameters. It matches semantically close input and output regions, extracts intent subsequences, estimates harmfulness with a refusal direction, and stops generation when necessary.
- Threat model:
- Goal: induce the model to bypass alignment guardrails and produce harmful instructions or propaganda.
- Knowledge: related work calls PAIR, TAP, and GPT-Fuzz black-box; the adaptive experiment states full white-box access. The main evaluation does not uniformly annotate knowledge levels.
- Capability: disguise intent with adversarial context. In the adaptive setting, optimize 20 learnable embedding suffixes that both evade intent matching and preserve harmful behavior.
- Victim system: the tested systems are instruction-tuned LLMs. The main tables use Llama2-7B, Llama3-8B, Mistral-7B-v0.2, and Vicuna-7B. The defense reads hidden states and can abort generation.
What related research exists?
Related work is divided into jailbreak attacks, input-space defenses, and latent-space defenses; baselines include RPO, CB, LAT, etc.
Jailbreak attacks
- Suffix search: GCG (Zou et al., 2023) and AutoDAN (Liu et al., 2023) construct adversarial suffixes with gradient- or token-level search.
- Black-box rewriting: PAIR (Chao et al., 2023), TAP (Mehrotra et al., 2023), and GPT-Fuzz (Yu et al., 2023) iteratively rewrite prompts in the black-box setting using attacker-model feedback or mutation.
- Intent obfuscation: RADICAL (Du et al., 2023) mixes harmful instructions with benign content, making the model more likely to start and continue answering. The authors say these attacks share the property that the output is semantically aligned with the user's underlying intent.
Input-space and prompt defenses
- Token perturbation: SmoothLLM (Robey et al., 2023), RA-LLM (Cao et al., 2023), and Erase-and-Check (Kumar et al., 2024) expose harmfulness by editing or checking inputs. The introduction says these methods are hard to scale to long prompts.
- Suffixes and filtering: RPO (Zhou et al., 2024) optimizes a universal defense suffix; IBProtector (Liu et al., 2024b) trains a small model to filter tokens by information bottleneck. Appendix A also mentions Semantic Smoothing and says input-space methods are often insufficient on long, complex prompts.
- Safety prompts: the introduction classifies the safety prompts of Xie et al. (2023) and Kim et al. (2024), along with suffix optimization, as context-level defenses, saying they are still easily overwritten by instructions.
Latent-space defenses
- Circuit Breaker (Zou et al., 2024): pushes harmful activations into an orthogonal space while preserving benign activations as much as possible. Appendix E says it defends strongly against multiple attacks and has some robustness to representation-level attacks; the paper cites Thompson and Sklar on over-refusal.
- Latent Adversarial Training (Sheshadri et al., 2024): searches latent space for perturbations that elicit harmful behavior and suppresses them.
- Refusal steering: CAST and Jailbreak-Antidote (Lee et al., 2024; Shen et al., 2024) use the refusal direction of Arditi et al. (2024) to steer activations toward refusal. Appendix A says latent-space defenses are usually less interpretable, control may be suboptimal with high degrees of freedom, and they cause high over-refusal and harm general utility.
Comparison setup
- Baseline methods: main experiments use RPO, Circuit Breaker, LAT, IBProtector, and MoGU; the ablation uses RDP without intent extraction. Comparisons are limited to zero-shot defenses not trained on jailbreak samples, and each ensemble defense is evaluated only on the same LLM used or fine-tuned in its original work. Appendix G additionally compares with the LLM intent analysis of Zhang et al. (2025) (IA one pass / two pass).
- Benchmarks: HarmBench (300 prompts per attack); benign queries from AlpacaEval, Puffin, and TriviaQA (2,000 total); boundary over-refusal with OR-Bench (2,000 prompts); general capability with ARC-C, TruthfulQA, and GSM8K.
The authors position SENTINEL as an input-space defense that retains interpretability, claim its effectiveness is comparable to latent-space defenses with lower over-refusal, and describe the mechanism as jailbreak features returning from the alignment blind spot to the aligned region.
How does the paper address this problem?
Sliding-window matching of input and output, multi-threshold cleaning, then refusal-direction projection scoring, checking every 10 tokens.
SENTINEL turns defense into generation-time intent extraction: it aligns semantically close windows in the input and output, scores the extracted subsequences against a refusal direction, and stops generation if the threshold is exceeded. It does not modify model parameters.
Problem setup and matching objective
- Extraction target: input x has length m, output y has length n. The goal is to extract semantically consistent subsets xsub and ysub. The alignment constraint requires feature distance less than ε; the informativeness constraint requires length greater than η and shorter than the full text.
- Windowization: the authors say single tokens are too semantically isolated, so they switch to sliding context windows. Each window is assigned extraction probabilities p and q, optimized on the simplex.
- Practical objective: minp,q p⊤ Dμν q − α(p⊤ Dμμ p + q⊤ Dνν q). The first term is a surrogate upper bound on the cross-set Wasserstein distance; the second term enlarges within-group variance to prevent p and q from degenerating to one-hot. α trades off alignment precision against informativeness. Appendix C derives this upper bound.
- Solving: softmax over unnormalized scores, optimized with Adam for 5 steps. The implementation uses α=0.25.
Window features and token scores
- Windows: stride 1, with implementation lengths of 5, 10, and 15 to cover short- and long-range dependencies.
- Features: final-layer token hidden states, mean-pooled within each window and then L2-normalized.
- Aggregation: token score s_t is the average of the scores of windows covering that token. Figure 1 illustrates that optimization retains semantically close windows and removes most adversarial tokens.
Adaptive cleaning and deduplication
- Multiple thresholds: thresholds uniformly sampled from 0 to 1; tokens with score at least θ_i are retained, yielding candidates at different cleaning levels. The implementation uses 5 linearly spaced thresholds.
- Deduplication: greedy max-min by cosine similarity, keeping K mutually dissimilar subsequences, starting from the highest-importance candidate. The implementation uses K=2. Appendix B gives the procedure.
Refusal direction scoring
- Direction: for the target LLM, take the mean activation difference between paired harmful and benign data, normalize it, then select layer l* and position i* on a separate validation set to obtain the unit direction r̂. The paper does not name these datasets.
- Decision: srefusal=⟨ h(l∗)i∗,r̂⟩. Average over the K candidates and compare with threshold τ. τ is the mean of benign-data projections plus two standard deviations. The authors say this leaves roughly 97.5% of benign prompts unaffected by over-refusal; this is a threshold rule, not the measured FPR in Table 1.
Generation-time intervention
- Periodic checking: does not wait for the full output. Runs every 10 generated tokens, up to 10 times. If judged harmful, stops generation and appends a refusal.
- Overhead: Appendix H says the intent optimization itself typically takes under 0.1 seconds, with the bottleneck being the scoring forward pass. The authors claim theoretical overhead of under 10% of standard generation; Appendix H has a complexity comparison.
What experiments did the paper conduct?
The authors report ASR below 5% on weakly aligned models; not every cell in Table 1 is below the baseline.
Experimental Setup
- Target Models: Main tables use Llama2-7B, Llama3-8B, Mistral-7B-v0.2, Vicuna-7B. Implementation details mention vicuna-7b-v1.5; Appendix Table 4 also includes Llama3.1-8B and Qwen-2.5-14b. Checkpoints are pretrained models; SENTINEL does no additional fine-tuning.
- Attacks and Scale: 300 samples per attack on HarmBench. Attacks are GCG, AutoDAN, GPT-Fuzz, FewShot, PAIR, RADICAL, DSA.
- Baseline Configurations: RPO, CB, LAT, IBProtector, MoGU. Each defense is compared only on the same LLM used or fine-tuned in its original work, and limited to zero-shot defenses not trained on jailbreak samples. Thus, in Table 1, Llama2-7B and Vicuna-7B have IBProtector, MoGU, RPO; Llama3-8B has CB, LAT; Mistral-7B-v0.2 only has CB. Ablation baseline is RDP.
- Metrics and Evaluation: ASR uses a HarmBench fine-tuned Llama2-13B classifier; SR uses StrongReject fine-tuned Gemma-2B, with header labeled as percentage; FPR uses GPT-4, following the OR-Bench protocol. IPS is the AUROC of importance scores for key tokens relative to non-key tokens.
- Utility Data: 2,000 random benign queries from AlpacaEval, Puffin, TriviaQA; 2,000 random boundary questions from OR-Bench; also tested ARC-C, TruthfulQA, GSM8K.
- Implementation: Final layer residual stream; windows 5, 10, 15; Adam 5 steps; α=0.25; 5 thresholds; K=2; check every 10 tokens, up to 10 times; single A100 80GB. The paper does not report the number of repetitions.
Main Results
SENTINEL's FPR and ASR (%), according to Table 1. SR not listed.
Swipe horizontally to read the table
Model Benign FPR OR-Bench FPR GCG ASR PAIR ASR AutoDAN ASR Llama2-7B 3.05 34.02 5.66 2.33 0.00 Llama3-8B 3.09 29.70 0.67 1.66 0.67 Mistral-7B-v0.2 1.59 24.66 4.00 2.00 0.67 Vicuna-7B 2.05 20.76 6.00 7.33 2.67 - Authors' Summary: The abstract states that ASR is reduced to near 5%, and OR-Bench over-refusal is lower than methods with similar defense effectiveness. The introduction states that weakly aligned models like Mistral-7B-v0.2 are below 5%, and strongly aligned models like Llama-3-8B are near 3%. The main text states that it is generally on par with or better than compared defenses, with lower over-refusal.
- Not Lowest in Every Cell: For Llama2-7B FewShot, SENTINEL ASR is 4.33%, MoGU is 1.00%, IBProtector is 1.33%; for this model, OR-Bench FPR is higher than RPO's 23.45%. For Llama3-8B GPT-Fuzz, SENTINEL is 1.67%, CB and LAT are 1.00%; on AutoDAN, CB and LAT are 0.00%. For Mistral AutoDAN, CB is 0.00%; on RADICAL, CB is 2.33%, SENTINEL is 3.00%. Reverse gaps include Vicuna AutoDAN, where SENTINEL is 2.67% and MoGU is 29.67%.
- No Defense and Other Attacks: No-defense GCG ASR is Llama2-7B 44.00%, Llama3-8B 44.67%, Mistral 90.00%, Vicuna 81.67%. SENTINEL's RADICAL ASR is 1.33%, 0.67%, 3.00%, 1.00% respectively; DSA is 2.00%, 4.67%, 3.33%, 5.00% respectively. The authors state that DSA has low ASR without defense because models often struggle to understand split payloads, but fluent outputs still expose intent.
Intent Extraction and Separability
- Comparison: On vicuna-7b-v1.5 and Llama2-7B, compare context matching scoring with random scoring using GCG, AutoDAN, GPT-Fuzz. Refusal tendency uses log-likelihood of refusal phrases.
- Authors' Interpretation: Matching scoring IPS is often near 1, random scoring near 0.5, the latter often classifying jailbreaks as benign. Figure 3 has IPS on the x-axis and log-likelihood on the y-axis; scatter positions are not visible in text conversion.
- Comparison with RDP: The authors state that after extraction, jailbreak harm scores shift right, while benign and boundary change little. Figure 2 text lines (labeled Llama2-7B) give RDP to SENTINEL: GCG ASR 10.00 to 0.67, FewShot 6.33 to 1.67, PAIR 6.33 to 0.67, AutoDAN 0.00 to 0.00, GPTFuzz 9.33 to 0.00, Benign FPR 3.06 to 3.09, Boundary FPR 35.77 to 34.02. This line is inconsistent with Table 1's Llama2-7B SENTINEL (GCG ASR 5.66, Benign FPR 3.05). Legend is Benign, Boundary, Attack; curves not visible.
Mechanism and White-Box Adaptation
- Feature Redistribution: The authors state that Figure 4 on Vicuna-7B shows benign and harmful distributions in blue and red contours respectively; jailbreak points (called yellow in text) are in high-density regions far from the alignment region, extracted subsequences (called purple in text) return to the alignment region; OR-Bench subsequences mostly fall in benign regions. Point positions are not visible in text conversion.
- Only Requiring Compliant Start: Table 3 on VICUNA-7B-V1.5, 20 learnable positions. Compliance-only Ada-GCG has IPS 0.32, ASR 3.00, SR 3.49; Ada-AutoDAN has 0.14, 6.67, 5.71; Ada-GPTFuzz has 0.19, 3.67, 4.22. The authors state IPS drops, but outputs often go off-topic or garbled, and harmful behavior is not preserved.
- Also Requiring On-Topicness: Compliance + On-topicness Ada-GCG has IPS 0.96, ASR 4.33, SR 5.67; Ada-AutoDAN has 0.95, 5.33, 5.12; Ada-GPTFuzz has 0.96, 4.67, 4.85. The authors state behavior is preserved but intent is exposed, thus still resisting this adaptive attack.
Other Ablations and Analyses
- α: Appendix F on Vicuna-1.5 GCG and AutoDAN states that α=0 gives lowest FPR but not lowest ASR; α=0.25 gives lowest ASR and still low FPR. Figure 5 bar values are not reliably aligned, not transcribed.
- K and NumThresh: The authors state that K=2 gives lowest ASR and FPR; NumThresh=5 is better, setting to 10 does not further reduce ASR, doubles cost, and increases FPR.
- Table 2: Llama3-8B ARC-c from 60.75 to 58.54, TruthfulQA from 51.65 to 49.81, GSM8K from 68.69 to 66.37; Mistral GSM8K from 40.03 to 38.49. The authors state only small decreases.
- Table 4: Llama3.1-8B AutoDAN ASR, IA one pass 18.33, two pass 9.33, SENTINEL 0.33; GCG two pass 1.00, lower than SENTINEL's 2.33. Header Qwen-14B-2.5 GPT-Fuzz is 24.33, 13.00, 0.67. The authors state complex prompts can override analysis instructions; Appendix G gives examples.
- Figure 6 and Appendix I: The authors state IPS is 0.5 before optimization, GCG and AutoDAN near 1, GPT-Fuzz about 0.9 on Llama2 and 0.75 on Vicuna. Appendix I states GPT-Fuzz has lowest IPS, Vicuna more easily departs from original request to explain role-play.
- Time: Table 6 AutoDAN average length 1478, intent optimization 0.069 seconds, scoring 0.357 seconds; GCG scoring average 0.124 seconds. Appendix D states even longest prompts, single call within 1.5 seconds.
What are some points that can be further explored?
The authors state SENTINEL mainly operates in token space and suggest future work to do intent matching directly in representation space.
Limitations and Future Directions Noted by Authors
- Token Space: Section 6 states SENTINEL operates mainly in token space, possibly less expressive than continuous hidden representations.
- Why Not Hidden-Space Matching: Section 6 states hidden-space defenses always consider the entire context rather than hidden intent in input, and defining intent matching in representation space is non-trivial.
- Future Directions: Section 6 states future work could define intent matching directly in representation space to support broader defenses and deeper mechanism analysis.
The paper's limitations and future work are concentrated in Section 6, with no other shortcomings listed separately.
Experimental Coverage
- Models: Main tables use Llama2-7B, Llama3-8B, Mistral-7B-v0.2, Vicuna-7B; Appendix Table 4 also includes Llama3.1-8B and Qwen-2.5-14b. Implementation details mention mistral-7b-v2, Figure 7 mentions Mistral-7B-Instruct-v0.2, main table mentions Mistral-7B-v0.2; the paper does not clarify whether these are the same checkpoint.
- Attacks and Baselines: On HarmBench, GCG, AutoDAN, GPT-Fuzz, FewShot, PAIR, RADICAL, DSA, 300 each. Baselines only appear on the same LLM used or fine-tuned in their original work; Table 1 does not have all baselines for every model. Comparison limited to zero-shot defenses not trained on jailbreak samples.
- Utility and Evaluation: 2,000 benign queries total from AlpacaEval, Puffin, TriviaQA; 2,000 from OR-Bench; also ARC-C, TruthfulQA, GSM8K. ASR evaluation uses Llama2-13B classifier, SR uses Gemma-2B, FPR uses GPT-4.
- Adaptive and Hyperparameters: Table 3 adaptive attacks on Vicuna-7B-v1.5, full white-box access, 20 learnable positions, two L_beh. Appendix F hyperparameter analysis on Vicuna-1.5 GCG and AutoDAN. Generation checks every 10 tokens, up to 10 times.
- Unspecified Settings: The paper does not report number of repetitions, outer optimization steps for adaptive attacks, or names of harmful and benign datasets used to fit refusal direction.
Summarize the main content of the paper
SENTINEL extracts intent using input-output consistency and projects it onto the refusal direction, reducing the ASR of various attacks on HarmBench.
SENTINEL is a parameter-free generation-time jailbreak defense that extracts hidden intent using input-output semantic consistency and scores it.
- Problem: Complex prompts wrap harmful intent in adversarial context. The authors argue token perturbations are hard to scale to long prompts, safety prompts are easily overridden, and existing defenses rarely localize intent.
- Approach: Sliding window matching yields token importance, multi-threshold cleaning retains K=2 dissimilar subsequences, then projects onto a precomputed refusal direction. Stops writing when exceeding benign projection mean plus two standard deviations. Checks every 10 tokens, up to 10 times.
- Main Results: Table 1 Mistral-7B-v0.2 GCG ASR, no defense 90.00%, SENTINEL 4.00%; Llama3-8B SENTINEL GCG ASR 0.67%. Introduction states weakly aligned models below 5%, strongly aligned near 3%; abstract says near 5%. Same table Llama2-7B OR-Bench FPR, SENTINEL 34.02%, RPO 23.45%.
- Exceptions: Not every cell is below baseline. Llama2-7B FewShot, SENTINEL ASR 4.33%, higher than MoGU's 1.00%. Llama3-8B DSA, SENTINEL ASR 4.67%, not all fall near "3%".
- Other Evidence: Table 3 on Vicuna-7B-v1.5, on-topic adaptive Ada-GCG IPS 0.96, ASR 4.33%; when only requiring compliant start, IPS drops to 0.14–0.32, authors state outputs often off-topic. Table 2 Llama3-8B GSM8K from 68.69 to 66.37. The authors describe mechanism as: subsequences redistribute jailbreak features from alignment blind spots to alignment regions, thereby reactivating alignment.
Related papers
Show 3 more papers
- Exploring Jailbreak Vulnerability Across Depth-Based Dynamic Inference in Large Language ModelsAnalysis / interpretabilityarXiv