論文鏈接:https://arxiv.org/pdf/1409.3215.pdf
(在另外一篇論文里看到的beam size,不太懂,就過來看原文啦,話不多說,ready go~~~)
本文提出了一個端對端的序列學習方法,對序列結構做最小的假設。使用多層LSTM將輸入序列映射到一個定長的向量,然后另一個deep LSTM來做decode。
結果:使用WMT‘14做English to French翻譯的任務,BLEU分數在整個測試集上達到34.8,LSTM的BLEU分數因為超出vocabulary的詞而被懲罰。除此之外,LSTM可以解決長序列。為了做筆記,a phrase-based SMT system在同樣的數據集上達到了33.3BLEU分數,當使用LSTM來重新排序由SMT系統產生的1000個hypotheses,BLEU分數達到了36.5。
Finally, we found that reversing the order of the words in all source sentences(but not target sentences) improved the LSTM's performance markedly, because doing so introduced many short term dependencies between the source and the target sentence which made the optimization problem easier
(表示這個很神奇啊)翻轉source sentence的順序可以提高LSTM的performance。
Deep Neural Network(DNNs) are powerful because they can perform arbitrary parallel computation for a modest number of step. DNNs 的強大是因為它們可以為一定數量的步驟執行任意的并行計算。
過去的限制:DNN只能被用于輸入和target可以被編碼到定長維度的向量的問題。
模型:
目標是估計條件概率:
T‘ 和 T可能不同。
先提取輸入序列(x1, ..., xT)的最后一個隱狀態,然后再計算y1, ..., yT' 的概率 with a standard LSTM-LM formulation whose initial hidden state is set to the representation v of x1,..., xT
每個p(yt | v, y1, ..., yt-1)分布是通過所有vocabulary中所有詞的softmax表示。
S---source sentence,? ?T---correct translation。? 求和公式下的S是training set。當訓練結束后,通過找到最可能的翻譯作為結果:
We search for the most likely translation using a simple left-to-right beam search decoder which maintains a small number B of partial hypotheses, where a partial hypothesis is a prefix of some translation.
beam search: 只在test的時候需要。假設詞表大小為3,內容為a, b, c。 beam size為2
decoder解碼時:
1. 生成第1個詞的時候,選擇概率最大的兩個詞,假設為a, c,那么當前序列就是a, c
2. 生成第2個詞的時候,我們將當前序列a和c,分別與詞表中的所有詞進行組合,得到新的6個序列aa ab ac ca cb cc,然后從其中選擇2個得分最高的,當作當前序列,假如為aa cb
3. 后面會不斷重復這個過程,直到遇到結束符為止。最終輸出2個得分最高的序列。