Manuscript Offprint
arXiv:2610.29110GRAM: Group-wise Rank-Aware Model Merging via Subspace Alignment
Abstract
Merging different models into a single model is highly desirable for multi-task deployment, particularly in regulated domains like healthcare. In such settings, models are often locally fine-tuned due to strict data privacy policies, necessitating that aggregation operates exclusively on the fine-tuned weights. Existing methods apply a uniform merge across all tasks, ignoring the geometric relationships among their learned subspaces. When task updates occupy misaligned subspaces, projecting them onto a shared low-rank basis discards task-relevant directions, a failure mode named subspace interference. Through this study, we show that the per-task projection error of a merged model is governed by the principal-angle alignment between each task and the shared subspace, so that grouping geometrically compatible tasks provably reduces this error within each group. Motivated by this observation, we propose Group-wise Rank-Aware Model Merging (GRAM), which uses the principal-angle geometry of task vectors to decide which tasks should be merged together and then performs a standard SVD-based merge within each coalition; the pipeline requires only the fine-tuned weights at merge time. With only one additional model (K=2), GRAM significantly mitigates subspace interference and consistently outperforms prior merging methods across language understanding (GLUE with Flan-T5), 8-task CLIP vision, and medical instruction tuning (Qwen2-7B-Instruct with four English/Chinese medical LoRAs).
1 Introduction
Model merging [Wortsman et al., 2022, Ilharco et al., 2022, Tang et al., 2023] aggregates multiple fine-tuned, task-specific models into a single deployable model without the need for additional training. This paradigm is highly attractive for multi-task deployment, as it circumvents the substantial costs of storing and serving independent models. The structured nature of weight updates—particularly in parameter-efficient fine-tuning (e.g., LoRA [Hu et al., 2022])—makes model merging highly effective. This approach is especially critical in privacy-constrained domains such as healthcare, where institutions independently fine-tune a shared backbone on local clinical data. Because data sharing across sites is strictly restricted, any unified multi-institution model must be constructed solely from the fine-tuned weights, precluding the use of the original training data.
Prior work on model merging spans parameter-space arithmetic with conflict resolution [Ilharco et al., 2022, Yadav et al., 2023], auxiliary signal coefficient learning [Yang et al., 2023, Tang et al., 2023], and structured approximations exploiting low-rank or layer-wise properties [Gargiulo et al., 2025, Stoica et al., 2024, Marczak et al., 2025, Wei et al., 2025, Sun et al., 2025, Chen et al., 2025a]. A pervasive limitation of these methods is their reliance on a uniform global merge: all tasks are compressed into a single shared space. Consequently, tasks whose learned parameter directions are least compatible with the majority suffer from disproportionate performance degradation—a
Equal contribution.
40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure 1: How tasks are grouped on the Grassmannian governs merging quality. Insets: three partitions of the per-task low-rank subspaces visualised on the Grassmannian—all tasks merged into a single global coalition (top, low intra-coalition similarity), three groups (middle), and the two-group GRAM partition (bottom, high intra-coalition similarity). Curve: as intra-coalition similarity increases, merged-model accuracy rises (left axis, solid) and the within-group subspace projection error falls (right axis, dashed). Highlighted markers tie each partition to its location on the trade-off curve: GRAM places geometrically compatible tasks in the same coalition, reducing the alignment penalty that global merging incurs.
phenomenon we term subspace interference. Furthermore, many existing techniques require access to task-specific calibration data or activations, rendering them inapplicable in strict privacy-preserving deployments where data cannot leave its source institution.
A critical signal overlooked by current methods is the inter-task geometry of the learned parameter subspaces. Existing techniques process updates individually or globally, systematically neglecting the pairwise geometric relationships between tasks. As illustrated in Figure 1, subspace similarity is highly predictive of merging compatibility: grouping tasks with high intra-coalition subspace similarity simultaneously increases merged-model accuracy and minimizes projection error. We observe distinct geometric signatures—such as cluster-outlier structures in GLUE tasks and block-diagonal affinities in vision tasks (section D). Crucially, the outlier tasks are precisely those that disproportionately degrade standard global SVD merging, and thus benefit the most from group-wise isolation (section 5). Subspace geometry therefore carries predictive information that current methods fail to exploit.
Motivated by this geometric insight, we propose Group-wise Rank-Aware Model Merging (GRAM). GRAM targets the task-aware deployment setting, where task identity is known at inference. We reframe the merging objective from compressing T models into a single model, to compressing T models into models, trading a marginal increase in storage for a targeted, significant reduction in subspace interference. Crucially, GRAM is entirely data-free: the pipeline operates exclusively on the fine-tuned weights, requiring no source data, activations, or calibration sets at merge time. Our primary contributions are as follows:
-
A Geometry-Aware Merging Algorithm: We introduce GRAM, which partitions tasks using Grassmannian k-means++ on chordal distances. Within each coalition, it dynamically merges models via a greedy adaptive rank allocator that pools singular values across members, achieving provable optimality under a global rank budget.
-
Theoretical Guarantees: We rigorously bound the projection error of our clustering objective. We prove that the resulting partition yields a merge error within of the optimal partition, and its expected error is strictly bounded below that of a standard global merge.
-
State-of-the-Art Data-Free Performance: Extensive evaluations across language understanding, vision, and medical instruction-tuning demonstrate that GRAM consistently outperforms existing data-free baselines. Notably, on the medical benchmark, GRAM surpasses even data-dependent methods (e.g., RegMean, Fisher-Merge) that rely on per-task calibration data.
Task Grouping in Multi-Task Learning. Deciding which tasks should be trained together has a long history in multi-task learning. Zamir et al. [2018] computationally map transfer relationships across 26 visual tasks, and Standley et al. [2020] formalize the grouping problem and search over partitions to trade accuracy against compute. Task2Vec [Achille et al., 2019] represents each task by a Fisher-information vector, while branched networks [Vandenhende et al., 2019] and mixture-of-experts models [Chen et al., 2023] realize grouping through the architecture itself. Affinity-based methods avoid combinatorial search: TAG [Fifty et al., 2021] estimates inter-task affinity from gradient signals in a single training run, MTG-Net [Song et al., 2022] meta-learns a predictor of per-task gains across task combinations, Grad-TAG [Li et al., 2024] scales affinity estimation via gradient linearization, and Wang et al. [2024a] cast grouping as a mathematical program with theoretical guarantees. Complementary work on dynamic loss weighting [Liu et al., 2022] modulates task competition during training rather than partitioning tasks explicitly. Dynamic client cooperation [Yang et al., 2026] mitigates interference through adaptive coalition formation rather than explicitly partitioning tasks. All of these approaches require training-time data and gradients, making them inapplicable to the post-hoc merging setting where only frozen weights are available. Our grouping criterion is data-free: it uses only the left singular subspaces of the task-specific weight updates.
3 Preliminaries
Task vectors. We consider a pre-trained model with layers and weights . After adapting the model to task , we obtain fine-tuned weights . Following the task-vector view of model merging [Ilharco et al., 2022, Yadav et al., 2023, Yu et al., 2024], the adaptation is summarized by the per-layer task vector
i.e., the difference between the task-adapted and pre-trained weights at layer . The matrix formulation in (1) applies to linear layers — MLP blocks and attention projection matrices — which covers all merged parameters in our experiments: the LoRA settings adapt only linear projections by construction, and in the fully fine-tuned vision setting SVD-based merging is applied to all 2-D weight matrices while the remaining non-matrix parameters (LayerNorm gains, biases) are merged by simple averaging (section D.6). For models tuned with Low-Rank Adaptation (LoRA) [Hu et al., 2022], the task vector inherits a rank-r factorization
SVD of task updates. The compact SVD of each update is
where contains the left singular vectors (output subspace), is a diagonal matrix of singular values , and contains the right singular vectors (input subspace). We drop the layer index when the context is unambiguous.
Merging objective. Given T task vectors, each of rank r across L layers, the goal is to produce merged task vectors that minimize the total reconstruction error across all tasks subject to a per-merge rank budget:
where assigns task to its group and is the merged update for group . The model deployed for group is, per layer,
i.e., each of the K deployed models is the pre-trained backbone plus its group's merged task vector, and task i is served by the model of group .
Subspace interference. Let be a shared output basis with orthonormal columns . Substituting the compact SVD , the projection error of task onto is
We adopt as a principled measure of inter-task interference as it directly measures the task-relevant information lost when updates are forced into a shared subspace. Crucially, depends only on and — not on — so partitioning by output-subspace alignment captures the interference signal a shared basis can control.
To isolate the geometric contribution of subspace misalignment from the magnitude of the task update, we drop the singular-value weighting and analyze . Every column of admits a unique orthogonal decomposition into a component in and a component in . Applied column-wise,
The two summands live in orthogonal subspaces, so by the Pythagorean theorem (in the Frobenius inner product), . Since has orthonormal columns, , and . Rearranging,
Let denote the principal angles between and ; throughout the paper we reserve for principal angles and for merge groups (model weights are denoted ), and index principal angles by . A standard result [Golub and Van Loan, 1996] states that the singular values of are exactly , so . Substituting into (7) and using ,
which is the squared chordal (projection F-) distance between the two subspaces. The expression depends only on the relative geometry of and and is invariant to the choice of basis. When the subspaces are well-aligned ( for all ), the projection error vanishes. When they are misaligned, important task directions are discarded by the merge. This motivates grouping tasks by (singular-value-weighted) subspace compatibility before merging.

