Booster:通过衰减有害扰动应对大型语言模型的有害微调
Booster: Tackling Harmful Fine-tuning for Large Language Models via Attenuating Harmful Perturbation
AI总结:
针对大语言模型微调即服务中的有害微调攻击,本文提出对齐阶段方法 Booster,通过损失正则项衰减权重上的有害扰动,在保持下游性能的同时降低模型有害分数。
摘要:
有害微调攻击给大型语言模型的微调即服务带来了严重的安全隐患。尽管现有防御方法已被提出以缓解该问题,但其性能仍远不能令人满意,且问题的根本原因尚未被完全揭示。为此,本文表明,模型权重上的有害扰动可能是对齐被破坏的一个可能原因。为了衰减有害扰动的负面影响,我们提出了一种对齐阶段的解决方案,命名为 Booster。在技术上,除原始对齐损失外,我们在对齐阶段的优化中加入了一个损失正则项。该正则项确保模型在模拟有害扰动后的有害损失降低得到衰减,从而缓解后续的微调风险。实验结果表明,Booster 能够在保持下游任务性能的同时,有效降低微调后模型的有害分数。我们的代码可在 https://github.com/git-disl/Booster 获取。
英文摘要:
Harmful fine-tuning attack poses serious safety concerns for large language models' fine-tuning-as-a-service. While existing defenses have been proposed to mitigate the issue, their performances are still far away from satisfactory, and the root cause of the problem has not been fully recovered. To this end, we in this paper show that harmful perturbation over the model weights could be a probable cause of alignment-broken. In order to attenuate the negative impact of harmful perturbation, we propose an alignment-stage solution, dubbed Booster. Technically, along with the original alignment loss, we append a loss regularizer in the alignment stage's optimization. The regularizer ensures that the model's harmful loss reduction after the simulated harmful perturbation is attenuated, thereby mitigating the subsequent fine-tuning risk. Empirical results show that Booster can effectively reduce the harmful score of the fine-tuned models while maintaining the performance of downstream tasks. Our code is available at https://github.com/git-disl/Booster.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。