Merging Models with Fisher-Weighted Averaging
Preprint
Abstract
Averaging the parameters of models that have the same architecture and initialization can provide a means of combining their respective capabilities. In this paper, we take the perspective that this "merging" operation can be seen as choosing parameters that approximately maximize the joint likelihood of the posteriors of the models' parameters. Computing a simple average of the models' parameters therefore corresponds to making an isotropic Gaussian approximation to their posteriors. We develop an alternative merging procedure based on the Laplace approximation where we approximate each model's posterior as a Gaussian distribution whose precision matrix corresponds to its Fisher information. We first show that our "Fisher merging" technique provides a performance boost in settings where simple parameter averaging is currently used -- specifically, robust fine-tuning and model ensembling. Then, we compare merging to standard gradient-based transfer learning and demonstrate that merging enables a fundamentally different method for transferring capabilities across models. Specifically, we show that Fisher merging is competitive with gradient-based transfer learning approaches (while being significantly cheaper) in intermediate-task training and domain-adaptive pre-training. We also show that our merging procedure makes it possible to combine models in previously unexplored ways. We release our code to facilitate future research into methods for merging models.Keywords
All Related Versions
This publication has 26 references indexed in Scilit:
- Robust fine-tuning of zero-shot models2022
- Measuring the Evolution of a Scientific Field through Citation FramesTransactions of the Association for Computational Linguistics, 2018
- ChemProt-3.0: a global chemical biology diseases mappingDatabase: The Journal of Biological Databases and Curation, 2016
- A Survey on Transfer LearningIEEE Transactions on Knowledge and Data Engineering, 2009
- Sided and Symmetrized Bregman CentroidsIEEE Transactions on Information Theory, 2009
- Model Selection and Model Averaging in Phylogenetics: Advantages of Akaike Information Criterion and Bayesian Approaches Over Likelihood Ratio TestsSystematic Biology, 2004
- Actively Searching for an Effective Neural Network EnsembleConnection Science, 1996
- Acceleration of Stochastic Approximation by AveragingSIAM Journal on Control and Optimization, 1992
- A Practical Bayesian Framework for Backpropagation NetworksNeural Computation, 1992
- On the mathematical foundations of theoretical statisticsPhilosophical Transactions of the Royal Society A, 1922