To Align or Not To Align: Check Your COMPASS Before You Train
Organizations: EPFL · University of Basel · HSLU
Abstract
Combining pretrained models is a common strategy for building AI systems, whether by aligning a vision encoder with a language model or merging fine-tuned checkpoints. However, finding compatible pairs typically requires costly empirical search, as compatibility is known only after alignment or merging. We propose COMPASS (COMPatibility ASsessment Score), a theoretically motivated diagnostic that estimates whether a model pair will be compatible prior to alignment or merging. Building on the observation that representational convergence is most robust at the level of local neighborhoods, COMPASS decomposes model compatibility into two cheap-to-compute axes: a pair-specific ease, defined as the -NN overlap between the two encoders, and a paradigm-level ceiling, capturing the maximum overlap their training paradigms allow. Together, these two axes provide a ranking of candidate model pairs and prescribe how to act on each pair: (i) prioritize pairs that already agree and whose paradigms are compatible, (ii) invest additional compute on pairs with compatible paradigms but low initial agreement, (iii) switch the pretraining paradigm when it cannot support sufficient agreement, or (iv) deprioritize pairs that score poorly on both axes. We apply COMPASS to cross-modal alignment experiments and task-arithmetic model merges and show that compatibility estimates by COMPASS strongly correlate with downstream success, achieving average Pearson correlation of on cross-modal alignment tasks and on model merging.
Figures & tables
Appendix figures & tables28 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Value |
|---|---|
| Adapter | Normalized canonical correlation analysis (CSA, 25 ) |
| Encoders | Frozen |
| Canonical dimension | |
| Equal-weight constraint | No |
| Regularization | None |
| Layer-selection probe size | paired image-caption embeddings |
| Component | Value |
|---|---|
| Pretrained source | Public timm checkpoints [ 31 ] |
| Fine-tuning method | Full fine-tuning |
| Optimizer | AdamW [ 48 ] |
| Weight decay | |
| Backbone learning rate | |
| Classifier-head learning rate |
| Dataset | Used for | License |
| WIT-1024 [ 26 ] | probe set, -NN overlap | CC BY-SA 3.0 |
| MS-COCO [ 18 ] | alignment training, retrieval | CC BY 4.0 |
| Flickr30k [ 17 ] | retrieval evaluation | Flickr terms of use |
| Task-arithmetic merging benchmark [ 11 ] | ||
| MNIST | merging fine-tuning | CC BY-SA 3.0 |
| SVHN | merging fine-tuning | non-commercial research use |
| Ease probe | ease | ceiling | product |
|---|---|---|---|
| MNIST (2K samples, main text) | |||
| 8-task pool (256 / task, 2,048 samples) |
| Outcome | COMPASS | COMPASS | Ease | Ceiling | Baseline |
|---|---|---|---|---|---|
| Flickr30k I2T R@1 | 0.91 | 0.73 | 0.87 | 0.77 | 0.63 |
| Flickr30k T2I R@1 | 0.91 | 0.73 | 0.87 | 0.77 | 0.65 |
| COCO I2T R@1 | 0.93 | 0.77 | 0.88 | 0.81 | 0.67 |
| COCO T2I R@1 | 0.93 | 0.77 | 0.88 | 0.81 | 0.66 |
| Merge retention | 0.70 | 0.50 | 0.66 | 0.61 | 0.06 |
| Predictor | Top-1 | Regret | Top-5 | Regret | NDCG@5 | Top-10 | Regret | NDCG@10 | Top-20 | Regret | NDCG@20 | Budget to best |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| COMPASS | 0.635 | 0.0% | 0.578 | 5.9% | 0.957 | 0.530 | 5.7% | 0.952 | 0.493 | 2.1% | 0.972 | 1/72 |
| Ease | 0.428 | 32.6% | 0.521 | 15.2% | 0.819 | 0.530 | 5.7% | 0.893 | 0.486 | 3.6% | 0.923 | 2/72 |
| Ceiling | 0.635 | 0.0% | 0.563 | 8.3% | 0.945 | 0.455 | 19.0% | 0.864 | 0.439 | 12.8% | 0.889 | 1/72 |
| Global CKA | 0.635 | 0.0% | 0.589 | 4.2% | 0.970 | 0.515 | 8.2% | 0.940 | 0.440 | 12.7% | 0.901 | 1/72 |
| Paradigm distance | 0.323 | 49.1% | 0.204 | 66.8% | 0.368 | 0.226 | 59.8% | 0.406 | 0.245 | 51.3% | 0.458 | 72/72 |
| Total parameters | 0.418 | 34.2% | 0.352 | 42.6% | 0.614 | 0.328 | 41.6% | 0.609 | 0.316 | 37.3% | 0.629 | 21/72 |
| Predictor | Top-1 | Regret | Top-10 | Regret | NDCG@10 | Top-40 | Regret | NDCG@40 | Budget to best |
|---|---|---|---|---|---|---|---|---|---|
| COMPASS | 0.947 | 8.4% | 0.927 | 7.1% | 0.920 | 0.890 | 9.1% | 0.910 | 5/392 |
| Ease | 0.947 | 8.4% | 0.935 | 6.4% | 0.924 | 0.874 | 10.7% | 0.896 | 5/392 |
| Ceiling | 0.968 | 6.4% | 0.926 | 7.3% | 0.930 | 0.828 | 15.5% | 0.871 | 162/392 |
| Task-vector cosine | 0.963 | 6.8% | 0.826 | 17.3% | 0.841 | 0.708 | 27.7% | 0.749 | 328/392 |
| Random ordering | 0.585 | 43.4% | 0.585 | 41.4% | - | 0.585 | 40.3% | - | 196.5 expected |
| Pairs trained | 1 | 2 | 5 | 10 | 20 |
|---|---|---|---|---|---|
| COMPASS | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Ease | 0.67 | 1.00 | 1.00 | 1.00 | 1.00 |
| Global CKA | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Random order | 0.53 | 0.66 | 0.79 | 0.88 | 0.95 |
| Merges performed | 1 | 5 | 10 | 20 | 50 |
|---|---|---|---|---|---|
| COMPASS | 0.92 | 1.00 | 1.00 | 1.00 | 1.00 |
| Ease | 0.92 | 1.00 | 1.00 | 1.00 | 1.00 |
| Ceiling | 0.94 | 0.94 | 0.95 | 0.96 | 0.97 |
| Task-vector cosine | 0.93 | 0.93 | 0.94 | 0.95 | 0.95 |
| Random order | 0.57 | 0.87 | 0.93 | 0.95 | 0.97 |
| Predictor | Alignment: Flickr I2T | Merging: retention |
|---|---|---|
| COMPASS | 0.91 | 0.70 |
| Pretraining paradigm distance | -0.60 | - |
| Architecture self-consistency | 0.37 | - |
| Total parameters | 0.09 | - |
| Random-init -NN overlap | 0.11 | - |
| Mean solo accuracy of two checkpoints | - | 0.43 |
| Metric | Alignment: Flickr I2T | Merging: retention |
|---|---|---|
| Mutual -NN overlap | 0.82 | 0.42 |
| RSA, rank correlation between RDMs | 0.38 | 0.22 |
| Procrustes similarity | 0.45 | 0.37 |
| Linear CKA | 0.34 | 0.25 |
| Evaluation | Alignment | Merging |
|---|---|---|
| COMPASS, nothing fitted | 0.91 | 0.70 |
| Regressor, random 5-fold CV | 0.94 | 0.91 |
| Regressor, leave-one-family/backbone out | 0.60 | 0.81 |
| Regressor, leave-one-paradigm out | 0.46 | -0.54 |
| Fold type | Folds | Spearman on rest | Spearman inside held-out group |
|---|---|---|---|
| Leave-one-vision-family-out | 6 | 0.85-0.93 | 0.81 median (0.56-0.87) |
| Leave-one-text-family-out | 7 | 0.89-0.92 | 0.86 median (0.78-0.94) |
| Leave-one-vision-paradigm-out | 5 | 0.85-0.93 | 0.80 median (0.56-0.87) |
| Leave-one-backbone-out (merging) | 14 | 0.67-0.71 | 0.28 median (-0.13-0.75) |
| Leave-one-paradigm-out (merging) | 5 | 0.60-0.72 | 0.27 median (0.20-0.66) |
| Held-out vision family | Rest | Held out | Held-out text family | Rest | Held out |
|---|---|---|---|---|---|
| CLIP | 0.91 | 0.78 | CLIP text | 0.92 | 0.78 |
| SigLIP | 0.89 | 0.87 | SigLIP text | 0.89 | 0.86 |
| CLIP fine-tuned | 0.92 | 0.83 | OLMo | 0.92 | 0.86 |
| DINOv2 | 0.93 | 0.80 | BLOOM | 0.91 | 0.90 |
| MAE | 0.85 | 0.87 | RoBERTa | 0.90 | 0.94 |
| Classification | 0.92 | 0.56 | LLaMA | 0.91 | 0.80 |
| CSA | Linear | MLP | LoRA | |
|---|---|---|---|---|
| CSA | - | 0.94 | 0.82 | 0.96 |
| Linear | 0.87 | - | 0.86 | 0.99 |
| MLP | 0.76 | 0.84 | - | 0.85 |
| LoRA | 0.91 | 0.98 | 0.85 | - |
| Predictor | CSA | Linear | MLP | LoRA |
|---|---|---|---|---|
| COMPASS | 0.87 | 0.90 | 0.73 | 0.92 |
| Ease | 0.78 | 0.78 | 0.56 | 0.78 |
| Ceiling | 0.86 | 0.97 | 0.76 | 0.95 |
| Global CKA | 0.71 | 0.79 | 0.60 | 0.78 |
| Procedure | Scaling | Cost for full grid |
|---|---|---|
| COMPASS , including ceiling | One probe pass per model | 29 passes; 21 min; 12 GB cached features |
| Exhaustive downstream evaluation | One alignment run per pair | 190 runs; 86–102 h; 729 GB cached features |
| Ceiling estimate | Alignment: Flickr30k I2T | Merging: retention |
|---|---|---|
| Original estimate | 0.909 | 0.696 |
| One shared value per paradigm | 0.903 | 0.699 |
| Gaussian noise at 25% of ceiling spread | 0.901 | 0.695 |
| Gaussian noise at 50% of ceiling spread | 0.883 | 0.695 |
| Gaussian noise at 100% of ceiling spread | 0.830 | 0.691 |
| Ceiling values shuffled across paradigms | 0.675 | 0.654 |
| Vision family held fixed | Pairs | Ease vs. R@1 | COMPASS vs. R@1 | Within-family ceiling spread |
|---|---|---|---|---|
| CLIP only | 12 | 0.67 | 0.78 | 0.013 |
| SigLIP only | 12 | 0.85 | 0.87 | 0.023 |
| CLIP fine-tuned only | 10 | 0.83 | 0.83 | 0.017 |
| MAE only | 12 | 0.87 | 0.87 | 0.016 |
| DINOv2 only | 13 | 0.77 | 0.80 | 0.024 |
| Classification only | 13 | 0.43 | 0.56 | 0.009 |
| Encoder | Ceiling before ft | Ceiling after ft | Mean R@1 before | Mean R@1 after |
|---|---|---|---|---|
| CLIP ViT-B/16 | 0.138 | 0.109 | 0.396 | 0.319 |
| CLIP ViT-L/14 | 0.147 | 0.117 | 0.579 | 0.548 |
| CLIP ViT-H/14 | 0.151 | 0.127 | 0.628 | 0.610 |
| Vision encoder | Ceiling | 10 ep | 30 ep | 100 ep | 300 ep |
|---|---|---|---|---|---|
| MAE ViT-B | 0.055 | 0.142 | 0.183 | 0.216 | 0.215 |
| AugReg ViT-B | 0.101 | 0.269 | 0.356 | 0.411 | 0.420 |
| DINOv2 ViT-B | 0.106 | 0.362 | 0.480 | 0.477 | 0.471 |
| CLIP ViT-B ft-IN12k | 0.109 | 0.288 | 0.370 | 0.454 | 0.459 |
| SigLIP ViT-B | 0.130 | 0.359 | 0.472 | 0.544 | 0.559 |
| CLIP ViT-B LAION-2B | 0.138 | 0.424 | 0.528 | 0.587 | 0.607 |
Language Model Merging
Language model merging combines capabilities from multiple models or adapters by composing their weights, updates, or outputs.
See all 106 papers