ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generation

Yu Sun, Shuohuan Wang, Shikun Feng, Siyu Ding, Chao Pang, Junyuan Shang, Jiaxiang Liu, Xuyi Chen, Yanbin Zhao, Yuxiang Lu, Weixin Liu, Zhihua Wu, Weibao Gong, Jianzhong Liang, Zhizhou Shang, Peng Sun, Xuan Ouyang, Dianhai Yu, Hao Tian, Hua Wu, Haifeng WangarXiv 2021

Introduction

Large-scale language models like GPT-3 and T5 have significantly advanced the field of Natural Language Processing (NLP) through massive parameter scaling and extensive pre-training. However, two primary challenges persist: the "Knowledge Deficit," where models lack explicit world knowledge found in structured data like Knowledge Graphs (KGs), and the "NLU vs. NLG Divide," where models are typically optimized for either understanding or generation but rarely both simultaneously.

ERNIE 3.0 addresses these gaps by introducing a 10-billion parameter unified framework that integrates auto-encoding and auto-regressive architectures, enhanced by a massive 4TB corpus of text and structured knowledge.

Architectural Framework: Continual Multi-Paradigms Unified Pre-training

The core innovation of ERNIE 3.0 is its modular, two-tier architecture designed to bridge the gap between understanding and generation tasks.

The ERNIE 3.0 architecture featuring a shared Universal Representation module and specialized Task-specific modules for NLU and NLG.

As shown in Figure 1, the framework consists of:

  • Universal Representation Module: A large Transformer-XL backbone that serves as a shared feature extractor, capturing broad lexical and syntactic information across all paradigms.
  • Task-specific Representation Modules: Specialized, smaller modules tailored for specific tasks. These include a bi-directional module for Natural Language Understanding (NLU) and a uni-directional module for Natural Language Generation (NLG).

This modularity allows the model to maintain a massive "universal" knowledge base while specializing its "heads" for different downstream applications, improving both performance and fine-tuning efficiency.

Knowledge-Enhanced Pre-training Objectives

ERNIE 3.0 employs a diverse set of pre-training tasks categorized into word-aware, structure-aware, and knowledge-aware objectives. A key highlight is the Universal Knowledge-Text Prediction (UKTP) task.

The Universal Knowledge-Text Prediction (UKTP) task, which aligns structured knowledge graph triples with unstructured encyclopedia text.

In the UKTP task (Figure 2), the model is required to predict relations within a Knowledge Graph based on mentions in corresponding text. By concatenating triples (e.g., Andersen, Write, Nightingale) with relevant sentences, the model learns to reason between structured facts and unstructured language, effectively internalizing "world knowledge" during the pre-training phase.

Datasets and Training Scale

The model was pre-trained on a massive 4TB Chinese corpus encompassing 11 diverse categories, including Baidu Search, Wikipedia, and specialized domains such as Law, Medicine, and Finance. This was further augmented with a Knowledge Graph containing over 50 million facts.

To manage the 10-billion parameter scale, the researchers utilized Progressive Learning. This strategy involves starting training with shorter sequence lengths and smaller batch sizes, gradually increasing them to ensure training stability and accelerate convergence. This approach reportedly reduced convergence time by up to 65% in base model configurations.

Experimental Results

ERNIE 3.0 demonstrated state-of-the-art (SOTA) performance across a wide array of benchmarks:

  • SuperGLUE: ERNIE 3.0 achieved a score of 90.6, securing the top position on the leaderboard (as of July 2021) and surpassing the human baseline of 89.8.
  • Chinese NLP Benchmarks: The model set new records on 54 different Chinese NLP tasks, including sentiment analysis, natural language inference (NLI), and semantic similarity.
  • Zero-shot Performance: In zero-shot settings, ERNIE 3.0 significantly outperformed other large-scale models like CPM-2 and PanGu-α, particularly in tasks requiring reasoning and factual question answering.

Conclusion and Future Directions

ERNIE 3.0 proves that a hybrid architecture can excel at both understanding and generation without compromise. By treating knowledge as a "first-class citizen" through tasks like UKTP, the model moves beyond simple pattern matching toward true semantic reasoning. While the current focus is heavily on the Chinese language and requires significant computational resources, future work aims to address prompt sensitivity and expand the framework's cross-lingual capabilities.

Summary updated

BibTeX
@misc{sun2021ernie,
  author = {Yu Sun and Shuohuan Wang and Shikun Feng and Siyu Ding and Chao Pang and Junyuan Shang and Jiaxiang Liu and Xuyi Chen and Yanbin Zhao and Yuxiang Lu and Weixin Liu and Zhihua Wu and Weibao Gong and Jianzhong Liang and Zhizhou Shang and Peng Sun and Wei Liu and Xuan Ouyang and Dianhai Yu and Hao Tian and Hua Wu and Haifeng Wang},
  title = {{ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generation}},
  year = {2021},
  eprint = {2107.02137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.02137},
}
Figure