UDAPTER - Efficient Domain Adaptation Using Adapters

Bhavitvya Malik, Abhinav Ramesh Kashyap, Min-Yen Kan, Soujanya Poria

Introduction

Fine-tuning large-scale Pre-trained Language Models (PLMs) like BERT for specific tasks and domains is computationally expensive and storage-intensive. In scenarios involving Unsupervised Domain Adaptation (UDA)—where labeled data exists for a source domain (e.g., book reviews) but only unlabeled data is available for a target domain (e.g., camera reviews)—traditional methods require updating all model parameters. This approach leads to high resource costs and "catastrophic forgetting," where the model loses general knowledge during adaptation.

UDAPTER addresses these challenges by introducing parameter-efficient adapter modules. By training only a tiny fraction of the model's parameters, UDAPTER matches or exceeds the performance of state-of-the-art UDA methods while significantly reducing overhead.

Methodology

UDAPTER utilizes Adapters, which are small bottleneck layers inserted into each layer of a frozen PLM. The authors propose two primary strategies for integrating these modules:

  1. Two-Step Domain and Task Adapters (TS-DT):
    • Step 1: A Domain Adapter is trained to minimize the Multi-Kernel Maximum Mean Discrepancy (MK-MMD) between source and target domain representations, forcing the model to learn domain-invariant features.
  2. Step 2: The Domain Adapter is frozen, and a Task Adapter is stacked on top and trained for the specific task (e.g., sentiment analysis) using labeled source data.
  3. Joint Domain Task Adapters (JOINT-DT): A single adapter is trained using a combined loss function that simultaneously minimizes domain divergence and task error.
UDAPTER Architectures: (a) Domain Adapter, (b) Two-Step Domain and Task Adapters (TS-DT), and (c) Joint Domain Task Adapters (JOINT-DT).

Experimental Results

The researchers evaluated UDAPTER on two major benchmarks: the AMAZON multi-domain sentiment analysis dataset and the MNLI (Multi-genre Natural Language Inference) dataset, covering 40 unique domain-adaptation scenarios.

Performance and Efficiency

UDAPTER demonstrated superior performance compared to traditional full fine-tuning methods. In the AMAZON sentiment task, the JOINT-DT variant achieved an average F1 score of 85.16, outperforming established baselines like DSN (84.92) and DANN (49.28).

Crucially, UDAPTER maintains high performance even as the number of trainable parameters is drastically reduced. On the MNLI task, the method remained within 0.85% of full-model UDA performance while training only a small fraction of the total parameters. This efficiency is illustrated by the relationship between the reduction factor (the ratio of the original layer size to the adapter bottleneck size) and the resulting F1 scores.

Performance (Target Domain Test F1) vs. Reduction Factor for JOINT-DT and TS-DT on (a) AMAZON and (b) MNLI datasets.

Key Insights

  • Layer-wise Sensitivity: Analysis revealed that lower layers of BERT are naturally more domain-invariant, while higher layers are highly domain-specific. UDAPTER is particularly effective at reducing divergence in these higher layers.
  • Composability: The TS-DT method allows for modularity; task and domain adapters can be swapped or combined without retraining the entire stack, facilitating easier adaptation to new domains.
  • Training Stability: Unlike adversarial methods like DANN, which are often unstable and sensitive to hyperparameters, UDAPTER proved robust and easier to optimize.

Conclusion

UDAPTER provides a scalable and efficient framework for unsupervised domain adaptation. By focusing updates on small adapter modules, it circumvents the high costs of full-model fine-tuning while achieving state-of-the-art results. Future work may extend this approach to generative tasks and explore its compatibility with other parameter-efficient techniques like LoRA.

Summary updated

BibTeX
@inproceedings{malik2023udapter,
  author = {Bhavitvya Malik and Abhinav Ramesh Kashyap and Min-Yen Kan and Soujanya Poria},
  title = {{UDAPTER - Efficient Domain Adaptation Using Adapters}},
  booktitle = {EACL},
  year = {2023},
  doi = {10.18653/v1/2023.eacl-main.165},
}
Figure