The Geometry of Safety Drifts: Step-level Refusal-Subspace Monitoring for Multi-Turn Jailbreak Prevention¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/llmnjust-afk/RsMon
Area: Safety
Keywords: Reasoning LLMs, Jailbreak Prevention, Refusal Subspace, Safety Drift, Geometric Intervention
TL;DR¶
RSMON exposes the temporal dynamics of refusal in reasoning LLMs, monitoring step-level residual activations projected onto a calibrated refusal subspace against a dynamic benign envelope and triggering a three-tier geometric intervention (re-projection, rollback, safe termination) that slashes jailbreak success rates by \(4.2\times\) without retraining or degrading mathematical and coding utility.
Background & Motivation¶
Reasoning large language models (RLLMs) such as DeepSeek-R1, OpenAI o-series, and Qwen3-Thinking variants achieve remarkable breakthroughs in mathematics, coding, and scientific deduction by generating extended, autoregressive chains of thought before delivering an answer. While this prolonged thinking phase was originally assumed to promote safer deliberation by allowing the model time to reflect, it also exponentially expands the attack surface: every intermediate reasoning token provides an adversarial entry point where the model can be biased, distracted, or persuaded. Recent red-teaming studies have weaponized this vulnerabilityโattacks like H-CoT, Chain-of-Thought Hijacking, and multi-stream perturbations demonstrate that injecting deceptive reasoning fragments causes the model's safety deliberation to collapse internally, yielding harmful responses to queries that the exact same model would firmly refuse in standard single-pass chat inference.
Conventional safety guardrails inherited from the chat alignment paradigm suffer from an intrinsic structural blind spot in the face of these reasoning-era jailbreaks. Input filters, output-side moderation classifiers, decoding-time constraints (e.g., SafeDecoding), and representation engineering defenses (e.g., Circuit Breakers) all model safety as an atomic, one-shot decision at the final forward pass or output boundary. In reasoning models that produce thousands of hidden thinking tokens, these defenses remain entirely unaware of the gradual, step-by-step subversion taking place within the chain of thought. By the time an external detector spots harmful output tokens, the model has already committed to an unsafe reasoning trajectory, rendering post-hoc interventions jarring, fragile, and often completely ineffective.
Overcoming this fundamental vulnerability requires looking directly inside the temporal evolution of intermediate representations during the thinking phase. Although recent mechanistic interpretability research has established that refusal behavior in chat models is mediated by low-dimensional linear refusal directions, their behavior across extended reasoning trajectories remained entirely unexplored. This paper uncovers a consistent three-regime structure along reasoning trajectories (sharp initial onset, gentle utility drift during benign problem solving, and an abrupt geometric collapse prior to harmful output emission on hijacked traces). Core idea: track step-level projections of intermediate hidden states onto a calibrated refusal subspace against a dynamic benign envelope, triggering an inference-time three-tier geometric intervention (re-projection, rollback, and hard refusal) at the earliest moment of safety collapse to achieve proactive, retraining-free jailbreak prevention.
Method¶
Overall Architecture¶
RSMON (Refusal-Subspace Monitor) is an entirely training-free, inference-time monitoring and intervention pipeline designed for open-weight reasoning architectures. Its operational pipeline comprises four synchronized stages: residual hidden state extraction, refusal subspace projection, persistent anomaly detection against a dynamic envelope, and a three-tier progressive geometric intervention engine.
During autoregressive reasoning token generation (\(t_1, \dots, t_T\)), RSMON extracts intermediate residual-stream hidden states \(h_t^{(\ell^\star)}\) at a single calibrated transformer layer \(\ell^\star\). The hidden vector is projected onto a low-rank, orthonormal refusal subspace matrix \(R\), calculating the scalar projection norm \(\rho_t\) at step \(t\). This value is evaluated against an empirically calibrated, step-dependent benign envelope threshold \(\underline{\rho}_t\). If the projection drops persistently below the lower boundary across \(\Delta\) consecutive thinking steps, RSMON diagnoses a safety collapse and triggers its tiered intervention engineโescalating from minimally invasive residual re-projection, to controlled prefix-guided rollback, to definitive safe refusal terminationโsafely steering the reasoning trajectory back into the benign regime with negligible computational overhead.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400, 'subGraphTitleMargin': {'top': 8, 'bottom': 16}}}}%%
flowchart TD
A["User Prompt & Autoregressive Thinking Trace<br/>t1, t2, ..., tT"] --> B["Hidden State Extraction at Layer โ*<br/>Sample Residual Stream ht"]
B --> C["Projection onto Refusal Subspace R<br/>Compute Scalar Norm ฯt"]
C --> D["Drift Monitoring vs. Benign Envelope<br/>Compare with Step-Dependent Lower Bound"]
D --> E{"Persistent Drift for ฮ Steps?<br/>ฯt < ฮผt - ฮฑฯt"}
E -->|No Drift / Benign| F["Continue Normal Generation<br/>Normal Reasoning Output"]
E -->|Drift Detected / Collapse| G["Three-Tier Intervention Engine<br/>Progressive Geometric Steer"]
subgraph G["Three-Tier Intervention Engine"]
direction TB
G1["Tier 1: Subspace Re-projection<br/>Additive Edit onto ht"] --> H1{"Envelope Restored?"}
H1 -->|Yes| R1["Resume Unaltered Deliberation"]
H1 -->|No / Repeat Fire within W Steps| G2["Tier 2: Controlled Rollback with Prefix<br/>Revert to t-ฮบ & Append 'Wait...'"]
G2 --> H2{"Safety Deliberation Recovered?"}
H2 -->|Yes| R2["Continue Safe Reasoning to Answer"]
H2 -->|No / Persistently Hijacked| G3["Tier 3: Safe Refusal Termination<br/>Early Exit with Refusal Template"]
end
R1 --> OUT["Safe Compliant or Refusing Response<br/>Final Output Generation"]
R2 --> OUT
G3 --> OUT
Key Designs¶
1. Multi-Dimensional Refusal Subspace Calibration: Capturing orthogonal harm vectors beyond single-direction limitations
Prior works in chat alignment typically model refusal as a one-dimensional linear vector in activation space. However, such single-vector formulations fail to span the diverse, mutually orthogonal geometries associated with distinct categorical harms such as CBRN weapons, cyberattacks, and systemic harassment. RSMON addresses this by calibrating a rank-\(k\) orthonormal refusal subspace matrix \(R \in \mathbb{R}^{d \times k}\) (\(k=4\) by default) extracted from a compact held-out corpus of \(N=512\) paired harmful/benign prompts from HarmBench and SALAD-Bench. For the model-specific critical layer \(\ell^\star\) identified via validation linear probe accuracy (Layer 18 for DeepSeek-R1-Distill-Qwen-7B, Layer 21 for Qwen3-8B-Thinking, and Layer 38 for QwQ-32B), mean activations over the initial thinking window \(\tau_0=8\) steps are collected, and the top-\(k\) principal components of the difference matrix form the basis \(R\). At any intermediate reasoning step \(t\), the refusal projection magnitude is computed as: $\(\rho_t^{(\ell^\star)} = \|R^\top h_t^{(\ell^\star)}\|_2\)$ This scalar sequence generates the Refusal-Subspace Drift Curve, isolating the strength of safety deliberation along the reasoning trajectory while leaving orthogonal, task-essential dimensions untouched.
2. Benign Envelope and Drift Detector: Filtering natural utility drift while pinpointing pre-emission collapse steps
During complex benign problem solving (such as advanced mathematics or competitive programming), attention shifts naturally toward domain-specific computation, causing the projection magnitude \(\rho_t\) to experience a gradual decay termed "utility drift." Enforcing a static global threshold would trigger massive false alarms on difficult benign prompts. RSMON profiles benign reasoning runs across MATH, GPQA, and instruction-following corpora, calculating the empirical mean \(\mu_t\) and standard deviation \(\sigma_t\) at each thinking step \(t\) to establish a per-step dynamic lower envelope: $\(\underline{\rho}_t^{(\ell^\star)} = \mu_t - \alpha \sigma_t\)$ The detector triggers an alarm only when the projection falls below this safety boundary for \(\Delta\) consecutive steps: $\(\rho_t^{(\ell^\star)} < \underline{\rho}_t^{(\ell^\star)} \quad \text{for } \Delta \text{ consecutive steps}\)$ Setting \(\alpha=2\) and \(\Delta=2\) keeps the false-positive rate on benign trajectories strictly bounded below 1%. More crucially, on attacked traces, this criterion detects the abrupt geometric collapse at an identifiable step \(t^\star\) that consistently precedes the generation of any harmful answer token by several steps, providing a vital lead-time window for intervention.
3. Three-Tier Intervention Engine: Deterministic, minimally invasive geometric steering
Rather than instantly aborting execution upon anomaly detection at step \(t^\dagger\), RSMON enforces a progressive, deterministic three-tier hierarchy designed to resolve threats with minimal computational perturbation. The primary intervention is Tier 1: Subspace Re-projection, which applies a single bounded additive edit to the residual stream:
$\(h_{t^\dagger}^{(\ell^\star)} \leftarrow h_{t^\dagger}^{(\ell^\star)} + \beta R R^\top \bar{h}_{t^\dagger}\)$
where \(\bar{h}_{t^\dagger}\) is the benign-mean activation vector and \(\beta\) is the minimal positive scalar needed to push \(\rho_{t^\dagger}\) back above the envelope boundary \(\underline{\rho}_{t^\dagger}\). If an adversarial hijack is too aggressive and triggers a secondary firing within a window of \(W=16\) steps, the engine escalates to Tier 2: Controlled Rollback, truncating the generation context back to step \(t^\dagger - \kappa\) (\(\kappa=4\)) and appending a refusal-priming token ("Wait, ...") to re-trigger the model's intrinsic safety deliberation. If the rolled-back deliberation is flagged yet again, the system defaults to Tier 3: Safe Refusal Termination, halting the thinking process immediately and returning a standardized refusal. Empirical breakdowns confirm that Tier 1 alone successfully resolves over 71% of all jailbreak attacks without discarding generated context.
Benchmark & Evaluation Protocol¶
Evaluations are conducted across three representative open reasoning models (DeepSeek-R1-Distill-Qwen-7B, Qwen3-8B-Thinking, and QwQ-32B-Preview) spanning 7B to 32B parameters. Jailbreak resilience is evaluated on HarmBench (159 functional behaviors) across five state-of-the-art attack paradigms: Chain-of-Thought Hijacking, H-CoT, Faster-GCG, Persuasion, and Simple Adaptive Attack, cross-verified with SALAD-Bench and JBDistill. To prevent single-shot evaluation bias, evaluations follow a rigorous stability protocol across 5 random seeds and 3 temperatures (\(T \in \{0.0, 0.6, 1.0\}\)) using paired bootstrap significance testing (\(B=10,000\) resamples). Utility preservation is concurrently benchmarked on MATH-500, GPQA-Diamond, HumanEval, and MT-Bench.
Key Experimental Results¶
Main Results¶
The table below presents the attack success rate (ASR %, lower is better) on HarmBench across five attack paradigms, averaged across the three reasoning models and 5 evaluation seeds (95% bootstrap halfwidths range from 1.28 to 2.03 ASR points).
| Defense Approach | CoT-Hijacking | H-CoT | Faster-GCG | Persuasion | Simple Adaptive | Paradigm Type |
|---|---|---|---|---|---|---|
| No Defense | 85.3% | 84.9% | 79.9% | 72.3% | 78.2% | Baseline Model |
| System Prompt | 78.6% | 74.3% | 62.7% | 48.3% | 65.8% | In-Context Prompting |
| Gradient Cuff | 73.8% | 70.1% | 29.7% | 57.5% | 46.8% | Input-Side Filter |
| Circuit Breakers | 59.3% | 56.8% | 27.3% | 44.7% | 44.0% | Final Representation Edit |
| Layer-Specific Editing | 62.9% | 66.5% | 34.4% | 49.3% | 48.6% | Offline Weight Editing |
| In-Context Demos | 64.3% | 56.9% | 55.3% | 36.2% | 57.0% | Few-Shot Alignment |
| Proactive Defense | 50.4% | 52.1% | 37.7% | 34.1% | 37.1% | Multi-Turn Drift Guard |
| RSMON (Ours) | 11.5% | 15.4% | 21.3% | 22.4% | 25.4% | Training-Free Step Monitor |
| REALSAFE-R1 (Topline) | 20.0% | 26.1% | 22.0% | 18.7% | 25.7% | Fine-Tuning Alignment |
The evaluation of utility preservation across four standard reasoning and instruction-following benchmarks is summarized below:
| Defense Approach | MATH-500 (Acc %) | GPQA-Diamond (Acc %) | HumanEval (Pass@1 %) | MT-Bench (Score) | Utility Summary |
|---|---|---|---|---|---|
| No Defense | 58.5% | 41.6% | 71.3% | 7.22 | Unperturbed Utility |
| Circuit Breakers | 57.4% | 40.5% | 70.0% | 7.09 | Slight Degradation |
| In-Context Demos | 56.7% | 39.9% | 68.5% | 6.92 | Context Budget Degradation |
| RSMON (Ours) | 57.8% | 41.5% | 70.6% | 7.14 | No Statistically Significant Drop |
Ablation Study¶
Ablation investigations conducted on DeepSeek-R1-Distill-Qwen-7B against Chain-of-Thought Hijacking isolate the impact of individual architectural choices:
| Configuration / Ablation Variant | CoT-Hijacking ASR (%) | Shift vs. Default | Key Observation |
|---|---|---|---|
| Default Full RSMON (\(k=4, \alpha=2, \Delta=2\)) | 13.96% | 0.00% | Optimal safety-utility trade-off |
| Subspace Dimension \(k=1\) (Single Direction) | 29.69% | +15.73% | Insufficient to cover diverse harm modes |
| Subspace Dimension \(k=2\) | 19.12% | +5.16% | Partial coverage of cross-category harms |
| Subspace Dimension \(k=8\) | 14.59% | +0.63% | Rank capacity saturates past \(k=4\) |
| Without Tier 2 Rollback (Re-projection Only) | 21.36% | +7.40% | Escalation needed on strong hijack attacks |
| Layer Perturbation (\(\ell^\star \pm 3\) Blocks) | 14.49% | +0.53% | Flat performance across middle-to-late blocks |
| Cross-Model Subspace Transfer (7B to 8B) | 16.66% | +2.70% | High transferability with minor domain shift |
Key Findings¶
- Dominance Over Training-Free Baselines: On reasoning-specific attacks (CoT-Hijacking and H-CoT), RSMON lowers ASR by more than \(3.5\times\) compared to the strongest training-free baseline, Circuit Breakers (dropping from 59.3% to 11.5% on CoT-Hijacking and 56.8% to 15.4% on H-CoT). Remarkably, it outperforms the fully retrained REALSAFE-R1 model without modifying a single model weight.
- Large Pre-Emission Lead Time Margin: The collapse detection step \(t^\star\) consistently leads the generation of the first harmful output token by a substantial margin (median lead time of 6.14 thinking steps on CoT-Hijacking and 5.41 steps on H-CoT). This buffer enables Tier 1 residual re-projection to resolve 71.6% of all attacks cleanly, with only 9.0% escalating to hard refusal termination.
- Negligible Utility Cost: Across MATH-500, GPQA, and HumanEval, performance drops are bounded within 0.7 percentage points, with drops on MATH and GPQA showing no statistical significance (\(p=0.34\) and \(p=0.71\), respectively). MT-Bench drops by less than 0.08 points, confirming that the dynamic envelope prevents broad helpfulness degradation.
- Heavy Fidelity Tax Under Adaptive Attack: When an adaptive adversary explicitly optimizes perturbations to keep the drift curve within the benign envelope, ASR increases to 23.8% on CoT-Hijacking; however, human auditing reveals that 38.3% of these successful jailbreaks produce incoherent or off-topic responses, indicating a severe utility and fidelity tax imposed on the attacker.
Highlights & Insights¶
- Temporal Refusal Dynamics in Latent Space: The work shifts the paradigm of safety representation engineering from static single-token snapshots to continuous trajectory dynamics, formalizing the Refusal-Subspace Drift Curve as an intuitive, mathematically grounded probe into model deliberation.
- Minimally Invasive Tiered Escalation: By pairing geometric re-projection with contextual rollback and refusal priming, RSMON harnesses the model's own innate reasoning ability to correct its course, circumventing the blunt all-or-nothing censorship of traditional guardrails.
- Model-Agnostic Safety Diagnostic: The drift curve functions simultaneously as an audit-ready diagnostic primitive, capable of revealing the exact token step and transformer layer where safety conviction collapsedโregardless of deceptive compliance in the overt reasoning text.
Limitations & Future Work¶
- Requirement for White-Box Residual Access: RSMON requires read and write access to internal transformer hidden layers, making it directly inapplicable to proprietary closed-source APIs (such as OpenAI o1/o3 or Gemini Thinking) without server-side support.
- Risk of Orthogonal Subspace Evasion: Advanced white-box adversaries with full gradient access could theoretically craft jailbreak strategies that deliberate exclusively within the orthogonal complement of the calibrated refusal subspace.
- Single-Language Focus: Calibration and evaluations were conducted predominantly in English; validating whether drift curve geometry remains strictly invariant across low-resource languages and cross-lingual obfuscation remains an open question for future work.
Related Work & Insights¶
- vs. Circuit Breakers (Zou et al., 2024): Circuit Breakers intervenes solely on the final representation output after reasoning has finished, missing the interior reasoning collapse entirely. RSMON acts in real time during the thinking phase.
- vs. SafeDecoding (Xu et al., 2024a): SafeDecoding adjusts token output distributions at decoding time via safety-aware probability shifts, imposing significant token generation latency. RSMON intervenes geometrically at \(O(kd)\) overhead per step.
- vs. REALSAFE-R1 (Zhang et al., 2025b): REALSAFE-R1 relies on costly safety-aligned reinforcement learning fine-tuning. RSMON is completely training-free, complementary, and can be stacked directly on top of fine-tuned models for compounded robustness.
Rating¶
- Novelty: โญโญโญโญโญ Formulates the first comprehensive characterization of temporal refusal dynamics in long-chain reasoning models and devises an elegant step-level geometric monitoring framework.
- Experimental Thoroughness: โญโญโญโญโญ Rigorously tested across 3 open reasoning models, 5 attack paradigms, 4 diverse utility benchmarks, with multi-seed bootstrap confidence intervals and adaptive threat modeling.
- Writing Quality: โญโญโญโญโญ Lucid narrative structure, mathematically precise formulations, compelling geometric visualizations, and disciplined ablation breakdowns.
- Value: โญโญโญโญโญ Provides an immediate, production-viable, and compute-efficient defense mechanism for open-source reasoning models without sacrificing multi-step deductive capabilities.