arXiv:2410.17146cs.LGcs.CV2024-10ICLR被引 42

通过分层线性缩放防止遗忘,提升模型微调与合并效果

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

  • 按网络深度线性缩放参数更新,浅层保通用特征,深层留任务特异性
  • 在多任务场景中减少负干扰,显著提升合并后模型性能
  • 兼容现有方法,适合需要稳定泛化能力的模型部署场景

微调预训练模型已成为赋予其专有知识的标准方法,但面临根本性挑战:(i) 微调常导致灾难性遗忘,目标领域性能提升伴随其他任务泛化能力下降;(ii) 来自不同任务的微调检查点合并会引发显著性能损失。为此,我们提出 LiNeS(Layer-increasing Network Scaling),一种后训练编辑技术,旨在保留预训练泛化能力的同时增强微调任务表现。LiNeS 根据参数所在层的深度进行线性缩放,保持浅层接近预训练值以维持通用特征,允许深层保留任务特定表示。在多任务模型合并场景中,对合并参数进行分层缩放可降低负面任务干扰。LiNeS 在视觉与自然语言处理多个基准上均展现出显著提升,缓解遗忘、增强分布外泛化能力,并可无缝集成至现有多任务模型合并基线,提升各类基准与模型规模下的性能。该方法实现简单、计算高效,且与多种现有技术互补。代码已开源。

原文摘要 · Abstract (English)

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

模型微调防遗忘模型合并分层缩放

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。