Figure 2: The GRAM pipeline. Each task vector is decomposed via SVD to extract its top-r left-and right-singular subspaces (left). The collection of 's is fed into a subspace clustering step that partitions the tasks into coalitions by chordal distance (middle). Within each coalition, the selected top- singular components from member tasks are concatenated and re-orthonormalized via thin SVD to yield a single rank- merged update (right).
4 Method: Group-wise Rank-Aware Model Merging
Our goal is to merge task vectors into per-group updates in a way that protects geometrically incompatible tasks from mutual interference. To accomplish this, we decompose the pipeline (fig. 2) into three stages. (1) Quantifying pairwise subspace geometry. We compute the pairwise chordal distance between task output subspaces. This quantity directly governs the projection error a shared basis would incur (Theorem B.3), so it is the natural input for the clustering step rather than coordinate-wise distances on flattened parameters. (2) Partitioning tasks into geometrically coherent coalitions. Treating each task's projection matrix as a point in Euclidean space, we run Grassmannian -means++ on the chordal-distance matrix to obtain coalitions with low within-group and high between-group subspace distance, importing the approximation guarantee of -means++ into the Grassmannian setting. (3) Per-coalition low-rank merge. Within each coalition we concatenate the per-task top- singular triples under an adaptive rank allocator that distributes the rank budget to minimize the reconstruction error, then orthonormalize via a thin SVD to produce a single rank- merged update per coalition.
4.1 Chordal Subspace Distance
We measure the geometric compatibility between two task subspaces via the squared chordal distance. At layer , the chordal distance between the column spaces of and is
where are the principal angles between and (indexed by here since denotes a task). By eq. (8), this quantity directly governs the projection error incurred when two tasks share a merged basis, making it the natural metric for deciding which tasks to group. Furthermore, we show that the chordal distance on the Grassmannian is equivalent to the squared Frobenius distance between the orthogonal projectors up to a factor of 2 (section C.4), so off-the-shelf -means++ on inherits its approximation guarantee in the chordal geometry (section B).
4.2 Grassmannian k-Means++ Clustering
To obtain a single distance per task pair, we average the per-layer chordal distance across layers:
We then run k-means++ [Arthur et al., 2007] on to partition the T tasks into K groups . The number of groups K is a user-specified compression budget that trades deployment cost (K deployed models) against merging fidelity. In our experiments (section 5), K=2 provides the best cost–accuracy trade-off on all benchmarks.
4.3 Per-Group Low-Rank Merge
For each group and layer , we merge the constituent task vectors into a single rank-r update. The procedure operates on all three SVD components—left singular vectors , singular values , and right singular vectors —and allocates rank budget adaptively rather than uniformly across tasks.
Adaptive rank allocation. A naïve approach gives each of the tasks an equal share of the rank budget. Since intrinsic rank varies sharply across tasks and layers in practice (fig. 4, section D.3), this uniform allocation wastes capacity on compact tasks and starves complex ones.
We instead formulate rank allocation as a discrete optimization problem. Let be the SVD of task 's update, and let denote the number of singular directions allocated to task . The per-task reconstruction error after keeping the top components is
\mathcal{L}_{i}(r_{i})=\left\|(I-B_{i}^{(r_{i})}B_{i}^{(r_{i})}^{\top})\Delta W_{i}\right\|_{\mathrm{F}}^{2}=\sum_{j>r_{i}}\sigma_{i,j}^{2}, \tag{11}where contains the top- left singular vectors of , and the second equality follows from the Eckart–Young theorem. We seek the allocation that minimizes total reconstruction error under a global budget:
The marginal gain of assigning one additional rank slot to task is . Since singular values are sorted in descending order within each task, the optimal strategy is greedy: pool all candidate singular values across tasks in the group, select the top- entries, and count how many are drawn from each task. This yields optimal per-task allocations with , ensuring that rank budget flows to the directions that most reduce reconstruction error.
Coalition merge. Given the per-task allocations , we follow TSV-Merge [Gargiulo et al., 2025]: concatenate the selected top- SVD components across tasks into , , and , sort globally by singular value, replace and with their orthogonal polar factors , (rather than computing an SVD of the joint operator), and reconstruct as the task vector for group at layer .
Theoretical guarantee for grouping. The grouping step is backed by a deterministic projection-error guarantee: with optimal per-group bases, any partition into K groups achieves total reconstruction error no larger than a single global rank-r basis fit to all tasks (Theorem B.1 in section B; the proof is a direct optimality argument independent of the clustering rule). The guarantee explains why the empirical gains in section 5 concentrate on tasks geometrically furthest from the bulk—exactly the tasks for which a partition-aware basis improves most over the global optimum, making the inequality strict and large in magnitude—while the alignment-penalty machinery (Theorem B.3) and the k-means++ partition error chain in section B quantify how much grouping helps.
Table 1: GLUE results on Flan-T5-Base and Flan-T5-Large (LoRA ): validation accuracy, Spearman for STS-B. Each cell reports Base/Large in that order. Bold: best merged result per column for each variant. Individual: per-task fine-tuned model (oracle upper bound).
| Method | CoLA | MNLI | MRPC | QNLI | QQP | RTE | SST-2 | STS-B | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| Individual (oracle) | 69.1 / 80.1 | 82.7 / 88.5 | 85.5 / 89.2 | 90.9 / 94.4 | 84.0 / 87.1 | 84.4 / 91.3 | 92.9 / 95.2 | 87.4 / 90.9 | 84.6 / 89.6 |
| Weight Averaging | 69.7 / 74.6 | 59.7 / 84.3 | 78.9 / 84.1 | 90.1 / 92.8 | 83.8 / 86.2 | 80.5 / 85.9 | 91.2 / 94.8 | 72.0 / 88.0 | 78.2 / 86.3 |
| Task Arithmetic | 69.5 / 76.9 | 59.0 / 85.4 | 78.7 / 85.3 | 90.1 / 93.9 | 83.9 / 85.8 | 79.4 / 88.1 | 91.5 / 95.2 | 72.9 / 87.8 | 78.1 / 87.3 |
| Concrete TA | 69.1 / 76.6 | 58.1 / 86.3 | 78.4 / 86.3 | 89.9 / 93.9 | 83.5 / 85.9 | 79.4 / 88.4 | 91.6 / 95.2 | 73.4 / 87.9 | 78.0 / 87.5 |
| DOGE TA | 69.1 / 78.4 | 71.9 / 88.1 | 80.9 / 86.5 | 90.3 / 93.8 | 83.5 / 86.3 | 79.8 / 87.7 | 92.5 / 95.1 | 71.1 / 87.7 | 79.9 / 88.0 |
| TIES-Merging | 68.3 / 77.1 | 56.3 / 85.1 | 79.4 / 86.3 | 89.8 / 93.9 | 83.7 / 86.0 | 79.4 / 87.7 | 91.6 / 95.1 | 71.2 / 88.0 | 77.5 / 87.4 |
| AdaMerging++ | 69.1 / 76.7 | 60.3 / 87.6 | 78.4 / 84.8 | 90.0 / 93.8 | 83.6 / 85.9 | 79.1 / 88.1 | 91.6 / 95.2 | 74.1 / 88.6 | 78.3 / 87.6 |
| Concrete AM | 69.0 / 76.1 | 59.4 / 87.7 | 80.1 / 85.5 | 89.9 / 93.8 | 82.9 / 85.9 | 79.1 / 88.1 | 91.7 / 95.4 | 75.4 / 87.1 | 78.5 / 87.8 |
| TSV-Merge | 69.2 / 79.2 | 74.7 / 86.0 | 80.9 / 87.3 | 90.2 / 93.6 | 83.6 / 85.6 | 78.7 / 87.0 | 92.7 / 95.3 | 83.2 / 88.7 | 81.7 / 87.8 |
| Iso-C | 69.1 / 73.8 | 59.9 / 64.2 | 77.9 / 82.4 | 88.9 / 92.2 | 82.9 / 86.0 | 80.9 / 82.7 | 91.5 / 92.8 | 66.1 / 86.4 | 77.2 / 82.5 |
| Iso-CTS | 69.1 / 73.8 | 58.3 / 59.1 | 77.0 / 82.1 | 88.5 / 91.8 | 82.2 / 85.8 | 80.5 / 82.3 | 91.4 / 92.4 | 64.0 / 86.0 | 76.4 / 81.7 |
| GRAM (ours) | 69.5 / 79.3 | 82.8 / 89.0 | 84.3 / 88.7 | 90.2 / 93.8 | 84.0 / 85.7 | 79.8 / 88.1 | 93.2 / 95.4 | 86.7 / 89.9 | 83.8 / 88.7 |
5 Experiments
5.1 Setup
We evaluate GRAM on three benchmarks: GLUE [Wang et al., 2018] with Flan-T5-Base/Large [Chung et al., 2024], the 8-task vision benchmark with fully fine-tuned CLIP ViT-B/32 and ViT-L/14, and medical instruction tuning on Qwen2-7B-Instruct with four LoRA experts (section 5.4). All methods operate on the same pre-existing fine-tuned models—from FusionBench [Tang et al., 2025] for GLUE and from the TSV-Merge release [Gargiulo et al., 2025] for vision—and are re-run under a unified protocol (section D), so cross-method differences come only from merging. We report validation accuracy on GLUE (Spearman for STS-B), test accuracy on vision, and the metrics described in section 5.4 for the medical benchmark. All experiments use task-aware inference: task identity is known at test time and selects the group-specific adapter. This is a preference rather than a requirement (section 5.5).
For GLUE and vision, we compare against seven baselines: Weight Averaging [Wortsman et al., 2022], Task Arithmetic [Ilharco et al., 2022], TIES-Merging [Yadav et al., 2023], AdaMerging++ [Yang et al., 2023], Iso-C and Iso-CTS [Marczak et al., 2025], and TSV-Merge [Gargiulo et al., 2025]. The GLUE results in table 1 additionally include Concrete TA, Concrete AM [Tang et al., 2023], and DOGE TA [Wei et al., 2025]. The CLIP ViT-B/16 results in section D.5 additionally include LiNeS-Merge [Wang et al., 2024b] and LOT-Merging [Sun et al., 2025] for completeness across recent structured-update baselines. The medical benchmark (section 5.4) additionally compares against Fisher-Merge [Matena and Raffel, 2022] and RegMean [Jin et al., 2022] as data-using references. Ablation includes random-equipartition controls under the same chordal metric.
5.2 Language Understanding
Table 1 presents GLUE results on Flan-T5-Base and Flan-T5-Large (LoRA ). We fix throughout to keep the budget overhead minimal—a single extra deployed model relative to the baselines—and ask whether this small extra resource yields meaningful gains. On Flan-T5-Base, GRAM reaches average, over the strongest baseline TSV-Merge (). On Flan-T5-Large, the gap between methods narrows in the higher-capacity regime, but GRAM still leads the field at , over TSV-Merge ()—all with only 2 deployed models and no per-task calibration data.
The per-task profile is consistent with the alignment-penalty mechanism of Theorem B.3: tasks at large principal angles from the bulk cluster bear the largest projection error under a global merge and stand to recover the most under per-coalition merging. MNLI and STS-B sit furthest from the {MRPC, QNLI, QQP, RTE} cluster in subspace geometry (section D), and they are the two tasks where GRAM recovers the most relative to TSV-Merge at both scales (MNLI 74.7→82.8 base, 86.0→89.0 large; STS-B 83.2→86.7 base, 88.7→89.9 large). On QQP, GRAM attains the highest base accuracy (84.0); on SST-2 it is within 0.1 of the strongest baseline.
Table 2: Eight-task vision results on fully fine-tuned CLIP ViT-B/32 and ViT-L/14: test accuracy (%). Each cell reports B/32/L/14 in that order. Bold: best merged result per column for each variant. Individual: per-task fine-tuned model (oracle upper bound).
| Method | MNIST | SVHN | GTSRB | DTD | Cars | RESISC45 | EuroSAT | SUN397 | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| Individual (oracle) | 99.7 / 99.8 | 97.6 / 98.1 | 99.1 / 99.2 | 97.7 / 98.5 | 78.2 / 92.2 | 95.9 / 97.3 | 99.8 / 99.8 | 75.3 / 82.0 | 92.9 / 95.9 |
| Weight Averaging | 86.5 / 96.8 | 62.7 / 77.7 | 53.3 / 68.9 | 54.7 / 66.8 | 62.6 / 81.7 | 71.9 / 82.3 | 71.0 / 88.7 | 65.1 / 71.5 | 66.0 / 79.3 |
| Task Arithmetic | 96.9 / 99.0 | 78.1 / 86.0 | 68.2 / 84.9 | 59.6 / 72.2 | 56.2 / 81.9 | 68.1 / 86.3 | 76.0 / 91.9 | 57.3 / 72.9 | 70.1 / 84.4 |
| TIES-Merging | 97.0 / 99.0 | 80.5 / 87.6 | 69.3 / 83.7 | 66.2 / 77.5 | 61.1 / 83.3 | 73.2 / 87.7 | 79.4 / 93.8 | 62.7 / 74.0 | 73.7 / 85.8 |
| AdaMerging++ | 98.2 / 99.0 | 90.1 / 90.2 | 73.2 / 95.7 | 81.3 / 93.7 | 69.2 / 88.6 | 78.2 / 91.5 | 93.9 / 97.2 | 65.7 / 74.7 | 81.2 / 91.3 |
| TSV-Merge | 99.3 / 99.6 | 91.5 / 95.1 | 91.8 / 96.3 | 83.8 / 93.4 | 69.5 / 89.3 | 84.8 / 93.2 | 94.1 / 98.5 | 65.6 / 76.8 | 85.0 / 92.8 |
| Iso-C | 98.9 / 99.3 | 87.0 / 90.5 | 91.0 / 95.8 | 88.1 / 96.1 | 71.0 / 91.4 | 87.0 / 94.7 | 92.4 / 98.8 | 69.1 / 79.7 | 85.6 / 93.3 |
| Iso-CTS | 98.9 / 99.4 | 84.9 / 91.2 | 91.6 / 96.6 | 89.0 / 97.0 | 71.4 / 91.9 | 88.4 / 95.4 | 92.5 / 99.1 | 69.4 / 80.2 | 85.8 / 93.9 |
| GRAM (ours) | 99.4 / 99.6 | 94.2 / 96.4 | 94.6 / 98.3 | 90.4 / 95.5 | 73.1 / 90.6 | 89.4 / 94.4 | 99.1 / 99.3 | 69.1 / 78.2 | 88.7 / 94.0 |
Table 3: Medical merging on Qwen2-7B-Instruct with four LoRA experts. MedQA / CMExam: accuracy; HealthcareMagic / cMedQA2: BLEU-4 / ROUGE-1/2/L. Avg Impr.: mean relative improvement over Pretrained across 10 columns; Avg Rank.: mean per-column rank (1 = best). Bold / underline: best / second-best per column among merging methods. Individual: per-task fine-tuned oracle.
| Method | MedQA Acc. | CMExam Acc. | HealthcareMagic | cMedQA2 | Avg Impr. | Avg Rank. | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BLEU-4 | ROUGE-1 | ROUGE-2 | ROUGE-L | BLEU-4 | ROUGE-1 | ROUGE-2 | ROUGE-L | |||||
| Pretrained | 51.92 | 74.77 | 1.05 | 25.90 | 3.27 | 12.65 | 9.77 | 40.30 | 19.05 | 20.94 | - | - |
| Individual (oracle) | 60.25 | 88.63 | 5.43 | 30.60 | 8.07 | 18.48 | 11.17 | 41.71 | 19.23 | 24.02 | +69.62% | 4.55 |
| Weight Averaging | 56.64 | 85.63 | 4.49 | 30.71 | 7.13 | 17.70 | 10.78 | 41.26 | 20.08 | 22.28 | +55.23% | 7.65 |
| Task Arithmetic | 57.97 | 87.69 | 5.00 | 30.33 | 7.72 | 18.11 | 5.55 | 32.70 | 12.02 | 19.15 | +49.40% | 7.05 |
| TIES-Merging | 58.05 | 87.69 | 4.23 | 30.72 | 7.03 | 17.58 | 11.30 | 42.06 | 20.60 | 22.85 | +54.18% | 6.10 |
| Fisher-Merge | 60.25 | 85.65 | 2.30 | 27.87 | 4.58 | 14.59 | 12.01 | 44.06 | 21.36 | 24.04 | +27.18% | 6.25 |
| RegMean | 60.80 | 88.21 | 5.51 | 31.19 | 8.21 | 18.58 | 11.39 | 41.75 | 20.25 | 23.05 | +71.48% | 3.40 |
| Iso-C | 58.05 | 86.68 | 4.52 | 29.58 | 7.12 | 17.60 | 9.78 | 39.60 | 17.93 | 23.65 | +53.47% | 7.85 |
| Iso-CTS | 57.82 | 86.74 | 4.54 | 29.73 | 7.20 | 17.77 | 11.97 | 42.84 | 20.28 | 25.26 | +59.11% | 5.40 |
| TSV-Merge | 56.64 | 86.72 | 5.12 | 30.61 | 7.71 | 18.10 | 12.55 | 43.84 | 21.84 | 24.40 | +67.81% | 4.35 |
| GRAM (ours) | 58.52 | 87.60 | 5.62 | 30.70 | 8.30 | 18.68 | 12.67 | 43.68 | 21.49 | 25.01 | +75.54% | 2.40 |
5.3 Vision
Table 2 reports per-task accuracy on fully fine-tuned CLIP ViT-B/32 and ViT-L/14. GRAM attains the highest average accuracy on both architectures (88.7% B/32, 94.0% L/14), surpassing Iso-CTS (85.8% / 93.9%) and TSV-Merge (85.0% / 92.8%). The pairwise projection-error matrix on the 8 vision tasks (App. D.4) shows a clear block-diagonal structure under , with high-chordal-distance pairs routed into different groups. The accuracy gains track this structure: GRAM is strongest on GTSRB (94.6 / 98.3) and EuroSAT (99.1 / 99.3), which sit furthest from the visual-recognition cluster (DTD/Cars/RESISC45/SUN397) and pay the largest off-diagonal penalty under . The vision gap to the next-best baseline (+2.9 on B/32) exceeds the NLU gap (+2.1 on Flan-T5-Base), suggesting vision tasks present more heterogeneous subspaces where partitioning offers more benefit.
5.4 Medical Instruction Tuning
We set up a case study of the medical scenario from section 1: four publicly available LoRA experts on Qwen2-7B-Instruct, fine-tuned for distinct medical sub-domains across two task families and two languages: MedQA (English MCQA), CMExam (Chinese MCQA), HealthcareMagic (English doctor-patient dialogue), and cMedQA2 (Chinese doctor-patient dialogue). MCQA tasks are scored by accuracy; open-ended tasks by BLEU-4 and ROUGE-1/2/L, yielding 10 heterogeneous metric columns. Like the data-free baselines (Weight Averaging, Task Arithmetic, TIES-Merging, TSV-Merge, Iso-C, Iso-CTS), GRAM requires no calibration data. We additionally include Fisher-Merge [Matena and Raffel, 2022] and RegMean [Jin et al., 2022] as data-using references that consume a standard 64-sample-per-task calibration set.
Table 3 reports per-metric results. With experts spanning two languages and two task families (MCQA / dialogue), plain averaging visibly interferes across the gap—Task Arithmetic regresses on cMedQA2 BLEU-4 (5.55 vs Pretrained 9.77) and on its ROUGE columns. GRAM's coalitions route subspace-distant pairs into separate groups and attain the best Avg Impr (+75.54%) and Avg Rank
Table 5: Clustering-algorithm ablation (Flan-T5-Base / GLUE): four ways of producing the partition from the same subspace geometry, plus the random control, under identical merging and evaluation.
| Partitioning of the same subspace geometry | K=2 partition | Avg. |
|---|---|---|
| GRAM | {CoLA, MRPC, QNLI, QQP, RTE, SST-2} | {MNLI, STS-B} | 83.8 |
| Agglomerative (average linkage) | identical partition | 83.8 |
| Max-modularity communities (exact, all 127 bipartitions) | {CoLA, MNLI, SST-2, STS-B} | {MRPC, QNLI, QQP, RTE} | 82.9 |
| Random equipartition | random 4/4 | 82.4 |
| No grouping (K=1, re-merged) | all tasks | 81.9 |
(2.40) of any merging method, ahead of even the data-using RegMean (+71.48%, 3.40) with its 64-sample-per-task calibration set. Gains concentrate on the open-ended generation columns (both BLEU-4 fields; HealthcareMagic ROUGE-2 / ROUGE-L), where preserving task-specific singular directions outweighs calibrated reweighting; on the two MCQA accuracy columns—the regime where calibration-based methods are strongest—GRAM trails the leader by under one point. The summary-metric edge also extends past the per-task Individual oracle (+69.62%, 4.55), consistent with recent findings that LLM merging can match or exceed fine-tuned baselines on this benchmark family [Fu et al., 2025].
5.5 Ablation Studies
Effects of each module. Table 4 evaluates the contribution of each GRAM component to overall performance. Starting from full GRAM, we remove one component at a time and report the benchmark average for both PEFT merging (Flan-T5-Base on GLUE) and full-model merging (CLIP ViT-B/32 on the 8-task vision benchmark). Removing PA-Sim replaces the chordal subspace metric with an alternative that ignores cross-task geometry, breaking the alignment-penalty signal that drives the partition. Removing Coalition collapses GRAM to and recovers the global TSV-Merge baseline. Removing Adapt-Rank substitutes a uniform budget for the adaptive allocator, wasting capacity on sharp-spectrum tasks and starving long-tail ones. Each component is crucial, but their relative importance flips across modalities: on GLUE, PA-Sim drives the largest drop (-3.0), followed by Coalition (-2.1) and Adapt-Rank (-1.6); on ViT-B/32, Coalition dominates (-3.4) while PA-Sim (-0.5) and Adapt-Rank (-0.1) are small — the heterogeneous LoRA spectra make adaptive allocation vital for PEFT but largely cosmetic for the more uniform full-fine-tuned vision deltas. With all components combined, GRAM boosts TSV-Merge by +2.1 on GLUE and +3.8 on ViT-B/32, demonstrating the complementarity of these components.
Table 4: Effects of the proposed modules. Subscripts (red) report the change relative to full GRAM.
| Model | GLUE | ViT-B/32 |
|---|---|---|
| GRAM | 83.8 | 88.8 |
| - PA-Sim | 80.8 -3.0 | 88.3 -0.5 |
| - Coalition | 81.7 -2.1 | 85.4 -3.4 |
| - Adapt-Rank | 82.2 -1.6 | 88.7 -0.1 |
Sensitivity to the number of groups . Table 6 evaluates GRAM for every from 1 to on Flan-T5-Base and Flan-T5-Large under one unified protocol (caption). At both scales the cost-accuracy frontier has a sharp knee at : moving from Weight Averaging—the simplest single-model baseline—to GRAM at gains +5.6 (Base) and +2.4 (Large) points, capturing 87% and 73% of the respective gaps to the no-merging oracle, for a single extra rank-16 adapter (0.7% / 0.6% of backbone parameters). Raising from 2 all the way to 7 adds at most +0.1 (Base) and +0.6 (Large) on top—on Base the average is not even monotone, dipping at . Most of the achievable gain is therefore already available at small : GRAM's geometry-aware clustering identifies compatible coalitions efficiently enough that a large is not needed to capture most of the gains in this setting. The practical rule is budget-first—deploy the smallest the serving budget allows; , our default, captures the bulk of the gain at the tightest possible budget.
Robustness of the partition. Table 5 compares four ways of producing the partition from the same subspace geometry. The partition is stable: it is identical across 10 initialization seeds at both and (10/10), and an independent hierarchy-based algorithm (agglomerative, average linkage) reproduces GRAM's partitions exactly at , with the exact max-modularity communities coinciding for every . The partition structure is thus a property of the geometry, not of a particular clustering algorithm—the gain comes from the subspace signal itself. The one disagreement is informative: at K=2 the degree-corrected modularity objective prefers a 4/4 split that pulls MNLI into the low-similarity cluster and scores 0.9 lower (82.9), whereas the solution used by GRAM respects the raw block structure of the similarity matrix and keeps the stronger 6/2 partition.
Deployment without oracle task identity. Task-aware inference is a preference, not a requirement: a lightweight Mahalanobis task mapper [Lee et al., 2018], as deployed in SKILL [Ge et al., 2023]—class-conditional Gaussians in the frozen base encoder's feature space, 5 training samples per class, no gradient training, no test-time task labels—routes 100.0% of validation examples to the correct group on Flan-T5-Base / GLUE at K=2, so task-agnostic GRAM equals oracle GRAM (83.8 on every task); group-routing accuracy stays ≥99.98% for every K. Its only errors (QQP↔MRPC, 0.18% of QQP) are absorbed by the coalition structure, since GRAM groups together precisely the similar tasks a router confuses (section D.2).
Scalability of the grouping step. A natural concern is whether grouping becomes a bottleneck when the number of tasks is large. Figure 3 measures the end-to-end cost of grouping on a single RTX 3080 as T grows from 8 to 1024. No benchmark offers thousands of adapters, so beyond our real tasks we use perturbed copies of them; grouping cost depends only on adapter shapes, not on their values, so these copies are a faithful proxy. Grouping is cheap: the real 8-task setting takes about one second, and 1024 tasks finish within a few minutes. Both time and memory grow roughly linearly with T, because decomposing each adapter dominates the cost and the pipeline processes one layer at a time. Llama-3-8B appears

