Fine-tuning Does Not Reach All: Uneven Safety and Knowledge Dynamics in Language Models

Ziwei Wang, Xinwei Guo, Jiaxin Zhang, Guanhua Chen, Haiyan Wu, Xiangyu Zhao, Lei Ma, Xin Yao, Shan He, Xuetao WeiNeurIPS 2026

TL;DR

When we fine-tune a Large Language Model (LLM) to be safer, we usually celebrate when its average safety score goes up, assuming the whole model got a gentle, uniform upgrade. This paper peeks under the hood at individual concepts and reveals a much messier reality: fine-tuning fractures pre-existing safety guardrails early on, leaves "dual-use" topics stubbornly unsafe, and can actually make a model more internally familiar with harmful ideas even while its outward behavior looks polite. If you want an AI that is predictably safe everywhere—not just on average—you have to look beyond aggregate scores.

What Problem Does This Paper Address?

Imagine trying to childproof a house, except every time you put a lock on the kitchen cabinet, the front door mysteriously swings unlocked. That is roughly what happens inside an LLM during fine-tuning.

Inside a neural network’s vast web of parameters, safe and unsafe ideas aren’t stored in neat, separate boxes; they are entangled, sharing the same semantic features. Yet, standard safety evaluations rely on aggregate metrics—one big average score across thousands of prompts. Aggregate scores hide local collateral damage. The authors ask: How does safety fine-tuning actually reshape an LLM’s mind across specific, fine-grained concepts, and does changing what a model knows reliably change how it behaves?

Methods

To see what aggregate metrics miss, the authors built a dual-metric, concept-level microscope and applied it primarily to Llama-3-8B-Instruct (using LoRA supervised fine-tuning across 5 epochs, with replications on Qwen2.5 and smaller Llama models).

Figure 1: An analytical framework for uncovering latent concept-level knowledge dynamics in fine-tuning. We construct concept-centric data with paired safe and unsafe samples and apply controlled fine-tuning strategies with varying data compositions. We evaluate both behavioral safety and internal knowledge accessibility, enabling a joint analysis of how fine-tuning reshapes knowledge and its expression. Our framework reveals three key findings that are obscured by conventional aggregated evaluation: (1) safety improvements are highly heterogeneous across concepts, (2) fine-tuning fails at safe-unsafe knowledge differentiation and may increase familiarity with unsafe content, and (3) internal knowledge and external behavior are systematically decoupled.

What’s standard here is the fine-tuning itself; what’s novel is the experimental control and dual probing:

  1. Factorial Training Strategies: They tested five distinct data mixes—varying whether the data was Safe, Unsafe, or Random (50/50), and whether concepts were sampled Uniformly (Bal) or Randomly (Rnd).
  2. External Behavior Probe (Safety Score): Models generated responses to test prompts, and Llama-Guard-3-8B judged them, extracting token probabilities for a continuous safety score between 0 and 1.
  3. Internal Knowledge Probe (Perplexity): Perplexity (PPL) measures how "surprised" a model is by a sequence of text—lower perplexity means higher familiarity. By measuring PPL on both safe and unsafe reference answers, the authors tracked whether the model was internally gravitating toward safe or dangerous knowledge, regardless of what it chose to say out loud.

Datasets

The authors grounded their work in BeaverTails, an existing large-scale dataset of (prompt, response, is_safe) triples. From this, they constructed a novel, concept-centric benchmark:

  • They parsed BeaverTails with a graph-extraction LLM (Phi-3-mini-4k-instruct-graph) to build a 41,306-node knowledge graph.
  • Using graph centrality algorithms (to find highly connected hubs) followed by GPT-4 and manual filtering (to drop generic words like "time"), they distilled 133 distinct safety-sensitive concepts (e.g., weed, hacking, discrimination).
  • Evaluation Set: Strictly balanced with 10 safe and 10 unsafe samples per concept (2,660 total).
  • Training Sets: 2,660 samples per strategy—for example, Safe-Bal used exactly 20 safe samples for each of the 133 concepts.

