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

通过多教师知识蒸馏实现模型融合

Model Merging via Multi-Teacher Knowledge Distillation

The Pennsylvania State University(宾夕法尼亚州立大学)

Seyed Arshan Dalili, Mehrdad Mahdavi

AI总结:

通过多教师知识蒸馏实现模型融合,提出 SAMerging 方法,通过平坦性感知 PAC-Bayes 泛化界提升模型泛化能力,在视觉和 NLP 基准上取得 SOTA 性能。

摘要:

模型融合已作为一种轻量级替代方案出现,用以替代联合多任务学习(MTL),但融合模型的泛化性质仍 largely 未被探索。建立此类理论保证非 trivial,因为融合过程通常禁止访问原始训练数据,并涉及将在根本上异质的数据分布上微调的模型进行组合。没有对这些动态的 principled 理解,当前方法往往依赖启发式方法来近似最优参数组合。这种依赖在系数缩放上最为关键,系数缩放是调节每个微调模型对共享参数贡献大小的加权因子。然而,没有 principled 目标指导其选择,这些方法会导致性能脆弱且对缩放初始化高度敏感。我们通过(i)建立一个针对模型融合设置的新型平坦性感知 PAC-Bayes 泛化界来填补这一空白。这一分析引入了一个“跨任务异质性”项,正式捕捉了不同微调模型先验与目标多任务分布之间的不匹配。受此理论洞察引导,(ii)我们将模型融合框架为在稀缺、未标记数据上的多教师知识蒸馏。我们正式证明了最小化学生-教师 Kullback-Leibler 散度可以直接收紧融合模型的超额风险上界。受由平坦性感知界导出的指导,(iii)我们通过 SAMerging 方法将此目标操作化,该方法采用 Sharpness-Aware Minimization(SAM)来寻找平坦极小值。经验上,SAMerging 在视觉和 NLP 基准上实现了新的 SOTA,取得了显著的性能。代码可在 https://github.com/arshandalili/SAMerging 上获得。

英文摘要:

Model merging has emerged as a lightweight alternative to joint multi-task learning (MTL), yet the generalization properties of merged models remain largely unexplored. Establishing such theoretical guarantees is non-trivial, as the merging process typically forbids access to the original training data and involves combining fine-tuned models trained on fundamentally heterogeneous data distributions. Without a principled understanding of these dynamics, current methods often rely on heuristics to approximate the optimal combination of parameters. This dependence is most critical in coefficient scaling, the weighting factors that modulate the magnitude of each fine-tuned model's contribution to the shared parameter. However, without a principled objective to guide their selection, these methods lead to brittle performance and are highly sensitive to scaling initialization. We address this gap by (i) establishing a novel flatness-aware PAC-Bayes generalization bound specifically for the model merging setting. This analysis introduces a "cross-task heterogeneity" term that formally captures the mismatch between diverse fine-tuned model priors and the target multi-task distributions. Guided by this theoretical insight, (ii) we frame model merging as multi-teacher knowledge distillation on scarce, unlabeled data. We formally demonstrate that minimizing the student-teacher Kullback-Leibler divergence directly tightens the upper bound on the merged model's excess risk. Guided by the flatness-aware bound derived, (iii) we operationalize this objective via SAMerging, a method that employs Sharpness-Aware Minimization (SAM) to find flat minima. Empirically, SAMerging establishes a new state of the art across vision and NLP benchmarks, achieving remarkable performance. The code is available at https://github.com/arshandalili/SAMerging.

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

↑