Adapting a Language Model While Preserving its General Knowledge

Zixuan Ke, Yijia Shao, Haowei Lin, Hu Xu, Lei Shu +1 more
1/21/2023
cs.CLcs.AIcs.LG

No official code found. Best implementation: UIC-Liu-Lab/DGA (21 stars, last commit 2023-02-12).

Abstract

Domain-adaptive pre-training (or DA-training for short), also known as post-training, aims to train a pre-trained general-purpose language model (LM) using an unlabeled corpus of a particular domain to adapt the LM so that end-tasks in the domain can give improved performances. However, existing DA-training methods are in some sense blind as they do not explicitly identify what knowledge in the LM should be preserved and what should be changed by the domain corpus. This paper shows that the existing methods are suboptimal and proposes a novel method to perform a more informed adaptation of the knowledge in the LM by (1) soft-masking the attention heads based on their importance to best preserve the general knowledge in the LM and (2) contrasting the representations of the general and the full (both general and domain knowledge) to learn an integrated representation with both general and domain-specific knowledge. Experimental results will demonstrate the effectiveness of the proposed approach.

View on arXivView PDF

Code Implementations(1)

UIC-Liu-Lab/DGACommunity100%

[EMNLP 2022] Adapting a Language Model While Preserving its General Knowledge

211Shell, PythonDec 9, 20223 years ago

Similar Papers

Cite this paper

@article{ke2023adapting,
  title  = {Adapting a Language Model While Preserving its General Knowledge},
  author = {Zixuan Ke and Yijia Shao and Haowei Lin and Hu Xu and Lei Shu and Bing Liu},
  year   = {2023},
  eprint = {2301.08986},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.08986v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.08986.svg)](https://codeofpaper.com/paper/2301.08986)

Discussion