arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.11041cs.CL
收藏

区分良莠:一种用于微调语言模型安全再对齐的事后方法

Separate the Wheat from the Chaff: A Post-Hoc Approach to Safety Re-Alignment for Fine-Tuned Language Models

Research Center for Social Computing and Information Retrieval(社会计算与信息检索研究中心);Harbin Institute of Technology(哈尔滨工业大学)

Di Wu, Xin Lu, Yanyan Zhao, Bing Qin

AI总结:

针对微调损害LLM安全对齐的问题,提出IRR方法,通过识别并移除不安全delta参数并重校准保留参数,在保持下游性能的同时显著提升安全基准表现。

摘要:

尽管大型语言模型(LLMs)在发布时实现了有效的安全对齐,但它们仍然面临各种安全挑战。一个关键问题是,微调常常损害LLMs的安全对齐。为了解决这个问题,我们提出了一种名为IRR(识别、移除和重新校准以实现安全再对齐)的方法,对LLMs执行安全再对齐。IRR的核心是从微调模型中识别并移除不安全的delta参数,同时重新校准保留的参数。我们在各种数据集上评估了IRR的有效性,包括全量微调和LoRA方法。我们的结果表明,IRR显著提升了微调模型在安全基准(如有害查询和越狱攻击)上的安全性能,同时保持了它们在下游任务上的性能。源代码可在以下网址获取:https://anonymous.4open.science/r/IRR-BD4F。

英文摘要:

Although large language models (LLMs) achieve effective safety alignment at the time of release, they still face various safety challenges. A key issue is that fine-tuning often compromises the safety alignment of LLMs. To address this issue, we propose a method named IRR (Identify, Remove, and Recalibrate for Safety Realignment) that performs safety realignment for LLMs. The core of IRR is to identify and remove unsafe delta parameters from the fine-tuned models, while recalibrating the retained ones. We evaluate the effectiveness of IRR across various datasets, including both full fine-tuning and LoRA methods. Our results demonstrate that IRR significantly enhances the safety performance of fine-tuned models on safety benchmarks, such as harmful queries and jailbreak attacks, while maintaining their performance on downstream tasks. The source code is available at: https://anonymous.4open.science/r/IRR-BD4F.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