We propose FMMformers, a class of efficient and flexible transformers inspired by the celebrated fast multipole method (FMM) for accelerating interacting particle simulation. FMM decomposes particle-particle interaction into near-field and far-field components and then performs direct and coarse-grained computation, respectively. Similarly, FMMformers decompose the attention into near-field and far-field attention, modeling the near-field attention by a banded matrix and the far-field attention by a low-rank matrix. Computing the attention matrix for FMMformers requires linear complexity in computational time and memory footprint with respect to the sequence length. In contrast, standard transformers suffer from quadratic complexity. We analyze and validate the advantage of FMMformers over the standard transformer on the Long Range Arena and language modeling benchmarks. FMMformers can even outperform the standard transformer in terms of accuracy by a significant margin. For instance, FMMformers achieve an average classification accuracy of $60.74\%$ over the five Long Range Arena tasks, which is significantly better than the standard transformer's average accuracy of $58.70\%$.


翻译:我们建议FMMEXERT(FMMT),这是一组高效和灵活的变压器,受著名的快速多极法(FMMM)的启发,用于加速互动粒子模拟。FMM将粒子相互作用分解成近地和远地的部件,然后分别进行直接和粗粗的计算。同样,FMMEXDER将注意力分解成近地和远地的注意,通过带宽的矩阵和低层的矩阵对近地注意进行模拟。计算FMMMEXT的注意矩阵需要计算时间和序列长度的记忆足迹的线性复杂度。相比之下,标准变压器具有二次变压的复杂度。我们分析并验证FMMEXDERT在长地程和语言建模基准标准变压器的优势。FMMMEXTERD在精确度方面甚至可以大大超过标准变压器的精确度。例如FMMMMTERD在5 Long Arena任务上的平均分类精度为60.74 $70美元,这比标准变压器的平均精确度要好得多。

0
下载
关闭预览

相关内容

Attention机制最早是在视觉图像领域提出来的,但是真正火起来应该算是google mind团队的这篇论文《Recurrent Models of Visual Attention》[14],他们在RNN模型上使用了attention机制来进行图像分类。随后,Bahdanau等人在论文《Neural Machine Translation by Jointly Learning to Align and Translate》 [1]中,使用类似attention的机制在机器翻译任务上将翻译和对齐同时进行,他们的工作算是是第一个提出attention机制应用到NLP领域中。接着类似的基于attention机制的RNN模型扩展开始应用到各种NLP任务中。最近,如何在CNN中使用attention机制也成为了大家的研究热点。下图表示了attention研究进展的大概趋势。
最新《Transformers模型》教程,64页ppt
专知会员服务
276+阅读 · 2020年11月26日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
67+阅读 · 2020年10月24日
【DeepMind】强化学习教程,83页ppt
专知会员服务
147+阅读 · 2020年8月7日
迁移学习简明教程,11页ppt
专知会员服务
105+阅读 · 2020年8月4日
一份循环神经网络RNNs简明教程,37页ppt
专知会员服务
168+阅读 · 2020年5月6日
【推荐系统/计算广告/机器学习/CTR预估资料汇总】
专知会员服务
86+阅读 · 2019年10月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
强化学习 cartpole_a3c
CreateAMind
9+阅读 · 2017年7月21日
Arxiv
17+阅读 · 2021年3月29日
Arxiv
22+阅读 · 2020年9月16日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
VIP会员
相关VIP内容
最新《Transformers模型》教程,64页ppt
专知会员服务
276+阅读 · 2020年11月26日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
67+阅读 · 2020年10月24日
【DeepMind】强化学习教程,83页ppt
专知会员服务
147+阅读 · 2020年8月7日
迁移学习简明教程,11页ppt
专知会员服务
105+阅读 · 2020年8月4日
一份循环神经网络RNNs简明教程,37页ppt
专知会员服务
168+阅读 · 2020年5月6日
【推荐系统/计算广告/机器学习/CTR预估资料汇总】
专知会员服务
86+阅读 · 2019年10月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
相关论文
Top
微信扫码咨询专知VIP会员