Recent advances in Transformer models allow for unprecedented sequence lengths, due to linear space and time complexity. In the meantime, relative positional encoding (RPE) was proposed as beneficial for classical Transformers and consists in exploiting lags instead of absolute positions for inference. Still, RPE is not available for the recent linear-variants of the Transformer, because it requires the explicit computation of the attention matrix, which is precisely what is avoided by such methods. In this paper, we bridge this gap and present Stochastic Positional Encoding as a way to generate PE that can be used as a replacement to the classical additive (sinusoidal) PE and provably behaves like RPE. The main theoretical contribution is to make a connection between positional encoding and cross-covariance structures of correlated Gaussian processes. We illustrate the performance of our approach on the Long-Range Arena benchmark and on music generation.


翻译:由于线性空间和时间的复杂性,最近变形模型的进展允许史无前例的序列长度。与此同时,相对位置编码(RPE)被提议为有利于古典变异器,包括利用时滞而不是绝对的推理位置。不过,对于最近变异器的线性变异器来说,RPE是无法使用的,因为它要求明确计算注意矩阵,而这正是这种方法所避免的。在本文中,我们弥合了这一差距,并提出了Stochacistic 定位编码,作为生成PE的一种方法,可以用来替代古典变异添加物(硅状)PE和类似RPE的可移动行为。主要的理论贡献是将相交的高斯进程的位置编码和交叉变异结构联系起来。我们展示了我们在长Range Arena基准和音乐生成方面的做法的绩效。

8
下载
关闭预览

相关内容

【ICML2021】具有线性复杂度的Transformer的相对位置编码
专知会员服务
24+阅读 · 2021年5月20日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
【论文笔记】通俗理解少样本文本分类 (Few-Shot Text Classification) (1)
深度学习自然语言处理
7+阅读 · 2020年4月8日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Neural Response Generation with Meta-Words
Arxiv
6+阅读 · 2019年6月14日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
7+阅读 · 2018年5月21日
Arxiv
4+阅读 · 2018年4月26日
Arxiv
5+阅读 · 2018年3月30日
VIP会员
相关资讯
相关论文
Neural Response Generation with Meta-Words
Arxiv
6+阅读 · 2019年6月14日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Arxiv
7+阅读 · 2018年5月21日
Arxiv
4+阅读 · 2018年4月26日
Arxiv
5+阅读 · 2018年3月30日
Top
微信扫码咨询专知VIP会员