arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.17146cs.LGcs.CV
收藏

LiNeS: 后训练层缩放防止遗忘并增强模型合并

LiNeS: Post-training Layer Scaling Prevents Forgetting and Enhances Model Merging

EPFL(洛桑联邦理工学院);Google DeepMind(谷歌DeepMind);University of Geneva(日内瓦大学);Meta FAIR

Ke Wang, Nikolaos Dimitriadis, Alessandro Favero, Guillermo Ortiz-Jimenez, Francois Fleuret, Pascal Frossard

AI总结:

提出后训练层缩放方法LiNeS,通过按层深度线性缩放参数更新,保持浅层通用特征、深层任务特征,缓解遗忘并增强多任务模型合并性能,在视觉和NLP基准上显著提升。

摘要:

对预训练模型进行微调已成为赋予其专门知识的标准方法,但这带来了根本性挑战。特别是,(i) 微调常常导致灾难性遗忘,即目标域上的改进会损害其他任务的泛化能力;(ii) 合并来自不同任务的微调检查点可能导致显著的性能损失。为应对这些挑战,我们引入了LiNeS(层递增网络缩放),一种后训练编辑技术,旨在保持预训练的泛化能力,同时增强微调后的任务性能。LiNeS根据网络中的层深度线性缩放参数更新,保持浅层接近其预训练值以保留通用特征,同时允许深层保留任务特定表示。在多任务模型合并场景中,对合并参数进行逐层缩放可减少负面任务干扰。LiNeS在视觉和自然语言处理的多个基准上,在单任务和多任务设置中均展现出显著改进。它缓解了遗忘,增强了分布外泛化,与现有的多任务模型合并基线无缝集成,提升了它们在基准和模型规模上的性能,并且可以在通过RLHF对齐不同奖励的LLM策略合并时增强泛化。我们的方法实现简单、计算高效,并与许多现有技术互补。我们的源代码可在https://github.com/wang-kee/LiNeS获取。

英文摘要:

Fine-tuning pre-trained models has become the standard approach to endow them with specialized knowledge, but it poses fundamental challenges. In particular, \textit{(i)} fine-tuning often leads to catastrophic forgetting, where improvements on a target domain degrade generalization on other tasks, and \textit{(ii)} merging fine-tuned checkpoints from disparate tasks can lead to significant performance loss. To address these challenges, we introduce LiNeS, Layer-increasing Network Scaling, a post-training editing technique designed to preserve pre-trained generalization while enhancing fine-tuned task performance. LiNeS scales parameter updates linearly based on their layer depth within the network, maintaining shallow layers close to their pre-trained values to preserve general features while allowing deeper layers to retain task-specific representations. In multi-task model merging scenarios, layer-wise scaling of merged parameters reduces negative task interference. LiNeS demonstrates significant improvements in both single-task and multi-task settings across various benchmarks in vision and natural language processing. It mitigates forgetting, enhances out-of-distribution generalization, integrates seamlessly with existing multi-task model merging baselines improving their performance across benchmarks and model sizes, and can boost generalization when merging LLM policies aligned with different rewards via RLHF. Our method is simple to implement, computationally efficient and complementary to many existing techniques. Our source code is available at https://github.com/wang-kee/LiNeS

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

↑