用贝叶斯方法融合多个专家模型,不需重新训练就能达到接近独立模型的性能。
Bayesian Model Merging

- 基于强先验的贝叶斯回归,利用锚模型引导权重合并
- 在8任务视觉融合中达95.1分,接近8个专家平均分95.8
- 支持无数据版本,适用于隐私敏感或数据受限场景
模型融合旨在不进行联合微调的情况下,将多个任务专用的专家模型合并为一个统一模型,为数据或计算资源受限时提供多任务学习的实用替代方案。现有方法存在两大局限:(1) 忽视强锚模型的归纳偏置,从零估计合并权重;(2) 在网络不同模块间共享超参数设置,缺乏全局优化策略。本文提出贝叶斯模型融合(BMM),一种即插即用的双层优化框架:内层将模型融合建模为基于锚模型强先验的激活相关贝叶斯回归,获得高效闭式解;外层通过贝叶斯优化在小验证集上全局搜索模块级超参数。此外,我们揭示了激活统计与任务向量之间的关键对齐关系,推导出无需辅助数据的无数据变体,可直接估计回归所需的格拉姆矩阵。在涵盖最多20个视觉任务和5个语言任务的广泛基准测试中,BMM持续优于所有即插即用锚基方法(如TA、WUDI-Merging、TSV)。尤其在ViT-L/14的8任务融合任务中,单一合并模型达到95.1分,接近8个任务专属专家的平均分95.8。
原文摘要 · Abstract (English)
Model merging aims to combine multiple task-specific expert models into a single model without joint retraining, offering a practical alternative to multi-task learning when data access or computational budget is limited. Existing methods, however, face two key limitations: (1) they overlook the valuable inductive bias of strong anchor models and estimate the merged weights from scratch, and (2) they rely on a shared hyperparameter setting across different modules of the network, lacking a global optimization strategy. This paper introduces Bayesian Model Merging (BMM), a plug-and-play bi-level optimization framework, where the inner level formulates the model merging as an activation-based Bayesian regression under a strong prior induced by an anchor model, yielding an efficient closed-form solution; and the outer level leverages a Bayesian optimization procedure to search module-specific hyperparameters globally based on a small validation set. Furthermore, we reveal a key alignment between activation statistics and task vectors, enabling us to derive a data-free variant of BMM that estimates the Gram matrix for regression without any auxiliary data. Across extensive benchmarks, including up to 20-task merging in vision and 5-task merging in language, BMM consistently outperforms all plug-and-play anchor baselines (e.g., TA, WUDI-Merging, and TSV). In particular, on the ViT-L/14 benchmark for 8-task merging, a single merged model reaches 95.1, closely matching the average performance of eight task-specific experts (95.8).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。