Training-Free Transformer Merging via
Sequential Local Operator Alignment

1CISPA Helmholtz Center for Information Security   2Munich Center for Machine Learning
3Technical University of Munich, School of Computation, Information and Technology   4Massachusetts Institute of Technology, Department of EECS, CSAIL
SLOA method illustration

SLOA aligns the effective local operators ($\mathbf{W}_Q\mathbf{W}_K^\top$, $\mathbf{W}_V\mathbf{W}_O$, LayerNorm affine, MLP projections) rather than raw weight matrices, sequentially under activations of the partially-merged model, then factorizes each operator back into transformer-compatible weights.

Abstract

Training-free model merging aims to combine multiple fine-tuned models into a single model without further optimization on labeled data. Yet, in transformers, independently merging individual layers can affect a shared attention computation because the query–key and value–output operators depend on composed matrices, overlooking the functional structure. Moreover, when merging earlier components, downstream components receive different activations than they do in the original model, thus, the merged and original execution paths no longer match.

In this paper, we introduce Sequential Local Operator Alignment, a training-free method that merges transformers along the execution path of the partially merged model. Our method uses calibration data to estimate the local behavior of each functional component, aligns operators sequentially under the intermediate activation of the partially merged model, and subsequently factorizes the merged operators back into valid transformer parameters. We empirically show that this sequential step reduces error accumulation across layers. Furthermore, the proposed operator factorization step enables rank expansion, providing a principled mechanism for increasing multi-task capacity.

We demonstrate that our approach generalizes across modalities, model scales, and varying numbers of tasks, from CLIP and RoBERTa to billion-parameter LLMs, and further extends naturally to the merging of LoRA-fine-tuned models. The results indicate improvements over strong merging baselines without requiring rank expansion, while optional expansion provides a further accuracy–inference-cost trade-off.

Motivation: Why Isolated Merging Fails

Non-invariance of isolated merging

Relative functional error along linear interpolations between equivalent factorizations. Error grows rapidly — equality holds only at $c=1$.

Hidden ambiguity. Any invertible $\mathbf{R}$ gives a different factorization with the same function:

$$(\mathbf{W}_Q\mathbf{R})(\mathbf{W}_K\mathbf{R}^{-\top})^\top = \mathbf{W}_Q\mathbf{W}_K^\top$$

Independent averaging fails. Averaging two such parameterizations yields

$$\bar{\mathbf{M}}_\mathrm{QK} = \tfrac{1}{4}\mathbf{W}_Q(\mathbf{I}+\mathbf{R})(\mathbf{I}+\mathbf{R}^{-1})\mathbf{W}_K^\top \;\neq\; \mathbf{W}_Q\mathbf{W}_K^\top$$

In the scalar case $\mathbf{R}=c\mathbf{I}$, the error grows without bound as $c\to\infty$. Two task models that are functionally identical at the QK level can produce arbitrarily different merged attention scores under isolated weight averaging.

Method

Unified Alignment Objective

For each local operator $\bm{\theta}$, SLOA solves:

$$\bm{\theta}_\mathrm{merge}= \arg\min_{\bm{\theta}}\; \underbrace{\tfrac{1}{T}\!\sum_{t,i}\! \bigl\|\mathcal{A}(\widehat{\mathbf{Z}}_{t,i};\bm{\theta})- \mathcal{A}(\mathbf{Z}_{t,i};\bm{\theta}_t)\bigr\|_F^2}_{\text{activation matching}} \,+\, \underbrace{\tfrac{1}{T}\!\sum_t\!\|\bm{\theta}-\bm{\theta}_t\|^2_{\widehat{\chi}_t}}_{\text{data-aware geometry}}$$

$\widehat{\mathbf{Z}}$ are activations from the partially-merged model; the geometry term uses a Mahalanobis distance that penalizes deviation along directions the calibration activations actually use. For fixed activations the objective is quadratic in $\bm{\theta}$ — closed-form regularized least squares per component.

Local Operators & Metrics

Component Local operator $\bm{\theta}$ Behavior map $\mathcal{A}(\mathbf{Z};\bm{\theta})$ Metric
LayerNorm $(\bm{\gamma},\bm{\beta})$ $\nu(\mathbf{X})\,\mathrm{diag}(\bm{\gamma})+\mathbf{1}\bm{\beta}^\top$ $\mathrm{Cov}(\nu(\chi))$
Linear map $\mathbf{W}$ $\mathbf{X}\mathbf{W}$ $\bm{\Lambda}$
QK component $\tfrac{1}{\sqrt{d_k}}\mathbf{W}_Q\mathbf{W}_K^\top$ $\mathbf{X}\bm{\theta}\mathbf{X}^\top$ $\bm{\Lambda}\otimes\bm{\Lambda}$
VO component $\mathbf{W}_V\mathbf{W}_O$ $\mathbf{A}\mathbf{X}\bm{\theta}$ $\bm{\Lambda}$

