TL;DR
PGSB (Pretrained-Guided Shared Basis) is a novel framework for merging multiple LoRA adapters into a single, unified multi-task model. By extracting a shared subspace across tasks and refining it to align with the geometric structure of the original pretrained weights, PGSB significantly reduces interference between tasks and outperforms existing state-of-the-art merging methods.
What Problem Does This Paper Address?
Adapting massive pretrained models to various downstream tasks is a cornerstone of modern AI. While Low-Rank Adaptation (LoRA) is a popular, parameter-efficient way to do this, it leaves us with a "library" of separate adapters. Ideally, we want to merge these into one multi-task model.
However, merging LoRA adapters is tricky. Most existing methods treat task-specific updates as directly comparable objects and merge them in their original low-rank spaces. This approach ignores two vital factors:
- Shared Support: Which update directions are actually useful across multiple tasks?
- Geometric Compatibility: How do these updates interact with the original pretrained weights ($W_0$)?
If the merged update isn't compatible with the "geometry" of the base model, performance tanks due to task interference and representational distortion.
Methods
The authors propose a two-stage framework called Pretrained-Guided Shared Basis (PGSB).
- Task-shared Subspace Extraction (TSE): Instead of merging updates directly, PGSB first identifies a common "language" (a shared basis) for all tasks. It concatenates the LoRA updates from different tasks and uses Singular Value Decomposition (SVD) to extract the most important shared directions.
- Pretrained-coupled Coordinate Refinement (PCR): This is the core innovation. Even with a shared basis, there are many ways to represent coordinates. PGSB refines the basis by looking at how the pretrained weights ($W_0$) interact with these shared directions. By performing another SVD on a "weighted pretrained coupling" matrix, it rotates the basis to ensure that the dominant interactions are concentrated, making the space much friendlier for coordinate-wise merge rules like TIES or DARE.
Crucially, the authors provide an efficient implementation that performs SVD on small, low-rank factors rather than full-sized weight matrices, keeping the computational overhead minimal.
Datasets
The authors evaluated PGSB across a wide range of benchmarks:
- Vision: Eight image classification tasks (including MNIST, DTD, and EuroSAT) using CLIP ViT-B/32 and ViT-L/14 backbones.
- Language (NLI): Six Natural Language Inference tasks (like SNLI and MNLI) using Llama-3-8B.
- Language (Reasoning): Eight Commonsense Reasoning tasks (like BoolQ and PIQA) using Llama-3-8B.
- Generalization: Seven additional vision datasets (like CIFAR100 and Caltech101) were used to test if the merged model preserved the base model's original transfer abilities.
Key Insights and Ideas
- The Base Model is the North Star: LoRA updates are learned as offsets to $W_0$. Therefore, the merging process must respect the geometry of $W_0$ to be effective.
- Coordinate Sensitivity: Popular merging rules like TIES (which trims small values and resolves sign conflicts) operate entry-by-entry. They are highly sensitive to the choice of basis. PGSB provides a "pretrained-compatible" basis where these rules can finally shine.
- Two-Sided Alignment: Unlike some previous methods that only align one side of the weight matrix, PGSB extracts both left and right support matrices, capturing the full interaction space of the updates.
- Preserving the "Free Lunch": Effective merging shouldn't just combine task knowledge; it should avoid breaking the general capabilities already present in the pretrained model. PGSB excels at maintaining this "transfer preservation."
Key Results
PGSB consistently outperformed strong baselines like KnOTS and Core Space across nearly all settings.
- Vision Performance: On ViT-B/32 using the TIES merge operator, PGSB achieved an average accuracy of 72.28%, compared to 64.54% for KnOTS and 68.34% for Core Space.
- Language Performance: On NLI tasks with Llama-3, PGSB reached an average of 93.73% (with TIES), surpassing all other merging spaces.
- Efficiency: Despite the extra refinement step, the "efficient" version of PGSB has a complexity of $\mathcal{O}(n^2Tr + T^3r^3)$, which matches the state-of-the-art Core Space method. With caching, it is actually faster than Core Space on vision backbones.
Limitations and Future Work
While highly effective, the paper notes a few areas for further exploration:
- Preprocessing Step: PGSB requires an initial SVD-based preprocessing step. While efficient, it's still an extra step compared to simple averaging.
- Linear Focus: The current work focuses on merging linear layers (where LoRA is typically applied). Extending this logic to other architectural components could be beneficial.
- Hyperparameter Search: Like most merging methods, finding the optimal scaling coefficients still requires a validation-based search, though PGSB's structured space actually makes this search more efficient than baselines.
Summary updated