NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Unified Mechanistic Analysis of Knowledge- and Safety-Based Refusals

Yuri Son, Seunghee Kim, Hyuhng Joon Kim, Taeuk KimarXiv 2026

TL;DR

When a Large Language Model (LLM) responds with "I cannot answer the question," is it because it genuinely doesn't know the answer, or because the prompt violates a safety policy? This paper reveals that both knowledge- and safety-based refusals share a common internal "refusal direction" in the model's early layers before branching into type-specific representations in later layers. The authors term this a commit-then-specify mechanism, showing that safety-based refusal signals are asymmetric and generalize much more strongly to knowledge gaps than vice versa.

What Problem Does This Paper Address?

LLMs are trained to refuse queries for two primary reasons:

  1. Knowledge-Based Refusal (KR): The request is outside the model's epistemic limits (e.g., asking for the phone number of a fictional character).
  2. Safety-Based Refusal (SR): The request violates normative or safety guidelines (e.g., asking for a real person's private phone number).
Overview of Knowledge-Based vs. Safety-Based Refusal

Historically, KR and SR have been studied in isolation—KR within the context of hallucination mitigation and uncertainty estimation, and SR within alignment and jailbreaking research. Because both types of refusal produce superficially identical text responses, it remained unknown whether they share a single internal mechanism or rely on completely separate pathways. Understanding this internal geometry is critical: if the mechanisms overlap heavily, optimizing a model for safety might inadvertently cause it to over-refuse benign questions where it simply lacks confidence, or vice versa.

Methods

The authors employ a suite of mechanistic interpretability techniques to dissect the internal states of three model families (Llama-3-8B, Qwen2.5-7B, and Gemma-2-9B):

  • Controlled Refusal Tuning (Seq-KS): To ensure a fair comparison, the authors created model variants trained under a unified protocol. They discovered that a sequential tuning schedule—training on knowledge refusal first, followed by safety refusal—yielded the best balance between refusal capabilities and general benchmark performance.
  • Representation-Level Analysis: Hidden states were extracted at the final prompt-token position to isolate the geometric vectors of refusal.
  • Linear Probing & Cross-Type Transfer: Probes were trained to distinguish a refusal from its control counterpart for one type (e.g., SR vs. Safety Control) and then evaluated directly on the other type (KR vs. Knowledge Control) without retraining.
  • Ablation Studies (Heads & MLPs): The authors zero-ablated top-contributing attention heads and MLP blocks to evaluate their causal impact on shared vs. type-specific refusal directions.
  • Activation Steering: Refusal vectors were added directly to the model's residual stream during inference to observe behavioral changes and shifts in the generated text's rationale.

Datasets

To eliminate confounding factors like differences in prompt structure, topic, or lexical style, the authors introduced a new dataset of 213 highly controlled contrastive quadruples.

Figure 2: Dataset construction pipeline and an example of a matched contrastive (KR, SR, KC, SC) quadruple.

Each quadruple contains four variations sharing a common topic category (across 20 total categories like personal data access, cybersecurity, and academic integrity):

  • KR: Knowledge-based refusal (unanswerable/fictional target)
  • SR: Safety-based refusal (sensitive/harmful target)
  • KC: Knowledge control (minimal edit making the prompt answerable)
  • SC: Safety control (minimal edit making the prompt benign)

Standard benchmarks (MMLU, GSM8K, TriviaQA, Natural Questions, AdvBench, and XSTest) were also utilized to monitor general model utility and baseline safety behavior during the controlled tuning phase.

Key Insights and Ideas

  • The "Commit-Then-Specify" Model: Refusal is a layered process. In the early-to-middle layers, the model uses a shared mechanism to make a generalized decision to refuse the prompt (the commit phase). Only in the final layers do type-specific features emerge to ground the refusal in either epistemic uncertainty or safety policies (the specify phase).
  • Directional Asymmetry: The overlap between KR and SR is fundamentally asymmetric. Safety-derived boundaries generalize remarkably well to knowledge-based refusals, whereas knowledge-derived boundaries transfer poorly to safety scenarios. This implies that safety alignment heavily reinforces the generic, shared refusal pathway.
  • Late-Layer Semantic Split: Logit-lens decoding showed that the early shared direction promotes generic refusal tokens like "sorry" and "regret". In contrast, the late-layer type-specific residuals explicitly separate availability/uncertainty tokens ("Based", "presently") from normative/legal tokens ("legal", "privacy", "illegal").

Key Results

  • High Directional Alignment: The geometric alignment (cosine similarity) between KR and SR refusal directions peaks in the early-to-middle layers, reaching values between 0.699 and 0.794 across all tested models.
  • The Transfer Accuracy Gap: Cross-type probing revealed a persistent performance gap. Probes trained on SR and tested on KR achieved high accuracy (80–86%), while probes trained on KR and tested on SR dropped significantly to 58–63% (see Figure 5).
Within-type and cross-type probe accuracy across layers
  • Steering Refusal Rationales: Activation steering experiments demonstrated that injecting type-specific residual vectors ($d_{spec}^K$ or $d_{spec}^S$) didn't just cause the model to refuse; it actively altered the rationale of the refusal. Injecting the safety residual into a fictional query caused the model to invent a safety policy violation as its excuse for refusing.

Limitations and Future Work

  • Open-Weight Dependency: The study relies entirely on internal activation tracking, head ablations, and residual stream interventions, which cannot be performed on closed-source models behind commercial APIs.
  • Single-Turn Constraints: The dataset and analysis focus exclusively on single-turn prompts. Real-world refusals often manifest across multi-turn dialogues where context accumulates.
  • Controlled vs. Wild Prompts: The 213 quadruples are intentionally clean and well-matched to isolate variables. Future work is required to see if this geometric structure holds up in highly ambiguous, borderline, or adversarial open-domain settings.

Summary updated

BibTeX
@misc{son2026unified,
  author = {Yuri Son and Seunghee Kim and Hyuhng Joon Kim and Taeuk Kim},
  title = {{A Unified Mechanistic Analysis of Knowledge- and Safety-Based Refusals}},
  year = {2026},
  eprint = {2609.00760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.00760},
}
Figure