Optimizable Model Averaging for Ensembling Heterogeneous Model Outputs
Organizations: Department of Computer Science University of British Columbia, Vancouver
Abstract
Foundation model ensembles can improve accuracy and robustness, but full fine-tuning and parameter-space merging are often expensive or impossible when candidate models have different architectures. We propose Optimizable Model Averaging (OMA), a black-box approach that learns nonnegative model-combination weights, one scalar coefficient per model, to average the candidate models' predictive probabilities, leaving all model parameters frozen, by minimizing regularized predictive entropy. A central challenge is that minimizing predictive entropy can favour confidently incorrect models: increased confidence need not imply improved accuracy or calibration. We therefore examine regularization as a mechanism for controlling adaptation and empirically evaluate its effect on calibration, observing lower expected calibration error in selected configurations, alongside better performance-calibration trade-offs than model output averaging. As foundation models continue to advance, these approaches will enable the incorporation of future, potentially much better models to improve performance on challenging text and image classification tasks.
Figures & tables
| Dataset | Method | Accuracy ( ) | ECE ( ) |
|---|---|---|---|
| SST-2 | Output averaging | 95.30 | 0.099 |
| OMA (best accuracy) | 95.71 0.62 | 0.027 0.003 | |
| OMA (best ECE) | 94.95 0.35 | 0.011 0.007 | |
| CoLA | Output averaging | 70.17 | 0.064 |
| OMA (best accuracy) | 71.06 0.40 | 0.058 0.004 | |
| OMA (best ECE) | 69.63 0.98 | 0.052 0.005 |
| MRPC | RTE | CoLA | SST-2 | |
| bert-base | 86.44 | 65.34 | 59.05 | 92.43 |
| bert-large | 90.61 | 61.73 | 64.55 | 93.58 |
| funnel (xlarge-base) | 92.01 | 87 | 69.6 | 95.99 |
| funnel (xlarge) | 89.69 | 87 | 68.06 | 54.93 |
| MS (Bert, best) | 88.3 | 61 | 59.1 | 92.5 |
| MS (Bert, greedy) | 88.3 | 61.7 | 59.1 | 93 |
| MRPC | RTE | CoLA | SST-2 | |
| BERT-Base | 74.80 | 53.07 | 43.57 | 88.19 |
| BERT-Large | 74.98 | 50.90 | 53.91 | 91.63 |
| funnel(xlarge-base) | 74.38 | 52.71 | 13.44 | 92.89 |
| funnel(xlarge) | 74.80 | 49.10 | 42.68 | 94.50 |
| LoRA (output avg) | 74.80 | 59.21 | 51.48 | 92.54 |
| Bayesian LoRA | 74.98 | 50.90 | 53.91 | 91.74 |
| Img-1K | Img-V2 | Img-R | Img-sketch | Img-A | ObjNet | ||
| Output avg | 84.90 | 79.14 | 96.22 | 75.85 | 85.08 | 77.13 | |
| OMA | 85.11 | 78.91 | 96.17 | 76.23 | 86.68 | 77.64 | |
| Zeroshot | (+0.25%) | (-0.29%) | (-0.05%) | (+0.50%) | (+1.88%) | (+0.66%) | |
| Output avg | 88.98 | 81.53 | 94.36 | 72.76 | 83.61 | 73.90 | |
| OMA | 89.19 | 81.90 | 94.64 | 72.68 | 85.47 | 74.02 | |
| MAP | (+0.24%) | (+0.45%) | (+0.30%) | (-0.11%) | (+2.22%) | (+0.16%) | |
| Method | Img-1K | V2 | R | Sketch | A | ObjNet |
|---|---|---|---|---|---|---|
| Accuracy-weighted | 88.98 | 81.83 | 94.38 | 73.95 | 83.89 | 74.05 |
| Single best model | 88.27 | 80.30 | 95.80 | 74.66 | 86.06 | 76.42 |
| Model Soups, greedy | 90.94 | 84.22 | 95.46 | 74.23 | 92.67 | 78.52 |
| CoCa, frozen | 90.6 | – | – | – | – | – |
| EVA-02-L | 90.0 | 82.4 | 89.9 | 70.1 | 87.7 | 62.8 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Name in Paper | OpenCLIP Name | Pretraining Data | Params (M) | FLOPs (B) | Memory (G) | Avg. Perf. (38 sets) |
|---|---|---|---|---|---|---|
| fe-1 | ViT-H-14-378-quickgelu | dfn5b | 986.71 | 1054.05 | 4.4 | 0.7079 |
| fe-2 | ViT-H-14-quickgelu | dfn5b | 986.11 | 381.68 | — | 0.6961 |
| fe-3 | EVA02-E-14-plus | laion2b_s9b_b144k | 5044.89 | 2362.19 | 20.2 | 0.6930 |
| fe-4 | ViT-SO400M-14-SigLIP-384 | webli | 877.96 | 723.48 | 4.1 | 0.6921 |
| fe-5 | ViT-bigG-14-CLIPA-336 | datacomp1b | 2517.76 | 2271.58 | 10.35 | 0.6842 |
| — | ViT-bigG-14-CLIPA | datacomp1b | 2517.22 | 1007.93 | — | 0.6822 |
| Name in Paper | OpenCLIP Name | Pretraining Data | Params (M) | FLOPs (B) | Memory (G) | Avg. Perf. (38 sets) |
|---|---|---|---|---|---|---|
| fe-1 | ViT-H-14-378-quickgelu | dfn5b | 986.71 | 1054.05 | 4.4 | 0.7079 |
| fe-2 | ViT-H-14-quickgelu | dfn5b | 986.11 | 381.68 | — | 0.6961 |
| fe-3 | EVA02-E-14-plus | laion2b_s9b_b144k | 5044.89 | 2362.19 | 20.2 | 0.6930 |
| fe-4 | ViT-SO400M-14-SigLIP-384 | webli | 877.96 | 723.48 | 4.1 | 0.6921 |
| fe-5 | ViT-bigG-14-CLIPA-336 | datacomp1b | 2517.76 | 2271.58 | 10.35 | 0.6842 |
| — | ViT-bigG-14-CLIPA | datacomp1b | 2517.22 | 1007.93 | — | 0.6822 |
| fe-1 | fe-2 | fe-3 | fe-4 | fe-5 | fe-6 | fe-7 | fe-8 | ||
|---|---|---|---|---|---|---|---|---|---|
| imagenet | map | 88.05 | 87.11 | 87.98 | 88.15 | 88.27 | 87.86 | 86.06 | 85.49 |
| zeroshot | 84.51 | 83.57 | 82.52 | 83.05 | 83.19 | 82.1 | 80.64 | 78.92 | |
| imagenet-v2 | map | 80.29 | 78.89 | 80.12 | 80.31 | 80.13 | 79.95 | 77.84 | 76.08 |
| zeroshot | 78.41 | 77.34 | 76.34 | 77.16 | 77.34 | 75.78 | 74.23 | 71.51 | |
| imagenet-r | map | 91.04 | 90.33 | 91.77 | 93.66 | 93.31 | 91.41 | 90.72 | 87.58 |
| zeroshot | 93.79 | 92.94 | 94.83 | 95.81 | 95.36 | 94.28 | 93.54 | 91.03 |
| Imagenet-1K | V2 | R | Sketch | A | |
|---|---|---|---|---|---|
| training subset 1 | 88.402 | 81.21 | 94.74 | 73.478 | 85.743 |
| training subset 2 | 88.634 | 81.12 | 94.847 | 73.308 | 86.39 — |
| training subset 3 | 88.542 | 81.36 | 94.883 | 73.625 | 85.943 |
| variance | 0.0090 | 0.0098 | 0.0036 | 0.0167 | 0.0734 |
| Name in Paper | OpenCLIP Name | Pretraining Data | Params (M) | FLOPs (B) | Memory (G) | Avg. Perf. (38 sets) |
|---|---|---|---|---|---|---|
| fe-1 | ViT-H-14-378-quickgelu | dfn5b | 986.71 | 1054.05 | 4.4 | 0.7079 |
| fe-2 | ViT-SO400M-14-SigLIP-384 | webli | 877.96 | 723.48 | 4.1 | 0.6921 |
| fe-3 | ViT-bigG-14-CLIPA-336 | datacomp1b | 2517.76 | 2271.58 | 10.35 | 0.6842 |
| fe-4 | EVA02-E-14 | laion2b_s4b_b115k | 4704.59 | 2311.42 | 18.8 | 0.6690 |
| fe-5 | ViT-H-14-quickgelu | metaclip_fullcc | 986.11 | 381.68 | 4.4 | 0.6671 |
| Camelyon17 | Flowers102 | Sun397 | ||||
|---|---|---|---|---|---|---|
| Name in Paper | map | zeroshot | map | zeroshot | map | zeroshot |
| fe-1 | 91.48 | 65.71 | 99.8 | 90.59 | 85.49 | 77.09 |
| fe-2 | 91.73 | 51.65 | 99.61 | 92.35 | 85.08 | 75.41 |
| fe-3 | 92.22 | 51.81 | 99.8 | 87.84 | 85.06 | 76.32 |
| fe-4 | 91.54 | 50.81 | 99.71 | 83.14 | 84.54 | 76.57 |
| fe-5 | 91.49 | 65.53 | 99.61 | 85.59 | 83.43 | 76.53 |
| Cam17 | Flw102 | Sun397 | ||
|---|---|---|---|---|
| Zeroshot | Output avg | 51.78 | 90.69 | 79.61 |
| OMA | 70.42 | 92.94 | 79.8 | |
| MAP | Output avg | 93.63 | 99.80 | 85.82 |
| BMA | 93.64 | 99.80 | 85.84 | |
| Zeroshot&MAP | Output avg | 93.63 | 99.80 | 85.82 |
| OMA | 93.70 | 99.83 | 86.39 |
| batch size | learning rate | epochs | test accuracy | |
|---|---|---|---|---|
| 1000 | 0.01 | 200 | 0.1 | 90.15 |
| 1000 | 0.01 | 200 | 1.0 | 92.21 |
| 1000 | 0.01 | 200 | 10.0 | 92.43 |
| 1000 | 0.01 | 200 | 50.0 | 92.18 |
| 1000 | 0.01 | 200 | 100.0 | 92.15 |
| batch size | learning rate | epochs | test accuracy | |
|---|---|---|---|---|
| 1200 | 0.001 | 400 | 0.1 | 77.086 |
| 1200 | 0.001 | 400 | 1.0 | 77.121 |
| 1200 | 0.001 | 400 | 10.0 | 77.064 |
| 1200 | 0.001 | 400 | 100.0 | 78.035 |
| 1200 | 0.001 | 400 | 1000.0 | 78.069 |
| 1200 | 0.001 | 400 | 10000.0 | 77.143 |
| number of samples | runtime (seconds) | log-marginal-likelihood |
|---|---|---|
| 200,000 | 26.4 | -79.68 |
| 400,000 | 54.97 | -79.02 |
| 800,000 | 106.62 | -78.31 |
| 1,600,000 | 214.26 | -77.55 |
| 3,200,000 | 436.79 | -76.88 |
| 6,400,000 | 862.89 | -76.18 |
| number of samples | runtime | log-marginal-likelihood |
| 1,000 | 0.13 | -93.57 |
| 10,000 | 1.23 | -94.86 |
| 100,000 | 13.23 | -94.82 |
| 1,000,000 | 128.62 | -94.83 |
| 10,000,000 | 1181 | -94.82 |
Ensemble Learning
Ensemble learning combines multiple predictors to improve accuracy, robustness, calibration, or uncertainty estimates.
See all 272 papers