Skip to main content
QUICK REVIEW

[Paper Review] Model Fusion via Optimal Transport

Sidak Pal Singh, Martin Jaggi|arXiv (Cornell University)|Oct 12, 2019
Advanced Neural Network ApplicationsComputer Science32 references7 citations
TL;DR

This paper proposes a one-shot model fusion method for neural networks using optimal transport (OT) to align neurons across differently trained models before averaging their weights. By computing the Wasserstein barycenter of layer-wise weight distributions, the method achieves superior performance over vanilla averaging and enables effective knowledge transfer even across heterogeneous, non-i.i.d. data, with strong results in model compression and as a proxy for ensembles.

ABSTRACT

Combining different models is a widely used paradigm in machine learning applications. While the most common approach is to form an ensemble of models and average their individual predictions, this approach is often rendered infeasible by given resource constraints in terms of memory and computation, which grow linearly with the number of models. We present a layer-wise model fusion algorithm for neural networks that utilizes optimal transport to (soft-) align neurons across the models before averaging their associated parameters. We show that this can successfully yield "one-shot" knowledge transfer (i.e, without requiring any retraining) between neural networks trained on heterogeneous non-i.i.d. data. In both i.i.d. and non-i.i.d. settings , we illustrate that our approach significantly outperforms vanilla averaging, as well as how it can serve as an efficient replacement for the ensemble with moderate fine-tuning, for standard convolutional networks (like VGG11), residual networks (like ResNet18), and multi-layer perceptrons on CIFAR10, CIFAR100, and MNIST. Finally, our approach also provides a principled way to combine the parameters of neural networks with different widths, and we explore its application for model compression. The code is available at the following link, https://github.com/sidak/otfusion.

Motivation & Objective

  • To address the inefficiency of ensemble methods due to high memory and computational costs in resource-constrained settings.
  • To overcome the poor performance of vanilla weight averaging when merging neural networks with non-identical weight parameterizations.
  • To enable one-shot fusion of models trained on heterogeneous, non-i.i.d. data without retraining or data sharing.
  • To provide a principled method for merging models of different widths, especially for model compression.
  • To serve as an efficient, data-free alternative to distillation and ensemble methods in federated and decentralized learning.

Proposed method

  • The method uses optimal transport to compute a soft, structured alignment between neurons in corresponding layers of two or more parent models based on activation similarity or incoming weight distributions.
  • It formulates layer-wise fusion as computing the Wasserstein barycenter of the probability measures defined by the weight vectors of the parent models.
  • The fusion process is applied layer by layer, enabling one-shot merging without retraining.
  • The method supports merging models with different widths by aligning neurons via OT before averaging.
  • It is used as a post-processing tool for structured pruning and as an initialization strategy for distillation or fine-tuning.
  • The approach is evaluated on CIFAR-10, CIFAR-100, and MNIST using VGG11, ResNet18, and MLPs, with ablation on hyperparameters and initialization strategies.

Experimental results

Research questions

  • RQ1Can optimal transport-based layer-wise fusion outperform vanilla averaging in merging neural networks trained on non-i.i.d. data?
  • RQ2Can the method successfully transfer knowledge between models trained on different tasks or label sets?
  • RQ3Can OT fusion serve as an effective proxy for ensemble averaging without retraining or data access?
  • RQ4How effective is OT fusion for model compression, especially when distillation is not feasible?
  • RQ5Does OT-based initialization improve distillation performance compared to random or model-based initialization?

Key findings

  • On CIFAR-10, OT fusion achieved 98.30% test accuracy with VGG11, significantly outperforming vanilla averaging (98.11%) and distillation (98.26% on average).
  • For ResNet18 on CIFAR-100, OT fusion reached 94.45% accuracy, surpassing vanilla averaging (93.89%) and matching or exceeding distillation results.
  • When compressing a larger teacher model to half its size (ρ=2), OT fusion achieved 98.26% accuracy, outperforming random initialization (98.13%) and model $M_B$ initialization (98.17%) in distillation.
  • In the extreme compression setting (ρ=10), OT fusion achieved 97.59% accuracy with distillation, compared to 97.21% with random and 97.55% with $M_B$ initialization, showing consistent gains.
  • OT fusion with fine-tuning matched or exceeded distillation performance in all settings, demonstrating its viability as a lightweight alternative.
  • The method successfully enabled knowledge transfer between models trained on different label sets, inheriting unique capabilities from each parent while outperforming both individually.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.