AdapterSoup: Weight Averaging to Improve Generalization of Pretrained Language Models
Authors:
- Alexandra ChronopoulouACAlexandra Chronopoulou
- Alexander FraserAFAlexander Fraser
- Jesse DodgeJDJesse Dodge
Preprint
Abstract
Pretrained language models (PLMs) are trained on massive corpora, but often need to specialize to specific domains. A parameter-efficient adaptation method suggests training an adapter for each domain on the task of language modeling. This leads to good in-domain scores but can be impractical for domain- or resource-restricted settings. A solution is to use a related-domain adapter for the novel domain at test time. In this paper, we introduce AdapterSoup, an approach that performs weight-space averaging of adapters trained on different domains. Our approach is embarrassingly parallel: first, we train a set of domain-specific adapters; then, for each novel domain, we determine which adapters should be averaged at test time. We present extensive experiments showing that AdapterSoup consistently improves performance to new domains without extra training. We also explore weight averaging of adapters trained on the same domain with different hyper-parameters, and show that it preserves the performance of a PLM on new domains while obtaining strong in-domain results. We explore various approaches for choosing which adapters to combine, such as text clustering and semantic similarity. We find that using clustering leads to the most competitive results on novel domains.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- DEMix Layers: Disentangling Domains for Modular Language Modeling2022
- Efficient Hierarchical Domain Adaptation for Pretrained Language Models2022
- Efficient Test Time Adapter Ensembling for Low-resource Language Varieties2021
- Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus2021
- Transformers: State-of-the-Art Natural Language Processing2020
- MAD-X: An Adapter-Based Framework for Multi-Task Cross-Lingual Transfer2020
- Unsupervised Domain Clusters in Pretrained Language Models2020
- Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks2020
- BioBERT: a pre-trained biomedical language representation model for biomedical text miningBioinformatics, 2019
- FaceNet: A unified embedding for face recognition and clustering2015