点击上方“Datawhale”,选择“星标”公众号
第一时间获取价值内容
Attention的产生
seq2seq将输入序列都压缩成一个固定大小的隐变量,就像我们的压缩文件一样,这个过程是有损压缩的,会迫使丢失许多输入序列中的信息。 存在着难以对齐的问题。比如中译音“我爱你”“I love you”,输入序列中的“我”应该与“I”对齐(贡献最大),然而在seq2seq模型中,“我”对"I","love","you"的贡献都是一致的
Attention的发展
Show, attend and tell: Neural image caption generation with visual attention
sort Attention hard Attention
Attention的计算
Soft attention:直接使用attention的权重对L个向量加权相加,这么做的好处是整个问题是可微的,可以利用BP end to end
总结

Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation

Effective Approaches to Attention-based Neural Machine Translation
global attention


Attention-Based Multi-Perspective Convolutional Neural Networks for Textual Similarity Measurement

multi-perspective sentence model
Structured Similarity Measurement
Attention-Based Input Interaction Layer
ABCNN: Attention-Based Convolutional Neural Network for Modeling Sentence Pairs

ABCNN-1

ABCNN-2
ABCNN-3
Graph Attention Network(GAT)
小结1
Attention is all you need
跳出原来千篇一律的attention形式,不使用CNN,不使用RNN,光靠attention,实现高并行化 抓取更强的长距离依赖关系
总结了attention的通用形式 提出了self attention,multi-head attention Transform结构
总结Attention的通用格式
提出self attention, multi-head attention

由于self attention 是对整个文本句求attention的,所以他能抓取到当前单词和该文本句中所有单词的依赖关系强度。这方面的能力显然比RNN的获取长依赖的能力强大的多。 此时不在用RNN的这种串行模式,即每一步计算依赖于上一步的计算结果。因此可以像CNN一样并行处理,而CNN只能捕获局部信息,通过层叠获取全局联系增强视野
Transform

Positional embedding:正如上面所说,self attention缺乏位置信息,这是不合理的。为了引入位置信息,这里用了一个部件position embedding。
residual connection 无论是encoder还是decoder我们都能看到存在这residual connection这种跳跃连接。
Layer Normalization

Masked Multi-Head Attention
An Attentive Survey of Attention Models
number of sequences:a)distinctive:只考虑了涉及单个输入和相应输出序列的情况(例如seq2seq中的attention)
Number of abstraction levels
Number of positions a)soft attention:它使用输入序列所有隐藏状态的加权平均值来构建上下文向量
Number of representations
Encoder-Decoder Memory Networks
Networks without RNNs 最具代表性的就是Transformer。
未完待续