When Safety Becomes An Outlier: Understanding the Retention of LLM Safety Behaviors

Binchi Zhang, Hadi Abdullah, Yiwei Cai, Jundong LiNeurIPS 2026

TL;DR

Why do large language models (LLMs) forget their safety training the moment you fine-tune them on new tasks—even completely harmless ones? This paper reveals that standard, robotic refusals ("I'm sorry, I cannot help with that") act like fragile, memorized outliers in the model's brain rather than deeply understood concepts. By replacing canned refusals with natural, context-aware explanations that match how the model natively "speaks," we can make AI safety dramatically more durable.

What Problem Does This Paper Address?

Imagine spending months teaching an LLM to be safe and harmless, only to watch those guardrails evaporate after a developer fine-tunes the model on benign downstream data like customer support tickets or math problems. Even mixing safety examples into the fine-tuning dataset doesn't reliably stop this "catastrophic forgetting."

While researchers knew safety was fragile, the why remained murky. The authors hypothesize that the culprit is the safety target itself. Current models handle harmful requests by collapsing into a narrow, formulaic refusal script.

Figure 1: Prefix histogram of model responses to 1,000 normal and 1,000 harmful instruction data samples in the BeaverTails dataset.

In probability terms, this creates an outlier mode: a low-entropy island in the model’s output space with weak ties to the prompt's actual meaning and low support from the model's pretraining distribution. Because it sits awkwardly outside the model's natural language flow, it is trivial to memorize during alignment—and equally trivial to overwrite later.

Methods

To fix this, the authors introduce NEST (Naturalness-Enhanced Safety Targets), a framework designed to pull safety behaviors back into the dense, well-supported regions of the model’s natural language distribution. Instead of forcing a canned apology, NEST teaches models to respond safely in their own voice, grounded in the specifics of the user's prompt.

They adapt NEST to two standard training pipelines:

  • Supervised Fine-Tuning (SFT): Rather than training a base model on rigid refusal strings, they use an instruction-tuned model to generate training labels with an augmented system prompt: "Analyze how and why this instruction is harmful." (Because instruction models themselves default to robotic refusals, the authors apply lightweight "jailbreak" preprocessing during label generation to coax out natural, analytical explanations instead of canned scripts).
  • Direct Preference Optimization (DPO): Standard DPO teaches models to prefer safe answers over unsafe ones, inadvertently rewarding terse refusals. NEST samples 50 candidate responses directly from the model being trained ("on-policy," ensuring naturalness) and scores them offline with separate helpfulness and harmfulness models. It then constructs training pairs that explicitly favor responses that are both safe and informative over unhelpful, robotic refusals.

Finally, they propose a clever diagnostic metric: measuring the perplexity (essentially, how "surprised" a model is by a piece of text) of the fine-tuned safety responses using the original pretrained base model. Lower perplexity means the safety behavior stays closer to the model's native instincts.

Datasets

The authors rely on established benchmarks rather than introducing new datasets:

  • Safety Alignment: BeaverTails (both benign and harmful prompts), Do-Not-Answer, and SorryBench for SFT; PKU-SafeRLHF for DPO.
  • Continual Fine-Tuning (Testing Retention): Alpaca (general instruction-following) and GSM8K (grade-school math) to simulate benign downstream adaptation.
  • Evaluation: AdvBench (harmful requests), StrongREJECT (measuring actionable harm), and XSTest (testing whether the model becomes overly paranoid on safe-but-edgy prompts).

Key Insights and Ideas

  • Refusals are memorized like random gibberish: In a brilliant diagnostic experiment, the authors trained models on three types of targets for harmful prompts: a fixed refusal, a fixed completely unrelated fluent sentence, and prompt-specific natural explanations. The model learned the fixed refusal at the exact same breakneck speed (~100 steps) and high gradient pressure as the arbitrary unrelated string. To the neural network, "I cannot fulfill this request" isn't a moral stance—it's just a constant string shortcut.
