1 为什么使用CNN学习序列表示
并且通过stacking 可以使 contex size 更大,如下图。
并且通过stacking 可以使 contex size 更大,如上图。
如图1,只需要三次CNN operation ,而需要 7 次 rnn 才能覆盖整个句子;
且RNN对于句首和句尾的非线性是不一致的
2 为什么引入注意力机制
Cho et al.,2014 解码器中目标序列中的任意一个词只考虑了编码器最终的映状态,即attend to 输入整 个句子,而 注意力机制中 c i c_i ci是输入句子各个时刻hidden state 的加权和,weight 不同表示对当前词的关注程度不一样,故允许网络在生成目标序列的对应词时关注输入句子的不同部分
3 如何利用CNN实现序列学习
引入Multi step Attention ,即每一层使用separate Attention
使用GLU(gated Linear unit )
Gehring, Jonas, Auli, Michael, Grangier, David, and
Dauphin, Yann N. A Convolutional Encoder Model
for Neural Machine Translation. arXiv preprint
arXiv:1611.02344, 2016
具体细节可以参考:
值得一读
Bahdanau, Dzmitry, Cho, Kyunghyun, and Bengio,
Yoshua. Neural machine translation by jointly learning
to align and translate. arXiv preprint arXiv:1409.0473,
2014