Transformers struggle when attending to long contexts, since the amount of computation grows with the context length, and therefore they cannot model long-term memories effectively. Several variations have been proposed to alleviate this problem, but they all have a finite memory capacity, being forced to drop old information. In this paper, we propose the $\infty$-former, which extends the vanilla transformer with an unbounded long-term memory. By making use of a continuous-space attention mechanism to attend over the long-term memory, the $\infty$-former's attention complexity becomes independent of the context length. Thus, it is able to model arbitrarily long contexts and maintain "sticky memories" while keeping a fixed computation budget. Experiments on a synthetic sorting task demonstrate the ability of the $\infty$-former to retain information from long sequences. We also perform experiments on language modeling, by training a model from scratch and by fine-tuning a pre-trained language model, which show benefits of unbounded long-term memories.


翻译:由于计算量随上下文长长而增加,因此无法有效地模拟长期记忆。为了缓解这一问题,提出了几种变异,但都具有有限的记忆能力,被迫放弃旧信息。在本文中,我们提议美元前列,将香草变压器扩展为无限制长期记忆。通过使用连续空间关注机制处理长期记忆,美元前列的注意力复杂性与上下文长度无关。因此,它能够任意地模拟长环境,保持“粘性记忆”,同时保持固定计算预算。合成分类任务实验显示美元前列有能力保存长序列信息。我们还进行语言建模实验,培训从刮起的模式,并微调一个经过预先训练的语言模型,显示无限制长期记忆的好处。

0
下载
关闭预览

相关内容

专知会员服务
22+阅读 · 2021年9月20日
专知会员服务
33+阅读 · 2021年8月16日
最新《Transformers模型》教程,64页ppt
专知会员服务
298+阅读 · 2020年11月26日
基于多头注意力胶囊网络的文本分类模型
专知会员服务
76+阅读 · 2020年5月24日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Transformer中的相对位置编码
AINLP
5+阅读 · 2020年11月28日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
Transferring Knowledge across Learning Processes
CreateAMind
27+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Do RNN and LSTM have Long Memory?
Arxiv
19+阅读 · 2020年6月10日
Arxiv
6+阅读 · 2019年7月11日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
8+阅读 · 2018年3月20日
Arxiv
3+阅读 · 2015年11月29日
VIP会员
相关VIP内容
专知会员服务
22+阅读 · 2021年9月20日
专知会员服务
33+阅读 · 2021年8月16日
最新《Transformers模型》教程,64页ppt
专知会员服务
298+阅读 · 2020年11月26日
基于多头注意力胶囊网络的文本分类模型
专知会员服务
76+阅读 · 2020年5月24日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
相关论文
Do RNN and LSTM have Long Memory?
Arxiv
19+阅读 · 2020年6月10日
Arxiv
6+阅读 · 2019年7月11日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
8+阅读 · 2018年3月20日
Arxiv
3+阅读 · 2015年11月29日
Top
微信扫码咨询专知VIP会员