$\nu(\mathbf{X})$ = LayerNorm-normalized input; $\mathbf{A}$ = attention matrix; $\bm{\Lambda}=\alpha\,\mathrm{diag}(\mathrm{Cov}(\mathbf{X}))+\epsilon\mathbf{I}$.

SLOA in 4 Steps

1. Collect activations $\{\mathbf{Z}_{t,i}\}$ for each operator from a small calibration set (256 samples per task by default).
2. Order operators topologically: LayerNorm $\to$ QK $\to$ VO $\to$ MLP $W_1$ $\to$ MLP $W_2$.
3. For each operator: forward through the partially-merged model to get $\widehat{\mathbf{Z}}_{t,i}$, then solve closed-form regularized LS.
4. Factorize QK/VO operators via SVD at chosen rank $r_j$ and write back transformer-compatible weights. Rank $r_j > d_k$ retains additional task-specific singular directions.

No gradients, no labels — one deterministic pass through the operator graph.

Results

All training-free methods that require calibration, including SLOA, use $N{=}256$ samples per task drawn exclusively from the training split; no test data is used for merging. Results are averaged over three random seeds. For SLOA, $r$ is the retained factorization rank of the QK and VO operators.

Radar: SLOA vs baselines

Per-task comparison of SLOA ($r{=}128$) with data-free and training-free baselines on ViT-B/32 with 20 vision tasks (left two) and RoBERTa with 7 GLUE tasks (right two). SLOA consistently outperforms both data-free and training-free baselines.

Vision: ViT-B/32 (CLIP fine-tunes)

Average accuracy (%) on 8, 14, and 20 vision classification tasks. $r{=}64$ matches the original ViT-B/32 attention-head dimension.

MethodSamples 8 tasks14 tasks20 tasks
Fine-tuned—90.3989.2689.78
Data-Free Weight Averaging—66.2965.3761.08
Task Arithmetic—69.4966.4760.60
TIES-Merging—71.7067.5862.76
TSV-M—83.0479.1173.66
Iso-C—82.6477.9471.16
Iso-CTS—82.8779.2473.41
Training-Free Fisher Merging25669.1266.2661.74
RegMean25682.6377.9372.20
RegMean++25684.3780.0674.51
SLOA ($r{=}64$)25684.8981.9480.06
SLOA ($r{=}128$)256 85.5082.6181.03

At the original rank, SLOA outperforms all baselines in every setting. Its advantage over the strongest baseline, RegMean++, grows with the number of merged tasks: +0.6 pp (8 tasks), +1.9 pp (14 tasks), +5.5 pp (20 tasks). Rank expansion $r{=}64\to128$ improves accuracy everywhere, with larger gains for more tasks.

Vision: ViT-B/16 (CLIP fine-tunes)

Average accuracy (%) on the same 8-, 14-, and 20-task benchmarks with the larger ViT-B/16 backbone.

MethodSamples 8 tasks14 tasks20 tasks
Fine-tuned—92.3491.3191.61
Data-Free Weight Averaging—72.2869.7264.81
Task Arithmetic—77.1770.9264.23
TIES-Merging—80.2171.4866.31
TSV-M—86.7082.0978.31
Iso-C—88.3682.3975.82
Iso-CTS—89.0184.5478.50
Training-Free Fisher Merging25673.6771.0066.50
RegMean25686.1381.4375.53
RegMean++25687.2582.2376.64
SLOA ($r{=}64$)25687.1684.1982.12
SLOA ($r{=}128$)256 88.0485.1683.43

The trend mirrors ViT-B/32: on 8 tasks the data-free Iso-CTS is narrowly strongest, by 14 tasks SLOA has overtaken it, and by 20 tasks SLOA leads by nearly 5 pp (83.43 vs. 78.50). Larger backbones are more weight-disentangled, so data-free baselines stay competitive at few tasks; as interference grows with task count, aligning functional operators wins by an increasingly clear margin.

NLU: RoBERTa on 7 GLUE Tasks

Per-task metric and average on seven GLUE tasks with merged RoBERTa-base models.

