Preserving Safety During Sequential Fine-Tuning: A Factorial and Geometric Analysis of Replay

George Ruellan, Diana Benavides-Prado
10/27/2026
cs.LG
distillation

No official code found. Best implementation: gruellan/preserving_safety_sequential_finetuning (0 stars, Python, last commit 2026-09-29).

Abstract

Benign fine-tuning can erode safety alignment in large language models, and sequential adaptation substantially compounds this risk. Prior work mitigates this erosion by replaying harmful-prompt refusals and benign-compliance examples, while other work instead matches base-model logits via distillation.

Show full abstract

However, the individual contributions of supervised exposure and distillation to safety behavior and refusal geometry during sequential adaptation remain unclear. We factor these two strategies apart and study their behavioral and geometric effects during sequential LoRA fine-tuning of Mistral-7B and Llama-3-8B across diverse task sequences (code generation, German-language summarization, and science question-answering). Behaviorally, supervised replay exposure yields the largest reduction in HarmBench attack success rate (ASR) on Mistral, averaging 51.1 points below base, but at a substantial over-refusal cost, averaging 53.4 points above base on OR-Bench-hard. Logit distillation, without any supervised replay loss, largely prevents safety erosion at a fraction of this cost: an average 5.4-point ASR reduction against only a 5.1-point rise in over-refusal. Llama shows the same asymmetry between the two strategies. Combining exposure and distillation moderates exposure's over-refusal while leaving downstream task scores largely unaffected. Geometrically, the two models diverge: on Mistral, distillation preserves the base refusal direction more closely than exposure does, whereas on Llama, refusal behavior after exposure largely survives ablation of the extracted refusal direction. This dissociation between models indicates that preserving the base refusal direction is not a reliable proxy for behavioral safety.

View on arXivView PDF

Code Implementations(1)

Preserving Safety During Sequential Fine-Tuning: A Factorial and Geometric Analysis of Replay

00Python, ShellSep 28, 20262 months ago

Similar Papers

Cite this paper

@article{ruellan2026preserving,
  title  = {Preserving Safety During Sequential Fine-Tuning: A Factorial and Geometric Analysis of Replay},
  author = {George Ruellan and Diana Benavides-Prado},
  year   = {2026},
  eprint = {2610.38001},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.38001v1}
}

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.38001.svg)](https://codeofpaper.com/paper/2610.38001)

Discussion