Bridging the Gap Between Harmfulness Belief and Refusal Behavior for Safety Alignment

Lu Zhang, Chen Feng, Qingzhuo Wang, Wen Shen, Zhihua WeiNeurIPS 2026

TL;DR

When a jailbreak tricks a Large Language Model (LLM) into giving a dangerous answer, the model usually still knows the request is harmful—that internal judgment just gets lost in transit before the model starts speaking. This paper introduces Bridging Harmfulness and Refusal (BHR), a lightweight training framework that wires the model's internal "harmfulness belief" directly to its "refusal decision." The result is near-zero attack success rates across tough jailbreaks without making the model overly paranoid on normal questions or adding any inference overhead.

What Problem Does This Paper Address?

Why do safety-aligned LLMs still fall for jailbreaks? To understand this, we have to look at where safety lives inside a chat model's token sequence.

When you send a prompt like "How to make a bomb," the chat template wraps your text in special boundary tokens. Recent mechanistic interpretability work revealed a surprising split:

  1. At the token closing the user's instruction ($t_{\text{inst}}$), the model's hidden states encode harmfulness belief—what the model thinks about the prompt.
  2. A few tokens later, right where the assistant's reply begins ($t_{\text{post}}$), the hidden states encode refusal behavior—what the model decides to say.
Figure 1: Token-position view of safety-relevant computation under a chat template. Using the Llama-3 template as the running example, the harmful prompt “How to make a bomb” is split into the user instruction, the assistant header, and the response (top row). Two boundary positions are highlighted: tinst (red, at <|eot_id|>) where the residual stream encodes the model’s harmfulness belief, and tpost (blue, at <|end_header_id|>) where it encodes the refusal decision. The dashed bridge marks the missing link this paper closes: belief at tinst does not reliably reach tpost, and BHR trains an explicit channel between them.

The authors discover a broken telephone game between these two positions. Even when an adversarial attack collapses the refusal signal at $t_{\text{post}}$, the model's internal harmfulness belief back at $t_{\text{inst}}$ remains rock-solid. Because standard safety training (like RLHF or DPO) mostly supervises surface outputs rather than internal information flow, that accurate early alarm fails to reach the decision point.

Figure 2: Three observations on Llama-3-8B-Instruct that motivate BHR. (a) At tinst, harmful (red) and harmless (blue) prompts separate cleanly; at tpost, the separation shifts to refuse (red) vs. accept (blue). (b) A linear probe trained on tinst hidden states (solid) loses substantial accuracy when applied at tpost (dashed); mean gap ¯∆= 0.374. (c) Normalized projections along vinst at tinst (blue) and along the refusal direction at tpost (red) on harmful HarmBench prompts: under GCG-T and RFA, belief stays near 1.0 while refusal collapses.

Methods

Instead of just using the $t_{\text{inst}}$ belief as an external guardrail filter at inference time, BHR bakes a structural bridge directly into the model's weights using a single LoRA adapter (which merges cleanly into the base model after training for zero added latency).

First, the authors extract frozen geometric "anchors" from the base model using a small reference set of harmful and benign prompts—specifically, the linear "harmfulness direction" ($v_{\text{inst}}$) at $t_{\text{inst}}$ and class centroids at both positions. Then, alongside standard next-token cross-entropy and a benign KL-divergence stability term, they train the adapter with three novel representation-level losses:

  • The Bridge Loss ($\mathcal{L}_{\text{bridge}}$): Forces the hidden state at $t_{\text{post}}$ to align with $v_{\text{inst}}$ on harmful prompts (and point away on benign ones). This builds a second, independent refusal pathway right at the response-start token.
  • The Belief Loss ($\mathcal{L}_{\text{bel}}$): Ensures that updating the shared LoRA weights doesn't corrupt the original harmfulness judgment back at $t_{\text{inst}}$.
  • The Belief-Gated Refusal Loss ($\mathcal{L}_{\text{ref}}$): Strengthens the conventional refusal direction at $t_{\text{post}}$, but multiplies the loss by a stop-gradient "gate" based on the model's own belief at $t_{\text{inst}}$. If a tricky benign prompt looks edgy on the surface, the model's calm internal belief dials down refusal training, preventing over-refusal.

Datasets

No new benchmarks are introduced; the authors combine established safety and utility suites:

  • Training (3,208 prompts): 860 harmful prompts from held-out splits of AdvBench and SORRY-Bench, paired with 2,348 GPT-4o-generated benign prompts (including XSTest-style "tricky" benign requests).
  • Safety Evaluation: HarmBench (159 non-copyright behaviors) tested against Direct requests and seven diverse jailbreaks (GCG-T, PAIR, AutoDAN, HumanJB, Refusal-Feature Ablation [RFA], Prefill, and CodeAttack), plus out-of-distribution checks on StrongREJECT and ISC-Bench.
  • Utility & Over-Refusal: MMLU (general knowledge), MT-Bench (conversational quality), and XSTest (compliance on safe-but-sensitive prompts).

