Skip to main content
QUICK REVIEW

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

Shizhe Diao, Tianyang Xu|arXiv (Cornell University)|Jun 8, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes Mixture-of-Domain-Adapters (MixDA), a parameter-efficient method that decouples pre-trained language model (PLM) feed-forward networks into frozen old-domain knowledge and trainable domain-specific adapters. By using a mixture-of-adapters gate to dynamically select knowledge from multiple domain adapters during fine-tuning, MixDA achieves state-of-the-art performance across in-domain, out-of-domain, and knowledge-intensive tasks with minimal parameter updates, demonstrating high reliability, scalability, and efficiency.

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 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.

Motivation & Objective

  • To address the challenge of efficiently injecting domain-specific knowledge into pre-trained language models without catastrophic forgetting.
  • To enable effective domain adaptation while preserving pre-trained general-domain knowledge.
  • To develop a scalable, parameter-efficient method that supports multiple domains and tasks through modular adapter design.
  • To investigate whether decoupling knowledge injection from model fine-tuning improves performance and robustness across diverse NLP tasks.

Proposed method

  • Decomposes the feed-forward networks (FFNs) of a PLM into two parts: frozen pre-trained FFNs for old-domain knowledge and trainable domain-specific adapters for new-domain knowledge.
  • Introduces a two-stage training strategy: first, domain adapters are trained on unlabeled domain-specific and pre-training corpora; second, a mixture-of-adapters (MoA) gate and task-specific adapter are trained on labeled data.
  • Employs a MoA gate to dynamically select the most relevant domain adapter based on input context, enabling dynamic fusion of domain knowledge.
  • Uses Pfeiffer-style adapters for both domain and task adaptation, ensuring parameter efficiency and compatibility with existing PLM fine-tuning pipelines.
  • Supports scalability by allowing independent training of domain adapters on different domains, which can be combined via the MoA gate at inference time.
  • Integrates structured knowledge (e.g., ConceptNet) into domain adapters during Stage 1 to enhance performance on knowledge-intensive tasks.

Experimental results

Research questions

  • RQ1Can domain-specific knowledge be injected into PLMs without modifying the pre-trained weights, thereby avoiding catastrophic forgetting?
  • RQ2How effective is a two-stage adapter tuning strategy—first on unlabeled data, then on labeled data—for domain adaptation?
  • RQ3Can a mixture-of-adapters gate dynamically select the most relevant domain knowledge for a given input, improving performance across diverse domains?
  • RQ4Does combining structured and unstructured knowledge in domain adapters lead to improved performance on knowledge-intensive tasks?
  • RQ5How does MixDA scale with increasing numbers of domains, and what is its parameter efficiency compared to standard fine-tuning?

Key findings

  • MixDA achieves state-of-the-art performance on 15 diverse datasets, including in-domain (GLUE), out-of-domain (ChemProt, RCT, IMDB, Amazon), and knowledge-intensive (KILT) benchmarks.
  • On the FEVER and CSQA knowledge-intensive tasks, combining unstructured and structured knowledge (via ConceptNet) improved performance by 10.3% and 1.2%, respectively.
  • The ablation study showed that removing the MoA gate caused a 5.2% performance drop, the old-domain knowledge a 7.5% drop, and the full MixDA structure a 12.4% drop, confirming the importance of each component.
  • Pfeiffer-style task-adapters outperformed other adapter types (Houlsby, Prefix-Tuning, LoRA) by at least 6.3%, with half the parameter count of Houlsby, making it the optimal choice.
  • The method scales effectively to multiple domains: domain adapters can be trained independently and combined via the MoA gate without retraining the entire model.
  • MixDA maintains high efficiency, adding only a small number of parameters per domain, making it suitable for language models as a service with multiple domain-specific adapters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.