arXiv:2410.21804cs.LGcs.CV2024-10TPAMI被引 27

针对多任务模型融合中任务冲突问题,提出动态专家混合的高效融合方法。

Efficient and Effective Weight-Ensembling Mixture of Experts for Multi-Task Model Merging

  • 区分关键与非关键模块,仅对关键模块构建动态专家混合结构。
  • 在多个数据集上优于当前最优融合方法,提升泛化与鲁棒性。
  • 通过共享路由和剪枝减少参数量,适合资源受限场景部署。

多任务学习(MTL)利用共享模型完成多个任务并促进知识迁移。基于任务算术的多任务学习研究表明,合并独立微调模型的参数可有效实现多任务学习。然而,现有方法主要在原始参数空间中寻找静态最优解,因任务间固有差异和潜在干扰常导致性能下降。为此,本文提出权重集成专家混合(WEMoE)方法用于多任务模型融合。首先通过分析Transformer模型核心模块在微调前后参数变化,识别出关键(敏感)模块;随后静态合并非关键模块,将关键模块转换为专家混合(MoE)结构。推理时,根据输入样本动态融合MoE中的专家模块,实现更灵活自适应的融合。在此基础上,进一步提出高效有效的E-WEMoE方法:通过移除关键模块中非必要组件,并在多个MoE模块间共享路由机制,显著降低可训练参数、总参数量及计算开销。跨多种架构与任务的实验结果表明,WEMoE与E-WEMoE在多任务性能、泛化能力与鲁棒性方面均优于当前最优模型融合方法。

原文摘要 · Abstract (English)

Multi-task learning (MTL) leverages a shared model to accomplish multiple tasks and facilitate knowledge transfer. Recent research on task arithmetic-based MTL demonstrates that merging the parameters of independently fine-tuned models can effectively achieve MTL. However, existing merging methods primarily seek a static optimal solution within the original model parameter space, which often results in performance degradation due to the inherent diversity among tasks and potential interferences. To address this challenge, in this paper, we propose a Weight-Ensembling Mixture of Experts (WEMoE) method for multi-task model merging. Specifically, we first identify critical (or sensitive) modules by analyzing parameter variations in core modules of Transformer-based models before and after finetuning. Then, our WEMoE statically merges non-critical modules while transforming critical modules into a mixture-of-experts (MoE) structure. During inference, expert modules in the MoE are dynamically merged based on input samples, enabling a more flexible and adaptive merging approach. Building on WEMoE, we further introduce an efficient-and-effective WEMoE (E-WEMoE) method, whose core mechanism involves eliminating non-essential elements in the critical modules of WEMoE and implementing shared routing across multiple MoE modules, thereby significantly reducing both the trainable parameters, the overall parameter count, and computational overhead of the merged model by WEMoE. Experimental results across various architectures and tasks demonstrate that both WEMoE and E-WEMoE outperform state-of-the-art (SOTA) model merging methods in terms of MTL performance, generalization, and robustness.

模型融合专家混合多任务学习高效推理

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