Transformer is a powerful model for text understanding. However, it is inefficient due to its quadratic complexity to input sequence length. Although there are many methods on Transformer acceleration, they are still either inefficient on long sequences or not effective enough. In this paper, we propose Fastformer, which is an efficient Transformer model based on additive attention. In Fastformer, instead of modeling the pair-wise interactions between tokens, we first use additive attention mechanism to model global contexts, and then further transform each token representation based on its interaction with global context representations. In this way, Fastformer can achieve effective context modeling with linear complexity. Extensive experiments on five datasets show that Fastformer is much more efficient than many existing Transformer models and can meanwhile achieve comparable or even better long text modeling performance.


翻译:变换器是一个强大的文本理解模型。 但是,它由于输入序列长度的四重复杂度而效率低下。 虽然变换器加速率有许多方法, 但它们在长序列上仍然效率低下, 或不够有效。 在本文中, 我们建议 Fastexer, 这是一种基于添加关注的高效变换器模型。 在 Fasterent 中, 我们首先使用添加式注意机制, 而不是模拟代号之间的双向互动, 而不是建模全球背景, 然后根据它与全球背景演示的相互作用, 进一步转换每个象征性的表示。 这样, 快速变换器可以实现具有线性复杂性的有效环境建模。 对五个数据集的广泛实验显示, Fastexerve 比许多现有的变换器模型效率高得多, 同时还可以实现可比的甚至更好的长文本建模效果。

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
专知会员服务
75+阅读 · 2021年3月16日
注意力机制综述
专知会员服务
80+阅读 · 2021年1月26日
专知会员服务
123+阅读 · 2020年9月8日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
注意力机制介绍,Attention Mechanism
专知会员服务
166+阅读 · 2019年10月13日
强化学习最新教程,17页pdf
专知会员服务
168+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
Attention最新进展
极市平台
5+阅读 · 2020年5月30日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
22+阅读 · 2018年10月9日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
Talking-Heads Attention
Arxiv
15+阅读 · 2020年3月5日
Arxiv
6+阅读 · 2019年4月8日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Area Attention
Arxiv
5+阅读 · 2019年2月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
26+阅读 · 2017年12月6日
VIP会员
相关VIP内容
专知会员服务
75+阅读 · 2021年3月16日
注意力机制综述
专知会员服务
80+阅读 · 2021年1月26日
专知会员服务
123+阅读 · 2020年9月8日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
注意力机制介绍,Attention Mechanism
专知会员服务
166+阅读 · 2019年10月13日
强化学习最新教程,17页pdf
专知会员服务
168+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
相关资讯
Attention最新进展
极市平台
5+阅读 · 2020年5月30日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
22+阅读 · 2018年10月9日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
相关论文
Talking-Heads Attention
Arxiv
15+阅读 · 2020年3月5日
Arxiv
6+阅读 · 2019年4月8日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Area Attention
Arxiv
5+阅读 · 2019年2月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
26+阅读 · 2017年12月6日
Top
微信扫码咨询专知VIP会员