Transformer Fusion with Optimal Transport
Moritz Imfeld, Jacopo Graldi, Marco Giordano, Thomas Hofmann, Sotiris Anagnostidis, Sidak Pal Singh
摘要
Fusion is a technique for merging multiple independently-trained neural networks in order to combine their capabilities. Past attempts have been restricted to the case of fully-connected, convolutional, and residual networks. This paper presents a systematic approach for fusing two or more transformer-based networks exploiting Optimal Transport to (soft-)align the various architectural components. We flesh out an abstraction for layer alignment, that can generalize to arbitrary architectures - in principle - and we apply this to the key ingredients of Transformers such as multi-head self-attention, layer-normalization, and residual connections, and we discuss how to handle them via various ablation studies. Furthermore, our method allows the fusion of models of different sizes (heterogeneous fusion), providing a new and efficient way to compress Transformers. The proposed approach is evaluated on both image classification tasks via Vision Transformer and natural language modeling tasks using BERT. Our approach consistently outperforms vanilla fusion, and, after a surprisingly short finetuning, also outperforms the individual converged parent models. In our analysis, we uncover intriguing insights about the significant role of soft alignment in the case of Transformers. Our results showcase the potential of fusing multiple Transformers, thus compounding their expertise, in the budding paradigm of model fusion and recombination. Code is available at https://github.com/graldij/transformer-fusion.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion 引用了 Federated Learning with Matched Averaging
- Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion 引用了 Merging Models with Fisher-Weighted Averaging
- Transporting Task Vectors across Different Architectures without Training 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Transporting Task Vectors across Different Architectures without Training 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling Vision Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time 引用了 Scaling Vision Transformers
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time 引用了 Merging Models with Fisher-Weighted Averaging
- Merging Models with Fisher-Weighted Averaging 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Preference-Aligned LoRA Merging: Preserving Subspace Coverage and Addressing Directional Anisotropy 引用了 Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion
- Preference-Aligned LoRA Merging: Preserving Subspace Coverage and Addressing Directional Anisotropy 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Preference-Aligned LoRA Merging: Preserving Subspace Coverage and Addressing Directional Anisotropy 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Preference-Aligned LoRA Merging: Preserving Subspace Coverage and Addressing Directional Anisotropy 引用了 Merging Models with Fisher-Weighted Averaging
- Model Fusion through Bayesian Optimization in Language Model Fine-Tuning 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Model Fusion through Bayesian Optimization in Language Model Fine-Tuning 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Merging Models with Fisher-Weighted Averaging 引用了 Federated Learning with Matched Averaging
- Merging Models with Fisher-Weighted Averaging 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Symphony-MoE: Harmonizing Disparate Pre-trained Models into a Coherent Mixture-of-Experts 引用了 Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
引用它的顶会 Paper10
- Model Fusion through Bayesian Optimization in Language Model Fine-TuningChaeyun Jang, Hyungi Lee, Jungtaek Kim, Juho LeeNeurIPS 2024 · 8 次引用
- Transporting Task Vectors across Different Architectures without TrainingFilippo Rinaldi, Aniello Panariello, Giacomo Salici, Angelo Porrello 等ICML 2026 · 3 次引用
- Preference-Aligned LoRA Merging: Preserving Subspace Coverage and Addressing Directional AnisotropyWooseong Jeong, Wonyoung Lee, Kuk-Jin YoonCVPR 2026 · 1 次引用
- Symphony-MoE: Harmonizing Disparate Pre-trained Models into a Coherent Mixture-of-ExpertsQi Wang, Hanyang Peng, Yue YuAAAI 2026 · 1 次引用
- Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model FusionBinchi Zhang, Zaiyi Zheng, Zhengzhang Chen, Jundong LiICML 2025
它引用的 Paper13
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs 等ICML 2022 · 1,464 次引用
- Federated Learning with Matched AveragingHongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris S. Papailiopoulos 等ICLR 2020 · 1,368 次引用
- Scaling Vision TransformersXiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, Lucas BeyerCVPR 2022 · 767 次引用
- Merging Models with Fisher-Weighted AveragingMichael Matena, Colin RaffelNeurIPS 2022 · 741 次引用
相关 Paper
- Model Fusion via Optimal TransportSidak Pal Singh, Martin JaggiNeurIPS 2020 · 330 次引用
- Representational Alignment Across Model Layers and Brain Regions with Multi-Level Optimal TransportShaan Shah, Meenakshi KhoslaICLR 2026 · 4 次引用
- LS-Merge: Merging Language Models in Latent SpaceBedionita Soro, Aoxuan Silvia Zhang, Bruno Andreis, Jaehyeong Jo 等ICLR 2026
- Multimodal Token Fusion for Vision TransformersYikai Wang, Xinghao Chen, Lele Cao, Wenbing Huang 等CVPR 2022 · 214 次引用
- TaskFusion: An Efficient Transfer Learning Architecture with Dual Delta Sparsity for Multi-Task Natural Language ProcessingZichen Fan, Qirui Zhang, Pierre Abillama, Sara Shoouri 等ISCA 2023 · 15 次引用
