Saved in:
Bibliographic Details
Main Authors: Horoi, Stefan, Camacho, Albert Manuel Orozco, Belilovsky, Eugene, Wolf, Guy
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2407.05385
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917714729107456
author Horoi, Stefan
Camacho, Albert Manuel Orozco
Belilovsky, Eugene
Wolf, Guy
author_facet Horoi, Stefan
Camacho, Albert Manuel Orozco
Belilovsky, Eugene
Wolf, Guy
contents Combining the predictions of multiple trained models through ensembling is generally a good way to improve accuracy by leveraging the different learned features of the models, however it comes with high computational and storage costs. Model fusion, the act of merging multiple models into one by combining their parameters reduces these costs but doesn't work as well in practice. Indeed, neural network loss landscapes are high-dimensional and non-convex and the minima found through learning are typically separated by high loss barriers. Numerous recent works have been focused on finding permutations matching one network features to the features of a second one, lowering the loss barrier on the linear path between them in parameter space. However, permutations are restrictive since they assume a one-to-one mapping between the different models' neurons exists. We propose a new model merging algorithm, CCA Merge, which is based on Canonical Correlation Analysis and aims to maximize the correlations between linear combinations of the model features. We show that our alignment method leads to better performances than past methods when averaging models trained on the same, or differing data splits. We also extend this analysis into the harder setting where more than 2 models are merged, and we find that CCA Merge works significantly better than past methods. Our code is publicly available at https://github.com/shoroi/align-n-merge
format Preprint
id arxiv_https___arxiv_org_abs_2407_05385
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Harmony in Diversity: Merging Neural Networks with Canonical Correlation Analysis
Horoi, Stefan
Camacho, Albert Manuel Orozco
Belilovsky, Eugene
Wolf, Guy
Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
Combining the predictions of multiple trained models through ensembling is generally a good way to improve accuracy by leveraging the different learned features of the models, however it comes with high computational and storage costs. Model fusion, the act of merging multiple models into one by combining their parameters reduces these costs but doesn't work as well in practice. Indeed, neural network loss landscapes are high-dimensional and non-convex and the minima found through learning are typically separated by high loss barriers. Numerous recent works have been focused on finding permutations matching one network features to the features of a second one, lowering the loss barrier on the linear path between them in parameter space. However, permutations are restrictive since they assume a one-to-one mapping between the different models' neurons exists. We propose a new model merging algorithm, CCA Merge, which is based on Canonical Correlation Analysis and aims to maximize the correlations between linear combinations of the model features. We show that our alignment method leads to better performances than past methods when averaging models trained on the same, or differing data splits. We also extend this analysis into the harder setting where more than 2 models are merged, and we find that CCA Merge works significantly better than past methods. Our code is publicly available at https://github.com/shoroi/align-n-merge
title Harmony in Diversity: Merging Neural Networks with Canonical Correlation Analysis
topic Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2407.05385