Key Insights and Ideas

  • Redundancy defeats targeted attacks: Standard refusal relies on a single geometric direction at $t_{\text{post}}$. By carrying $v_{\text{inst}}$ forward, BHR creates two largely orthogonal safety channels at the decision point. Causal ablations prove that knocking out either channel leaves the model safe; an attacker has to wipe out both simultaneously to break through.
  • Training beats inference-time filtering: Prior work used $t_{\text{inst}}$ probes as an inference guardrail. When tested against CodeAttack (which wraps harmful requests in code), that static guardrail's failure rate jumped to 26.4%. Because BHR actively repairs and aligns representations during training, its CodeAttack failure rate on Llama-3 drops to 0.0%—with no thresholds to tune.
  • Two-sided bridging prevents paranoia: Safety defenses often trade robustness for annoying false refusals (like refusing to explain how to "kill a Python process"). Making the bridge bidirectional—actively pushing benign states away from the harmfulness vector—and gating refusal learning via internal belief keeps benign compliance intact.

Key Results

Tested primarily on Llama-3-8B-Instruct, Gemma-7B-IT, and Mistral-7B-Instruct-v0.2 (requiring ~4 hours on a single A800 GPU per model), BHR outperforms eight strong baselines including CircuitBreaker and DeepRefusal:

  • Near-zero jailbreak success: BHR hits 0.0% Attack Success Rate (ASR) on most attack cells, staying $\le 5\%$ across all attacks on Llama-3 and Gemma. It is the only defense to achieve 0.0% Prefill ASR across all three models.
  • Crushing white-box representation attacks: Against RFA—which directly erases the conventional refusal vector—BHR slashes ASR from 79.4% $\rightarrow$ 0.6% (Llama-3), 92.8% $\rightarrow$ 3.1% (Gemma), and 85.6% $\rightarrow$ 8.2% (Mistral).
  • Preserved capabilities: MMLU stays within 1 percentage point of the base models, and XSTest compliance stays within 0.4–1.2 percentage points (whereas heavy-handed baselines lose up to 12.4 points on Mistral). Extensions also confirm the method scales from 3B to 32B parameters and Mixture-of-Experts architectures.

Limitations and Future Work

BHR relies on one core precondition: the base model must already recognize that a prompt is harmful at $t_{\text{inst}}$.

  • Intent-hiding attacks: When prompts disguise malicious goals inside seemingly benign professional tasks (like ISC-Bench, where the base model's internal belief is right only 20.8% of the time), BHR's ASR remains high at 77.4%—though adding such examples to belief supervision drops it to 26.4%.
  • Weight tampering & direct $t_{\text{inst}}$ attacks: BHR assumes fixed weights at deployment (it is not designed to survive malicious fine-tuning), and directly ablating $t_{\text{inst}}$ breaks the belief, though doing so severely degrades the model's general capabilities.
  • Open frontiers: Adapting this bridge to reasoning models (where long chain-of-thought blocks shift the decision boundary), multimodal models (where visual inputs might bypass text beliefs), and preference optimization frameworks like DPO or GRPO remain exciting next steps.

Summary updated

Abstract

Many existing defenses mainly strengthen refusal behavior to improve the safety of LLMs. Recent interpretability work shows that, in safety-aligned LLMs, harmfulness belief and refusal behavior are represented separately in the hidden states at the last token of the user instruction ($t_{\mathrm{inst}}$) and the response-start token ($t_{\mathrm{post}}$), respectively. Based on it, we find that harmfulness belief is not reliably preserved when it is carried from the $t_{\mathrm{inst}}$ to the $t_{\mathrm{post}}$. As a result, even when the LLM internally recognizes a request as harmful, it may still produce a compliant response. To address this, we propose Bridging Harmfulness and Refusal (BHR), a training framework that bridges harmfulness belief and refusal behavior. Specifically, BHR trains the adapter so that harmfulness information is carried to the hidden state at the $t_{\mathrm{post}}$, thereby establishing a second pathway from harmfulness belief to refusal behavior. To keep this signal reliable during fine-tuning, we introduce two additional losses. A belief loss helps the LLM maintain an accurate harmfulness judgment at the $t_{\mathrm{inst}}$. A belief-gated refusal loss uses the LLM's harmfulness belief at $t_{\mathrm{inst}}$ to regulate refusal learning, making attacks that target refusal features less effective while reducing the risk of over-refusal on benign inputs. Experiments across multiple LLMs and safety benchmarks show that BHR substantially improves robustness against both white-box and black-box jailbreak attacks, reduces the risk of over-refusal on benign prompts, and preserves general capabilities.
BibTeX
@inproceedings{zhang2026bridging,
  author = {Lu Zhang and Chen Feng and Qingzhuo Wang and Wen Shen and Zhihua Wei},
  title = {{Bridging the Gap Between Harmfulness Belief and Refusal Behavior for Safety Alignment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=oNxj0lY1EY},
}
Figure