TL;DR
Forcing a dozen specialized fine-tuned models into a single merged model often destroys performance on outlier tasks because their learned parameter directions clash. GRAM fixes this without needing any training data: instead of forcing one universal model, it reads the geometric "angles" between task weights, groups compatible tasks into $K$ friendly coalitions, and merges within those groups. Just allowing two merged models instead of one eliminates most of the interference and sets a new bar across vision, language, and medical benchmarks.
What Problem Does This Paper Address?
Imagine several hospitals each fine-tuning the same base LLM on local patient records. Due to strict privacy laws, they cannot share data—only model weights. Model merging promises to combine these task-specific updates ("task vectors," or the difference between fine-tuned and base weights) into a single multi-task model without retraining.
The catch? Almost all existing methods perform a uniform global merge, squishing every task into one shared parameter space. When tasks learn misaligned weight directions, projecting them onto a single low-rank basis throws away vital, task-specific information—a failure mode the authors call subspace interference. Worse, many methods that try to fix this require calibration data or activations at merge time, which violates strict data-privacy rules.
Methods
Instead of compressing $T$ models into $1$, GRAM (Group-wise Rank-Aware Model Merging) compresses $T$ models into a tiny budget of $K \ll T$ models (typically $K=2$), operating exclusively on frozen weights. The pipeline has three stages:
- Measuring Subspace Geometry (New): For each layer, GRAM decomposes each task's weight update via Singular Value Decomposition (SVD) to extract its output subspace. It measures compatibility between tasks using squared chordal distance—a metric based on the principal angles between subspaces that directly governs how much information is lost when two tasks share a basis.
- Grassmannian $k$-Means++ Clustering (New): Treating each task's subspace projector as a point on a geometric manifold (the Grassmannian), GRAM runs $k$-means++ on the layer-averaged chordal distances to partition tasks into $K$ geometrically coherent coalitions, backed by an $O(\log K)$ optimality guarantee.
- Adaptive Per-Coalition Merge (New + Standard): Within each group, rather than splitting the rank budget $r$ equally, a greedy adaptive rank allocator pools singular values across member tasks and hands more rank capacity to complex tasks with heavy spectral tails. Finally, it combines the selected singular components using a standard orthogonal polar-factor merge (following TSV-Merge).
Datasets
GRAM is evaluated post-hoc on pre-existing fine-tuned checkpoints across three benchmarks (no new datasets are introduced, though the authors assemble a 4-expert medical evaluation):
- Language Understanding (GLUE): 8 tasks (CoLA, MNLI, MRPC, QNLI, QQP, RTE, SST-2, STS-B) using LoRA-tuned Flan-T5-Base and Flan-T5-Large.
- Computer Vision: An 8-task benchmark (MNIST, SVHN, GTSRB, DTD, Cars, RESISC45, EuroSAT, SUN397) using fully fine-tuned CLIP ViT-B/32 and ViT-L/14.
- Medical Instruction Tuning: Four public LoRA experts on Qwen2-7B-Instruct spanning English and Chinese multiple-choice QA and doctor-patient dialogues (MedQA, CMExam, HealthcareMagic, cMedQA2).
Key Insights and Ideas
- The $K=2$ "Sharp Knee": You don't need many models to stop interference. Moving from $K=1$ to $K=2$ captures 87% (Flan-T5-Base) and 73% (Flan-T5-Large) of the accuracy gap to the unmerged individual oracle, costing just one extra rank-16 LoRA adapter (~0.7% of backbone parameters). Going from $K=2$ to $K=7$ adds almost nothing (+0.1% to +0.6%).
- Outliers Win Big: Global merges quietly sacrifice geometric outliers to satisfy the majority cluster. On GLUE, MNLI and STS-B sit at large angles from the bulk tasks; isolating them into a second coalition recovers massive accuracy drops (+8.1 points on MNLI for Flan-T5-Base over TSV-Merge).
- You Don't Actually Need Task Labels at Test Time: While GRAM assumes you know which task is being queried, a lightweight Mahalanobis distance router (using 5 training samples per class and zero gradient updates) routes 100% of GLUE validation queries to the right $K=2$ group—because the tasks a router might confuse (like QQP and MRPC) are geometrically similar and already merged into the same coalition!
Key Results
With $K=2$ and zero calibration data, GRAM consistently beats single-model baselines:
- GLUE: Achieves 83.8% (Flan-T5-Base) and 88.7% (Flan-T5-Large) average score, beating the strongest baseline (TSV-Merge) by +2.1 and +0.9 points.
- Vision: Hits 88.7% (ViT-B/32) and 94.0% (ViT-L/14) average test accuracy, outperforming Iso-CTS (85.8% / 93.9%) and TSV-Merge (85.0% / 92.8%).
- Medical: Achieves the best overall rank (2.40) and highest average relative improvement (+75.54% over pretrained), beating even data-dependent methods like RegMean (+71.48%) and Fisher-Merge (+27.18%) that use 64 calibration samples per task.
- Speed: Grouping 8 tasks takes ~1 second on a single RTX 3080, and scaling to 1,024 synthetic adapters finishes in under ~2.5 minutes.
Limitations and Future Work
- Single-seed & Model Scope: Results use single-seed reporting (making tight margins on Flan-T5-Large warrant caution) and test one model family per modality.
- Simulated Privacy Setting: The medical benchmark uses public checkpoints rather than a live, multi-hospital federated deployment.
- Theory vs. Practice Gap: The theoretical bounds analyze idealized optimal group bases rather than GRAM's exact column-stacked, adaptively allocated SVD merge.
- Future Directions: The authors plan to scale task-agnostic routing to massive adapter collections and test GRAM in real multi-site federated healthcare setups.
Summary updated