MethodSamples CoLASST-2MRPCQQP MNLIQNLIRTEAvg
Individual— 0.60180.94040.89220.9141 0.87200.92710.79060.8483
Data-Free Weight Averaging— 0.18080.81880.81160.7381 0.43830.71060.61730.6165
Task Arithmetic— 0.29090.84630.81880.7869 0.55910.75840.64620.6724
TIES-Merging— 0.19510.84290.83330.8351 0.65010.73090.42600.6448
TSV-M— 0.34770.87390.84460.8286 0.61630.81240.66060.7120
Iso-C— 0.26390.86010.81300.8211 0.73030.78820.70400.7115
Iso-CTS— 0.41360.77980.63850.6500 0.52770.65900.65340.6174
Training-Free Fisher Merging256 0.11260.87190.74190.7808 0.42270.53110.51500.5680
RegMean256 0.27970.89330.80690.7915 0.72510.83360.61610.7066
RegMean++256 0.24330.91700.77400.8099 0.75430.82990.66910.7139
SLOA ($r{=}64$)256 0.56080.92320.88140.8152 0.76780.87550.71000.7906
SLOA ($r{=}128$)256 0.57210.92390.88100.8166 0.77530.88240.73410.7979

bold = best in column; underline = second best. At the original rank SLOA improves the average over the strongest baseline by 7.7 points; $r{=}128$ raises the margin to 8.4 points. SLOA is best on six of seven tasks, trailing only TIES-Merging and TSV-M on QQP.

LLM: Merging LLaMA-2-7B LoRA Experts

Merging three LoRA-adapted LLaMA-2-7B experts (math, code, instruction-following). SLOA forms the effective weight $\mathbf{W}_t=\mathbf{W}_0+\mathbf{B}_t\mathbf{A}_t$ and merges its composed operators, so it is invariant to the LoRA factorization ambiguity $\mathbf{B}_t\mathbf{A}_t=(\mathbf{B}_t\mathbf{R})(\mathbf{R}^{-1}\mathbf{A}_t)$. Rotary position embeddings prevent a single composed QK operator, so only the VO circuit is composed (SLOA-VO) while $\mathbf{W}_Q,\mathbf{W}_K$ are merged as linear operators. Avg. = mean over GSM8K, HumanEval (pass@1), and IFEval.

Method GSM8KHumanEvalIFEvalAvg.
Experts LLaMA-2-7B Pretrained4.320.0020.898.40
LLaMA-2-7B IF-Tulu12.591.2266.1726.66
LLaMA-2-7B Code (Magic-Coder)9.7032.9326.9923.21
LLaMA-2-7B Math (Meta-Math)65.500.0015.5327.01
Data-Free Weight Averaging40.1118.2940.6733.02
Task Arithmetic ($\alpha{=}0.5$)58.9815.8542.7039.18
TSV-M ($\alpha{=}0.5$)58.0018.2942.1439.48
TIES ($\alpha{=}0.3$)48.1420.7334.5734.48
KnOTS-TIES ($\lambda{=}0.85$)55.2715.2440.8537.12
Iso-C38.8921.3457.6739.30
Iso-CTS36.0921.3455.4537.63
Training-Free RegMean56.0329.2748.2444.51
RegMean++55.9529.2754.1646.46
SLOA-VO ($r_{ov}{=}128$)58.6128.0557.8648.17
SLOA-VO ($r_{ov}{=}256$)59.5127.4458.9648.64
SLOA-VO ($r_{ov}{=}384$) 59.5127.4460.6349.19

bold/underline = best/second-best merging method per column. At the architecture-preserving rank $r_{ov}{=}128$, SLOA-VO has the highest average of all merging methods (+1.7 over RegMean++). Expanding to $r_{ov}{=}384$ further improves GSM8K and IFEval, with a small HumanEval reduction.

Additional Experiments & Ablations

Merging LoRA-adapted ViT experts

MethodSamplesNorm. Acc. (%)
Fine-tuned (LoRA)—100.00
Data-Free Simple Avg—63.76
TA—63.70
TIES—63.70
DARE-TIES—63.70
KnOTS-TIES—68.00
KnOTS-DARE-TIES—63.90
Iso-C—73.60
Iso-CTS—73.70
Training-Free Fisher Merging25662.81
RegMean25672.72
RegMean++25681.11
SLOA ($r{=}64$)25682.66
SLOA ($r{=}128$)25688.07

