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

具有Transformers的语言模型

Language Models with Transformers

Amazon Web Services(亚马逊云科技)

Chenguang Wang, Mu Li, Alexander J. Smola

摘要:

Transformer架构在计算效率方面优于基于RNN的模型。最近,GPT和BERT在大规模语料库上使用预训练的语言模型证明了Transformer模型在各种NLP任务上的有效性。令人惊讶的是,这些Transformer架构对于语言模型本身来说是次优的。Transformer中的自我注意和位置编码都不能有效地结合对语言建模至关重要的单词级顺序上下文。在本文中,我们探索了用于语言模型的有效Transformer架构,包括添加额外的LSTM层以更好地捕获顺序上下文,同时仍然保持计算效率。我们提出了协调架构搜索(CAS)找到一个有效的架构,通过迭代细化的模型。在PTB、WikiText-2和WikiText-103上的实验结果表明,CAS在所有问题上都实现了20.42到34.11之间的困惑度,即与最先进的LSTM相比,平均提高了12.0个困惑度单位。源代码是公开的。

英文摘要:

The Transformer architecture is superior to RNN-based models in computational efficiency. Recently, GPT and BERT demonstrate the efficacy of Transformer models on various NLP tasks using pre-trained language models on large-scale corpora. Surprisingly, these Transformer architectures are suboptimal for language model itself. Neither self-attention nor the positional encoding in the Transformer is able to efficiently incorporate the word-level sequential context crucial to language modeling. In this paper, we explore effective Transformer architectures for language model, including adding additional LSTM layers to better capture the sequential context while still keeping the computation efficient. We propose Coordinate Architecture Search (CAS) to find an effective architecture through iterative refinement of the model. Experimental results on the PTB, WikiText-2, and WikiText-103 show that CAS achieves perplexities between 20.42 and 34.11 on all problems, i.e. on average an improvement of 12.0 perplexity units compared to state-of-the-art LSTMs. The source code is publicly available.

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

↑