Sutskever2014_Sequence to Sequence Learning with Neural Networks
阿新 • • 發佈:2018-11-09
INFO: Sutskever2014_Sequence to Sequence Learning with Neural Networks
ABSTRACT
- Use one LSTM to read the input sequence, one timestep at a time, to obtain large fixed-dimensional vector representation, and then to use another LSTM to extract the output sequence from that vector. The second LSTM is essentially a recurrent neural network language model except that it is conditioned on the input sequence.
- It is not clear how to apply an RNN to problems whose input and the output sequences have different lengths with complicated and non-monotonic relationships.
- Reversing the input sentences results in LSTMs with better memory utilization.
(Instead of mapping the sentence a, b, c to the sentence α, β, γ, the LSTM is asked to map c, b, a to α, β, γ, where α, β, γ is the translation of a, b, c.)
RELEVANT INFORMATION:
- Encoder - Decoder:
- Encoder-Decoder並不是一個具體的模型,而是一類框架。Encoder和Decoder部分可以是任意的文字,語音,影象,視訊資料,模型可以採用CNN,RNN,BiRNN、LSTM、GRU等等。所以基於Encoder-Decoder,我們可以設計出各種各樣的應用演算法。
- Encoder-Decoder框架有一個最顯著的特徵就是它是一個End-to-End學習的演算法;這樣的模型往往用在機器翻譯中,比如將法語翻譯成英語。這樣的模型也被叫做 Sequence to Sequence learning。
- 侷限性:編碼和解碼之間的唯一聯絡就是一個固定長度的語義向量c。也就是說,編碼器要將整個序列的資訊壓縮排一個固定長度的向量中去。但是這樣做有兩個弊端:
- 語義向量c無法完全表示整個序列的資訊。
- 先輸入的內容攜帶的資訊會被後輸入的資訊稀釋掉/覆蓋,且輸入序列越長就越嚴重,使得在解碼的時候一開始就沒有獲得輸入序列足夠的資訊, 那麼解碼的準確度自然也就要打個折扣。
ENCODER-DECODER 模型
- Attention Model
- 為了彌補上述基本Encoder-Decoder模型的侷限性,近兩年NLP領域提出Attention Model(注意力模型),典型的例子就是在機器翻譯的時候,讓生成詞不是隻能關注全域性的語義編碼向量c,而是增加了一個“注意力範圍”,表示接下來輸出詞時候要重點關注輸入序列中的哪些部分,然後根據關注的區域來產生下一個輸出。
- 相比於之前的Encoder-Decoder模型,Attention模型最大的區別就在於它不再要求編碼器將所有輸入資訊都編碼進一個固定長度的向量之中。相反,此時編碼器需要將輸入編碼成一個向量的序列,而在解碼的時候,每一步都會選擇性的從向量序列中挑選一個子集進行進一步處理。
ATTENTION 模型