Hierarchical Wasserstein Merging for Multi-Domain Multi-Task Learning: From Specialists to a Generalist
Organizations: Virginia Tech · Amazon
Abstract
Multi-domain multi-task learning (MD-MTL) aims to build a single generalist model that performs well across heterogeneous domains and tasks. However, joint training often suffers from interference under distribution shifts. Existing model merging methods mostly operate on model parameters while overlooking the geometric structure of latent representation distributions across domains and tasks. To address these limitations, we propose Hierarchical Wasserstein Merging (HWM), a representation-level framework that models each domain-task specialist as a distribution of hidden representations on a shared support. HWM constructs task-level and global Wasserstein barycenters to capture within-task domain variation and cross-task structure, enabling either training-free specialist aggregation by Wasserstein-derived weights or training-based generalist learning through a hybrid Wasserstein alignment loss. Experiments on four NLP tasks across four domains per task show that HWM achieves superior effectiveness and generalization capability in MD-MTL settings.
Figures & tables
| Task | Domain | Datasets Used |
| Paraphrasing | Biomedical | eLife Goldsack et al. (2022) , PLOS Goldsack et al. (2022) , Cells Guo et al. (2024) |
| News | SciTechNews Cardenas et al. (2023) , MSRP Dolan and Brockett (2005) | |
| Science | VTechAGP Cheng et al. (2025b) , ParaSci Dong et al. (2021) | |
| Wikipedia | PAWS Zhang et al. (2019) | |
| Question Answering | Web | ComplexWebQuestions Talmor and Berant (2018) , WebQuestions Berant et al. (2013) , TriviaQA Joshi et al. (2017) |
| Biomedical | COVID-QA Möller et al. (2020) , HealthQA Zhu et al. (2019) |
| Types | Methods | BERTScore F1 (%) | SARI | LLM-as-a-judge (%) | |||||||||
| Gov. | Lit. | News | Sci. | Gov. | Lit. | News | Sci. | Gov. | Lit. | News | Sci. | ||
| Pre-trained | Pretrained | 74.92 | 73.18 | 71.40 | 72.63 | 35.21 | 36.08 | 36.44 | 34.97 | 52.34 | 42.10 | 62.93 | 72.53 |
| Fine-tuned | Generalist | 81.68 | 76.22 | 74.33 | 80.49 | 44.88 | 39.22 | 37.40 | 44.76 | 51.76 | 39.87 | 57.56 | 63.54 |
| Specialist | 82.12 | 77.25 | 76.58 | 81.27 | 45.56 | 39.70 | 41.50 | 45.27 | 53.26 | 44.14 | 65.69 | 69.84 | |
| Merged | Model Soup | 76.81 | 76.49 | 75.39 | 76.93 | 40.32 | 37.47 | 35.33 | 38.52 | 49.96 | 44.38 | 59.20 | 63.88 |
| Task Arithmetic | 78.43 | 76.72 | 76.30 | 75.87 | 38.53 | 39.16 | 38.78 | 37.78 | 64.22 | 50.46 | 60.51 | 72.27 | |
| Types | Methods | BERTScore F1 (%) | SARI | LLM-as-a-judge (%) | |||||||||
| Bio. | News | Sci. | Wiki | Bio. | News | Sci. | Wiki | Bio. | News | Sci. | Wiki | ||
| Pre-trained | Pretrained | 70.16 | 61.20 | 62.81 | 69.25 | 38.24 | 23.80 | 25.65 | 28.23 | 54.38 | 10.26 | 9.19 | 24.71 |
| Fine-tuned | Generalist | 77.18 | 69.85 | 74.58 | 78.15 | 38.75 | 40.26 | 34.48 | 42.44 | 55.28 | 14.59 | 10.09 | 20.03 |
| Specialist | 81.41 | 74.08 | 81.19 | 90.60 | 41.46 | 44.99 | 39.33 | 51.79 | 61.61 | 21.21 | 33.51 | 65.06 | |
| Merged | Model Soup | 81.08 | 76.64 | 78.88 | 84.34 | 39.36 | 36.43 | 34.80 | 34.84 | 53.77 | 25.36 | 15.17 | 40.86 |
| Task Arithmetic | 80.40 | 74.59 | 75.45 | 75.20 | 38.70 | 33.86 | 34.89 | 33.86 | 64.56 | 23.52 | 26.61 | 21.07 | |
| Types | Methods | BERTScore F1 (%) | METEOR (%) | LLM-as-a-judge (%) | |||||||||
| Bio. | News | Web | Wiki | Bio. | News | Web | Wiki | Bio. | News | Web | Wiki | ||
| Pre-trained | Pretrained | 67.66 | 72.92 | 67.51 | 67.36 | 12.49 | 12.54 | 20.32 | 15.85 | 25.67 | 25.02 | 58.70 | 70.87 |
| Fine-tuned | Generalist | 72.54 | 77.53 | 85.40 | 69.74 | 18.69 | 31.26 | 18.31 | 15.38 | 48.15 | 41.15 | 59.57 | 61.50 |
| Specialist | 77.43 | 77.77 | 85.66 | 72.04 | 22.17 | 32.01 | 36.25 | 28.16 | 64.83 | 47.17 | 68.11 | 74.85 | |
| Merged | Model Soup | 74.34 | 77.50 | 72.46 | 75.85 | 11.57 | 30.81 | 23.40 | 23.03 | 46.26 | 43.47 | 58.68 | 66.37 |
| Task Arithmetic | 75.12 | 75.56 | 73.50 | 76.80 | 16.49 | 23.49 | 27.71 | 27.65 | 63.02 | 50.45 | 68.22 | 79.57 | |
| Types | Methods | Prediction Validity Rate (%) | Micro-F1 (%) | LLM-as-a-judge (%) | |||||||||
| Bio. | News | Sci. | Wiki | Bio. | News | Sci. | Wiki | Bio. | News | Sci. | Wiki | ||
| Pre-trained | Pretrained | 16.22 | 25.70 | 26.37 | 28.98 | 5.84 | 20.80 | 5.36 | 22.85 | 11.60 | 24.38 | 14.07 | 60.90 |
| Fine-tuned | Generalist | 3.55 | 8.20 | 8.16 | 15.36 | 0.44 | 8.69 | 7.10 | 19.02 | 24.70 | 17.66 | 15.32 | 59.15 |
| Specialist | 47.19 | 92.67 | 55.02 | 84.00 | 27.17 | 31.01 | 11.40 | 33.33 | 31.42 | 44.05 | 17.66 | 62.40 | |
| Merged | Model Soup | 25.08 | 16.05 | 22.29 | 16.45 | 9.36 | 16.07 | 5.70 | 18.17 | 15.36 | 15.18 | 15.40 | 53.16 |
| Task Arithmetic | 14.85 | 97.65 | 17.99 | 97.71 | 5.37 | 32.84 | 6.87 | 37.65 | 19.81 | 35.92 | 13.64 | 67.50 | |
| Types | Methods | Summarization | Lay | QA | IE | ||||||||
| BS | SARI | LLM | BS | SARI | LLM | BS | MET. | LLM | Valid. | MiF1 | LLM | ||
| Architecture | Global | 74.98 | 37.03 | 57.31 | 80.89 | 34.46 | 46.76 | 76.31 | 24.11 | 60.62 | 76.38 | 15.88 | 22.35 |
| HWM | 77.88 | 40.60 | 64.95 | 81.25 | 37.63 | 50.53 | 77.84 | 26.25 | 63.72 | 93.05 | 25.34 | 39.38 | |
| Centroids | HWM-128 | 75.28 | 38.50 | 51.27 | 80.35 | 34.00 | 47.88 | 76.01 | 38.64 | 60.47 | 89.25 | 19.95 | 34.12 |
| HWM-256 | 76.58 | 39.68 | 57.08 | 80.89 | 33.92 | 48.46 | 76.38 | 38.66 | 59.88 | 92.09 | 20.01 | 35.87 | |
| HWM-512 | 77.88 | 40.60 | 64.95 | 81.25 | 37.63 | 50.53 | 77.84 | 26.25 | 63.72 | 93.05 | 25.34 | 39.38 | |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Metric | Domain | Global | HWM | |
| Summ. | BERTScore | Gov. | 78.85 | 79.94 | +1.09 |
| Lit. | 74.83 | 76.53 | +1.70 | ||
| News | 75.65 | 77.30 | +1.65 | ||
| Sci. | 70.58 | 77.75 | +7.17 | ||
| SARI | Gov. | 34.39 | 41.15 | +6.76 | |
| Lit. | 39.86 | 39.54 | -0.32 |
| Task | Metric | Domain | HWM | HWM ∗ | ||||
| Summ. | BS | Gov. | 77.00 | 77.84 | 79.94 | 75.83 | 75.83 | 77.28 |
| Lit. | 74.15 | 74.85 | 76.53 | 73.42 | 73.40 | 77.41 | ||
| News | 75.26 | 77.07 | 77.30 | 72.74 | 76.95 | 77.37 | ||
| Sci. | 74.72 | 76.54 | 77.75 | 70.58 | 76.07 | 79.48 | ||
| SARI | Gov. | 38.11 | 38.20 | 41.15 | 34.33 | 34.67 | 39.48 | |
| Task | Metric | Domain | HWM | HWM ∗ | ||||
| Small | Full | Small | Full | |||||
| Summ. | BS | Gov. | 77.87 | 79.94 | +2.07 | 75.80 | 77.28 | +1.48 |
| Lit. | 73.36 | 76.53 | +3.17 | 73.28 | 77.41 | +4.13 | ||
| News | 74.61 | 77.30 | +2.69 | 77.02 | 77.37 | +0.35 | ||
| Sci. | 74.66 | 77.75 | +3.09 | 77.40 | 79.48 | +2.08 | ||
| SARI | Gov. | 38.45 | 41.15 | +2.70 | 34.99 | 39.48 | +4.49 | |
Multi-Task Learning
Multi-task learning trains models to solve related tasks together by sharing representations, parameters, or supervision.
See all 394 papers