arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.14996cs.CLcs.LG
收藏

Segatron:用于语言建模和理解的分段感知的Transformer

Segatron: Segment-Aware Transformer for Language Modeling and Understanding

University of Waterloo(滑铁卢大学);Peking University(北京大学)

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

摘要:

Transformers对于序列建模非常强大。几乎所有最先进的语言模型和预训练的语言模型都基于Transformer架构。但是,它仅通过标记位置索引来区分连续标记。我们假设,更好的上下文表示可以从具有更丰富的位置信息的Transformer生成。为了验证这一点,我们提出了一个段感知的Transformer(Segatron),通过替换原来的令牌位置编码与段落,句子和令牌的组合位置编码。我们首先将段感知机制引入到Transformer-XL,这是一种流行的基于transformer的语言模型,具有内存扩展和相对位置编码。我们发现,我们的方法可以进一步改善Transformer-XL基础模型和大模型,在WikiText-103数据集上实现17.1困惑度。我们进一步研究了Segatron的预训练掩蔽语言建模任务。实验结果表明,使用Segatron(SegaBERT)预训练的BERT在各种NLP任务上的性能优于使用vanilla Transformer的BERT,在zero-shot句子表示学习上的性能优于RoBERTa。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