Figure 2: Learning curves for fixed and prompt-grounded safety targets.
  • Native fluency predicts durability: Across models, lower perplexity under the original base model correlates with better safety retention after continual fine-tuning (Pearson $r$ between $0.49$ and $0.69$). Safety sticks best when it doesn't fight the model's pretraining prior.
  • No trade-off with helpfulness or over-refusal: Teaching models to explain why something is harmful doesn't make them preachy on normal tasks or trigger-happy on sensitive benign prompts.

Key Results

Across Qwen2.5-7B, Mistral-7B, Llama-3-8B, Alpaca-7B, and Vicuna-7B, NEST consistently outperformed standard refusals both immediately after safety training and after continual fine-tuning on 10,000 benign Alpaca instructions:

  • SFT Retention: On Llama-3-8B evaluated on AdvBench, standard hard-refusal training saw its harmful response rate skyrocket from 41.86% to 79.83% after benign fine-tuning. With NEST, the initial harmful rate started lower (35.07%) and degraded far less (60.61%), while slashing base-model perplexity from 38.38 down to 3.58.
  • Eliminating Mode Collapse: Prefix diversity scores (Self-BLEU, where lower means more diverse) improved on Llama-3-8B from 0.85 (highly repetitive) to 0.69 with NEST.
  • DPO & Independent Judges: In DPO, NEST reduced post-continuation harmful rates across all backbones (e.g., dropping Mistral's post-SFT harmful rate from 75.40% to 71.28%). Re-scoring outputs with Llama-Guard-3 confirmed NEST achieved the lowest unsafe rate (35.6%) compared to fixed refusals (44.6%), while maintaining identical downstream task utility (ROUGE-L and BLEU).

Limitations and Future Work

The authors are admirably transparent about the boundaries of their findings:

  • Perplexity is a proxy, not a silver bullet: While base-model perplexity predicts retention well in high-perplexity regimes, the effect saturates once perplexity drops below ~3. Moreover, when aggregating across wildly different model architectures and response lengths, the overall correlation weakens ($r = 0.28$). It is a useful screening tool, not a replacement for real safety evaluations.
  • Causal entanglement: Their gradient diagnostics confirm that natural targets induce gentler optimization updates, but these experiments don't cleanly isolate whether the magic comes mostly from response length, semantic grounding, or distributional support.
  • Safety still degrades: While NEST significantly slows down safety forgetting, continual fine-tuning still causes noticeable degradation (e.g., jumping from 35% to 60% harmful rates in SFT, and 0.19% to 71.28% in Mistral DPO), leaving plenty of room for future work combining target design with parameter-freezing or constrained optimization defenses.

Summary updated

Abstract

Safety-aligned large language models often lose their safety behaviors after fine-tuning, even when safety data are included. While this fragility is well documented, its underlying cause remains unclear. In this paper, we propose that formulaic refusal strings can function as \textit{outlier modes}: narrow, weakly grounded response patterns that are easy to fit but vulnerable to subsequent updates. Controlled experiments support this account: fixed refusals are acquired much like arbitrary constant strings, in contrast to prompt-grounded natural responses. Motivated by these findings, we introduce Naturalness-Enhanced Safety Targets (NEST), a safety alignment framework that improves safety retention by constructing natural, context-aware safety targets that keep safety responses within the model's existing output distribution and grounded in semantics. We instantiate NEST in both supervised and preference-based alignment settings, using perplexity under the original model as a proxy for distributional support. Across multiple models and alignment regimes, natural safety targets improve both immediate safety and its retention under continued fine-tuning without sacrificing helpfulness. These findings suggest a practical principle for more durable safety alignment: construct safety targets that draw on the model's existing language capabilities and remain grounded in the meaning of each request.
BibTeX
@inproceedings{zhang2026when,
  author = {Binchi Zhang and Hadi Abdullah and Yiwei Cai and Jundong Li},
  title = {{When Safety Becomes An Outlier: Understanding the Retention of LLM Safety Behaviors}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=b28qPD14np},
}
Figure