Key Insights and Ideas

  • The Epoch-1 Shockwave: Regardless of what you feed the model—even 100% pure, safe data—safety scores plummet right after the first epoch of fine-tuning. Fine-tuning structurally disrupts the model's pre-existing alignment before it can start re-learning.
Figure 2: Evolution of safety score and its dispersion across fine-tuning strategies and epochs.
  • Immutable Outliers: Two classes of concepts completely shrug off fine-tuning. Persistently low-safety concepts are mostly "dual-use" terms (weed, fuse, ignition, locks) that have everyday legal meanings alongside harmful ones, preventing clean boundaries. Robustly safe concepts are exclusively social-ethics topics (discrimination, Mexicans, Black people) that stay safe even under adversarial unsafe training—likely due to heavy RLHF reinforcement during pretraining.
  • Knowing $\neq$ Doing: Internal knowledge and external behavior are systematically decoupled. Training exclusively on safe data can still inadvertently increase a model's internal familiarity with unsafe content—creating a "surface-safe" illusion that standard behavioral evaluations completely miss.

Key Results

  • Early Hidden Degradation: Between Epoch 0 and Epoch 1, roughly 53% to 65% of concepts enter a "surface-safe" state where familiarity increases for both safe and unsafe content simultaneously. By Epoch 2, suppressing unsafe familiarity triggers generalized forgetting across 45% to 49% of concepts under safe strategies.
  • Decoupled Outcomes: Comparing Epoch 5 to a random baseline, Safe-Bal successfully guides 72.93% (97/133) of concepts into the ideal state (safer behavior and lower unsafe familiarity), outperforming Safe-Rnd (69.92%).
  • Latent Risk: Even under exclusively safe training (Safe-Rnd and Safe-Bal), 8.27% to 10.53% of concepts improve their outward safety scores while secretly becoming more internally familiar with unsafe text.
  • Homogenization: Balanced safe coverage (Safe-Bal) actively drives down concept-level dispersion (Coefficient of Variation and Polarization Rate) below pre-fine-tuning levels, proving that uniform concept coverage makes safety more consistent across the board.

Limitations and Future Work

Not discussed in the paper. (Note: While the main text notes the deliberate constraint of using a single-source dataset to prevent style confounds and points to appendices for scale/architecture replications, an explicit limitations and future work section is not included in the provided pages.)

Summary updated

Abstract

Fine-tuning is widely used to align large language models (LLMs) with desired behavioral norms such as safety, yet it is typically evaluated using aggregate metrics that assume uniform improvements across the model. However, fine-tuning operates within a constrained parameter space, and its entangled effects on localized knowledge remain poorly understood. To address this, we investigate fine-tuning at the level of individual knowledge concepts using a controlled framework with representative concepts and paired safe/unsafe samples under varying data compositions. By jointly analyzing behavioral safety via model outputs and internal knowledge accessibility via perplexity, we obtain a unified view of how knowledge is modified and expressed. Our results reveal that fine-tuning does not uniformly improve safety. Instead, it (1) exhibits strong concept-level heterogeneity, including persistent low-safety concepts and robustly safe concepts with clear domain specificity; (2) improves safe–unsafe discrimination on average, but coexists with familiarity on both safe and unsafe content or even loses previously learned safe knowledge; and (3) decouples internal knowledge from external behavior, as changes in familiarity do not reliably translate into safer outputs, especially due to early-stage disruption of existing safety structures. Our findings position consistency as a distinct objective beyond conventional aggregate safety and demonstrate that reducing unsafe knowledge exposure under uniform concept-level coverage actively homogenizes safety distributions across model knowledge, offering a principled path toward alignment that is not merely effective on average, but uniformly reliable, predictable, and robust across knowledge concepts.
BibTeX
@inproceedings{wang2026fine,
  author = {Ziwei Wang and Xinwei Guo and Jiaxin Zhang and Guanhua Chen and Haiyan Wu and Xiangyu Zhao and Lei Ma and Xin Yao and Shan He and Xuetao Wei},
  title = {{Fine-tuning Does Not Reach All: Uneven Safety and Knowledge Dynamics in Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=7MsNSkqKWp},
}
Figure