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:
- 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.
- 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.
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.
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