Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Mixture-of-Domain-Adapters: Decoupling and Injecting Domain Knowledge to Pre-trained Language Models Memories

About

Pre-trained language models (PLMs) demonstrate excellent abilities to understand texts in the generic domain while struggling in a specific domain. Although continued pre-training on a large domain-specific corpus is effective, it is costly to tune all the parameters on the domain. In this paper, we investigate whether we can adapt PLMs both effectively and efficiently by only tuning a few parameters. Specifically, we decouple the feed-forward networks (FFNs) of the Transformer architecture into two parts: the original pre-trained FFNs to maintain the old-domain knowledge and our novel domain-specific adapters to inject domain-specific knowledge in parallel. Then we adopt a mixture-of-adapters gate to fuse the knowledge from different domain adapters dynamically. Our proposed Mixture-of-Domain-Adapters (MixDA) employs a two-stage adapter-tuning strategy that leverages both unlabeled data and labeled data to help the domain adaptation: i) domain-specific adapter on unlabeled data; followed by ii) the task-specific adapter on labeled data. MixDA can be seamlessly plugged into the pretraining-finetuning paradigm and our experiments demonstrate that MixDA achieves superior performance on in-domain tasks (GLUE), out-of-domain tasks (ChemProt, RCT, IMDB, Amazon), and knowledge-intensive tasks (KILT). Further analyses demonstrate the reliability, scalability, and efficiency of our method. The code is available at https://github.com/Amano-Aki/Mixture-of-Domain-Adapters.

Shizhe Diao, Tianyang Xu, Ruijia Xu, Jiawei Wang, Tong Zhang• 2023

Related benchmarks

TaskDatasetResultRank
Natural Language UnderstandingGLUE (test)
SST-2 Accuracy56.4
416
Sentiment AnalysisIMDB (test)
Accuracy58.1
248
Commonsense Question AnsweringCSQA (test)
Accuracy0.389
127
Fact VerificationFEVER (test)--
32
Relation ExtractionChemProt (test)
Micro F160.6
25
Extractive Question AnsweringMRQA
NewsQA Score63.9
19
Natural Language UnderstandingGLUE & SuperGLUE (test)
RTE Accuracy66.9
17
Natural Language UnderstandingOthers (WG, Yelp, SciTail, PAWS)
WG Accuracy55.2
11
Sentence ClassificationRCT (test)
F1 Score0.264
6
Sentiment AnalysisAmazon (test)
Accuracy54.7
6
Showing 10 of 10 rows

Other info

Code

Follow for update