Large language models require continuous adaptation to new tasks while preserving safety alignment. However, fine-tuning on even benign data often compromises safety behaviors, including refusal of harmful requests, truthfulness, and commonsense reasoning. We investigate which training samples cause alignment drift through a data-centric lens. Our empirical analysis shows samples contribute unequally: high-gradient samples cause greater safety degradation and drive models toward pretrained distributions, while moderate-gradient samples enable task learning with minimal alignment loss. We propose gradient-based sample selection that filters high-gradient samples during fine-tuning. Across multiple model families on continual domain tasks, our method substantially improves alignment preservation while maintaining competitive task performance, without requiring curated safe data or architectural modifications. Our method is robust across selection ratios, task orderings, and diverse attack benchmarks.


翻译:大语言模型需要在保持安全对齐的同时持续适应新任务。然而,即使在良性数据上进行微调,也常会损害安全行为,包括对有害请求的拒绝、真实性和常识推理。我们通过数据中心的视角研究哪些训练样本会导致对齐漂移。实证分析表明,样本贡献不均等:高梯度样本导致更大的安全退化,并将模型推向预训练分布,而中等梯度样本能在对齐损失最小的情况下实现任务学习。我们提出基于梯度的样本选择方法,在微调过程中过滤高梯度样本。在多个模型家族的持续领域任务上,该方法在保持竞争性任务性能的同时,显著提升了对齐保持能力,且无需精心策划的安全数据或架构修改。该方法在选择比例、任务顺序和多种攻击基准测试中均表现出鲁棒性。

0
下载
关闭预览

相关内容

大语言模型对齐研究综述
专知会员服务
56+阅读 · 2024年8月1日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
【ACL2024】语言模型对齐的不确定性感知学习
专知会员服务
26+阅读 · 2024年6月10日
《大模型对齐方法》最新综述
专知会员服务
85+阅读 · 2024年3月8日
专知会员服务
45+阅读 · 2021年5月6日
SemanticAdv:基于语义属性的对抗样本生成方法
机器之心
14+阅读 · 2019年7月12日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月13日
VIP会员
相关主题
最新内容
边缘计算的军事应用
专知会员服务
6+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
8+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
13+阅读 · 8月7日
相关VIP内容
大语言模型对齐研究综述
专知会员服务
56+阅读 · 2024年8月1日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
【ACL2024】语言模型对齐的不确定性感知学习
专知会员服务
26+阅读 · 2024年6月10日
《大模型对齐方法》最新综述
专知会员服务
85+阅读 · 2024年3月8日
专知会员服务
45+阅读 · 2021年5月6日
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员