arXiv:2610.29110cs.AIOct 2026

Manuscript Offprint

arXiv:2610.29110

GRAM: Group-wise Rank-Aware Model Merging via Subspace Alignment

Di Wu, Shuaidong Pan

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

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 ∑pairs∈G(1−cos⁡2θ)\sum_{\text{pairs} \in G}(1 - \cos^2 \theta) 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 K≪TK \ll T 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:

  1. 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.

  2. Theoretical Guarantees: We rigorously bound the projection error of our clustering objective. We prove that the resulting partition yields a merge error within O(log⁡K)O(\log K) of the optimal partition, and its expected error is strictly bounded below that of a standard global merge.

  3. 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.