Normalized accuracy (mean over tasks of merged/fine-tuned accuracy $\times$ 100) on ViT-B/32 LoRA experts (KnOTS, rank 16) across 8 vision tasks; the LoRA oracle's raw average accuracy is 84.28%.

SLOA needs no change to its local objective for LoRA experts: it merges the effective functional operators rather than the non-identifiable LoRA factors. SLOA ($r{=}128$) reaches 88.07%, 7.0 points above the strongest baseline, and even $r{=}64$ beats all baselines — the merged operator's subspace can exceed the rank of any single task expert.

Scaling with calibration samples and rank

ViT-B/32 calibration scaling

ViT-B/32, 20 tasks

ViT-B/16 calibration scaling

ViT-B/16, 20 tasks

RoBERTa calibration scaling

RoBERTa, 7 GLUE tasks

Across both modalities and all ranks, SLOA improves steadily with more calibration data — larger sets give a better-conditioned system for the merged weights. Even with only 128 samples SLOA outperforms all baselines. Raising $r$ from 64 to 128 and 256 helps further on vision; on NLU, 128 helps clearly while 256 gives diminishing returns.

Diagnosing the source of SLOA's gains

Error accumulation across depth

Layer-wise merging error on ViT-B/16, 20 tasks: mean relative $L_2$ error between merged and expert activations at each block. SLOA and RegMean++ track closely for six blocks, then diverge; SLOA's error peaks at 1.65–1.69$\times$ its input-level error vs. 1.87$\times$ (RegMean++) and 2.08$\times$ (RegMean). Rank expansion narrows the gap further.

Baseline calibration scaling

Accuracy vs. calibration samples on ViT-B/32: RegMean/RegMean++ plateau early once their Gram statistics stabilize, while SLOA keeps improving. Sequential correction alone (no operator composition) already beats both; composing QK/VO and expanding rank adds a further gain at every budget.

Circuit capacity, components, and regularization

QK/OV rank decoupling

Decoupling QK and OV ranks (ViT-B/32, 20 tasks, 1024 samples). Expanding one circuit alone saturates near $r{=}256$; QK expansion beats OV expansion; jointly expanding both gives the best, most sustained gains.

Component ablation

Component ablation (ViT-B/32, 20 tasks). Sequential alignment alone is already strong; adding only QK or only OV hurts, since the two are coupled inside attention; merging both jointly gives the best result.

Alpha sensitivity

Sensitivity to $\alpha$ (ViT-B/32, 8 tasks). Larger $\alpha$ helps with few samples; the optimum decreases as calibration data grows, approaching $\alpha\approx0.05$.

Merge cost

MethodData requirementMerge time (s)Accuracy (%)
Task ArithmeticData-free14.6364.23
TIES-MergingData-free39.6466.31
TSV-MData-free153.3478.31
Iso-CData-free17.0975.82
Iso-CTSData-free167.2478.50
Fisher MergingCalibration ($N{=}256$)112.7066.50
RegMeanCalibration ($N{=}256$)84.1175.53
RegMean++Calibration ($N{=}256$)115.0876.64
SLOA ($r{=}64$)Calibration ($N{=}256$)175.9582.12
SLOA ($r{=}128$)Calibration ($N{=}256$)182.4483.43
SLOA ($r{=}256$)Calibration ($N{=}256$)186.7483.74

Wall-clock merge time on ViT-B/16, 20 tasks. SLOA costs about as much as the SVD-based data-free methods (TSV-M, Iso-CTS) while being ~5 pp more accurate. The cost is paid once, when building the merged checkpoint; afterwards no task identity, routing, or test-time adaptation is needed. Rank expansion $r{=}64 o256$ adds only ~11 s.

Key takeaways:

  • Sequential alignment limits error accumulation across depth and is the largest single source of gains.
  • QK and OV must be merged jointly — composing them also unlocks rank expansion for extra multi-task capacity.
  • SLOA keeps improving with more calibration data, while RegMean-style baselines plateau.
  • SLOA transfers unchanged to LoRA-adapted experts, in both ViT and LLaMA-2-7B.
  • The optimal $\alpha$ decreases as calibration data grows; the regularizer matters most in the low-data regime.

BibTeX

@misc{maurya2026trainingfreetransformermergingsequential,
      title={Training-Free Transformer Merging via Sequential Local Operator Alignment},
      author={Akansh Maurya and Ya-Wei Eileen Lin and Stefanie Jegelka and Sebastian U Stich and Rotem Mulayoff},
      year={2026},
      eprint={2610.06415},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2610.06415},
}