Understanding and Mitigating Over-refusal for Large Language Models via Safety Representation

Junbo Zhang, Ran Chen, Qianli Zhou, Xinyang Deng, Wen JiangarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) become more integrated into daily workflows, the push for safety has introduced a significant hurdle: the "safety-usability paradox." To prevent models from generating harmful content, developers employ aggressive alignment techniques. However, this often results in over-refusal, where the model becomes so sensitive to safety filters that it rejects legitimate, harmless requests containing sensitive keywords.

Figure 1: An illustration of the over-refusal problem where a model incorrectly rejects a benign technical request.

As shown in Figure 1, a model might correctly refuse a prompt about harming a person but incorrectly refuse a command to "kill a Python process" because it associates the word "kill" with physical violence. This paper argues that the root cause of this behavior lies deep within the model's internal representation space, where the boundary between malicious intent and harmless context becomes blurred.

The MOSR Framework

To solve this, the researchers developed MOSR (Mitigate Over-refusal via Safety Representation), a framework that intervenes in the model's safety representations during alignment. MOSR introduces two primary innovations:

  1. Overlap-Aware Loss Weighting: The authors discovered that malicious samples representationally similar to benign ones cause the model to over-generalize its refusal. MOSR assigns lower weights to these "overlapping" malicious samples during training, preventing the model from accidentally learning to reject nearby benign prompts.
  2. Context-Aware Augmentation (CAE): To combat "refusal position bias"—where models decide to reject based only on the first few tokens—MOSR trains the model using "harmful prefixes" before the refusal response. This forces the model to process more context before making a safety decision, leading to more nuanced, context-dependent behavior.

Key Insights and Results

Using tools like Probing Classifiers and LogitLens, the authors proved that over-refusal samples occupy a mathematical "gray zone" between benign and malicious clusters. MOSR helps the model "decide" more accurately in these ambiguous regions.

Figure 6: Comparison of different alignment methods showing the trade-off between safety (Toxic Prompts Rejection Rate) and usability (Over-Refusal Rate).

In evaluations using Llama3-8B-Instruct and Mistral-7B-Instruct-v0.2, MOSR outperformed state-of-the-art defense methods like DPO and RepBlend. As seen in Figure 6, MOSR achieves a superior balance on the safety-usability frontier. For instance, on the OR-Bench, MOSR reduced the over-refusal rate of Llama3-8B from a baseline of 70.58% down to 41.70%, while maintaining a low Attack Success Rate (ASR) of approximately 8.19%.

Conclusion and Future Work

MOSR demonstrates that over-refusal is a representation-level issue that can be mitigated without sacrificing safety or general intelligence. While currently focused on single-turn interactions, future research will address the complexities of multi-turn over-refusal and explore lower-cost intervention methods for proprietary models.

Summary updated

BibTeX
@misc{zhang2025understanding,
  author = {Junbo Zhang and Ran Chen and Qianli Zhou and Xinyang Deng and Wen Jiang},
  title = {{Understanding and Mitigating Over-refusal for Large Language Models via Safety Representation}},
  year = {2025},
  eprint = {2511.19009},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.19009},
}
Figure