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的模型比较了一下,效果很好,尤其对于长句子有奇效。

posted @ 2018-04-21 14:51  HOLD  阅读(4415)  评论(1编辑  收藏  举报