Figure 3: Grouping cost vs. number of tasks T on one RTX 3080 (bars: wall-clock time; lines: peak GPU memory). T=8 is the real task set; larger T uses synthetic tasks with the same layer shapes and rank.
cheaper than Flan-T5 only because its LoRA factors are used directly rather than dense per-layer deltas.
6 Conclusion
GRAM partitions tasks by chordal subspace distance via Grassmannian k-means++ and merges within each group with a standard SVD-based procedure, avoiding the projection loss of global merging on misaligned subspaces. On GLUE with Flan-T5-Base/Large, GRAM (K=2) reaches 83.8%/88.7% average, matching the strongest baseline at the cost of one extra deployed model. On 8-task vision (CLIP ViT-B/32, ViT-L/14), GRAM reaches 88.7%/94.0%, the highest among compared methods. On the medical benchmark (Qwen2-7B-Instruct with four LoRA experts), GRAM attains the best Avg Rank without using any per-task calibration data. Gains concentrate on tasks whose subspaces are most dissimilar from the majority—precisely the tasks that the alignment penalty of Theorem B.3 predicts will benefit most from grouping.
Limitations. Our results have several scope limits: (i) single-seed reporting, so small Flan-T5-Large margins should be read with caution; (ii) one model family per modality (Flan-T5 for NLU, CLIP for vision, Qwen2 for medical), and the medical evaluation is a case study on public benchmarks rather than a real federated experiment from multiple sites; (iii) the theory analyzes idealized objects (optimal basis, Grassmannian k-means objective) rather than GRAM's exact column-stacked merge with adaptive allocation, so it should be read as geometric motivation rather than end-to-end optimality guarantee.
Future work. Scaling the task-agnostic router of section D.2 beyond small task collections—where group routing approaches full task identification [Ge et al., 2023]—and extending the medical evaluation to a real multi-site federated setup would broaden the deployment story.
References
Alessandro Achille, Michael Lam, Rahul Tewari, Avinash Ravichandran, Subhransu Maji, Charless C Fowlkes, Stefano Soatto, and Pietro Perona. Task2vec: Task embedding for meta-learning. In Proceedings of the IEEE/CVF international conference on computer vision, pages 6430–6439, 2019.
David Arthur, Sergei Vassilvitskii, et al. k-means++: The advantages of careful seeding. In Soda, volume 7, pages 1027–1035, 2007.
Zhikang Chen, Sen Cui, Deheng Ye, Min Zhang, Gang Niu, Yu Zhang, Masashi Sugiyama, and Tingting Zhu. From coefficients to directions: Rethinking model merging with directional alignment. arXiv preprint arXiv:2512.00391, 2025a.
Zhikang Chen, Abudukelimu Wuerkaixi, Sen Cui, Haoxuan Li, Ding Li, Jingfeng Zhang, Bo Han, Gang Niu, Houfang Liu, Yi Yang, et al. Learning without isolation: Pathway protection for continual learning. arXiv preprint arXiv:2505.18568, 2025b.
Zitian Chen, Yikang Shen, Mingyu Ding, Zhenfang Chen, Hengshuang Zhao, Erik G Learned-Miller, and Chuang Gan. Mod-squad: Designing mixtures of experts as modular multi-task learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11828–11837, 2023.
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1–53, 2024.
Alan Edelman, Tomás A Arias, and Steven T Smith. The geometry of algorithms with orthogonality constraints. SIAM journal on Matrix Analysis and Applications, 20(2):303–353, 1998.
Chris Fifty, Ehsan Amid, Zhe Zhao, Tianhe Yu, Rohan Anil, and Chelsea Finn. Efficiently identifying task groupings for multi-task learning. Advances in Neural Information Processing Systems, 34:27503–27516, 2021.
Zichuan Fu, Xian Wu, Yejing Wang, Wanyu Wang, Shanshan Ye, Hongzhi Yin, Yi Chang, Yefeng Zheng, and Xiangyu Zhao. Training-free llm merging for multi-task learning. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 33111–33124, 2025.
Antonio Andrea Gargiulo, Donato Crisostomi, Maria Sofia Bucarelli, Simone Scardapane, Fabrizio Silvestri, and Emanuele Rodola. Task singular vectors: Reducing task interference in model merging. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 18695–18705, 2025.
Yunhao Ge, Yuecheng Li, Di Wu, Ao Xu, Adam M. Jones, Amanda Sofie Rios, Iordanis Fostiropoulos, Shixian Wen, Po-Hsuan Huang, Zachary William Murdock, Gozde Sahin, Shuo Ni, Kiran Lekkala, Sumedh Anand Sontakke, and Laurent Itti. Lightweight learner for shared knowledge lifelong learning. Transactions on Machine Learning Research, 2023.
Gene H Golub and Charles F Van Loan. Matrix computations johns hopkins university press. Baltimore and London, 41(62):2, 1996.
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Liang Wang, Weizhu Chen, et al. Lora: Low-rank adaptation of large language models. ICLR, 1(2):3, 2022.
Chenyu Huang, Peng Ye, Tao Chen, Tong He, Xiangyu Yue, and Wanli Ouyang. Emr-merging: Tuning-free high-performance model merging. Advances in Neural Information Processing Systems, 37:122741–122769, 2024.
Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Suchin Gururangan, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. Editing models with task arithmetic. arXiv preprint arXiv:2212.04089, 2022.
Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. arXiv preprint arXiv:2212.09849, 2022.
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. In Advances in Neural Information Processing Systems, volume 31, 2018.
Dongyue Li, Aneesh Sharma, and Hongyang R Zhang. Scalable multitask learning using gradient-based estimation of task affinity. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 1542–1553, 2024.
Shikun Liu, Stephen James, Andrew J Davison, and Edward Johns. Auto-lambda: Disentangling dynamic task relationships. arXiv preprint arXiv:2202.03091, 2022.
Daniel Marczak, Simone Magistri, Sebastian Cygert, Bartłomiej Twardowski, Andrew D Bagdanov, and Joost Van De Weijer. No task left behind: Isotropic model merging with common and task-specific subspaces. arXiv preprint arXiv:2502.04959, 2025.
Michael S Matena and Colin A Raffel. Merging models with fisher-weighted averaging. Advances in Neural Information Processing Systems, 35:17703–17716, 2022.
Xiaozhuang Song, Shun Zheng, Wei Cao, James Yu, and Jiang Bian. Efficient and effective multi-task grouping via meta learning on task combinations. Advances in Neural Information Processing Systems, 35:37647–37659, 2022.
Trevor Standley, Amir Zamir, Dawn Chen, Leonidas Guibas, Jitendra Malik, and Silvio Savarese. Which tasks should be learned together in multi-task learning? In International conference on machine learning, pages 9120–9132. PMLR, 2020.
George Stoica, Pratik Ramesh, Boglarka Ecsedi, Leshem Choshen, and Judy Hoffman. Model merging with svd to tie the knots. arXiv preprint arXiv:2410.19735, 2024.
Wenju Sun, Qingyong Li, Wen Wang, Yang Liu, Yangli-ao Geng, and Boyang Li. Towards minimizing feature drift in model merging: Layer-wise task vector fusion for adaptive knowledge integration. arXiv preprint arXiv:2505.23859, 2025.
Anke Tang, Li Shen, Yong Luo, Liang Ding, Han Hu, Bo Du, and Dacheng Tao. Concrete subspace learning based interference elimination for multi-task model fusion. arXiv preprint arXiv:2312.06173, 2023.
Anke Tang, Li Shen, Yong Luo, Enneng Yang, Han Hu, Lefei Zhang, Bo Du, and Dacheng Tao. FusionBench: A unified library and comprehensive benchmark for deep model fusion. Journal of Machine Learning Research, 26(307):1–38, 2025. URL https://www.jmlr.org/papers/v26/25-1243.html.
Simon Vandenhende, Stamatios Georgoulis, Bert De Brabandere, and Luc Van Gool. Branched multi-task networks: deciding what layers to share. arXiv preprint arXiv:1904.02920, 2019.
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP workshop BlackboxNLP: Analyzing and interpreting neural networks for NLP, pages 353–355, 2018.
Chenguang Wang, Xuanhao Pan, and Tianshu Yu. Towards principled task grouping for multi-task learning. arXiv preprint arXiv:2402.15328, 2024a.
Ke Wang, Nikolaos Dimitriadis, Alessandro Favero, Guillermo Ortiz-Jimenez, Francois Fleuret, and Pascal Frossard. Lines: Post-training layer scaling prevents forgetting and enhances model merging. arXiv preprint arXiv:2410.17146, 2024b.
Yongxian Wei, Anke Tang, Li Shen, Zixuan Hu, Chun Yuan, and Xiaochun Cao. Modeling multi-task model merging as adaptive projective gradient descent. arXiv preprint arXiv:2501.01230, 2025.
Mitchell Wortsman, Gabriel Ilharco, Samir Ya Gadre, Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, et al. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In International conference on machine learning, pages 23965–23998. PMLR, 2022.
Prateek Yadav, Derek Tam, Leshem Choshen, Colin A Raffel, and Mohit Bansal. Ties-merging: Resolving interference when merging models. Advances in neural information processing systems, 36:7093–7115, 2023.
Danni Yang, Zhikang Chen, Sen Cui, Mengyue Yang, Ding Li, Abudukelimu Wuerkaixi, Haoxuan Li, Jinke Ren, and Mingming Gong. Decentralized dynamic cooperation of personalized models for federated continual learning. Advances in Neural Information Processing Systems, 38:111897–111926, 2026.
Enneng Yang, Zhenyi Wang, Li Shen, Shiwei Liu, Guibing Guo, Xingwei Wang, and Dacheng Tao. Adamerging: Adaptive model merging for multi-task learning. arXiv preprint arXiv:2310.02575, 2023.
Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, and Yongbin Li. Language models are super mario: Absorbing abilities from homologous models as a free lunch. In Forty-first International Conference on Machine Learning, 2024.
Amir R Zamir, Alexander Sax, William Shen, Leonidas J Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3712–3722, 2018.
A Broader Impact
GRAM provides a way to combine independently fine-tuned task vectors into a single deployable model without retraining or pooling raw training data, and the geometry-aware grouping step is what makes this scale beyond a handful of tasks. We highlight two settings where this property carries concrete societal value.
Healthcare and other privacy-constrained domains. Clinical AI is trained on data that cannot legally or ethically be centralized: electronic health records, radiology images, pathology slides, and clinical-note adapters live behind institutional firewalls and HIPAA/GDPR boundaries. Today, a hospital that fine-tunes a foundation model on its own patient cohort cannot easily benefit from another hospital's adapter for a related task (a different imaging modality, a different patient population, or a different downstream label) without either sharing the underlying data or running an expensive joint training run. GRAM operates entirely on released task vectors—the parameter deltas, never the data—and merges them by clustering subspaces that are geometrically compatible. This lets a coalition of institutions pool model expertise across complementary specialties (e.g., radiology + pathology + clinical-note triage) while keeping each institution's data on-premises, and without forcing dissimilar tasks into a single averaged model where high-stakes minority tasks would otherwise be drowned out by majority gradients. The same property applies to other privacy-sensitive verticals: legal, financial, and on-device personalization.
Decentralized and community-driven model merging. The open-model ecosystem now hosts hundreds of thousands of community-released LoRA adapters and full fine-tunes per base model, but practitioners have no principled way to combine more than a few at a time. Naive averaging across many adapters destroys task-specific structure; per-adapter routing keeps a linear deployment cost. GRAM's coalition structure is a middle path: a small number K of merged checkpoints that respect subspace geometry, with the compression budget K left as an explicit knob. This matches the way decentralized model development actually proceeds—asynchronous, uncoordinated, contributors who never share data—and gives downstream users a way to consume many adapters as a few well-chosen merged models, lowering the deployment cost of community fine-tuning without forcing centralization.
Risks and limitations. Two risks are worth flagging. First, merging task vectors does not erase the biases or harmful behaviors of any constituent model; coalitions of biased adapters can yield biased merged checkpoints, and the chordal-distance grouping is geometric, not semantic, so it offers no protection against value misalignment in the inputs. Practitioners should audit each merged coalition with the same fairness and safety scrutiny they would apply to a single fine-tune. Second, GRAM lowers the cost of redistributing capabilities encoded in fine-tuned adapters, including capabilities the original fine-tuner did not intend to release. Standard adapter-licensing and provenance practices—adapter cards, licensing terms, watermarking—apply unchanged, and we encourage their use when GRAM is deployed in shared settings.
B Deferred Theoretical Analysis
We collect the geometric and complexity results that motivate GRAM but are deferred from the main text for space. Theorem B.1 below is the headline guarantee that grouping reduces total projection error (referenced from section 5.5); the results that follow extend the picture to the GRAM column-stacked basis, the partition-level error chain that ties the chordal clustering rule to a k-means++ approximation guarantee, the computational cost, and a Rademacher-complexity bound. Equation (8) in section 3 already establishes that, for any orthonormal , — the squared chordal distance between and . All proofs are in section C.
Theorem B.1 (Grouping reduces total error). Let tasks be partitioned into groups . For each group , let be the optimal rank- basis minimizing over orthonormal , and let be the analogous global optimum for all T tasks. Then
with strict inequality whenever some per-group optimal basis improves on the global optimum within group . The proof (section C.1) is a direct optimality argument and does not depend on the specific clustering rule.
Theorem B.2 (Direct projection-error bound for the GRAM per-group basis). Let be a coalition with rank allocation satisfying and (the budget enforced by the GRAM allocator of section 4.3), and let
be the column-wise concatenation of the per-task top- left singular vectors of , with the convention that is an empty matrix (no contribution). Let be any orthonormal basis whose column space contains (e.g. the GRAM merge basis, padded if ). Then for every task ,
where the right-hand side reduces to when .
B.1 Grassmannian k-Means++ Error Bound
Lemma B.3 (Alignment penalty for two equally weighted subspaces). Let have orthonormal columns and principal angles . Fix . Then for every matrix with ,
with equality when the columns of B are the top-r left singular vectors of .
Deterministic latent-group model. There are latent groups with prototype subspaces , each with orthonormal columns, satisfying for all and . There are tasks with per group; task in group has and . For a partition , define the optimal-basis merge error
Under , the optimal per-group basis is the chordal Fréchet mean on (Theorem C.5), and with the Grassmannian -means cost . The bounds below compare partitions through the projection error of the optimal per-group basis ( ); they should be read as guarantees on the partition objective and how grouping shapes it, not as guarantees on GRAM's actual column-stacked basis. Theorem B.2 provides the algorithmic-side bound on the GRAM basis itself, and section C.5 discusses when the column-stacked basis coincides with the Fréchet mean and when it merely upper-bounds it. Let denote the partition from -means++ on , a uniformly random equipartition into groups of size , , and the trivial single-block partition ( ).
Theorem B.4 (k-means++ partition error bounds). Under the deterministic latent-group model with :
- (Random partition lower bound, valid for .)
- (Global merge lower bound, valid for .)
Corollary B.5 (Projection error chain). Under the deterministic latent-group model with , in the regime for a small absolute constant ,
The right inequality is deterministic and follows from groupwise optimality (Theorem B.1); the left inequality follows from comparing parts (1) and (2) of Theorem B.4, with the regime chosen so that the random lower bound exceeds the GRAM upper bound.
Theorem B.5 captures the headline message: refining the trivial single-block merge into K groups via k-means++ on subspace similarities is never worse than a random equipartition (in expectation, in the small- regime), and an arbitrary equipartition is in turn never worse than not grouping at all (deterministically). A non-uniform singular-value extension is in section C.9.
B.2 Computational Complexity
Let . The GRAM pipeline incurs, once per model:
• Per-task SVD: For LoRA deltas (Flan-T5/GLUE, Qwen medical), thin QR of and followed by an SVD costs per task per layer. For full-rank deltas (vision), a top-r truncated SVD costs per task per layer.
• Pairwise chordal distance: is per pair; the full matrix is — no need to materialize the projection matrices .
• Clustering: k-means++ on the precomputed pairwise-distance matrix; negligible when T is small.
• Per-group merge: for the polar-factor orthogonalization plus per layer for rank allocation.
The dominant term is for LoRA deltas and for full-rank deltas, both strictly cheaper than one epoch of fine-tuning per task). At inference, each group's rank-r merged update costs per layer—identical to individual or global merge on a per-query basis. GRAM stores K merged updates instead of T per-task models, a factor T/K reduction in storage with no additional per-query FLOPs.
B.3 Generalization via Rademacher Complexity
Definition 1 (Linear-update hypothesis class). Fix , with , and . Let .
Theorem B.6 (Rademacher bound for linear updates). Let be an i.i.d. sample with . Then
Corollary B.7 (Per-group capacity is no larger than the global class). If the GRAM per-group merged updates all satisfy , each per-group update belongs to , so the per-group Rademacher complexity is bounded by , matching the global class.
C Proof Details
C.1 Proof of Theorem B.1
Proof of Theorem B.1. For the global merge, let be the optimal rank-r basis minimizing \sum_{i=1}^T \left\| (I - B^* B^*^\top) \Delta W_i \right\|_F^2 over all tasks.
For a partition , let be the optimal rank-r basis for group , i.e.,
By optimality of within group , for any orthonormal :
In particular, choosing (the global optimum) for each group:
which establishes that group-wise merging with per-group optimal bases always achieves error no greater than global merging.
Strictness of the inequality requires a uniqueness/non-degeneracy assumption: if some strictly improves on within group (which generically holds when the within-group leading singular subspace differs from the global one), the inequality is strict; otherwise it can be tight.
C.2 Proof of Theorem B.2
We restate the theorem for convenience and then prove it via three elementary lemmas.
Lemma C.1 (Pythagorean identity for orthogonal projectors). For any orthogonal projector ( ) and any matrix , .
Proof. . The cross term vanishes because , using and .
Lemma C.2 (Subspace monotonicity of projected energy). Let be orthogonal projectors with . Then in the Loewner order, and for every , .
Proof. For orthogonal projectors, is equivalent to (since projects into a subspace of and acts as the identity there). Taking transposes and using , also gives , so is symmetric and idempotent: . Hence is itself an orthogonal projector, and for any , , where the last equality uses . Thus , and applying this with gives , so , i.e. .
Lemma C.3 (Self-projection recovers the truncation energy). For any task with thin SVD and any , letting (with when ), , where the sum is empty (and equals 0) when .
Proof. The case is immediate from . For , , so , where and . Since has orthonormal columns, (using when has orthonormal columns).
Proof of Theorem B.2. Let be the orthogonal projector onto . By the construction of , . (This holds in particular for the orthogonal polar factor of used in GRAM: if is the SVD, then has the same column space as , which equals .)
Since is one of the column blocks of by construction, every column of lies in , so
By Theorem C.2, , and by Theorem C.3, . Combining,
Applying Theorem C.1 to and gives . Substituting the lower bound and using ,
which is (14).
Equality case (m = 1). If the coalition has a single task, and , so the inequality in Theorem C.2 is an equality, and the bound is attained.
What this proof does and does not give. The proof bounds the projection error onto the GRAM column basis, not the reconstruction error of the merged delta itself. The latter decomposes orthogonally as
and Theorem B.2 controls only the first term. The second term — the in-subspace fitting error of the single merged delta against task 's in-subspace component — is not analyzed here and would require a separate argument tracking how is constructed from the per-task singular values and right-singular vectors. The bound in Theorem B.2 is also loose precisely when other tasks in the coalition contribute new directions that align with — the regime in which grouping is most useful — because the proof discards all inter-task overlap by lower-bounding via the smaller projector alone.
C.3 GRAM vs. global merge under uniform allocation (statement and proof)
Corollary C.4 (Grouping reduces the projection-error upper bound for every task). Fix a LoRA rank budget per merged adapter. Compare the global merge over all T tasks under uniform allocation to a GRAM coalition of size under uniform allocation . Then , and for every task the projection-error upper bounds from Theorem B.2 satisfy
The improvement is strictly positive whenever any of the singular values is non-zero.
Proof. implies , hence . The tail sum is non-increasing in , so the GRAM bound is no larger than the global bound; the difference is exactly . Applying Theorem B.2 to both bases yields (29).
Remark 1 (Tightness). Theorem C.4 states a worst-case guarantee on the gap between GRAM and global merging at the level of upper bounds, not a comparison of actual projection errors; the looseness of Theorem B.2 discussed above carries through here. The multiplicative gap between alignment-aware and random grouping is captured by Theorem B.4, not this corollary.
C.4 Equivalence of chordal and Euclidean distances on projectors
To run -means++ off the shelf we need a Euclidean embedding of the Grassmannian. Each subspace has a unique orthogonal projector , which is invariant to the choice of orthonormal basis for the subspace and serves as that embedding. On these projectors,
using (rank-r idempotent) and . The chordal distance on the Grassmannian is therefore Euclidean (up to a factor of 2) on the projector embedding.
C.5 Chordal Fréchet mean and the GRAM merge basis
Proposition C.5 (Fréchet mean under chordal distance). Let have orthonormal columns and let . Any minimizer of over is a top- invariant subspace of ; the minimizer is unique whenever , and otherwise any choice of -dimensional subspace within the top eigenspace is optimal.
Proof. Write for any orthonormal . Therefore
Minimizing over orthonormal is equivalent to maximizing where . By the Ky Fan max-trace theorem, the maximum is and is achieved when spans the top- eigenspace of .
Relation to the GRAM column-stacked basis. Theorem B.2 concerns the column space of , which has dimension at most (and is set to by the GRAM allocation rule of section 4.3, which exhausts the rank budget). The Fréchet-mean basis above is the top- eigenspace of , and the two coincide only when equals that eigenspace; in general they differ. For example, with , , , and allocation , the selected column from each task gives while the Fréchet mean is . We therefore distinguish two regimes in the analysis below: (i) the per-task projection-error upper bound eq. (14), which holds for any orthonormal basis of — including the GRAM output — without invoking the Fréchet-mean identification; and (ii) the latent-group analysis ( -means++ gap, error chain), in which is defined via the optimal-basis projection error and the Fréchet mean is invoked as the optimum, not as GRAM's actual output. This separation makes the theory bridge orthogonal to whether GRAM's column-stacked basis exactly matches the Fréchet mean.
C.6 Proof of Theorem B.3
Proof of Theorem B.3. Let and . Using with and ,
Since with , the nonzero eigenvalues of equal the nonzero eigenvalues of
The singular values of are (Golub–Van Loan), so is unitarily similar to and its eigenvalues are . Since , the top-r eigenvalues of are . By the Ky Fan max-trace theorem,
with equality when is a top-r eigenspace of , equivalently the top-r left singular subspace of . Substituting (32) into (31) gives
which is (15).
C.7 Proof of Theorem B.4
We prove each part of the theorem under the deterministic latent-group model: groups, tasks per group (), prototype subspaces with pairwise principal angles , and within-group spread for all .
Proof of part (1): upper bound. Define and recall .
Step 1 (seeding guarantee). k-means++ selects K seeds from via -sampling and assigns each to its nearest seed, yielding partition . By Arthur et al. [2007],
where .
Step 2 (seeds are projections). Each seed is a rank-r projection matrix, hence a valid point on . The chordal Fréchet mean minimizes cost over rank-r projections and can only reduce cost:
Step 3 (Euclidean ≤ Grassmannian). For any partition and group , the Euclidean mean minimizes over all matrices , while the Fréchet mean is constrained to rank-r projections. Therefore . Minimizing over and summing: .
Combining. . Multiplying by gives .
Absolute bound. The latent partition is feasible: , where the second inequality uses since is the cost-minimizing center.
Proof of part (2): lower bound. Call mixed if it contains tasks with , and pick any such pair in each mixed . Let be the chordal Fréchet mean of , which is the minimizer in (16) for by Theorem C.5. Theorem B.3 holds for every orthonormal , so applying it with to the pair and dropping the non-negative contributions from the remaining tasks,
The left side is exactly the contribution of to (since achieves the minimum in (16)), so this is a per-mixed-group lower bound on .
Procrustes metric and triangle inequality. Define , the Procrustes (chordal Fubini–Study) distance, which is a metric on [Edelman et al., 1998]; denotes its square. We use two facts: (a) since for , ; and (b) since trivially with , . Combining (a) with gives , and likewise for . By the triangle inequality for ,
The right side is non-negative iff , which is the hypothesis of part (2). Squaring and dropping the non-negative cross term,
using . Halving, . Substituting into (34), the per-mixed-group contribution to is at least .
Expected number of mixed groups. Under a uniformly random equipartition into groups of size , each group is a random -subset; exactly of the such subsets are monochromatic (one per latent group). Hence . Linearity of expectation across mixed groups gives (18).
Proof of part (3): global merge lower bound. Let be the global merge basis ( has a single block containing all tasks). We construct pairwise-disjoint inter-group pairs and apply Theorem B.3 to each.
Existence of the matching. With latent groups of size , no group contains more than tasks (since for ). A standard graph-theoretic result then gives a matching of size in the inter-group graph (the complete multipartite graph ): order tasks as by interleaving across groups (one task from each group, then a second from each, etc.), and pair for ; consecutive tasks in this ordering belong to different groups whenever .
Per-pair lower bound. For each disjoint inter-group pair with , applying Theorem B.3 with and the Procrustes argument from the proof of part (2),
valid for .
Summation. Summing (36) over the disjoint pairs and adding the non-negative contribution of any unmatched task (when T is odd),
which is (19).
C.8 Proof of Theorem B.5
Proof of Theorem B.5. Right inequality (deterministic). For any partition with groups , let minimize over orthonormal , so . Let be the analogous global minimizer for (a single block of all tasks). Substituting as a feasible (sub-optimal) basis inside each group ,
This is exactly Theorem B.1; it is deterministic and holds in particular for , hence .
Left inequality (in expectation, in the small- regime). Let . From Theorem B.4 parts (1) and (2),
the latter valid for . Sufficient for the left inequality is , i.e.
Using and for , , this is implied by . The bracketed term is whenever , and the right side is whenever . Combining these (using , , , for ), both inequalities hold whenever for a sufficiently small absolute constant . Hence .
C.9 Non-uniform singular values (statement and proof)
Proposition C.6 (Non-uniform singular values). Let with , , and recall the optimal-basis merge error (16). Then for any partition ,
and consequently
where .
Proof. Fix any orthonormal and any task . Substituting the SVD and using ,
with by (8). Since in the Loewner order,
Now fix a partition . For the lower bound, let achieve . By the lower side of (39),
where the last inequality uses that is the minimum of over orthonormal . For the upper bound, let be the chordal Fréchet mean of (achieving ). Since is a feasible (sub-optimal for the weighted problem) basis,
using the upper side of (39). This is (37).
For (38), let and let . Steps 1–3 of the proof of Theorem B.4 (1) are model-independent: they show for any data , using only the -means++ guarantee [Arthur et al., 2007] and the Euclidean–Grassmannian comparison. Combining this with (37),
using (definition of ) and (the lower side of (37)).
C.10 Proof of Theorem B.6
Proof. Let be i.i.d. Rademacher random variables. Splitting each as , the part is a fixed function of (independent of ), so
and the first term factors out of the supremum over . Taking expectation over and using to kill the first term,
Step 1: rewrite as a Frobenius inner product. For any , , where . Linearity gives
Step 2: supremum via Cauchy–Schwarz. Let . By the Cauchy–Schwarz inequality on the Frobenius inner product,
Moreover, is a rank-one matrix of the form with , so (using ).
Step 3: bound via Jensen and independence. By Jensen's inequality,
where the cross-terms vanish because .
Step 4: combine. Taking expectation over ,
which is (21).
Table 6: Sensitivity to the number of groups on Flan-T5-Base and Flan-T5-Large / GLUE; each cell reports Base/Large. Partitions come from the same clustering GRAM uses; every group is re-merged with the adaptive-rank merge () and freshly evaluated with the Table 1 pipeline, which reproduces the published row exactly on Large (on Base, re-merged scores 81.9 vs. 81.7 for the original checkpoint—SVD tie-breaking on near-degenerate spectra). The Weight Averaging row and the Large anchors are the corresponding Table 1 rows.
| K | CoLA | MNLI | MRPC | QNLI | QQP | RTE | SST-2 | STS-B | Avg. | Extra params |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 (weight averaging) | 69.7 / 74.6 | 59.7 / 84.3 | 78.9 / 84.1 | 90.1 / 92.8 | 83.8 / 86.2 | 80.5 / 85.9 | 91.2 / 94.8 | 72.0 / 88.0 | 78.2 / 86.3 | — |
| 1 (global merge) | 69.1 / 79.2 | 74.2 / 86.0 | 80.4 / 87.3 | 89.7 / 93.6 | 83.5 / 85.6 | 80.9 / 87.0 | 92.7 / 95.3 | 84.6 / 88.7 | 81.9 / 87.8 | — |
| 2 (GRAM) | 69.5 / 79.3 | 82.8 / 89.0 | 84.3 / 88.7 | 90.2 / 93.8 | 84.0 / 85.7 | 79.8 / 88.1 | 93.2 / 95.4 | 86.7 / 89.9 | 83.8 / 88.7 | +1.8M / +4.7M |
| 3 | 69.5 / 79.3 | 82.7 / 88.5 | 84.3 / 88.7 | 90.2 / 93.8 | 84.0 / 85.7 | 79.8 / 88.1 | 93.2 / 95.4 | 87.4 / 90.9 | 83.9 / 88.8 | +3.5M / +9.4M |
| 4 | 69.1 / 79.9 | 82.7 / 88.5 | 84.8 / 89.5 | 90.2 / 93.8 | 83.7 / 85.8 | 78.0 / 88.4 | 93.2 / 95.2 | 87.4 / 90.9 | 83.6 / 89.0 | +5.3M / +14.2M |
| 5 | 69.1 / 80.1 | 82.7 / 88.5 | 84.8 / 89.5 | 90.2 / 93.8 | 83.7 / 85.8 | 78.0 / 88.4 | 92.9 / 95.2 | 87.4 / 90.9 | 83.6 / 89.0 | +7.1M / +18.9M |
| 6 | 69.1 / 80.1 | 82.7 / 88.5 | 83.3 / 89.5 | 90.9 / 93.9 | 83.5 / 85.8 | 79.8 / 90.6 | 92.9 / 95.2 | 87.4 / 90.9 | 83.7 / 89.3 | +8.8M / +23.6M |
| 7 | 69.1 / 80.1 | 82.7 / 88.5 | 83.1 / 88.7 | 90.9 / 94.4 | 84.1 / 87.1 | 79.1 / 88.8 | 92.9 / 95.2 | 87.4 / 90.9 | 83.7 / 89.2 | +10.6M / +28.3M |
| 8 (no merging) | 69.1 / 80.1 | 82.7 / 88.5 | 85.5 / 89.2 | 90.9 / 94.4 | 84.1 / 87.1 | 84.5 / 91.3 | 92.9 / 95.2 | 87.4 / 90.9 | 84.6 / 89.6 | +12.4M / +33.0M |
Table 7: GRAM vs. random grouping quality. Intra-sim and Inter-sim denote the average subspace similarity within and between groups, respectively. Ratio = Intra-sim / Inter-sim. Higher ratio indicates better separation.
| Setting | Intra-sim | Inter-sim | Ratio | Avg Acc |
|---|---|---|---|---|
| No grouping (K=1, global merge) | 0.097 | — | — | 81.7 |
| GRAM K=2 | 0.143 | 0.035 | 4.06 | 83.8 |
| Random K=2 | 0.089 | 0.102 | 0.87 | 82.4 |
| GRAM K=3 | 0.150 | 0.036 | 4.21 | 83.9 |
| Random K=3 | 0.119 | 0.089 | 1.34 | 83.1 |
Remark on rank. The bound makes no use of , so it applies uniformly to any Frobenius-bounded linear adapter, low-rank or not. A rank constraint would buy a sharper bound only if it were combined with a nuclear-norm constraint via standard low-rank Rademacher arguments; we do not pursue this since for our purposes the rank-free bound already suffices to show that grouping does not enlarge the hypothesis class.
D Additional Experimental Details
D.1 Grouping Analysis
Table 7 quantifies the grouping quality produced by GRAM versus random assignment. GRAM with achieves an intra-group to inter-group similarity ratio of 4.06, compared to 0.87 for random grouping—a factor-of-four difference. This separation increases slightly to 4.21 at . Across the four grouped settings, higher ratio correlates with better downstream accuracy: geometric coherence within groups translates directly to merge quality.
Random grouping at produces groups whose intra-group similarity (0.089) is actually lower than the global average (0.097), because some random partitions place highly dissimilar tasks together. GRAM avoids this failure mode by construction.
D.2 Deployment without Oracle Task Identity
GRAM targets task-aware deployments—e.g., a multi-institution medical system where each request carries its provenance, so task identity is deployment metadata rather than an inference problem. Nevertheless, GRAM extends to the task-agnostic setting at no accuracy cost via a lightweight router. We instantiate the Mahalanobis task mapper of Lee et al. [2018], as deployed for task recognition in shared-knowledge lifelong learning (SKILL) [Ge et al., 2023]: class-conditional Gaussians in the frozen base encoder's feature space (mean-pooled hidden states; no extra model), class means estimated from only training samples per class ( raw examples total across all 8 tasks), and one tied covariance (Ledoit–Wolf). A test input is routed to the group owning its nearest class centroid. The router involves no gradient training and no test-time task labels; merging itself remains fully data-free, and the router's -example requirement is strictly weaker than the 64-samples-per-task calibration consumed by the data-using baselines (RegMean, Fisher-Merge) in section 5.4. On Flan-T5-Base / GLUE at , the router routes of validation examples of every task to the correct group, so task-agnostic GRAM equals oracle GRAM—83.8 on every task, to the decimal.
Table 8: Group-routing accuracy (%) of the Mahalanobis task mapper under the partition chain for every , Flan-T5-Base / GLUE. requires full task identification.
| K | 2 | 3 | 4 | 5 | 6 | 7 | 8 (full task ID) |
|---|---|---|---|---|---|---|---|
| Group-routing acc. | 100.00 | 100.00 | 100.00 | 100.00 | 99.99 | 99.98 | 99.98 |
Small is what makes routing easy. The router encodes the same formatted request the instruction-tuned model itself consumes, and it only needs to resolve groups, not tasks: at it faces a binary decision, and any confusion between tasks in the same coalition is harmless by construction. Table 8 reports the mapper's group-routing accuracy under the partition chain for every . The mapper's only errors, at any , are QQPMRPC confusions (72 of 40,430 QQP examples, )—two semantically adjacent paraphrase-detection tasks. These errors are invisible for because GRAM's geometry-aware clustering places QQP and MRPC in the same coalition, and only surface once separates them. This reveals a structural synergy: a router's confusions occur precisely between similar tasks, and similar tasks are precisely what GRAM groups together—the coalition structure absorbs router errors by design. A per-task deployment () forgoes this protection and demands full task identification, exactly the harder regime studied in SKILL (87.1% over 102 tasks) [Ge et al., 2023].
D.3 Per-Task Intrinsic Rank Heterogeneity
Figure 4 reports the number of singular values needed to capture of the per-layer Frobenius energy, computed over the 8 GLUE tasks and 72 LoRA layers of Flan-T5-Base. Uniform per-task allocation inside a coalition either wastes slots on compact-spectrum tasks or truncates long-tail ones; the adaptive allocator of section 4.3 reads off this heterogeneity directly from the singular values and assigns rank where it actually reduces error.

