ERNIE-Doc: A Retrospective Long-Document Modeling Transformer
arXiv:2012.15688
Abstract
Transformers are not suited for processing long documents, due to their quadratically increasing memory and time consumption. Simply truncating a long document or applying the sparse attention mechanism will incur the context fragmentation problem or lead to an inferior modeling capability against comparable model sizes. In this paper, we propose ERNIE-Doc, a document-level language pretraining model based on Recurrence Transformers. Two well-designed techniques, namely the retrospective feed mechanism and the enhanced recurrence mechanism, enable ERNIE-Doc, which has a much longer effective context length, to capture the contextual information of a complete document. We pretrain ERNIE-Doc to explicitly learn the relationships among segments with an additional document-aware segment-reordering objective. Various experiments were conducted on both English and Chinese document-level tasks. ERNIE-Doc improved the state-of-the-art language modeling result of perplexity to 16.8 on WikiText-103. Moreover, it outperformed competitive pretraining models by a large margin on most language understanding tasks, such as text classification and question answering.
arXiv commentAccepted by ACL 2021 (main conference, long paper)
References in corpus (17)
- Adam: A Method for Stochastic Optimization
- Longformer: The Long-Document Transformer
- ERNIE: Enhanced Representation through Knowledge Integration
- Generating Long Sequences with Sparse Transformers
- Reformer: The Efficient Transformer
- A Simple Method for Commonsense Reasoning
- An Analysis of Neural Language Modeling at Multiple Scales
- HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering
- Pretrained Transformers for Text Ranking: BERT and Beyond
- DRCD: a Chinese Machine Reading Comprehension Dataset
- Sparse Sinkhorn Attention
- CLUE: A Chinese Language Understanding Evaluation Benchmark
- BP-Transformer: Modelling Long-Range Context via Binary Partitioning
- HIBERT: Document Level Pre-training of Hierarchical Bidirectional Transformers for Document Summarization
- DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applications
- CAIL2019-SCM: A Dataset of Similar Case Matching in Legal Domain
- Open Domain Web Keyphrase Extraction Beyond Language Modeling