[Paper Review] Continual Domain-Tuning for Pretrained Language Models
This paper proposes continual learning (CL) methods—particularly Elastic Weight Consolidation (EWC)—to mitigate catastrophic forgetting during domain-tuning of pretrained language models (e.g., BERT, RoBERTa). By constraining parameter updates to preserve source-domain knowledge, EWC improves downstream task performance and robustness to domain shifts, with only marginal computational overhead compared to standard domain-tuning (SDT).
Pre-trained language models (LM) such as BERT, DistilBERT, and RoBERTa can be tuned for different domains (domain-tuning) by continuing the pre-training phase on a new target domain corpus. This simple domain tuning (SDT) technique has been widely used to create domain-tuned models such as BioBERT, SciBERT and ClinicalBERT. However, during the pretraining phase on the target domain, the LM models may catastrophically forget the patterns learned from their source domain. In this work, we study the effects of catastrophic forgetting on domain-tuned LM models and investigate methods that mitigate its negative effects. We propose continual learning (CL) based alternatives for SDT, that aim to reduce catastrophic forgetting. We show that these methods may increase the performance of LM models on downstream target domain tasks. Additionally, we also show that constraining the LM model from forgetting the source domain leads to downstream task models that are more robust to domain shifts. We analyze the computational cost of using our proposed CL methods and provide recommendations for computationally lightweight and effective CL domain-tuning procedures.
Motivation & Objective
- To investigate catastrophic forgetting in standard domain-tuning (SDT) of pretrained language models when adapting to new domains.
- To evaluate whether continual learning (CL) techniques can reduce forgetting of source-domain knowledge during domain-tuning.
- To identify CL methods that improve forward and backward transfer—enhancing performance on both target and source domain downstream tasks.
- To analyze the computational cost of CL-based domain-tuning and recommend lightweight, effective methods for practical deployment.
- To improve robustness of downstream models to domain shift by preserving source-domain representations during fine-tuning.
Proposed method
- Adapts five established CL methods—L2 regularization, Elastic Weight Consolidation (EWC), Experience Replay (ER), Gradient Episodic Memory (GEM), and Regularized Hebbian (RH)—to the domain-tuning setting.
- Uses EWC to compute Fisher information matrix approximations from a small sample of source-domain data (WikiText) to identify important parameters for preservation.
- Applies CL constraints during continued pretraining on target-domain corpora, preventing large updates to parameters critical for source-domain performance.
- Employs standard masked language modeling (MLM) loss for pretraining and fine-tunes on extractive question answering and natural language inference tasks.
- Evaluates forward transfer (impact of source pretraining on target tasks) and backward transfer (impact of target tuning on source tasks) as key metrics.
- Compares computational cost across methods, noting that EWC and L2 are nearly as efficient as SDT, while GEM and RH are roughly twice as expensive due to per-mini-batch gradient computation.
Experimental results
Research questions
- RQ1How does catastrophic forgetting affect the performance of standard domain-tuning (SDT) on downstream tasks in target domains?
- RQ2Which continual learning (CL) methods most effectively reduce forgetting of source-domain knowledge during domain-tuning of pretrained language models?
- RQ3Do CL-based domain-tuning methods improve forward transfer (performance on target tasks) and backward transfer (performance on source tasks) compared to SDT?
- RQ4What is the computational cost of CL-based domain-tuning, and which methods offer the best trade-off between performance and efficiency?
- RQ5Can CL-based domain-tuned models improve robustness to domain shift in downstream fine-tuning?
Key findings
- Elastic Weight Consolidation (EWC) achieves the best balance of performance and computational efficiency, showing superior backward transfer and competitive forward transfer compared to SDT.
- RH outperforms EWC in forward transfer on average but is significantly more computationally expensive, making it less practical for large models.
- EWC leads to latent representations that contain more information about downstream task output variables than SDT, indicating better feature learning.
- Downstream models initialized with EWC-tuned weights are more robust to domain shifts (e.g., target-to-source transfer), demonstrating improved generalization.
- For smaller models like DistilBERT, EWC underperforms; GEM and RH are better alternatives, though with higher computational cost.
- L2 and EWC have minimal computational overhead—only slightly more than SDT—making them ideal for real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.