Jailbreaking the Matrix: Nullspace Steering for Controlled Model Subversion
Organizations: Department of Computer & Information Science & Engineering, University of Florida, Gainesville, FL 32611, USA · School of Computer Science, University of Oklahoma, Norman, OK 73019, USA · Computer Science Laboratory, SRI International, Menlo Park, CA 94025, USA
Abstract
Large language models remain vulnerable to jailbreak attacks -- inputs designed to bypass safety mechanisms and elicit harmful responses -- despite advances in alignment and instruction tuning. We propose Head-Masked Nullspace Steering (HMNS), a circuit-level intervention that (i) identifies attention heads most causally responsible for a model's default behavior, (ii) suppresses their write paths via targeted column masking, and (iii) injects a perturbation constrained to the orthogonal complement of the muted subspace. HMNS operates in a closed-loop detection-intervention cycle, re-identifying causal heads and reapplying interventions across multiple decoding attempts. Across multiple jailbreak benchmarks, strong safety defenses, and widely used language models, HMNS attains state-of-the-art attack success rates with fewer queries than prior methods. Ablations confirm that nullspace-constrained injection, residual norm scaling, and iterative re-identification are key to its effectiveness. To our knowledge, this is the first jailbreak method to leverage geometry-aware, interpretability-informed interventions, highlighting a new paradigm for controlled model steering and adversarial safety circumvention.
Figures & tables
| Model / Method | AdvBench | HarmBench | JBB-Behaviors | StrongReject | ||||
|---|---|---|---|---|---|---|---|---|
| ASR | ACQ | ASR | ACQ | ASR | ACQ | ASR | ACQ | |
| LLaMA-2-7B-Chat | ||||||||
| Foot-In-The-Door (FITD) | 44.00 / 38.00 | 16.20 | 41.30 / 36.10 | 16.80 | 45.10 / 39.20 | 15.90 | 38.70 / 33.40 | 17.10 |
| AutoDAN | 72.60 / 66.20 | 12.80 | 69.10 / 63.20 | 13.10 | 73.40 / 67.50 | 12.50 | 66.20 / 60.40 | 13.60 |
| ArrAttack | 92.00 / 87.00 | 7.50 | 90.00 / 86.00 | 7.90 | 93.00 / 88.00 | 7.30 | 88.00 / 89.09 | 8.00 |
| Many-shot JB (MSJ) | 64.80 / 58.90 | 10.90 | 62.20 / 56.70 | 11.40 | 66.00 / 60.10 | 10.60 | 58.30 / 53.10 | 11.80 |
| Variant | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|
| HMNS (Full) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Remove masking (Projection-only) | 89.5 / 84.0 | 2.4 | 30 | 0.61 | 7.1 |
| Remove projection (Mask-only) | 87.9 / 82.2 | 2.3 | 29 | 0.55 | 6.3 |
| Inject direct dir. (Direct– , no nullspace) | 88.7 / 83.1 | 2.5 | 32 | 0.63 | 7.2 |
| No re-identification (freeze top– at ) | 90.2 / 85.0 | 2.7 | 24 | 0.60 | 7.0 |
| Random– head selection | 81.4 / 76.0 | 2.2 | 32 | 0.56 | 6.7 |
| Method | IPC | FPS (×10 12 ) | LPS (s) |
|---|---|---|---|
| AutoDAN | 0 | 0.44 | 5.2 |
| ArrAttack | 0 | 0.62 | 6.7 |
| Many-shot JB | 0 | 0.91 | 8.0 |
| PrisonBreak | 0 | 0.98 | 8.9 |
| HMNS (Ours) | 32 | 0.53 | 6.1 |
| Attack / Defense | SMO | DPP | RPO | PAR | PAT | SAF | Avg |
|---|---|---|---|---|---|---|---|
| LLaMA-2-7B-Chat (AdvBench) | |||||||
| FITD | 10.0 / 7.0 | 12.0 / 9.0 | 20.0 / 14.0 | 14.0 / 10.0 | 12.0 / 8.0 | 11.0 / 7.0 | 13.2 / 9.2 |
| AutoDAN | 15.0 / 11.0 | 24.0 / 18.0 | 38.0 / 28.0 | 28.0 / 20.0 | 22.0 / 16.0 | 18.0 / 12.0 | 24.2 / 17.5 |
| ArrAttack | 34.0 / 22.0 | 48.0 / 36.0 | 74.0 / 55.0 | 58.0 / 41.0 | 42.0 / 30.0 | 40.0 / 29.0 | 49.3 / 35.5 |
| Tempest | 26.0 / 19.0 | 42.0 / 31.0 | 68.0 / 50.0 | 52.0 / 38.0 | 36.0 / 25.0 | 33.0 / 24.0 | 42.8 / 31.2 |
| HMNS (Ours) | 40.0 / 25.0 | 54.0 / 41.0 | 82.0 / 61.0 | 64.0 / 45.0 | 48.0 / 33.0 | 47.0 / 34.0 | 55.8 / 39.8 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Model / Method | AdvBench | HarmBench | JBB-Behaviors | StrongReject | ||||
|---|---|---|---|---|---|---|---|---|
| ASR | ACQ | ASR | ACQ | ASR | ACQ | ASR | ACQ | |
| Mistral-7B-Instruct-v0.2 | ||||||||
| FITD | 42.0 / 36.5 | 16.4 | 39.5 / 34.1 | 16.9 | 43.2 / 37.6 | 15.8 | 36.8 / 31.7 | 17.2 |
| AutoDAN | 70.8 / 64.6 | 12.7 | 67.2 / 61.3 | 13.1 | 71.6 / 65.5 | 12.2 | 64.9 / 59.4 | 13.5 |
| ArrAttack | 91.1 / 86.2 | 7.6 | 89.2 / 84.7 | 7.8 | 92.4 / 87.5 | 7.4 | 87.1 / 82.9 | 8.1 |
| HMNS (Ours) | 97.4 / 92.5 | 2.0 | 95.3 / 90.7 | 2.1 | 98.2 / 93.1 | 1.9 | 93.0 / 88.4 | 2.2 |
| AdvBench | HarmBench | JBB-Behaviors | StrongReject | |
|---|---|---|---|---|
| Method | Fluency | Toxicity (score) | Toxicity (rate) |
|---|---|---|---|
| FITD | |||
| AutoDAN | |||
| ArrAttack | |||
| Tempest | |||
| HMNS (ours) |
| Method | Metric | SMO | DPP | RPO | PAR | PAT | SAF |
|---|---|---|---|---|---|---|---|
| ArrAttack | FPS (×10 12 ) | 1.12 | 1.35 | 1.88 | 1.47 | 1.21 | 1.19 |
| LPS (s) | 10.2 | 11.4 | 14.8 | 12.5 | 10.7 | 10.6 | |
| ACQ | 26.8 | 32.0 | 44.5 | 36.7 | 29.2 | 28.9 | |
| HMNS (Ours) | FPS (×10 12 ) | 0.74 | 0.85 | 1.09 | 0.89 | 0.76 | 0.78 |
| LPS (s) | 7.1 | 7.8 | 9.5 | 8.3 | 7.0 | 7.3 | |
| ACQ | 2.1 | 2.1 | 2.2 | 2.2 | 2.1 | 2.3 |
| Variant (14B / AdvBench) | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|
| HMNS (Full) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Remove masking (Projection-only) | 89.5 / 84.0 | 2.4 | 30 | 0.61 | 7.1 |
| Remove projection (Mask-only) | 87.9 / 82.2 | 2.3 | 29 | 0.55 | 6.3 |
| Inject direct function dir. (Direct– , no nullspace) | 88.7 / 83.1 | 2.5 | 32 | 0.63 | 7.2 |
| No re–identification (freeze top– from ) | 90.2 / 85.0 | 2.7 | 24 | 0.60 | 7.0 |
| Random– head selection | 81.4 / 76.0 | 2.2 | 32 | 0.56 | 6.7 |
| Attribution Variant | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|
| KL-div (global- , proxy+exact, batched) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Target-logit drop | 91.0 / 85.9 | 2.4 | 26 | 0.54 | 6.3 |
| Confidence drop (max-logit change) | 89.2 / 84.3 | 2.6 | 24 | 0.51 | 6.1 |
| Entropy change | 88.5 / 83.2 | 2.7 | 23 | 0.49 | 6.0 |
| Exact-only (no proxy preselection) | 96.7 / 92.0 | 2.1 | 78 | 0.84 | 9.7 |
| Serial masking (vs batched) | 96.7 / 92.0 | 2.1 | 32 | 0.71 | 8.5 |
| Category | Variant | Metric : Value |
|---|---|---|
| Reference | HMNS (Full) | ASR (F/G4): 96.8 / 92.1 ; ACQ: 2.1 ; IPC: 32; FPS: 0.58 ; LPS: 6.8 |
| Orthogonality tol. | (ref) | ASR: 96.8 / 92.1; ACQ: 2.1; IPC: 32; FPS: 0.58; LPS: 6.8 |
| ASR: 95.9 / 91.2; ACQ: 2.1; IPC: 32; FPS: 0.57; LPS: 6.7 | ||
| ASR: 94.0 / 89.5; ACQ: 2.2; IPC: 32; FPS: 0.56; LPS: 6.6 | ||
| Resampling budget | 0 | ASR: 93.1 / 88.2; ACQ: 2.3; IPC: 31; FPS: 0.56; LPS: 6.6 |
| 1 | ASR: 95.4 / 90.6; ACQ: 2.2; IPC: 32; FPS: 0.57; LPS: 6.7 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
| Reference | HMNS (Full) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Top- | 92.4 / 87.7 | 2.3 | 24 | 0.50 | 6.2 | |
| Top- | 95.0 / 90.3 | 2.2 | 28 | 0.55 | 6.6 | |
| Top- | 96.2 / 91.5 | 2.1 | 30 | 0.57 | 6.7 | |
| Top- | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 | |
| Top- | 96.9 / 92.0 | 2.2 | 36 | 0.62 | 7.1 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|---|
| Reference | bf16 + TF32 on | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Model dtype | fp16 (no loss-scaling) | 95.9 / 91.0 | 2.2 | 32 | 0.58 | 6.7 |
| Model dtype | fp16 (+ static loss-scaling) | 96.5 / 91.8 | 2.2 | 32 | 0.58 | 6.8 |
| Model dtype | fp32 | 96.9 / 92.3 | 2.1 | 32 | 0.62 | 7.5 |
| TF32 matmul | off (bf16) | 96.7 / 92.0 | 2.1 | 32 | 0.60 | 7.1 |
| Quantization | INT8/AWQ (act-side mask) | 96.2 / 91.5 | 2.1 | 32 | 0.57 | 6.7 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
| Reference | Adaptive (multi-layer), final-only | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Layer policy | Early-only layers | 90.7 / 85.5 | 2.3 | 28 | 0.54 | 6.5 |
| Layer policy | Mid-only layers | 94.8 / 90.1 | 2.2 | 30 | 0.56 | 6.7 |
| Layer policy | Late-only layers | 96.1 / 91.5 | 2.1 | 31 | 0.57 | 6.7 |
| Layer policy | Adaptive (top- global) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Token position | final + (T 1) | 97.0 / 92.3 | 2.1 | 33 | 0.60 | 7.1 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|---|
| Reference | Chat template: on | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Chat template | off (raw prompt) | 94.2 / 89.6 | 2.3 | 32 | 0.58 | 6.9 |
| Tokenizer | space-prefix on | 96.6 / 91.9 | 2.1 | 32 | 0.58 | 6.8 |
| Tokenizer | strict BOS/EOS | 96.8 / 92.2 | 2.1 | 32 | 0.58 | 6.7 |
| Defense | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
| None | baseline | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Single | SMO | 95.6 / 90.8 | 2.1 | 33 | 0.59 | 6.9 |
| Single | DPP | 95.2 / 90.2 | 2.2 | 33 | 0.60 | 7.0 |
| Single | RPO | 93.8 / 88.7 | 2.2 | 34 | 0.62 | 7.2 |
| Single | PAR | 95.0 / 90.0 | 2.2 | 33 | 0.60 | 7.0 |
| Single | PAT | 94.0 / 89.0 | 2.2 | 34 | 0.62 | 7.2 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|---|
| Regime | FLOP-matched | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Regime | Latency-matched | 96.7 / 92.0 | 2.1 | 32 | 0.59 | 6.8 |
| Regime | ACQ-matched | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|---|
| Seeds | 3 | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Seeds | 5 | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Seeds | 10 | 96.9 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Grader | GPT4o (det.) | 96.8 / — | 2.1 | 32 | 0.58 | 6.8 |
| Grader | GPT-5 (det.) | — / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Fluency LM | LLaMA-2-7B (base) | (fluency baseline) | — | — | — | — |
| Category | Setting | ASR (Fuzz/G4) | ACQ | IPC | FPS | LPS (s) |
|---|---|---|---|---|---|---|
| Reference | HMNS (Full) | 96.8 / 92.1 | 2.1 | 32 | 0.58 | 6.8 |
| Shuffle heads | Permute head IDs (same ) | 84.3 / 79.1 | 2.3 | 32 | 0.59 | 6.9 |
| Random inject | Random unit vec. (no projection) | 82.7 / 77.4 | 2.3 | 32 | 0.59 | 6.9 |
| Random mask | Mask random slices (size-matched) | 83.5 / 78.0 | 2.2 | 32 | 0.58 | 6.8 |
| Iteration pair | (all heads) | Top- overlap (%) |
|---|---|---|
| 0.78 | 81 | |
| 0.74 | 78 | |
| 0.71 | 75 | |
| 0.63 | 68 |
| Failure mode | Share | Example behavior (paraphrased) |
|---|---|---|
| Distributed safety | Compare several synthesis routes for an illegal drug and pick the easiest at home. | |
| Defense re-framing / deflection | Slightly edit a political article to favor an extremist group (often turned into high-level/meta discussion). | |
| Other / model-specific | Long, multi-step prompts mixing several harms where is sometimes insufficient. |
| Method | MHJ on -3-Medium-14B | MHJ on LLaMA-3.1-70B | ||
|---|---|---|---|---|
| ASR (%) | ACQ | ASR (%) | ACQ | |
| Defense-only | 4.8 | — | 3.2 | — |
| AutoDAN | 61.7 | 12.3 | 66.0 | 11.8 |
| ArrAttack | 81.0 | 7.5 | 85.3 | 7.2 |
| Tempest | 76.2 | 9.4 | 81.1 | 9.1 |
| HMNS (Ours) | 91.6 | 2.1 | 95.2 | 2.0 |
| Attack | ASR (%) GPT-4o | ASR (%) GPT-5 |
|---|---|---|
| ArrAttack | 31.2 | 23.5 |
| Tempest | 27.8 | 21.0 |
| HMNS | 39.6 | 29.7 |