Error-Subspace Calibration for Multi-Task Model Merging
Organizations: Kim Jaechul Graduate School of AI, KAIST
Abstract
Model merging combines task-specific expert models into a single model without joint training on their original datasets, but often incurs a performance gap relative to the individual experts. Post-merging calibration can reduce this gap through task-specific representation alignment, but the alignment objective alone does not specify which feature directions to correct. We propose Error-Subspace Calibration (ESCal), a post-merging calibration framework that identifies low-dimensional error subspaces from weight differences between expert and merged models. At each intermediate block boundary, a bridge module projects the merged representation onto the next block's input-projection error subspace and maps these coordinates to an additive correction in the current block's output-projection error subspace. The subspace bases remain fixed, so calibration learns only these linear maps, yielding a parameter-efficient mechanism for feature correction. We find that ESCal brings the merged model closer to the experts in both representations and predictions, indicating more faithful recovery of task-specific behavior. Experiments on vision and natural language understanding benchmarks show that ESCal improves merged-model performance across diverse architectures and merging methods using a small calibration set for each task.
Figures & tables
| Method | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Pretrained | 63.18 | 59.73 | 60.33 | 45.37 | 31.61 | 32.56 | 48.25 | 43.99 | 48.13 |
| Expert | 75.34 | 77.73 | 95.98 | 99.74 | 97.46 | 98.73 | 99.69 | 79.36 | 90.50 |
| Task Arithmetic | 55.32 | 54.98 | 66.82 | 77.78 | 80.21 | 69.68 | 97.34 | 50.37 | 69.06 |
| w/ Surgery | 60.39 | 52.62 | 71.38 | 88.65 | 81.67 | 74.27 | 97.82 | 52.77 | 72.45 |
| w/ Surgery V2 | 70.70 | 66.41 | 90.65 | 99.12 | 96.61 | 95.88 | 99.47 | 70.90 | 86.22 |
| w/ IntervMerge | 66.35 | 58.87 | 85.88 | 97.61 | 93.44 | 87.49 | 98.62 | 64.31 | 81.57 |
| Method | CoLA | SST-2 | MRPC | STS-B | QQP | MNLI | QNLI | RTE | Avg. |
| Pretrained | 0.0000 | 0.5975 | 0.1581 | -0.0758 | 0.4633 | 0.3183 | 0.5078 | 0.5271 | 0.3120 |
| Expert | 0.5895 | 0.9438 | 0.9091 | 0.8997 | 0.8994 | 0.8718 | 0.9198 | 0.7726 | 0.8507 |
| Task Arithmetic | 0.1232 | 0.6135 | 0.5500 | 0.5356 | 0.5881 | 0.6270 | 0.5365 | 0.5343 | 0.5135 |
| w/ Surgery | 0.2553 | 0.8532 | 0.7657 | 0.7877 | 0.7793 | 0.7215 | 0.7839 | 0.7184 | 0.7081 |
| w/ Surgery V2 | 0.5358 | 0.9326 | 0.8908 | 0.8978 | 0.8002 | 0.8404 | 0.9084 | 0.7408 | 0.8184 |
| w/ IntervMerge | 0.4647 | 0.9135 | 0.8477 | 0.8706 | 0.7779 | 0.7625 | 0.8524 | 0.7199 | 0.7762 |
| Basis | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Random orthonormal | 65.42 | 63.88 | 88.54 | 98.61 | 96.06 | 95.81 | 99.32 | 64.98 | 84.08 |
| Fine-tuned weights, top- | 66.94 | 65.02 | 89.85 | 99.03 | 96.17 | 96.32 | 99.36 | 65.70 | 84.80 |
| Task vector, top- | 69.29 | 67.72 | 93.01 | 99.44 | 97.08 | 97.47 | 99.53 | 72.53 | 87.01 |
| Merging error, top- | 70.33 | 69.02 | 93.60 | 99.48 | 97.10 | 97.70 | 99.55 | 73.52 | 87.54 |
| Read basis | Write basis | ||
| Top- | Random- | Bottom- | |
| Top- | |||
| Random- | |||
| Bottom- | |||
| Read | Write | |||
| Constrained | Constrained | |||
| Unconstrained | Constrained | |||
| Constrained | Unconstrained |
| Method | ViT-B/32 | ViT-B/16 | ViT-L/14 | RoBERTa | ||||
| KL | Agreement | KL | Agreement | KL | Agreement | KL | Agreement | |
| Task Arithmetic | 0.9383 | 74.51% | 0.7918 | 79.56% | 0.4447 | 86.83% | 0.6926 | 61.38% |
| w/ Surgery V2 | 0.2671 | 90.70% | 0.2054 | 92.94% | 0.1259 | 95.27% | 0.2872 | 87.76% |
| w/ FeatCal | 0.3204 | 89.48% | 0.2987 | 90.96% | 0.1610 | 94.40% | 0.4697 | 83.35% |
| w/ ESCal | 0.1821 | 92.09% | 0.1341 | 94.16% | 0.0910 | 96.09% | 0.2439 | 88.74% |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Base merging method | ViT-B/32 | ViT-B/16 | ViT-L/14 |
| Task Arithmetic | |||
| TIES-Merging | |||
| AdaMerging (tw) | |||
| AdaMerging (lw) | |||
| WUDI-Merging | |||
| ProDistill |
| Base merging method | Rank | Learning rate | Epochs |
| Task Arithmetic | 4 | 500 | |
| TIES-Merging | 16 | 200 | |
| AdaMerging (tw) | 16 | 500 | |
| AdaMerging (lw) | 4 | 1000 | |
| WUDI-Merging | 16 | 1000 | |
| ProDistill | 16 | 1000 |
| Method | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Task Arithmetic | 55.32 | 54.98 | 66.82 | 77.78 | 80.21 | 69.68 | 97.34 | 50.37 | 69.06 |
| w/ Surgery | 60.39 0.46 | 52.62 0.59 | 71.38 1.76 | 88.65 0.79 | 81.67 1.65 | 74.27 0.91 | 97.82 0.16 | 52.77 2.73 | 72.45 0.52 |
| w/ Surgery V2 | 70.70 0.19 | 66.41 0.49 | 90.65 1.23 | 99.12 0.18 | 96.61 0.07 | 95.88 0.62 | 99.47 0.06 | 70.90 0.75 | 86.22 0.17 |
| w/ IntervMerge | 66.35 0.38 | 58.87 0.83 | 85.88 1.55 | 97.61 0.32 | 93.44 0.22 | 87.49 1.09 | 98.62 0.10 | 64.31 1.10 | 81.57 0.29 |
| w/ FeatCal | 69.22 | 70.31 | 89.06 | 98.00 | 95.01 | 92.40 | 99.13 | 71.11 | 85.53 |
| w/ ESCal | 70.33 0.22 | 69.02 0.19 | 93.60 0.36 | 99.48 0.07 | 97.10 0.05 | 97.70 0.22 | 99.55 0.03 | 73.52 0.44 | 87.54 0.07 |
| Method | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Task Arithmetic | 61.74 | 65.96 | 74.15 | 77.07 | 88.06 | 73.92 | 98.48 | 53.03 | 74.05 |
| w/ Surgery | 65.25 0.43 | 63.49 1.63 | 76.73 1.36 | 89.67 0.99 | 88.03 0.40 | 76.13 2.11 | 98.39 0.12 | 58.62 2.21 | 77.04 0.40 |
| w/ Surgery V2 | 74.17 0.16 | 76.68 0.75 | 93.02 0.59 | 98.95 0.24 | 97.21 0.06 | 96.51 0.62 | 99.52 0.04 | 74.85 0.95 | 88.86 0.17 |
| w/ IntervMerge | 70.34 0.22 | 69.55 0.96 | 88.15 2.12 | 97.50 0.45 | 95.30 0.22 | 86.57 2.14 | 99.00 0.12 | 67.57 1.88 | 84.25 0.36 |
| w/ FeatCal | 71.96 0.06 | 79.84 0.19 | 90.12 0.32 | 97.95 0.26 | 96.44 0.03 | 93.37 0.03 | 99.16 0.03 | 73.41 0.65 | 87.78 0.11 |
| w/ ESCal | 74.22 0.27 | 79.82 0.54 | 95.07 0.26 | 99.46 0.09 | 97.61 0.08 | 98.47 0.26 | 99.58 0.02 | 77.31 0.63 | 90.19 0.20 |
| Method | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Task Arithmetic | 74.16 | 82.09 | 86.67 | 93.93 | 87.91 | 86.77 | 98.94 | 65.69 | 84.52 |
| w/ Surgery | 74.71 0.27 | 80.50 0.43 | 87.89 1.66 | 95.47 0.57 | 88.82 0.59 | 86.87 1.01 | 98.94 0.13 | 69.84 1.94 | 85.38 0.19 |
| w/ Surgery V2 | 78.61 0.28 | 86.93 0.31 | 94.57 1.00 | 99.39 0.04 | 97.73 0.04 | 97.55 0.54 | 99.58 0.03 | 78.62 0.99 | 91.62 0.11 |
| w/ IntervMerge | 76.40 0.26 | 83.59 0.68 | 91.62 1.51 | 98.53 0.30 | 96.29 0.15 | 92.54 1.61 | 99.42 0.04 | 74.19 1.01 | 89.07 0.10 |
| w/ FeatCal | 79.05 0.04 | 90.18 0.09 | 94.11 0.11 | 99.30 0.05 | 96.47 0.04 | 96.85 0.08 | 99.36 0.03 | 78.96 0.06 | 91.78 0.02 |
| w/ ESCal | 79.12 0.17 | 89.28 0.16 | 96.11 0.28 | 99.66 0.05 | 97.98 0.03 | 98.75 0.23 | 99.64 0.02 | 80.52 0.28 | 92.63 0.05 |
| Method | CoLA | SST-2 | MRPC | STS-B | QQP | MNLI | QNLI | RTE | Avg. |
| Pretrained | 0.0000 | 0.5975 | 0.1581 | -0.0758 | 0.4633 | 0.3183 | 0.5078 | 0.5271 | 0.3120 |
| Expert | 0.5895 | 0.9438 | 0.9091 | 0.8997 | 0.8994 | 0.8718 | 0.9198 | 0.7726 | 0.8507 |
| Task Arithmetic | 0.1232 | 0.6135 | 0.5500 | 0.5356 | 0.5881 | 0.6270 | 0.5365 | 0.5343 | 0.5135 |
| w/ Surgery | 0.2553 0.0253 | 0.8532 0.0124 | 0.7657 0.0155 | 0.7877 0.0089 | 0.7793 0.0192 | 0.7215 0.0118 | 0.7839 0.0224 | 0.7184 0.0099 | 0.7081 0.0088 |
| w/ Surgery V2 | 0.5358 0.0106 | 0.9326 0.0029 | 0.8908 0.0037 | 0.8978 0.0018 | 0.8002 0.0137 | 0.8404 0.0016 | 0.9084 0.0019 | 0.7408 0.0110 | 0.8184 0.0016 |
| w/ IntervMerge | 0.4647 0.0273 | 0.9135 0.0049 | 0.8477 0.0061 | 0.8706 0.0075 | 0.7779 0.0135 | 0.7625 0.0080 | 0.8524 0.0089 | 0.7199 0.0098 | 0.7762 0.0067 |
| Method | GSM8K | MATH | HumanEval | MBPP | Avg. | Norm Avg. |
| WizardMath-13B | 0.6343 | 0.1468 | 0.0732 | 0.2156 | 0.2675 | 0.7655 |
| Llama-2-13b-code-alpaca | 0.0000 | 0.0000 | 0.2195 | 0.2959 | 0.1289 | 0.5000 |
| Task Arithmetic | 0.6494 | 0.1446 | 0.0122 | 0.0917 | 0.2245 | 0.5936 |
| w/ Surgery | 0.6542 | 0.1468 | 0.0488 | 0.1514 | 0.2503 | 0.6913 |
| w/ Surgery V2 | 0.6255 | 0.1430 | 0.0793 | 0.2133 | 0.2653 | 0.7606 |
| w/ FeatCal | 0.6406 | 0.1452 | 0.2073 | 0.2683 | 0.3154 | 0.9625 |
| Method | HumanEval | MBPP | AlpacaEval | Avg. | Norm Avg. |
| WizardLM-13B-V1.2 | 0.3293 | 0.3509 | 0.1646 | 0.2816 | 1.2287 |
| Llama-2-13b-code-alpaca | 0.2195 | 0.2959 | 0.0196 | 0.1783 | 0.7064 |
| Task Arithmetic | 0.3232 | 0.3440 | 0.1576 | 0.2749 | 1.1975 |
| w/ Surgery | 0.3171 | 0.3486 | 0.1604 | 0.2754 | 1.1991 |
| w/ Surgery V2 | 0.3293 | 0.3349 | 0.1615 | 0.2752 | 1.2044 |
| w/ FeatCal | 0.3110 | 0.3372 | 0.1520 | 0.2667 | 1.1600 |
| Method | GSM8K | MATH | HumanEval | MBPP | AlpacaEval | Avg. | Norm Avg. |
| WizardLM-13B-V1.2 | 0.0223 | 0.0004 | 0.3293 | 0.3280 | 0.1646 | 0.1689 | 0.6076 |
| WizardMath-13B | 0.6343 | 0.1468 | 0.0732 | 0.2100 | 0.0487 | 0.2226 | 0.6317 |
| Task Arithmetic | 0.6614 | 0.1440 | 0.2622 | 0.3000 | 0.1053 | 0.2946 | 0.8749 |
| w/ Surgery | 0.6693 | 0.1358 | 0.2683 | 0.3300 | 0.1101 | 0.3027 | 0.8940 |
| w/ Surgery V2 | 0.6566 | 0.1434 | 0.2500 | 0.3160 | 0.1149 | 0.2962 | 0.8865 |
| w/ FeatCal | 0.6454 | 0.1404 | 0.2439 | 0.3040 | 0.1041 | 0.2876 | 0.8548 |
| Basis construction | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| Random orthonormal | 65.42 0.27 | 63.88 0.55 | 88.54 0.57 | 98.61 0.23 | 96.06 0.10 | 95.81 0.22 | 99.32 0.05 | 64.98 1.02 | 84.08 0.15 |
| Fine-tuned weights, top- | 66.94 0.22 | 65.02 0.48 | 89.85 0.61 | 99.03 0.15 | 96.17 0.04 | 96.32 0.45 | 99.36 0.06 | 65.70 0.84 | 84.80 0.24 |
| Task vector, top- | 69.29 0.15 | 67.72 0.67 | 93.01 0.45 | 99.44 0.11 | 97.08 0.04 | 97.47 0.28 | 99.53 0.04 | 72.53 0.39 | 87.01 0.09 |
| Merging error, bottom- | 62.11 0.21 | 62.17 0.30 | 82.26 0.36 | 97.20 0.35 | 94.02 0.19 | 91.05 0.17 | 98.83 0.07 | 59.21 0.58 | 80.86 0.13 |
| Merging error, top- | 70.33 0.22 | 69.02 0.19 | 93.60 0.36 | 99.48 0.07 | 97.10 0.05 | 97.70 0.22 | 99.55 0.03 | 73.52 0.44 | 87.54 0.07 |
| Training ( tasks) | Inference (one task) | |||||
| Method | Trainable Parameters | # Trainable | Stored Entries | # Stored | BF16 Storage | Overhead |
| Shared ViT-B/32 image encoder | – | – | 87,849,216 | 167.56 MiB | Reference | |
| Surgery | 131,072 | 16,384 | 0.031 MiB | 0.02% | ||
| Surgery V2 | 2,490,368 | 311,296 | 0.594 MiB | 0.35% | ||
| FeatCal | (closed form) | 0 | 0 | 0.000 MiB | 0.00% | |
| ESCal | 1,572,864 | 2,555,904 | 4.875 MiB | 2.91% | ||
| Base construction | Calibration | ||||
| Base merging method | Time | Surgery | Surgery V2 | FeatCal | ESCal |
| Task Arithmetic | 0.09 | 6.28 | 13.41 | 0.63 | 13.22 |
| TIES-Merging | 0.39 | 5.48 | 12.05 | 0.58 | 12.92 |
| WUDI-Merging | 5.61 | 5.53 | 12.18 | 0.53 | 13.05 |
| AdaMerging (tw) | 39.46 | 6.87 | 13.69 | 0.65 | 14.06 |
| AdaMerging (lw) | 40.04 | 6.96 | 13.69 | 0.89 | 14.05 |
| Batch size 1 | Batch size 64 | |||||
| Calibration | Image latency (ms) | (ms) | Overhead (%) | Batch latency (ms) | Throughput (img/s) | Throughput reduction (%) |
| None | 5.51 0.02 | Ref. | Ref. | 14.83 0.05 | 4316.5 15.6 | Ref. |
| Surgery | 5.60 0.03 | +0.095 | +1.72 [+1.51, +1.95] | 14.81 0.07 | 4320.1 20.0 | +0.15 [+0.06, +0.25] |
| Surgery V2 | 7.27 0.02 | +1.758 | +31.91 [+31.60, +32.27] | 15.63 0.04 | 4095.0 11.6 | +5.04 [+4.99, +5.08] |
| FeatCal | 5.50 0.02 | +0.004 | +0.07 [-0.30, +0.48] | 14.84 0.03 | 4311.4 8.3 | +0.01 [-0.01, +0.04] |
| ESCal | 7.09 0.02 | +1.575 | +28.53 [+28.23, +28.84] | 15.66 0.04 | 4086.9 10.3 | +5.29 [+5.22, +5.35] |
| Support / task | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| 4 | 66.64 0.21 | 63.17 1.20 | 85.49 1.08 | 91.32 3.07 | 93.87 0.33 | 92.01 1.37 | 97.47 0.49 | 60.33 1.44 | 81.29 0.36 |
| 8 | 67.83 0.42 | 65.05 1.21 | 88.01 0.91 | 94.77 3.28 | 95.47 0.33 | 93.60 0.75 | 98.27 0.64 | 63.48 1.61 | 83.31 0.49 |
| 16 | 68.71 0.27 | 66.50 0.84 | 90.03 0.56 | 96.72 0.91 | 96.02 0.51 | 94.87 0.69 | 98.79 0.34 | 65.49 0.86 | 84.64 0.34 |
| 32 | 69.68 0.14 | 67.77 0.41 | 92.35 0.28 | 99.09 0.23 | 96.79 0.11 | 96.90 0.63 | 99.38 0.07 | 69.89 1.42 | 86.48 0.21 |
| 64 | 70.33 0.22 | 69.02 0.19 | 93.60 0.36 | 99.48 0.07 | 97.10 0.05 | 97.70 0.22 | 99.55 0.03 | 73.52 0.44 | 87.54 0.07 |
| 128 | 70.66 0.08 | 69.70 0.24 | 94.09 0.19 | 99.57 0.04 | 97.22 0.04 | 98.18 0.18 | 99.64 0.02 | 75.46 0.21 | 88.07 0.06 |
Model Merging
Model merging combines trained model weights or adapters to reuse capabilities while reducing the cost of joint training or ensembles.
See all 193 papers