A bottleneck in transformer architectures is their quadratic complexity with respect to the input sequence, which has motivated a body of work on efficient sparse approximations to softmax. An alternative path, used by entmax transformers, consists of having built-in exact sparse attention; however this approach still requires quadratic computation. In this paper, we propose Sparsefinder, a simple model trained to identify the sparsity pattern of entmax attention before computing it. We experiment with three variants of our method, based on distances, quantization, and clustering, on two tasks: machine translation (attention in the decoder) and masked language modeling (encoder-only). Our work provides a new angle to study model efficiency by doing extensive analysis of the tradeoff between the sparsity and recall of the predicted attention graph. This allows for detailed comparison between different models, and may guide future benchmarks for sparse models.


翻译:变压器结构中的瓶颈是其输入序列的二次复杂程度,这促使人们就低效的微缩近似值进行大量工作。 内轴变压器使用的替代路径包括内置零散的注意; 然而,这个方法仍然需要四进制计算。 在本文中, 我们提出一个简单的模型Sprassfinder, 用来在计算前确定堆积注意的聚度模式。 我们实验了我们方法的三种变体, 其基础是距离、 量化和组合, 包括两个任务: 机器翻译( 脱coder 的注意) 和隐蔽语言建模( encoder- only) 。 我们的工作为研究模型效率提供了一个新角度, 其方法是广泛分析宽度和回顾预测的注意图之间的取舍。 这样可以对不同的模型进行详细比较, 并且可以指导稀少模型的未来基准 。

0
下载
关闭预览

相关内容

专知会员服务
22+阅读 · 2021年9月20日
专知会员服务
30+阅读 · 2021年6月12日
专知会员服务
91+阅读 · 2021年6月3日
【CVPR2021】基于端到端预训练的视觉-语言表征学习
专知会员服务
37+阅读 · 2021年4月9日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
98+阅读 · 2020年8月30日
【MIT深度学习课程】深度序列建模,Deep Sequence Modeling
专知会员服务
76+阅读 · 2020年2月3日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
鲁棒机器学习相关文献集
专知
8+阅读 · 2019年8月18日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Jointly Improving Summarization and Sentiment Classification
黑龙江大学自然语言处理实验室
3+阅读 · 2018年6月12日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
11+阅读 · 2021年10月26日
Arxiv
19+阅读 · 2020年12月23日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Arxiv
5+阅读 · 2017年9月8日
VIP会员
相关VIP内容
专知会员服务
22+阅读 · 2021年9月20日
专知会员服务
30+阅读 · 2021年6月12日
专知会员服务
91+阅读 · 2021年6月3日
【CVPR2021】基于端到端预训练的视觉-语言表征学习
专知会员服务
37+阅读 · 2021年4月9日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
98+阅读 · 2020年8月30日
【MIT深度学习课程】深度序列建模,Deep Sequence Modeling
专知会员服务
76+阅读 · 2020年2月3日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
鲁棒机器学习相关文献集
专知
8+阅读 · 2019年8月18日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Jointly Improving Summarization and Sentiment Classification
黑龙江大学自然语言处理实验室
3+阅读 · 2018年6月12日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
相关论文
Arxiv
11+阅读 · 2021年10月26日
Arxiv
19+阅读 · 2020年12月23日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Arxiv
5+阅读 · 2017年9月8日
Top
微信扫码咨询专知VIP会员