Understanding and Preserving Safety in Fine-Tuned LLMs
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Fine-tuning is an essential and pervasive functionality for applying large language models (LLMs) to downstream tasks. However, it has the potential to substantially degrade safety alignment, e.g., by greatly increasing susceptibility to jailbreak attacks, even when the fine-tuning data is entirely harmless. Despite garnering growing attention in defense efforts during the fine-tuning stage, existing methods struggle with a persistent safety-utility dilemma: emphasizing safety compromises task performance, whereas prioritizing utility typically requires deep fine-tuning that inevitably leads to steep safety declination. In this work, we address this dilemma by shedding new light on the geometric interaction between safety- and utility-oriented gradients in safety-aligned LLMs. Through systematic empirical analysis, we uncover three key insights: (I) safety gradients lie in a low-rank subspace, while utility gradients span a broader high-dimensional space; (II) these subspaces are often negatively correlated, causing directional conflicts during fine-tuning; and (III) the dominant safety direction can be efficiently estimated from a single sample. Building upon these novel insights, we propose safety-preserving fine-tuning (SPF), a lightweight approach that explicitly removes gradient components conflicting with the low-rank safety subspace. Theoretically, we show that SPF guarantees utility convergence while bounding safety drift. Empirically, SPF consistently maintains downstream task performance and recovers nearly all pre-trained safety alignment, even under adversarial fine-tuning scenarios. Furthermore, SPF exhibits robust resistance to both deep fine-tuning and dynamic jailbreak attacks. Together, our findings provide new mechanistic understanding and practical guidance toward always-aligned LLM fine-tuning.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 31 of its 56 references that are in the map. First posted on arXiv 15 Jan 2026.
Builds on
31 of 56 references.
Closest ancestors · 8
Same direction, newest first
- 2024What Makes and Breaks Safety Fine-tuning? A Mechanistic Study14 Jul
- 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
- 2024Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack28 May
- 2024No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attacks25 May
- 2024Representation Noising: A Defence Mechanism Against Harmful Finetuning23 May
- 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications7 Feb
- 2023LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B31 Oct
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
Other references · 23
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,758
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 630
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
11 more
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 530
- 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
- 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Studycited by 478
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
- 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 284
- 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 224
- 2024AutoDAN-Turbo: A Lifelong Agent for Strategy Self-Exploration to Jailbreak LLMscited by 185
- 2024Attacks, Defenses and Evaluations for LLM Conversation Safety: A Surveycited by 124
- 2024Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmeticcited by 105
- 2024Making Them Ask and Answer: Jailbreaking Large Language Models in Few Queries via Disguise and Reconstructioncited by 95
- 2025Alleviating the Fear of Losing Alignment in LLM Fine-tuningcited by 8
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studiescited by 6
- 2026Alignment Dynamics in LLM Fine-Tuningcited by 2
- 2026You Snooze, You Lose: Automatic Safety Alignment Restoration through Neural Weight Translationcited by 0
- 2026REFLECTOR: Internalizing Step-wise Reflection against Indirect Jailbreakcited by 0
- 2026The Heterogeneous Safety Impacts of Benign Multilingual Fine-Tuningcited by 0
- 2026TRACE: Trajectory-Based Safety Patch Learning for LLM Post-Training Realignmentcited by 0
- 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMscited by 0
- 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMs26 Aug 2026
- 2026The Heterogeneous Safety Impacts of Benign Multilingual Fine-Tuning27 Jun 2026
- 2026TRACE: Trajectory-Based Safety Patch Learning for LLM Post-Training Realignment26 Jun 2026
- 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studies22 Jun 2026
- 2026REFLECTOR: Internalizing Step-wise Reflection against Indirect Jailbreak20 May 2026
- 2026Alignment Dynamics in LLM Fine-Tuning18 May 2026
- 2026You Snooze, You Lose: Automatic Safety Alignment Restoration through Neural Weight Translation6 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025Secure LLM Fine-Tuning via Safety-Aware Probing
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2025Gradient Surgery for Safe LLM Fine-Tuning
- 2024Locking Down the Finetuned LLMs Safety
- 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
- 2026Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning
- 2025Rethinking Safety in LLM Fine-tuning: An Optimization Perspective
- 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance