Skip to main navigation Skip to search Skip to main content

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

  • Shizhe Diao*
  • , Tianyang Xu
  • , Ruijia Xu
  • , Jiawei Wang
  • , Tong Zhang
  • *Corresponding author for this work
  • Hong Kong University of Science & Technology
  • Shanghai Jiao Tong University

Research output: Contribution to conference › Conference Paper › peer-review

Abstract

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 domainspecific 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 seam-lessly 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.
Original languageEnglish
Pages5113-5129
Number of pages17
StatePublished - 9 Jul 2023
Event61st Annual Meeting of the the Association-for-Computational-Linguistics (ACL) - Toronto,CANADA, Toronto, Canada
Duration: 9 Jul 2023 → 14 Jul 2023

Conference

Conference61st Annual Meeting of the the Association-for-Computational-Linguistics (ACL)
Country/TerritoryCanada
CityToronto
Period9/07/23 → 14/07/23

Funding

We thank the anonymous reviewers for their valuable suggestions. This work was supported by the General Research Fund (GRF) of Hong Kong (No. 16310222 and No. 16201320). Shizhe Diao and Ruijia Xu were supported by the Hong Kong Ph.D. Fellowship Scheme (HKPFS).

Indexed by

  • CPCI-S

Fingerprint

Dive into the research topics of 'Mixture-of-Domain-Adapters: Decoupling and Injecting Domain Knowledge to Pre-trained Language Models' Memories'. Together they form a unique fingerprint.

Cite this