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.
翻译:预训练语言模型(PLM)在大规模语料库上训练,但通常需要针对特定领域进行专门特化。一种具有参数效率的适应方法建议在语言建模任务上针对每个领域训练适配器。这导致在领域内获得良好的得分,但在领域或资源受限的情况下可能不切实际。解决方案是在测试时使用相关的领域适配器进行新领域的适应。本文介绍了一种名为AdapterSoup的方法,该方法对在不同领域训练的适配器进行加权平均以执行权重空间平均化。我们的方法是无耻并行的:首先,我们训练一组特定于领域的适配器;然后,对于每个新领域,我们确定在测试时应该平均哪些适配器。我们进行了广泛的实验,表明AdapterSoup可以在不进行额外训练的情况下始终提高对新领域的性能。我们还探索了在不同超参数下训练的相同领域适配器的权重平均值,并表明它在新领域上保持PLM的性能,同时获得强大的领域内结果。我们探索了选择哪些适配器进行组合的各种方法,例如文本聚类和语义相似性。我们发现使用聚类会导致在新领域上获得最具竞争力的结果。