HMNS: Achieving mechanism-level jailbreak through attention head masking and null-space injectionJailbreaking the Matrix: Nullspace Steering for Controlled Model Subversion
Translation in progress — untranslated text is omitted.
The researchers propose Head-Masked Nullspace Steering (HMNS), a jailbreak method that directly intervenes in the model's internal computation at inference time: first, use KL divergence attribution to find the attention heads that most influence the model's default behavior, mask their output projections, then inject perturbations into the orthogonal complement of the masked subspace, and repeat this process in a closed loop during decoding. On four benchmarks—AdvBench, HarmBench, JBB-Behaviors, and StrongReject—across three models—LLaMA-2-7B-Chat, Phi-3-Medium-4K-Instruct, and LLaMA-3.1-70B—the authors report that HMNS achieves the highest attack success rate under six defenses, with an average of about 2 queries, roughly 3.5 to 4 times fewer than strong baselines. The paper also proposes compute-normalized metrics such as forward-equivalent pass (FEP), reporting about 0.53 trillion FLOPs per success and 6.1 seconds latency on LLaMA-3.1-70B.
- Large language models still face jailbreak risks after safety alignment, and existing prompt-based attack methods mostly stay at the input surface, often requiring multiple queries, easily failing under strong defenses, and lacking explainability of the model's internal computational mechanisms.
- The authors propose HMNS, which at inference time locates the causal attention heads that dominate refusal via KL divergence, dynamically zeroes out blocks of their output projection columns, and injects adaptively scaled perturbation vectors into the orthogonal complement space, forming a closed-loop adaptive intervention.
- On 4 safety benchmarks and 3 models, HMNS's ASR exceeds the second-best baseline by 5–6 percentage points with ACQ maintained at about 2; it remains leading under 6 defenses, and under computational alignment its FLOPs and latency both match prompt baselines.
- The authors note that the method incurs runtime overhead on large models, and downstream unmasked components may still respond to perturbations; the experiments mainly cover six open-source models and single-step prompts, and were not tested on closed-source commercial models.
The paper shifts jailbreaking from the prompt level to the attention head level, and provides a compute-normalized metric, which can be used by red teams and defenders to evaluate mechanism-level attacks.
Related papers
- Where Is Rank-1 DiM Refusal Intervenable in Multimodal LM Derivatives?Analysis / interpretabilityarXiv