[Paper Review] Continual Pre-training of Language Models
Proposes DAS, a soft-masking based method for continual domain-adaptive pre-training of LMs to learn from a sequence of unlabeled domain corpora while mitigating forgetting and enabling knowledge transfer.
Language models (LMs) have been instrumental for the rapid advance of natural language processing. This paper studies continual pre-training of LMs, in particular, continual domain-adaptive pre-training (or continual DAP-training). Existing research has shown that further pre-training an LM using a domain corpus to adapt the LM to the domain can improve the end-task performance in the domain. This paper proposes a novel method to continually DAP-train an LM with a sequence of unlabeled domain corpora to adapt the LM to these domains to improve their end-task performances. The key novelty of our method is a soft-masking mechanism that directly controls the update to the LM. A novel proxy is also proposed to preserve the general knowledge in the original LM. Additionally, it contrasts the representations of the previously learned domain knowledge (including the general knowledge in the pre-trained LM) and the knowledge from the current full network to achieve knowledge integration. The method not only overcomes catastrophic forgetting, but also achieves knowledge transfer to improve end-task performances. Empirical evaluation demonstrates the effectiveness of the proposed method.
Motivation & Objective
- Study continual domain-adaptive pre-training (continual DAP-training) for language models when exposed to a sequence of unlabeled domain corpora.
- Develop a method to prevent catastrophic forgetting while enabling knowledge transfer across domains.
- Preserve general LM knowledge without access to pre-training data via a proxy measure of unit importance.
- Encourage integration of new domain knowledge with previously learned knowledge through contrastive signals.
- Evaluate the approach on multiple unlabeled-domain corpora and end-task classifications.
Proposed method
- Introduce a soft-masking mechanism that uses unit-wise importance to constrain backward gradients during continual DAP-training.
- Define a proxy KL-divergence based robustness loss to estimate unit importance for general LM knowledge without access to pre-training data.
- Accumulate unit importance across domains using element-wise max and apply soft-masks in the backward pass to preserve past knowledge while learning new domains.
- Use a contrastive loss to encourage complementary representations between the accumulated (past) knowledge and the full (past + current) knowledge to promote knowledge integration.
- Compute current-domain unit importance after training each domain and update the accumulated importance for the next domain.
- End-task fine-tuning does not require domain IDs as the LM retains all integrated knowledge.

Experimental results
Research questions
- RQ1Can continual domain-adaptive pre-training be effectively realized with full LM updates rather than parameter isolation?
- RQ2How can we prevent catastrophic forgetting while enabling knowledge transfer across domains in continual DAP-training?
- RQ3Can a soft-masking mechanism guided by unit importance protect general LM knowledge and support cross-domain transfer?
- RQ4Does a contrastive learning objective improve knowledge integration between past domains and the current domain?
- RQ5Is a proxy-based measure of unit importance (without access to pre-training data) effective for initializing general-knowledge preservation?
Key findings
- DAS outperforms a wide range of baselines on end-task classifications across multiple domains.
- DAS achieves strong knowledge transfer and negative forgetting rates, indicating effective forgetting prevention and cross-domain transfer.
- Direct full-LM domain learning (as in DAS) outperforms adapter- and prompt-based domain adaptation baselines in this continual setting.
- A contrastive objective that contrasts full knowledge with past knowledge promotes knowledge integration over naive past-only contrasts.
- A proxy KL-divergence based measure can effectively estimate general-knowledge unit importance without access to the original pre-training data.
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.