SEAL:基于双层数据选择的安全增强对齐LLM微调
SEAL: Safety-enhanced Aligned LLM Fine-tuning via Bilevel Data Selection
AI总结:
本文提出SEAL框架,通过双层优化学习数据排序器,在LLM微调中提升安全高质量数据的权重并降低不安全数据的影响,在多个基线上显著提升模型质量与胜率。
摘要:
在任务特定数据上进行微调以提升下游性能是利用大型语言模型(LLMs)的关键步骤。然而,先前的研究表明,在若干对抗样本甚至良性数据上微调模型,会极大损害模型预置的对齐与安全能力。在本工作中,我们提出了SEAL,一个增强LLM微调安全性的新框架。SEAL基于双层优化学习一个数据排序器,对安全且高质量的微调数据进行上排序,对不安全或低质量的数据进行下排序。使用SEAL训练的模型在多个基线上展现出卓越质量,在Llama-3-8b-Instruct和Merlinite-7b模型上,与随机选择相比,胜率分别提升了8.5%和9.7%。代码可在github获取。
英文摘要:
Fine-tuning on task-specific data to boost downstream performance is a crucial step for leveraging Large Language Models (LLMs). However, previous studies have demonstrated that fine-tuning the models on several adversarial samples or even benign data can greatly comprise the model's pre-equipped alignment and safety capabilities. In this work, we propose SEAL, a novel framework to enhance safety in LLM fine-tuning. SEAL learns a data ranker based on the bilevel optimization to up rank the safe and high-quality fine-tuning data and down rank the unsafe or low-quality ones. Models trained with SEAL demonstrate superior quality over multiple baselines, with 8.5% and 9.7% win rate increase compared to random selection respectively on Llama-3-8b-Instruct and Merlinite-7b models. Our code is available on github https://github.com/hanshen95/SEAL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。