Figure 4: Number of singular values required to capture of Frobenius energy, per task (rows) and per LoRA layer (columns), on Flan-T5-Base. Decoder layers (left half) are typically low-rank (1–4 significant directions); encoder layers (right half) are higher-rank (10–16). The cross-task and cross-layer heterogeneity motivates the adaptive rank allocator in section 4.3.
D.4 Pairwise Projection Error on ViT-B/32
Figure 5 visualizes the pairwise projection error between task subspaces on ViT-B/32 under (TSV-Merge) vs. (GRAM); the block structure that emerges at is described in the caption.
(a)

(b)

Figure 5: Pairwise projection error between task subspaces on ViT-B/32, under (TSV-Merge, left) and (GRAM, right). Reordering at by GRAM's partition exposes a block-diagonal structure: within-group pairs incur lower error than across-group pairs, consistent with Theorem B.3.
Table 9: Eight-task vision benchmark results (test accuracy) using CLIP ViT-B/16 with full fine-tuning. Bold: best merged result per column; underline: second best. Individual adapters use one task-specific model per task (oracle upper bound).
| Method | MNIST | SVHN | GTSRB | DTD | Cars | RESISC45 | EuroSAT | SUN397 | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| Individual (oracle) | 99.8 | 97.8 | 99.0 | 98.3 | 87.5 | 97.0 | 99.8 | 78.8 | 94.8 |
| Weight Averaging | 94.4 | 72.6 | 60.6 | 54.0 | 69.9 | 75.2 | 81.3 | 68.6 | 72.1 |
| Task Arithmetic | 98.3 | 84.5 | 76.1 | 60.4 | 68.1 | 73.7 | 86.4 | 64.4 | 76.5 |
| TIES-Merging | 98.3 | 84.8 | 73.9 | 64.8 | 71.7 | 77.8 | 89.4 | 68.0 | 78.6 |
| AdaMerging++ | 98.4 | 93.1 | 92.3 | 64.0 | 79.2 | 81.1 | 95.6 | 69.2 | 84.1 |
| TSV-Merge | 99.3 | 92.9 | 94.5 | 85.2 | 81.0 | 88.5 | 97.4 | 70.6 | 88.7 |
| Iso-C | 99.1 | 90.7 | 94.9 | 89.9 | 82.6 | 91.6 | 97.4 | 73.5 | 90.0 |
| Iso-CTS | 99.2 | 90.4 | 96.2 | 92.3 | 83.2 | 92.8 | 97.7 | 74.1 | 90.7 |
| LiNeS-Merge | 98.6 | 85.6 | 79.7 | 64.7 | 72.5 | 77.5 | 87.6 | 65.4 | 79.0 |
| LOT-Merging | 99.0 | 94.8 | 70.8 | 68.7 | 75.9 | 82.6 | 84.4 | 70.7 | 80.9 |
| GRAM (ours) | 99.5 | 96.0 | 96.8 | 92.2 | 82.7 | 91.4 | 98.8 | 72.0 | 91.2 |
D.5 CLIP ViT-B/16 Full Fine-tuning Results
For completeness across the standard CLIP backbone family, table 9 reports per-task accuracy on the 8-task vision benchmark using a fully fine-tuned CLIP ViT-B/16 checkpoint. GRAM reaches average—the highest among all compared methods—outperforming Iso-CTS , Iso-C , TSV-Merge , and the remaining single-model baselines. The win pattern mirrors the B/32 and L/14 results in table 2: the largest absolute gains over global merging concentrate on the high-chordal-distance tasks (GTSRB, EuroSAT, SVHN), exactly the cells that the alignment-penalty analysis of Theorem B.3 predicts will benefit most from grouping. The consistency of the gain pattern across three ViT scales (B/32, B/16, L/14) is consistent with the partition-quality mechanism being scale-invariant rather than tied to a specific backbone.
D.6 Implementation Details
Flan-T5 GLUE adapters. On both Flan-T5-Base and Flan-T5-Large we use LoRA with rank and (scaling factor 2.0), applied to the query and value projections in self-attention and (in the decoder) cross-attention. Each LoRA delta has shape on Base and on Large; the number of adapted layers is on Base (12 encoder + 12 decoder blocks) and
on Large (24 encoder + 24 decoder blocks). Per-task adapters are trained with AdamW (learning rate , batch size 16) for 10 epochs; we report on the GLUE validation splits, with Spearman on STS-B and accuracy on the remaining tasks.
CLIP ViT vision adapters. We use the per-task fully fine-tuned CLIP ViT-B/32 and ViT-L/14 checkpoints released by TSV-Merge [Gargiulo et al., 2025], evaluated on the standard 8-task vision benchmark (MNIST, SVHN, GTSRB, DTD, Cars, RESISC45, EuroSAT, SUN397). The ViT-B/16 results in section D.5 are produced under the same protocol on a fully fine-tuned ViT-B/16 backbone. Since the per-task checkpoints are fully fine-tuned, the per-layer task delta is full-rank; we apply SVD truncation at merge time with rank budget per layer (matching the GLUE setting), which is the rank actually flowing into the chordal distance and the per-coalition merge. As stated in section 3, the matrix formulation applies to linear layers: SVD-based merging is applied to all 2-D weight matrices (MLP blocks and attention projections), while the remaining non-matrix parameters (LayerNorm gains, biases) are merged by simple averaging. All vision results report test accuracy. No additional task-specific training is performed; GRAM and all baselines operate on these checkpoints directly.
Qwen2 medical adapters. We use four publicly released LoRA adapters on Qwen2-7B-Instruct, one per medical sub-domain: MedQA, CMExam, HealthcareMagic, and cMedQA2. Each adapter uses LoRA with rank and , applied to the attention and MLP (gate, up, down) projections of every decoder block. GRAM operates directly on these adapters without further training.
Calibration set for data-using baselines. Fisher-Merge [Matena and Raffel, 2022] and RegMean [Jin et al., 2022] require a small calibration set per task at merge time. We use a uniform 64-sample-per-task calibration set drawn from each task's training split: Fisher-Merge uses these samples to estimate per-parameter Fisher information, and RegMean uses them to estimate input second-moment matrices for the closed-form layer-wise solver. The data-free baselines (Weight Averaging, Task Arithmetic, TIES-Merging, Iso-C, Iso-CTS, TSV-Merge) and GRAM see no calibration data.
Clustering. For each model family we compute the pairwise chordal distance matrix (averaged across all L adapted layers) and run k-means++ with 20 random initializations on the projection-matrix embeddings. We set K = 2 as the number of groups throughout.
Computational cost. For the Flan-T5-Base/GLUE setup (T=8, L=72), SVD decomposition of all task deltas takes approximately 20 seconds on CPU; distance-matrix construction and k-means++ clustering complete in under 1 second; per-group SVD merging adds negligible overhead. Total wall-clock time for the GRAM pipeline is under 30 seconds, compared to hours of adapter training per task. The other model families exhibit the same qualitative cost structure: SVD dominates and is bounded by the per-layer cost summed over TL deltas.
D.7 Medical Benchmark Details
Task suite. The medical benchmark covers two task families crossed with two languages:
• Multiple-choice QA (MCQA). MedQA (English) and CMExam (Chinese): the model selects one option from a candidate set; reported metric is exact-match accuracy.
• Doctor–patient dialogue (open-ended generation). HealthcareMagic (English) and cMedQA2 (Chinese): the model generates a free-form answer to a patient query; reported metrics are BLEU-4 and ROUGE-1, ROUGE-2, and ROUGE-L (F1) against the reference response.
The 4 task families with 1 metric each (MCQA accuracy) plus 4 metrics each (BLEU-4, ROUGE-1/2/L) on the two open-ended tasks yield the 10 heterogeneous metric columns reported in table 3.
Summary metrics. Avg Rank is the mean rank across the 10 columns, where rank 1 is the best per-column merging method (the per-task Individual oracle is excluded from ranking). Avg Impr is the per-column relative improvement over the un-adapted Pretrained baseline, averaged across the 10 columns: for each metric column j and method M, we compute , then average over j. This normalizes for the wide range of metric magnitudes (MCQA accuracy in tens of points; ROUGE-2 in single digits).