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.
Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retraining
Beijing Key Laboratory of Safe AI and Superalignment(北京安全人工智能与超对齐重点实验室);Beijing Institute of AI Safety and Governance(北京人工智能安全与治理研究院);Brain-inspired Cognitive AI Lab, Institute of Automation, Chinese Academy of Sciences(脑启发认知人工智能实验室,中国科学院自动化研究所);University of Chinese Academy of Sciences(中国科学院大学);Long-term AI(长期人工智能)
Safe Delta: Consistently Preserving Safety when Fine-Tuning LLMs on Diverse Datasets
Guangdong Provincial Key Laboratory of Brain-Inspired Intelligent Computation, Department of CSE, SUSTech(脑启发智能计算广东省重点实验室,计算机科学与工程系,华南理工大学);Department of CSE, HKUST(计算机科学与工程系,香港科技大学);Department of CSE, PolyU(计算机科学与工程系,PolyU);Department of CSE, SUSTech(计算机科学与工程系,华南理工大学);Huawei Technologies CO.(华为技术有限公司);College of Computing(计算学院)
CLEAR: Continuous Latent Adapter Routing for Utility-Preserving LLM Safety Alignment
Stanford University(斯坦福大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Siebel School of Computing and Data Science, University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校西贝尔计算与数据科学学院);Computer Science, Stanford University(斯坦福大学计算机科学系)
Jailbreak Instruction-Tuned LLMs via end-of-sentence MLP Re-weighting
Peking University(北京大学);School of Science(理学院);Westlake University(西湖大学);Beijing International Center for Mathematical Research(北京国际数学研究中心);Center for Machine Learning Research(机器学习研究中心)
A Guardrail for Safety Preservation: When Safety-Sensitive Subspace Meets Harmful-Resistant Null-Space
School of Artificial Intelligence, Jilin University(吉林大学人工智能学院);King Abdullah University of Science and Technology(卡塔尔国王大学科学与技术研究院);University of Oxford(牛津大学)
Safe Pruning LoRA: Robust Distance-Guided Pruning for Safety Alignment in Adaptation of LLMs
School of Electronics and Computer Science, University of Southampton, UK(索姆塞特大学电子与计算机科学学院);Department of Computer Science, University of Liverpool, UK(利弗pool大学计算机科学系)
Aligned but Fragile: Enhancing LLM Safety Robustness via Zeroth-Order Optimization
The State Key Laboratory of Blockchain and Data Security(区块链与数据安全国家重点实验室);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州高科技园区(滨江)区块链与数据安全研究院);Sun Yat-sen University(中山大学);KAUST(卡塔尔大学)
Unintended Memorization of Sensitive Information in Fine-Tuned Language Models
TUM University Hospital(慕尼黑工业大学医院);Technical University of Munich (TUM)(慕尼黑技术大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心);Department of Computing, Imperial College London(伦敦帝国学院计算系)
Multilingual Safety Signals Are Multi-Layered: Filtering Safety-Degrading Data for Safer LLMs
Beihang University(北京航空航天大学);Zhongguancun Laboratory(中关村实验室);Hangzhou Innovation Institute, Beihang University(北京航空航天大学杭州创新研究院);Qingdao Research Institute, Beihang University(北京航空航天大学青岛研究院)