Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

PLeaS -- Merging Models with Permutations and Least Squares

About

The democratization of machine learning systems has made the process of fine-tuning accessible to practitioners, leading to a wide range of open-source models fine-tuned on specialized tasks and datasets. Recent work has proposed to merge such models to combine their functionalities. However, prior approaches are usually restricted to models that are fine-tuned from the same base model. Furthermore, the final merged model is typically required to be of the same size as the original models. In this work, we propose a new two-step algorithm to merge models -- termed PLeaS -- which relaxes these constraints. First, leveraging the Permutation symmetries inherent in the two models, PLeaS partially matches nodes in each layer by maximizing alignment. Next, PLeaS computes the weights of the merged model as a layer-wise Least Squares solution to minimize the approximation error between the features of the merged model and the permuted features of the original models. PLeaS allows a practitioner to merge two models sharing the same architecture into a single performant model of a desired size, even when the two original models are fine-tuned from different base models. We also demonstrate how our method can be extended to address a challenging scenario where no data is available from the fine-tuning domains. We demonstrate our method to merge ResNet and ViT models trained with shared and different label spaces, and show improvement over the state-of-the-art merging methods of up to 15 percentage points for the same target compute while merging models trained on DomainNet and fine-grained classification tasks. Our code is open-sourced at https://github.com/SewoongLab/PLeaS-Merging .

Anshul Nasery, Jonathan Hayase, Pang Wei Koh, Sewoong Oh• 2024

Related benchmarks

TaskDatasetResultRank
Image ClassificationOxford-IIIT Pets
Accuracy86.5
259
Image ClassificationCUB-200 2011
Accuracy66.7
257
Image ClassificationDomainNet (test)--
209
Image ClassificationStanford Dogs
Accuracy61.6
130
Image ClassificationNABirds
Accuracy8.3
37
Image ClassificationCIFAR-100 50+50
Joint Accuracy73.3
25
Node Classification RetentionCora, CiteSeer, Actor, Amazon-Ratings, and Arxiv specialist subsets (held-out)
Retention A27
10
Image ClassificationDomainNet Same Label Space avg across pairs
Clipart Accuracy41.7
8
Image ClassificationCUB, Oxford-IIIT Pets, Stanford Dogs, NABirds Different Label Spaces (avg across pairs)
CUB Accuracy75.2
8
Showing 9 of 9 rows

Other info

Code

Follow for update