Alleviating the Fear of Losing Alignment in LLM Fine-tuning
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated revolutionary capabilities in understanding complex contexts and performing a wide range of tasks. However, LLMs can also answer questions that are unethical or harmful, raising concerns about their applications. To regulate LLMs' responses to such questions, a training strategy called textitalignment can help. Yet, alignment can be unexpectedly compromised when fine-tuning an LLM for downstream tasks. This paper focuses on recovering the alignment lost during fine-tuning. We observe that there are two distinct directions inherent in an aligned LLM: the textitaligned direction and the textitharmful direction. An LLM is inclined to answer questions in the aligned direction while refusing queries in the harmful direction. Therefore, we propose to recover the harmful direction of the fine-tuned model that has been compromised. Specifically, we restore a small subset of the fine-tuned model's weight parameters from the original aligned model using gradient descent. We also introduce a rollback mechanism to avoid aggressive recovery and maintain downstream task performance. Our evaluation on 125 fine-tuned LLMs demonstrates that our method can reduce their harmful rate (percentage of answering harmful questions) from 33.25% to 1.74%, without sacrificing task performance much. In contrast, the existing methods either only reduce the harmful rate to a limited extent or significantly impact the normal functionality. Our code is available at https://github.com/kangyangWHU/LLMAlignment
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Apr 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 3; 2026: 6.
9 papers.
- 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
- 2025Re-Emergent Misalignment: How Narrow Fine-Tuning Erodes Safety Alignment in LLMscited by 9
- 2025Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignmentcited by 8
- 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instancecited by 8
- 2026Understanding and Preserving Safety in Fine-Tuned LLMscited by 7
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 4
- 2026Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignmentcited by 2
- 2026MCP-DPT: A Defense-Placement Taxonomy and Coverage Analysis for Model Context Protocol Securitycited by 2
- 2026Adversarial Reframing: A Framework for Targeted Generation in Language Modelscited by 0
- 2026Adversarial Reframing: A Framework for Targeted Generation in Language Models20 May 2026
- 2026MCP-DPT: A Defense-Placement Taxonomy and Coverage Analysis for Model Context Protocol Security8 Apr 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs15 Jan 2026
- 2026Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignment12 Jan 2026
- 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance5 Jan 2026
- 2025Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignment26 Sep 2025
- 2025Gradient Surgery for Safe LLM Fine-Tuning10 Aug 2025
- 2025Re-Emergent Misalignment: How Narrow Fine-Tuning Erodes Safety Alignment in LLMs4 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning
- 2026Alignment Dynamics in LLM Fine-Tuning
- 2026The Art of (Mis)alignment: How Fine-Tuning Methods Effectively Misalign and Realign LLMs in Post-Training
- 2024Aligners: Decoupling LLMs and Alignment
- 2025Massive Supervised Fine-tuning Experiments Reveal How Data, Layer, and Training Factors Shape LLM Alignment Quality
- 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templates
- 2024Understanding Layer Significance in LLM Alignment
- 2025Curvature-Aware Safety Restoration In LLMs Fine-Tuning