TL;DR
When we train Large Language Models (LLMs) to be safe, they often become over-defensive, refusing completely harmless prompts. This paper reveals that overrefusal is driven by "refusal triggers"—benign linguistic cues (like "Can you help me") that get falsely associated with safety rejections during training. By extracting these triggers and repurposing them into targeted benign training data, the authors drastically reduce overrefusal while maintaining robust safety guardrails.
What Problem Does This Paper Address?
Safety alignment techniques like Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF) are standard industry practices used to ensure LLMs reject harmful requests. However, these methods frequently suffer from overrefusal, where the model rejects benign queries that superficially resemble harmful ones. For example, a model trained to refuse a request to create a fake testimonial video might incorrectly refuse a benign request to create a promotional video simply because both share phrases like "create a video" or "endorse my product."
The authors tackle the lack of a mechanistic understanding of why this over-generalization happens and propose a targeted training-time defense to fix it without compromising the model's core safety.
Methods
The authors introduce a two-step Trigger-Aware Mitigation strategy:
- Extraction of Refusal Triggers: They use an advanced external LLM (GPT-4o) to analyze harmful training datasets ($D_h$). The model strips away the explicit harmful intent while preserving the harmless events, contextual settings, and help-seeking discourse structures. This creates a "sanitized" version of the query containing only the benign components (the refusal triggers).
- Trigger-Aware Fine-Tuning: Instead of mixing safety data with generic benign datasets (like Alpaca), which suffer from a severe distributional shift, they repurpose these extracted refusal triggers to generate a highly targeted benign dataset ($D_b$). Training the model on these pairs explicitly teaches it to decouple these specific benign cues from refusal responses.
Datasets
- Harmful Training Data ($D_h$): Llama2 Safety Data.
- Benign Training Data ($D_b$): Stanford Alpaca (used as a baseline) vs. the authors' custom trigger-matched benign dataset (consisting of just 248 highly targeted samples).
- Evaluation Benchmarks:
- Harmful (Attack Success Rate - ASR): SorryBench, JBench-H, and HEx-PHI.
- Benign (Refusal Rate - RR): Koala, JBench-B, GSM-8K, SQL-1K, and OrBench-H.
Key Insights and Ideas
- Representational Proximity: Through a mechanistic analysis of the model's hidden states (layer 15 onwards), the authors proved that rejected benign queries sit significantly closer to refusal triggers in the activation space than accepted benign queries do. Overrefusal is a direct consequence of semantic proximity learned from harmful data.
- The Failure of Generic Benign Data: Traditional methods attempt to mitigate overrefusal by mixing in massive generic datasets like Alpaca. The authors show this fails because generic data does not share the specific linguistic triggers present in the safety training data, leaving a critical distributional gap.
- Extreme Data Efficiency: You don't need massive datasets to fix overrefusal. The authors' method using only 248 trigger-matched samples vastly outperformed fine-tuning on 22,000 generic Alpaca samples.
- Contextual Ambiguity in Code/Math: Overrefusal mitigation is particularly pronounced in technical domains. High-risk safety keywords like "inject", "drop", or "execute" are entirely benign in SQL or programming contexts, making them highly effective triggers to disentangle during training.
Key Results
The method was evaluated across multiple model families (Llama2, Llama3-Uncensored, Qwen2.5-Uncensored) and alignment paradigms (SFT, Prefilled-SFT, and RLVR):
- Supervised Fine-Tuning (SFT) on Llama3-U: Using Alpaca as the benign dataset caused massive overrefusal, spiking the Refusal Rate (RR) on GSM-8k to 95.75%. The proposed trigger-matched data kept the GSM-8k RR at a mere 0.99% while maintaining a highly competitive safety profile.
- Reinforcement Learning (RLVR) on Llama3-U: When applying RL-based safety alignment, generic data augmentation led to severe overrefusal on OrBench-H (98.48% RR). The trigger-aware method successfully mitigated this down to 57.09% RR while keeping the Attack Success Rate (ASR) on harmful prompts low.
Overall, across all settings, the trigger-matched approach achieved the lowest average score (Avg), representing the best balance between safety defense and benign responsiveness.
Limitations and Future Work
- Pipeline Dependencies: The extraction of refusal triggers relies heavily on an external LLM (GPT-4o) and heuristic filtering. This pipeline can occasionally introduce noise, miss subtle harmful intent, or over-sanitize useful context.
- Automated Evaluation Constraints: The study relies primarily on rule-based and keyword-based automatic detectors to evaluate refusal rates, which may fail to capture nuanced, borderline safety judgments.
- Optimization and Scale: The optimal scale and composition of trigger-matched datasets across highly diverse or specialized application domains remain an open question for future research.
Summary updated