Mixture-of-Domain-Adapters: Decoupling and Injecting Domain Knowledge to
Pre-trained Language Models Memories
- URL: http://arxiv.org/abs/2306.05406v1
- Date: Thu, 8 Jun 2023 17:54:36 GMT
- Title: Mixture-of-Domain-Adapters: Decoupling and Injecting Domain Knowledge to
Pre-trained Language Models Memories
- Authors: Shizhe Diao, Tianyang Xu, Ruijia Xu, Jiawei Wang, Tong Zhang
- Abstract summary: Pre-trained language models (PLMs) demonstrate excellent abilities to understand texts in the generic domain while struggling in a specific 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.
- Score: 31.995033685838962
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- 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.
Related papers
- AdapterSoup: Weight Averaging to Improve Generalization of Pretrained
Language Models [127.04370753583261]
Pretrained language models (PLMs) are trained on massive corpora, but often need to specialize to specific domains.
A solution is to use a related-domain adapter for the novel domain at test time.
We introduce AdapterSoup, an approach that performs weight-space averaging of adapters trained on different domains.
arXiv Detail & Related papers (2023-02-14T13:09:23Z) - UDApter -- Efficient Domain Adaptation Using Adapters [29.70751969196527]
We propose two methods to make unsupervised domain adaptation more parameter efficient.
The first method deconstructs UDA into a two-step process: first by adding a domain adapter to learn domain-invariant information.
We are within 0.85% F1 for natural language inference task, by fine-tuning only a fraction of the full model parameters.
arXiv Detail & Related papers (2023-02-07T02:04:17Z) - Meta-DMoE: Adapting to Domain Shift by Meta-Distillation from
Mixture-of-Experts [33.21435044949033]
Most existing methods perform training on multiple source domains using a single model.
We propose a novel framework for unsupervised test-time adaptation, which is formulated as a knowledge distillation process.
arXiv Detail & Related papers (2022-10-08T02:28:10Z) - Unsupervised Domain Adaptation with Adapter [34.22467238579088]
This paper explores an adapter-based fine-tuning approach for unsupervised domain adaptation.
Several trainable adapter modules are inserted in a PrLM, and the embedded generic knowledge is preserved by fixing the parameters of the original PrLM.
Elaborated experiments on two benchmark datasets are carried out, and the results demonstrate that our approach is effective with different tasks, dataset sizes, and domain similarities.
arXiv Detail & Related papers (2021-11-01T02:50:53Z) - Multilingual Domain Adaptation for NMT: Decoupling Language and Domain
Information with Adapters [66.7986513246294]
We study the compositionality of language and domain adapters in the context of Machine Translation.
We find that in the partial resource scenario a naive combination of domain-specific and language-specific adapters often results in catastrophic forgetting' of the missing languages.
arXiv Detail & Related papers (2021-10-18T18:55:23Z) - CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation [44.06904757181245]
Unsupervised domain adaptation (UDA) aims to transfer knowledge learned from a labeled source domain to a different unlabeled target domain.
One fundamental problem for the category level based UDA is the production of pseudo labels for samples in target domain.
We design a two-way center-aware labeling algorithm to produce pseudo labels for target samples.
Along with the pseudo labels, a weight-sharing triple-branch transformer framework is proposed to apply self-attention and cross-attention for source/target feature learning and source-target domain alignment.
arXiv Detail & Related papers (2021-09-13T17:59:07Z) - Stagewise Unsupervised Domain Adaptation with Adversarial Self-Training
for Road Segmentation of Remote Sensing Images [93.50240389540252]
Road segmentation from remote sensing images is a challenging task with wide ranges of application potentials.
We propose a novel stagewise domain adaptation model called RoadDA to address the domain shift (DS) issue in this field.
Experiment results on two benchmarks demonstrate that RoadDA can efficiently reduce the domain gap and outperforms state-of-the-art methods.
arXiv Detail & Related papers (2021-08-28T09:29:14Z) - Cross-domain Contrastive Learning for Unsupervised Domain Adaptation [108.63914324182984]
Unsupervised domain adaptation (UDA) aims to transfer knowledge learned from a fully-labeled source domain to a different unlabeled target domain.
We build upon contrastive self-supervised learning to align features so as to reduce the domain discrepancy between training and testing sets.
arXiv Detail & Related papers (2021-06-10T06:32:30Z) - Contrastive Learning and Self-Training for Unsupervised Domain
Adaptation in Semantic Segmentation [71.77083272602525]
UDA attempts to provide efficient knowledge transfer from a labeled source domain to an unlabeled target domain.
We propose a contrastive learning approach that adapts category-wise centroids across domains.
We extend our method with self-training, where we use a memory-efficient temporal ensemble to generate consistent and reliable pseudo-labels.
arXiv Detail & Related papers (2021-05-05T11:55:53Z) - Deep Domain-Adversarial Image Generation for Domain Generalisation [115.21519842245752]
Machine learning models typically suffer from the domain shift problem when trained on a source dataset and evaluated on a target dataset of different distribution.
To overcome this problem, domain generalisation (DG) methods aim to leverage data from multiple source domains so that a trained model can generalise to unseen domains.
We propose a novel DG approach based on emphDeep Domain-Adversarial Image Generation (DDAIG)
arXiv Detail & Related papers (2020-03-12T23:17:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.