Minrui Jiang , Yuning Yang , Xiurui Xie , Pei Ke , Guisong Liu
{"title":"在大型语言模型中安全有效的后微调对齐","authors":"Minrui Jiang , Yuning Yang , Xiurui Xie , Pei Ke , Guisong Liu","doi":"10.1016/j.knosys.2025.114523","DOIUrl":null,"url":null,"abstract":"<div><div>Fine-tuning is critical to customizing Large Language Models (LLMs) in various applications, but it inevitably disrupts the safety alignment of the models. Current alignment methods tackle harmful fine-tuning challenges but frequently compromise model usefulness, resulting in unsatisfactory downstream task performance. To address this issue, we propose a <strong>S</strong>afe and <strong>E</strong>ffective post-fine-tuning <strong>A</strong>lignment (<strong>SEA</strong>) from a knowledge disentanglement perspective. SEA introduces a novel two-level pruning process that surgically removes harmful functionalities. We first propose a differential importance score to isolate harmful pathways at the parameter level, and then introduce a module-wise analysis to protect entangled modules, thereby robustly balancing safety and utility. Experimental results on Llama2, Gemma and Mistral demonstrate that SEA effectively mitigates safety risks while maintaining optimal fine-tuning accuracy. This work provides a practical solution to the safety-performance dilemma associated with harmful fine-tuning of LLMs.</div></div>","PeriodicalId":49939,"journal":{"name":"Knowledge-Based Systems","volume":"330 ","pages":"Article 114523"},"PeriodicalIF":7.6000,"publicationDate":"2025-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Safe and effective post-fine-tuning alignment in large language models\",\"authors\":\"Minrui Jiang , Yuning Yang , Xiurui Xie , Pei Ke , Guisong Liu\",\"doi\":\"10.1016/j.knosys.2025.114523\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Fine-tuning is critical to customizing Large Language Models (LLMs) in various applications, but it inevitably disrupts the safety alignment of the models. Current alignment methods tackle harmful fine-tuning challenges but frequently compromise model usefulness, resulting in unsatisfactory downstream task performance. To address this issue, we propose a <strong>S</strong>afe and <strong>E</strong>ffective post-fine-tuning <strong>A</strong>lignment (<strong>SEA</strong>) from a knowledge disentanglement perspective. SEA introduces a novel two-level pruning process that surgically removes harmful functionalities. We first propose a differential importance score to isolate harmful pathways at the parameter level, and then introduce a module-wise analysis to protect entangled modules, thereby robustly balancing safety and utility. Experimental results on Llama2, Gemma and Mistral demonstrate that SEA effectively mitigates safety risks while maintaining optimal fine-tuning accuracy. This work provides a practical solution to the safety-performance dilemma associated with harmful fine-tuning of LLMs.</div></div>\",\"PeriodicalId\":49939,\"journal\":{\"name\":\"Knowledge-Based Systems\",\"volume\":\"330 \",\"pages\":\"Article 114523\"},\"PeriodicalIF\":7.6000,\"publicationDate\":\"2025-09-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Knowledge-Based Systems\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S095070512501562X\",\"RegionNum\":1,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Knowledge-Based Systems","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S095070512501562X","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
Safe and effective post-fine-tuning alignment in large language models
Fine-tuning is critical to customizing Large Language Models (LLMs) in various applications, but it inevitably disrupts the safety alignment of the models. Current alignment methods tackle harmful fine-tuning challenges but frequently compromise model usefulness, resulting in unsatisfactory downstream task performance. To address this issue, we propose a Safe and Effective post-fine-tuning Alignment (SEA) from a knowledge disentanglement perspective. SEA introduces a novel two-level pruning process that surgically removes harmful functionalities. We first propose a differential importance score to isolate harmful pathways at the parameter level, and then introduce a module-wise analysis to protect entangled modules, thereby robustly balancing safety and utility. Experimental results on Llama2, Gemma and Mistral demonstrate that SEA effectively mitigates safety risks while maintaining optimal fine-tuning accuracy. This work provides a practical solution to the safety-performance dilemma associated with harmful fine-tuning of LLMs.
期刊介绍:
Knowledge-Based Systems, an international and interdisciplinary journal in artificial intelligence, publishes original, innovative, and creative research results in the field. It focuses on knowledge-based and other artificial intelligence techniques-based systems. The journal aims to support human prediction and decision-making through data science and computation techniques, provide a balanced coverage of theory and practical study, and encourage the development and implementation of knowledge-based intelligence models, methods, systems, and software tools. Applications in business, government, education, engineering, and healthcare are emphasized.