Continual Pre-Training Using Cross-Domain Loss for Language Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional pre-trained language models require extensive retraining on new data, which is costly and inefficient, and struggle to maintain generalization while avoiding the forgetting of prior knowledge.

Innovation Solution

A method for continual pre-training that iteratively adjusts model parameters using cross-domain loss values to integrate knowledge from multiple domains, incorporating soft prompt features and latent features to enhance language model training.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If conventional learning methods retrain models from scratch on new data, then the model can learn new domain knowledge, but the training cost increases significantly and prior knowledge is lost

Engineering Contradiction:
Improveability to learn new domain knowledgeVSAvoidtraining time and computational cost
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-training a language model on general domain data before fine-tuning on specific domain data. The pre-training phase prepares the model with general language understanding and knowledge, which serves as a foundation for subsequent domain-specific adaptation. This avoids starting from scratch when encountering new domains, significantly reducing training time and computational cost while maintaining the ability to learn new domain knowledge through fine-tuning.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If pre-trained language models are used, then general language understanding is achieved, but the models forget prior knowledge when faced with new data

Engineering Contradiction:
Improvelanguage understanding capabilityVSAvoidforgetting of prior knowledge
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent merges general domain pre-trained knowledge with specific domain fine-tuned knowledge through a unified model architecture. The model combines the general language understanding capabilities acquired during pre-training with domain-specific knowledge acquired during fine-tuning, allowing it to maintain both broad language comprehension and specialized domain expertise without forgetting prior knowledge.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent applies parameter changes by adjusting model parameters during fine-tuning while preserving the core pre-trained parameters. This selective parameter adjustment allows the model to adapt to new domains by modifying only the necessary parameters for domain-specific tasks, while retaining the general language understanding capabilities embedded in the pre-trained parameters, thus avoiding catastrophic forgetting.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If extensive retraining is performed on new data, then the model adapts to new domains, but the computational resources and training costs increase

Engineering Contradiction:
Improvedomain adaptation capabilityVSAvoidcomputational resources and training cost
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent performs preliminary pre-training on general domain data before fine-tuning on specific domain data. This preliminary action creates a robust foundation that reduces the extent of retraining needed for new domains, thereby lowering computational resources and training costs while maintaining strong domain adaptation capabilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies partial action by fine-tuning only the necessary portions of the model for domain-specific tasks rather than retraining the entire model from scratch. This selective fine-tuning approach significantly reduces computational resources and training costs while still achieving effective domain adaptation through targeted parameter adjustments.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20250232184A1Language model training method and apparatus based on continual pre-training
Publication Date: 2025.07.17 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US20250232184A1 patent drawing
  • US20250232184A1 patent drawing
  • US20250232184A1 patent drawing

AI summary

Embodiments of this specification provide language model training methods and apparatuses based on continual pre-training. In one example method, a soft prompt feature corresponding to each current training sample in a current domain is obtained. A latent feature corresponding to each piece of text data in the current domain is obtained. A cross-domain loss value is determined based on a difference between the obtained latent feature and a latent feature obtained based on an initial current language model in a previous domain. When a training termination condition for the current domain is not satisfied, model parameters are adjusted based on the cross-domain loss value. When a training termination condition for the current domain is satisfied, the model training process is repeated by continuing using a training sample set in a next domain, until a training termination condition for continual pre-training is satisfied.