Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Segatron: Segment-Aware Transformer for Language Modeling and Understanding

About

Transformers are powerful for sequence modeling. Nearly all state-of-the-art language models and pre-trained language models are based on the Transformer architecture. However, it distinguishes sequential tokens only with the token position index. We hypothesize that better contextual representations can be generated from the Transformer with richer positional information. To verify this, we propose a segment-aware Transformer (Segatron), by replacing the original token position encoding with a combined position encoding of paragraph, sentence, and token. We first introduce the segment-aware mechanism to Transformer-XL, which is a popular Transformer-based language model with memory extension and relative position encoding. We find that our method can further improve the Transformer-XL base model and large model, achieving 17.1 perplexity on the WikiText-103 dataset. We further investigate the pre-training masked language modeling task with Segatron. Experimental results show that BERT pre-trained with Segatron (SegaBERT) can outperform BERT with vanilla Transformer on various NLP tasks, and outperforms RoBERTa on zero-shot sentence representation learning.

He Bai, Peng Shi, Jimmy Lin, Yuqing Xie, Luchen Tan, Kun Xiong, Wen Gao, Ming Li• 2020

Related benchmarks

TaskDatasetResultRank
Language ModelingWikiText-103 (test)
Perplexity17.1
524
Natural Language UnderstandingGLUE (test)
SST-2 Accuracy94.8
416
Semantic Textual SimilaritySTS tasks (STS12, STS13, STS14, STS15, STS16, STS-B, SICK-R)
STS12 Score74.49
195
Language ModelingWikiText-103 (val)
PPL22.5
180
Language ModelingarXiv (test)
PPL22.99
137
Machine Reading ComprehensionRACE (test)--
111
Machine Reading ComprehensionSQuAD 2.0 (dev)
EM81.8
57
Machine Reading ComprehensionSQuAD 1.1 (dev)
EM86
48
Reading ComprehensionRACE (dev)
Accuracy74.5
16
Text GenerationArXiv (val)
PPL21.28
5
Showing 10 of 10 rows

Other info

Code

Follow for update