Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Update Your Transformer to the Latest Release: Re-Basin of Task Vectors

About

Foundation models serve as the backbone for numerous specialized models developed through fine-tuning. However, when the underlying pretrained model is updated or retrained (e.g., on larger and more curated datasets), the fine-tuned model becomes obsolete, losing its utility and requiring retraining. This raises the question: is it possible to transfer fine-tuning to a new release of the model? In this work, we investigate how to transfer fine-tuning to a new checkpoint without having to re-train, in a data-free manner. To do so, we draw principles from model re-basin and provide a recipe based on weight permutations to re-base the modifications made to the original base model, often called task vector. In particular, our approach tailors model re-basin for Transformer models, taking into account the challenges of residual connections and multi-head attention layers. Specifically, we propose a two-level method rooted in spectral theory, initially permuting the attention heads and subsequently adjusting parameters within select pairs of heads. Through extensive experiments on visual and textual tasks, we achieve the seamless transfer of fine-tuned knowledge to new pre-trained backbones without relying on a single training step or datapoint. Code is available at https://github.com/aimagelab/TransFusion.

Filippo Rinaldi, Giacomo Capitani, Lorenzo Bonicelli, Donato Crisostomi, Federico Bolelli, Elisa Ficarra, Emanuele Rodol\`a, Simone Calderara, Angelo Porrello• 2025

Related benchmarks

TaskDatasetResultRank
Image ClassificationDTD
Accuracy64.1
487
Image ClassificationRESISC45
Accuracy73.36
472
Image ClassificationSVHN
Accuracy53.26
395
Image ClassificationGTSRB
Accuracy56.78
291
Image ClassificationSUN397, Cars, RESISC45, EuroSAT, SVHN, GTSRB, MNIST, DTD (test)
Avg Acc63.74
114
Image ClassificationEuroSAT
Accuracy63.21
58
Image Classification8-Vision benchmark (EuroSAT, GTSRB, SVHN, RESISC45, DTD, Cars, MNIST, SUN397) (test)
Accuracy (EuroSAT)50.3
13
Showing 7 of 7 rows

Other info

Follow for update