Fine-tuning pre-trained language models has become the prevalent paradigm for building downstream NLP models. Oftentimes fine-tuned models are readily available but their training data is not, due to data privacy or intellectual property concerns. This creates a barrier to fusing knowledge across individual models to yield a better single model. In this paper, we study the problem of merging individual models built on different training data sets to obtain a single model that performs well both across all data set domains and can generalize on out-of-domain data. We propose a dataless knowledge fusion method that merges models in their parameter space, guided by weights that minimize prediction differences between the merged model and the individual models. Over a battery of evaluation settings, we show that the proposed method significantly outperforms baselines such as Fisher-weighted averaging or model ensembling. Further, we find that our method is a promising alternative to multi-task learning that can preserve or sometimes improve over the individual models without access to the training data. Finally, model merging is more efficient than training a multi-task model, thus making it applicable to a wider set of scenarios.
翻译:在建立下游NLP模型时,微调预训练语言模型已成为主流范式。但通常情况下,由于数据隐私或知识产权问题,微调模型已经可用,但训练数据不可用。这就为跨越各个模型融合知识以生成更好的单一模型创建了一个障碍。在本文中,我们研究了建立在不同训练数据集上的个别模型的合并问题,以获得跨所有数据集领域都能表现良好的单一模型,并能推广到域外数据。我们提出了一种无数据知识融合方法,该方法在参数空间中合并模型,由权重引导,使合并模型与个别模型之间的预测差异最小化。在一系列评估设置中,我们展示了所提出的方法显著优于基线,例如Fisher加权平均或模型集成。此外,我们发现我们的方法是多任务学习的一个有前途的替代方案,能在没有访问训练数据的情况下保留或有时提高个别模型的表现。最后,模型合并比训练多任务模型更高效,因此适用于更广泛的场景。