Paper Reading: Neural Machine Translation by Jointly Learning to Align and Translate


這篇文章是論文"NEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE"的閱讀筆記,這是2015年發表在ICLR的一篇文章。

ABSTRACT

NMT(neural machine translation)是個很多人研究過的問題,最近也突破很多
回到這篇論文,當時解決NMT問題的做法主要是基於encoder-decoder框架的,這框架也挺好的,在很多領域表現都不錯。但是,encoder部分把輸入信息壓縮到一個固定長度的vector中,這造成了性能的瓶頸。這篇論文提出的模型就是在翻譯的過程中自動在輸入中尋找與輸出目標有關系的部分幫助決策。這就是這篇論文提出的方法的核心思想。

看一下原文是怎么說的👇

In this paper, we conjecture that the use of a fixed-length vector is a bottleneck in improving the performance of this basic encoder–decoder architecture, and propose to extend this by allowing a model to automatically (soft-)search for parts of a source sentence that are relevant to predicting a target word, without having to form these parts as a hard segment explicitly.

BACKGROUND

1 translation problem

從概率角度看,翻譯問題就是 : \(arg max_yp(y|x)\)

2 RNN Encoder-Decoder

Encoder讀入輸入\(x=(x_i,x_i,...x_t)\),輸出一個vector \(c\):

\[c=q(\{h_1,h_2...h_t\}) \]

q是某個非線性的函數。
Decoder是這樣一個概率模型,

\[\begin{aligned} p(y)= \prod_{t=1}^{T}p(y_t|\{y_1,...y_{t-1}\},c) \\ p(y_t|\{y_1,...y_{t-1}\},c) = g(y_{t_i},s_t,c) \end{aligned} \]

PROPOSED METHOD

網絡結構是這樣的:


encoder部分是個雙向RNN。decoder部分,條件概率變成:

\[p(y_i|\{y_1,...y_{i-1}\},x) = g(y_{i-1},s_i,c_i) \]

\[s_i = f(s_{i-1},y_{i-1},c_i) \]

與前面的decoder不同的是,\(c_i\)對每個\(y_i\)都是不同的。

\[c_i = \sum_{j=1}^{T}\alpha_{ij}h_j \]

可以看到\(c_i\)是encoder各個輸出狀態\(h_j\)的一個加權和,所以它能做到focus和這個目標\(y_i\)最相關的輸入。

\[\alpha_{ij}=\frac{exp(e_{ij})}{\sum exp(e_{ik}) } \]

\[e_{ij} = a(s_{j-1},h_j) \]

這個\(e_{ij}\)就是最重點的地方了,這個函數衡量i和j有多match.

is an alignment model which scores how well the inputs around position j and the output at position i match.

EXPERIMENT RESULT

和基於encoder-decoder的模型比較了一下,效果很好,尤其對於長句子有奇效。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM