The attention mechanism has been widely used in deep neural networks as a model component. By now, it has become a critical building block in many state-of-the-art natural language models. Despite its great success established empirically, the working mechanism of attention has not been investigated at a sufficient theoretical depth to date. In this paper, we set up a simple text classification task and study the dynamics of training a simple attention-based classification model using gradient descent. In this setting, we show that, for the discriminative words that the model should attend to, a persisting identity exists relating its embedding and the inner product of its key and the query. This allows us to prove that training must converge to attending to the discriminative words when the attention output is classified by a linear classifier. Experiments are performed, which validates our theoretical analysis and provides further insights.


翻译:关注机制在深层神经网络中被广泛用作模型组成部分,现在它已成为许多最先进的自然语言模型中的关键基石。尽管它取得了巨大的成功,但迄今为止还没有在足够的理论深度上对关注工作机制进行调查。在本文中,我们设置了一个简单的文本分类任务,并研究了培训使用梯度下降的简单关注分类模式的动态。在这个背景下,我们显示,由于模型应该关注的歧视性词,其嵌入和关键和查询的内在产品存在一种顽固的特征。这使我们能够证明,当关注产出由线性分类师分类时,培训必须集中到歧视性的词汇中。 进行了实验,这些实验证实了我们的理论分析并提供了进一步的见解。

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研究进展的大概趋势。
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
70+阅读 · 2020年8月2日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
【NIPS2018】接收论文列表
专知
5+阅读 · 2018年9月10日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年1月5日
Arxiv
21+阅读 · 2019年8月21日
Arxiv
6+阅读 · 2019年3月19日
Adversarial Reprogramming of Neural Networks
Arxiv
3+阅读 · 2018年6月28日
Arxiv
3+阅读 · 2018年3月14日
Arxiv
3+阅读 · 2018年2月24日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
【NIPS2018】接收论文列表
专知
5+阅读 · 2018年9月10日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
相关论文
Arxiv
0+阅读 · 2021年1月5日
Arxiv
21+阅读 · 2019年8月21日
Arxiv
6+阅读 · 2019年3月19日
Adversarial Reprogramming of Neural Networks
Arxiv
3+阅读 · 2018年6月28日
Arxiv
3+阅读 · 2018年3月14日
Arxiv
3+阅读 · 2018年2月24日
Top
微信扫码咨询专知VIP会员