提出一种无需重放数据的LoRA防遗忘正则化方法。
Mask the Target: A Plug-and-Play Regularizer Against LoRA Forgetting

- 在输出空间移除目标词,仅对非目标词汇做KL正则化。
- 在分布差异大时显著缓解模型遗忘,提升新旧能力平衡。
- 无需修改架构或推理流程,适配所有LoRA变体。
低秩适应(LoRA)已成为微调大语言模型以适配新领域、任务和用户的主要方法。然而,仅关注适应性能可能掩盖一个重要缺陷:LoRA更新可能在目标分布上提升表现,同时损害预训练与对齐阶段学到的原有能力。我们发现,当适应分布与模型原始训练或对齐分布差异显著时,遗忘问题尤为严重。实际场景中,原始训练与对齐数据通常不可用,加剧了该挑战。为此,我们在无重放设置下研究了LoRA在新学习与遗忘之间的权衡,并提出一种可直接嵌入现有训练流程的简单输出空间正则化器。该方法将真实目标词从基线模型与适配模型的分布中移除,重新归一化剩余概率,并仅对非目标词汇施加KL正则化。该策略保留了基线模型对替代词的相对偏好,同时不直接对抗适应所需的交叉熵信号。由于正则化仅作用于损失层面,无需重放数据、架构修改、适配器重设计或推理开销,可直接应用于现有LoRA变体。在所有测试的LoRA变体及多种骨干模型上,该方法在适应分布与原始分布差异较大时,显著提升了新学习与遗忘之间的性能边界,表明其具有广泛适用性,有助于实现更可靠的LLM更新。
原文摘要 · Abstract (English)
Low-Rank Adaptation (LoRA) has become one of the most widely used fine-tuning mechanisms for adapting large language models to new domains, tasks, and users. Yet adaptation performance alone can obscure an important failure mode: LoRA updates may improve performance on the target distribution while degrading prior capabilities learned during pretraining and alignment. We show that this forgetting becomes especially severe when the adaptation distribution differs substantially from the models original training or alignment distributions. The challenge is amplified in practical settings, where the original training and alignment data are typically unavailable. Motivated by this constraint, we study how LoRA based adaptation balances new learning against forgetting in a replay-free setting, and introduce a simple output space regularizer that can be added directly to existing training pipelines. Our method removes the ground-truth token from both the base and adapted model distributions, renormalizes the remaining probabilities, and applies KL regularization only over the non-target vocabulary. This preserves the base models relative preferences among alternative tokens without directly opposing the cross-entropy signal required for adaptation. As the regularizer acts only at the loss level, it requires no replay data, architectural changes, adapter redesign, or inference-time overhead, and can be applied directly to existing LoRA variants. Across all LoRA variants tested and across various backbones, our method improves the frontier between new learning and forgetting when the adaptation distribution differs substantially from the base models original training or alignment distributions, suggesting a broadly applicable route toward more reliable LLM updating.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。