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

288391-20180421154452751-825987480.png

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

网络结构是这样的:

288391-20180421154536061-249380752.png

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

转载于:https://www.cnblogs.com/naniJser/p/8900720.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值