Refusal Localizes, the Damage Relocates: Safety Layers Under Few-Sample Fine-Tuning

Jungseob Lee, Dongyub Jude Lee, Sugyeong Eo, Seongtae Hong, Seungyoon Lee +1 more
9/29/2026
1 citation
cs.CLcs.CRcs.LG

Official code: js-lee-AI/refusal-relocates (2 stars, Python, MIT, last commit 2026-10-04).

Abstract

Fine-tuning adapts aligned large language models (LLMs) to downstream tasks, but a few dozen harmful examples can remove their refusal of harmful requests. Prior work localizes safety-related behavior to specific layers, directions, and tokens, suggesting targets for protection.

Show full abstract

We test whether successful localization and recovery support defenses that survive changes in the attack. Across six checkpoints from four model families, harmful and benign prompts remain linearly separable after attack, and patching full clean hidden states into the compromised model restores refusal at a reproducible transition depth. Building on a prior layer-freezing defense, we freeze every layer up to this depth and repeat the attack. At a hundred harmful examples, refusal remains near zero on all six checkpoints, with recovery transitions above the frozen boundary. In a second study, removing the update's top two singular directions restores refusal after short attention-only fine-tunes on four checkpoints. On Llama-3.1-8B, ordinary training changes weaken this repair and an attacker who spreads the update defeats it. A spectral detector calibrated on benign Llama fine-tunes misses most repair failures on that checkpoint. Localized freezing can nevertheless help preserve refusal when a few harmful examples enter training data unintentionally. These results show that an attacker can bypass a region identified by recovery and defeat a repair that works across multiple checkpoints, motivating five checks for defenses against adaptive fine-tuning. Code is available at https://github.com/js-lee-AI/refusal-relocates.

View on arXivView PDF

Code Implementations(1)

MIT

LLM safety: analyze how fine-tuning shifts refusal behavior and evaluate layer-freezing and low-rank defenses.

20PythonSep 27, 20261 months agoMIT
alignmentfine-tuningllm-safetylow-rank-adaptationmechanistic-interpretability+1 more

Similar Papers

Cite this paper

@article{lee2026refusal,
  title  = {Refusal Localizes, the Damage Relocates: Safety Layers Under Few-Sample Fine-Tuning},
  author = {Jungseob Lee and Dongyub Jude Lee and Sugyeong Eo and Seongtae Hong and Seungyoon Lee and Heuiseok Lim},
  year   = {2026},
  eprint = {2610.00320},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.00320v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.00320.svg)](https://codeofpaper.com/paper/2610.00320)

Discussion