TL;DR
BYOM (Build Your Own Multi-task model) is a data-free, training-free framework that merges multiple task-specific models into a single multi-task model without the typical performance degradation caused by task interference. By compressing task-specific knowledge into sparse vectors or low-rank matrices, BYOM achieves accuracy comparable to maintaining separate single-task models while significantly reducing parameter storage costs.
What Problem Does This Paper Address?
Finetuning large pre-trained foundation models (like ViT or Flan-T5) for specific downstream tasks has become standard practice. However, deploying a separate large model for every single task is incredibly expensive in terms of storage and serving costs.
While Multi-Task Learning (MTL) trains a single model to handle multiple tasks simultaneously, it requires access to all task datasets at once—a luxury often blocked by data privacy concerns or prohibitive compute costs.
Recently, "model merging" has emerged as an alternative: blending the weights of independently finetuned models without retraining them. Unfortunately, existing data-free merging methods (like Task Arithmetic or TIES-Merging) suffer from severe task interference, where parameter updates from different tasks conflict and degrade overall performance. Methods that do mitigate this interference typically require access to original training data or expensive gradient calculations. BYOM aims to deliver the best of both worlds: data-free, computation-efficient model merging with negligible performance loss.
Methods
The authors introduce two parameter-efficient variants of BYOM depending on how the underlying models were trained:
- BYOM-FFT (For Fully Finetuned Models): Instead of simply averaging model weights, BYOM-FFT first creates a shared base model ($\theta^*$) using a standard merging algorithm (like Task Arithmetic). It then calculates a task-specific "residual vector" ($u_t = \theta_t - \theta^*$) for each task. Finally, it applies magnitude pruning to keep only the top-$m\%$ (e.g., 1% to 10%) highest-magnitude elements of this residual, zeroing out the rest. At inference time, the model dynamically routes to $\theta^* + \hat{u}_t(m)$.
- BYOM-LoRA (For LoRA-Finetuned Models): For models trained using Low-Rank Adaptation (LoRA), the task-specific update is represented by two low-rank matrices, $A_t$ and $B_t$. BYOM-LoRA applies Singular Value Decomposition (SVD) directly to the combined update product ($A_t B_t^\top$) to compress it into an even lower-rank representation ($q \ll r$). This extracts the core task-specific knowledge into a highly compact form.
Both approaches are entirely data-free and training-free, requiring only the weights of the finetuned models.
Datasets
The authors evaluated BYOM across both Computer Vision (CV) and Natural Language Processing (NLP) domains:
- CV Image Classification: MNIST, GTSRB, SVHN, RESISC45, SUN397, EuroSAT, DTD, and Cars (using CLIP variants with ViT-B/32, ViT-B/16, and ViT-L/14 backbones).
- NLP Text Classification: MRPC, RTE, SST-2, and QNLI (using the Flan-T5-base backbone).
- Robustness Benchmarks: The Natural group of the Visual Task Adaptation Benchmark (VTAB).
Key Insights and Ideas
- Task Interference is Ubiquitous: The authors demonstrate that task interference occurs not just between highly distinct tasks (like texture recognition vs. car classification), but even when splitting a single dataset (Cars) into two highly similar tasks with disjoint label sets. Simple weight averaging cannot resolve this.
- Merge Before Pruning: A naive approach ("Post-Pruning") prunes the task vector relative to the pre-trained model before any merging. BYOM-FFT flips this by pruning the residual after creating a shared merged model. This ensures that shared knowledge across tasks is preserved in the base parameters, while only unique, task-specific nuances are kept in the sparse vectors.
- Holistic LoRA Compression: For LoRA models, performing SVD on the combined weight update matrix ($A_t B_t^\top$) yields significantly better accuracy than trying to compress the individual $A_t$ and $B_t$ matrices separately.
Key Results
BYOM consistently closed the performance gap between merged multi-task models and isolated single-task models:
- Reusing Fully Finetuned Models: As shown in Figure 1, while standard merging techniques like Task-Arithmetic and TIES-Merging see their accuracy plummet by 10–20% compared to the Single-Task baseline, BYOM-FFT (keeping the top 10% parameters) achieves virtually identical accuracy to the single-task baseline while utilizing 4.5× fewer parameters overall.
- Reusing LoRA Models: BYOM-LoRA with a rank of $q=16$ matched the single-task LoRA baseline performance while being 1.6× more parameter-efficient.
- Generality: BYOM-FFT is highly flexible; it can be stacked on top of other merging algorithms (like RegMean or Fisher-Merging) to consistently boost their multi-task performance.
Limitations and Future Work
Despite its strong performance, BYOM has a few key constraints:
- Homogeneous Architectures: It currently requires all task-specific models to share the exact same neural network architecture.
- Shared Initialization: The models must have been finetuned from the exact same pre-trained checkpoint.
- Explicit Task Routing: At inference time, the system must be explicitly told which task it is evaluating so it can load the correct task-specific sparse vector or low-rank matrix. Eliminating this requirement via automated task routing is a promising direction for future research.
Summary updated