Transformer networks have a potential of learning longer-term dependency, but are limited by a fixed-length context in the setting of language modeling. As a solution, we propose a novel neural architecture, \textit{Transformer-XL}, that enables Transformer to learn dependency beyond a fixed length without disrupting temporal coherence. Concretely, it consists of a segment-level recurrence mechanism and a novel positional encoding scheme. Our method not only enables capturing longer-term dependency, but also resolves the problem of context fragmentation. As a result, Transformer-XL learns dependency that is about 80\% longer than RNNs and 450\% longer than vanilla Transformers, achieves better performance on both short and long sequences, and is up to 1,800+ times faster than vanilla Transformer during evaluation. Additionally, we improve the state-of-the-art (SoTA) results of bpc/perplexity from 1.06 to 0.99 on enwiki8, from 1.13 to 1.08 on text8, from 20.5 to 18.3 on WikiText-103, from 23.7 to 21.8 on One Billion Word, and from 55.3 to 54.5 on Penn Treebank (without finetuning). Our code, pretrained models, and hyperparameters are available in both Tensorflow and PyTorch.


翻译:变换器网络具有学习长期依赖性的潜力,但受语言模型设置中固定长度背景的限制。作为一个解决方案,我们提议了一个新的神经结构,\textit{transfred-XL},使变换器能够在不扰乱时间一致性的情况下学习超过固定长度的依赖性。具体地说,它包括一个分级重现机制和一个新的定位编码计划。我们的方法不仅能够捕捉长期依赖性,而且还解决了背景分裂问题。因此,变换器-XL学会了比RNN和香草变换器长约80 ⁇ 年长,450 ⁇ 长约80 ⁇ 。作为一个解决方案,我们提出了一个新的神经结构,使变换器能够在不破坏时间一致性的情况下学习超过固定长度的对依赖性。具体地说,它包括一个分级重现机制和一个新的定位编码系统。我们的方法不仅能够捕捉到长期依赖性,而且还解决了背景变形问题。 因此,变换器-XL学会学习了比RNNN约长80 ⁇ 长,比香草变换器长450 ⁇ 长450 ⁇ 长,在短序和长的顺序上都达到更好的性工作,在短的成绩上都比Vanilla变形变换器变换器变换速度快1800+1800倍。此外比Van3比VWWe,从55.3到TWe,还有5号,从5号,从5到Tirmas,从5号,还有5号,从5号,从5号,从5号,从5号,从5号,从5号到Tirmax103.,从5号,从5号,从5号,从5号,从5号到Tirmas,从5号,从5号,从5号,从5号到1039到1039,从5号,从5号,从5号,从5号,从5号,从5号,从5号,从5号,从5号,到10,到10,到10号,从5号,从5号,从5号到1039,从5号,从5号,从5号,到10号,到10号,从5号,从5号,到10号,从5号,到10号,从5号,从5号,到10号,从

4
下载
关闭预览

相关内容

基于多头注意力胶囊网络的文本分类模型
专知会员服务
76+阅读 · 2020年5月24日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
【MIT深度学习课程】深度序列建模,Deep Sequence Modeling
专知会员服务
75+阅读 · 2020年2月3日
BERT进展2019四篇必读论文
专知会员服务
64+阅读 · 2020年1月2日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
TensorFlow 2.0 学习资源汇总
专知会员服务
66+阅读 · 2019年10月9日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
站在BERT肩膀上的NLP新秀们:XLMs、MASS和UNILM
PaperWeekly
16+阅读 · 2019年6月6日
Transformer-XL:释放注意力模型的潜力
谷歌开发者
31+阅读 · 2019年2月19日
Arxiv
21+阅读 · 2019年8月21日
Arxiv
6+阅读 · 2019年7月11日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
5+阅读 · 2018年2月26日
Arxiv
5+阅读 · 2018年1月18日
VIP会员
相关VIP内容
基于多头注意力胶囊网络的文本分类模型
专知会员服务
76+阅读 · 2020年5月24日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
【MIT深度学习课程】深度序列建模,Deep Sequence Modeling
专知会员服务
75+阅读 · 2020年2月3日
BERT进展2019四篇必读论文
专知会员服务
64+阅读 · 2020年1月2日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
TensorFlow 2.0 学习资源汇总
专知会员服务
66+阅读 · 2019年10月9日
相关论文
Arxiv
21+阅读 · 2019年8月21日
Arxiv
6+阅读 · 2019年7月11日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
5+阅读 · 2018年2月26日
Arxiv
5+阅读 · 2018年1月18日
Top
微信扫码咨询专知VIP会员