Introduction
State-of-the-art language models like BERT and XLNet have revolutionized natural language processing by pre-training on massive datasets using simple objectives like Masked Language Modeling (MLM). However, these models often fail to capture the full complexity of language—such as named entities, structural relations, and semantic discourse—because their pre-training tasks are limited. Furthermore, traditional pre-training is typically a static process; adding new knowledge often requires retraining from scratch to avoid "catastrophic forgetting."
ERNIE 2.0 (Enhanced Representation through Knowledge Integration) introduces a Continual Pre-training framework designed to incrementally ingest a diverse array of lexical, syntactic, and semantic tasks. By employing a multi-task learning approach that retains previous knowledge while integrating new objectives, ERNIE 2.0 achieves significant performance gains across both English and Chinese benchmarks.
The Continual Pre-training Framework
The core innovation of ERNIE 2.0 is its ability to learn from new tasks sequentially without losing proficiency in earlier ones. Unlike standard multi-task learning, which trains on all tasks simultaneously, or simple sequential learning, which risks forgetting, ERNIE 2.0 uses a hybrid approach.
When a new task is introduced, the model is initialized with parameters from the previous stage. It then trains on the new task alongside the existing suite of tasks. This ensures the model develops a robust, multi-faceted internal representation of language that evolves over time.
Task Construction and Model Architecture
To provide the model with a comprehensive understanding of language, the authors developed three categories of unsupervised pre-training tasks:
- Word-aware Tasks: These focus on lexical features, including "Knowledge Masking" (masking phrases or entities), predicting capitalization, and identifying token-document relations.
- Structure-aware Tasks: These capture syntactic and organizational properties, such as predicting the correct order of shuffled sentence segments and determining the distance between sentences.
- Semantic-aware Tasks: These address high-level meaning, including identifying discourse relations and determining the relevance of search queries to document titles.
The architecture utilizes a standard Transformer encoder. A key modification is the addition of a Task Embedding to the input layer. This embedding signals to the model which specific task it is currently solving, allowing the shared parameters to specialize their attention based on the objective.
Experimental Results
ERNIE 2.0 was evaluated on massive English and Chinese corpora, including Wikipedia, BookCorpus, and proprietary search logs.
- English Performance: On the GLUE benchmark, ERNIE 2.0 (Large) achieved a score of 83.6, outperforming the original BERT and XLNet models at the time.
- Chinese Performance: The model demonstrated clear dominance on Chinese NLP tasks, particularly in areas requiring deep semantic understanding like reading comprehension (CMRC 2018) and semantic similarity (LCQMC).
- Ablation Studies: Experiments confirmed that the continual multi-task learning strategy is superior to simple sequential learning, as it prevents performance degradation on earlier tasks while successfully mastering new ones.
Conclusion
ERNIE 2.0 demonstrates that language understanding is a multi-dimensional skill that benefits from diverse training objectives. By providing a framework for constant learning, ERNIE 2.0 moves beyond the "one-and-done" paradigm of traditional pre-training. While the reliance on some proprietary datasets presents a challenge for full replication, the framework itself is open-ended, paving the way for future models that can integrate even more complex logic and external knowledge.
Summary updated