========================================================
RNNs 的出现,主要是因为它们能够把以前的信息联系到现在,从而解决现在的问题。比如,利用前面的画面,能够帮助我们理解当前画面的内容。如果 RNNs 真的可以做到这个,那么它肯定是对我们的任务有帮助的。但是它真的可以做到吗,恐怕还得看实际情况呀!
有时候,我们在处理当前任务的时候,只需要看一下比较近的一些信息。比如在一个语言模型中,我们要通过上文来预测一下个词可能会是什么,那么当我们看到“ the clouds are in the ?”时,不需要更多的信息,我们就能够自然而然的想到下一个词应该是“sky”。在这样的情况下,我们所要预测的内容和相关信息之间的间隔很小,这种情况下 RNNs 就能够利用过去的信息, 很容易的实现。
设计 LSTMs 主要是为了解决前面提到的 长距离依赖 (long-term dependency )的问题。它们的结构本身就很适合记住很长距离的信息,而非很艰难的 “理论上能够“。
========================================================
注意力机制研究现状综述(Attention mechanism)
Intuitively, this implements a mechanism of attention in the decoder. The decoder decides parts of the source sentence to pay attention to. By letting the decoder have an attention mechanism, we relieve the encoder from the burden of having to encode all information in the source sentence into a fixedlength vector. With this new approach the information can be spread throughout the sequence of annotations, which can be selectively retrieved by the decoder accordingly.
总结上面的几句话。概括上讲,为了让解码部分具有注意力机制的功能。通俗点讲,就是让解码部分可以选择性地使用编码部分的信息。
========================================================
详解Transformer (Attention Is All You Need)
作者采用Attention机制的原因是考虑到RNN(或者LSTM,GRU等)的计算限制为是顺序的,也就是说RNN相关算法只能从左向右依次计算或者从右向左依次计算,这种机制带来了两个问题:
的计算依赖
========================================================
========================================================
========================================================
========================================================
========================================================
========================================================
========================================================