Convolutional Sequence to Sequence Learning
Convolutional Sequence to Sequence Learning
(^{1})Facebook AI Research.
Correspondence to: Jonas Gehring
jgehring@fb.com, Michael Auli michaelauli@fb.com.
Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia, PMLR 70, 2017. Copyright 2017 by the author(s).
Abstract
摘要
The prevalent approach to sequence to sequence learning maps an input sequence to a variable length output sequence via recurrent neural networks. We introduce an architecture based entirely on convolutional neural networks. Compared to recurrent models, computations over all elements can be fully parallelized during training to better exploit the GPU hardware and optimization is easier since the number of non-linearities is fixed and independent of the input length. Our use of gated linear units eases gradient propagation and we equip each decoder layer with a separate attention module. We outperform the accuracy of the deep LSTM setup of Wu et al. (2016) on both WMT'14 English-German and WMT'14 English-French translation at an order of magnitude faster speed, both on GPU and CPU.
当时最常见的序列到序列学习做法,是用循环神经网络把输入序列映射成变长输出序列。我们提出一种完全基于卷积神经网络的结构。与循环模型相比,训练时可以对所有位置同时计算,从而更好地利用 GPU;优化也更容易,因为非线性次数是固定的,不随输入长度变化。我们使用门控线性单元,便于梯度传播,并为每一层解码器配备单独的注意力模块。在 WMT'14 英德和英法翻译上,我们的精度超过了 Wu 等(2016)的深度 LSTM 设置,在 GPU 和 CPU 上的速度都快大约一个数量级。
The source code and models are available at https://github.com/facebookresearch/fairseq.
- Introduction
- 引言
Sequence to sequence learning has been successful in many tasks such as machine translation, speech recognition (Sutskever et al., 2014; Chorowski et al., 2015) and text summarization (Rush et al., 2015; Nallapati et al., 2016; Shen et al., 2016) amongst others. The dominant approach to date encodes the input sequence with a series of bi-directional recurrent neural networks (RNN) and generates a variable length output with another set of decoder RNNs, both of which interface via a soft-attention mechanism (Bahdanau et al., 2014; Luong et al., 2015). In machine translation, this architecture has been demonstrated to outperform traditional phrase-based models by large margins (Sennrich et al., 2016b; Zhou et al., 2016; Wu et al., 2016; §2).
序列到序列学习已在机器翻译、语音识别(Sutskever 等,2014;Chorowski 等,2015)和文本摘要(Rush 等,2015;Nallapati 等,2016;Shen 等,2016)等许多任务上取得成功。目前的主流做法是用一组双向循环神经网络(RNN)编码输入序列,再用另一组解码器 RNN 生成变长输出,两者通过软注意力机制衔接(Bahdanau 等,2014;Luong 等,2015)。在机器翻译中,这种结构已被证明大幅超过传统短语模型(Sennrich 等,2016b;Zhou 等,2016;Wu 等,2016;§2)。
Convolutional neural networks are less common for sequence modeling, despite several advantages (Waibel et al., 1989; LeCun & Bengio, 1995). Compared to recurrent layers, convolutions create representations for fixed size contexts, however, the effective context size of the network can easily be made larger by stacking several layers on top of each other. This allows to precisely control the maximum length of dependencies to be modeled. Convolutional networks do not depend on the computations of the previous time step and therefore allow parallelization over every element in a sequence. This contrasts with RNNs which maintain a hidden state of the entire past that prevents parallel computation within a sequence.
尽管有若干优点,卷积神经网络在序列建模中并不那么常见(Waibel 等,1989;LeCun 与 Bengio,1995)。与循环层相比,卷积为固定大小的上下文建立表示,但只要把若干层叠起来,网络的有效上下文就可以变大,从而精确控制所要建模的最长依赖。卷积网络不依赖前一时刻的计算结果,因此可以在序列的每个位置上并行。这与 RNN 不同:RNN 要维持整个过去的隐状态,因而无法在同一序列内部并行计算。
Multi-layer convolutional neural networks create hierarchical representations over the input sequence in which nearby input elements interact at lower layers while distant elements interact at higher layers. Hierarchical structure provides a shorter path to capture long-range dependencies compared to the chain structure modeled by recurrent networks, e.g. we can obtain a feature representation capturing relationships within a window of (n) words by applying only (O(n/k)) convolutional operations for kernels of width (k), compared to a linear number (O(n)) for recurrent neural networks. Inputs to a convolutional network are fed through a constant number of kernels and non-linearities, whereas recurrent networks apply up to (n) operations and non-linearities to the first word and only a single set of operations to the last word. Fixing the number of non-linearities applied to the inputs also eases learning.
多层卷积神经网络在输入序列上建立层次化表示:邻近的输入在较低层交互,较远的输入在较高层交互。与循环网络所建模的链式结构相比,这种层次结构为捕捉长程依赖提供了更短的路径。例如,对于宽度为 (k) 的卷积核,只需 (O(n/k)) 次卷积就能得到覆盖 (n) 个词窗口内关系的特征表示,而循环网络需要线性的 (O(n)) 次运算。卷积网络的输入会经过固定次数的卷积核和非线性,而循环网络会对第一个词施加多达 (n) 次运算和非线性,对最后一个词却只施加一组运算。把施加在输入上的非线性次数固定下来,也有利于学习。
Recent work has applied convolutional neural networks to sequence modeling such as Bradbury et al. (2016) who introduce recurrent pooling between a succession of convolutional layers or Kalchbrenner et al. (2016) who tackle neural translation without attention. However, none of these approaches has been demonstrated improvements over state of the art results on large benchmark datasets. Gated convolutions have been previously explored for machine translation by Meng et al. (2015) but their evaluation was restricted to a small dataset and the model was used in tandem with a traditional count-based model. Architectures which are partially convolutional have shown strong performance on larger tasks but their decoder is still recurrent (Gehring et al., 2016).
近期已有工作把卷积神经网络用于序列建模,例如 Bradbury 等(2016)在连续的卷积层之间引入循环池化,Kalchbrenner 等(2016)则在不使用注意力的情况下做神经翻译。不过,这些方法都还没有在大型基准数据集上显示出对当时最优结果的改进。Meng 等(2015)也曾把门控卷积用于机器翻译,但评测局限在较小的数据集上,并且模型是与传统计数模型一起使用的。部分卷积的结构在更大规模任务上表现很好,但其解码器仍是循环的(Gehring 等,2016)。
In this paper we propose an architecture for sequence to sequence modeling that is entirely convolutional. Our model is equipped with gated linear units (Dauphin et al., 2016) and residual connections (He et al., 2015a). We also use attention in every decoder layer and demonstrate that each attention layer only adds a negligible amount of overhead. The combination of these choices enables us to tackle large scale problems (§3).
本文提出一种完全卷积的序列到序列结构。模型配备了门控线性单元(Dauphin 等,2016)和残差连接(He 等,2015a)。我们还在每一层解码器中使用注意力,并表明每一层注意力只增加可以忽略的开销。这些选择合在一起,使我们能够处理大规模问题(§3)。
We evaluate our approach on several large datasets for machine translation as well as summarization and compare to the current best architectures reported in the literature. On WMT'16 English-Romanian translation we achieve a new state of the art, outperforming the previous best result by 1.9 BLEU. On WMT'14 English-German we outperform the strong LSTM setup of Wu et al. (2016) by 0.5 BLEU and on WMT'14 English-French we outperform the likelihood trained system of Wu et al. (2016) by 1.6 BLEU. Furthermore, our model can translate unseen sentences at an order of magnitude faster speed than Wu et al. (2016) on GPU and CPU hardware (§4, §5).
我们在若干大规模机器翻译数据集以及摘要任务上评测该方法,并与文献中当时最好的结构比较。在 WMT'16 英语–罗马尼亚语翻译上,我们达到新的最高水平,比此前最好结果高 1.9 BLEU。在 WMT'14 英德上,我们比 Wu 等(2016)的强 LSTM 设置高 0.5 BLEU;在 WMT'14 英法上,比 Wu 等(2016)用似然训练的系统高 1.6 BLEU。此外,在 GPU 和 CPU 上,我们的模型翻译未见过的句子,速度比 Wu 等(2016)大约快一个数量级(§4,§5)。
- Recurrent Sequence to Sequence Learning
- 循环序列到序列学习
Sequence to sequence modeling has been synonymous with recurrent neural network based encoder-decoder architectures (Sutskever et al., 2014; Bahdanau et al., 2014). The encoder RNN processes an input sequence (x = (x_1,\ldots,x_m)) of (m) elements and returns state representations (z = (z_1,\ldots,z_m)). The decoder RNN takes (z) and generates the output sequence (y=(y_1,\ldots,y_n)) left to right, one element at a time. To generate output (y_{i+1}), the decoder computes a new hidden state (h_{i+1}) based on the previous state (h_i), an embedding (g_i) of the previous target language word (y_i), as well as a conditional input (c_i) derived from the encoder output (z). Based on this generic formulation, various encoder-decoder architectures have been proposed, which differ mainly in the conditional input and the type of RNN.
序列到序列建模几乎就等于基于循环神经网络的编码器–解码器结构(Sutskever 等,2014;Bahdanau 等,2014)。编码器 RNN 处理长度为 (m) 的输入序列 (x = (x_1,\ldots,x_m)),并返回状态表示 (z = (z_1,\ldots,z_m))。解码器 RNN 接受 (z),从左到右一次生成一个元素,得到输出序列 (y=(y_1,\ldots,y_n))。为了生成 (y_{i+1}),解码器根据前一状态 (h_i)、上一目标词 (y_i) 的嵌入 (g_i),以及由编码器输出 (z) 得到的条件输入 (c_i),计算新的隐状态 (h_{i+1})。在这一通用表述下,已有多种编码器–解码器结构被提出,主要差别在于条件输入和所用 RNN 的类型。
Models without attention consider only the final encoder state (z_m) by setting (c_i=z_m) for all (i) (Cho et al., 2014), or simply initialize the first decoder state with (z_m) (Sutskever et al., 2014), in which case (c_i) is not used. Architectures with attention (Bahdanau et al., 2014; Luong et al., 2015) compute (c_i) as a weighted sum of ((z_1,\ldots,z_m)) at each time step. The weights of the sum are referred to as attention scores and allow the network to focus on different parts of the input sequence as it generates the output sequences. Attention scores are computed by essentially comparing each encoder state (z_j) to a combination of the previous decoder state (h_i) and the last prediction (y_i); the result is normalized to be a distribution over input elements.
不做注意力的模型只使用编码器的最后状态 (z_m),对所有 (i) 令 (c_i=z_m)(Cho 等,2014),或者只用 (z_m) 初始化解码器的第一个状态(Sutskever 等,2014),这时并不使用 (c_i)。带注意力的结构(Bahdanau 等,2014;Luong 等,2015)在每个时间步把 (c_i) 算成 ((z_1,\ldots,z_m)) 的加权和。这些权重称作注意力分数,使网络在生成输出时可以关注输入序列的不同部分。注意力分数本质上是把每个编码器状态 (z_j) 与前一解码器状态 (h_i) 以及上一预测 (y_i) 的组合加以比较,再归一化成输入元素上的分布。
Popular choices for recurrent networks in encoder-decoder models are long short term memory networks (LSTM; Hochreiter & Schmidhuber, 1997) and gated recurrent units (GRU; Cho et al., 2014). Both extend Elman RNNs (Elman, 1990) with a gating mechanism that allows the memorization of information from previous time steps in order to model long-term dependencies. Most recent approaches also rely on bi-directional encoders to build representations of both past and future contexts (Bahdanau et al., 2014; Zhou et al., 2016; Wu et al., 2016). Models with many layers often rely on shortcut or residual connections (He et al., 2015a; Zhou et al., 2016; Wu et al., 2016).
编码器–解码器模型中常用的循环网络是长短期记忆网络(LSTM;Hochreiter 与 Schmidhuber,1997)和门控循环单元(GRU;Cho 等,2014)。二者都在 Elman RNN(Elman,1990)上加入门控,以便记住先前时间步的信息,从而建模长期依赖。近期大多数方法还使用双向编码器,以同时建立过去和未来上下文的表示(Bahdanau 等,2014;Zhou 等,2016;Wu 等,2016)。层数较多的模型常常依靠捷径或残差连接(He 等,2015a;Zhou 等,2016;Wu 等,2016)。
- A Convolutional Architecture
- 一种卷积结构
Next we introduce a fully convolutional architecture for sequence to sequence modeling. Instead of relying on RNNs to compute intermediate encoder states (z) and decoder states (h) we use convolutional neural networks (CNN).
下面我们介绍一种用于序列到序列建模的全卷积结构。我们不再依靠 RNN 来计算中间的编码器状态 (z) 和解码器状态 (h),而是使用卷积神经网络(CNN)。
3.1. Position Embeddings
3.1. 位置嵌入
First, we embed input elements (x=(x_1,\ldots,x_m)) in distributional space as (w = (w_1,\ldots,w_m)), where (w_j \in \mathbb{R}^f) is a column in an embedding matrix (D \in \mathbb{R}^{V imes f}). We also equip our model with a sense of order by embedding the absolute position of input elements (p=(p_1,\ldots,p_m)) where (p_j \in \mathbb{R}^f). Both are combined to obtain input element representations (e=(w_1+p_1,\ldots,w_m+p_m)). We proceed similarly for output elements that were already generated by the decoder network to yield output element representations that are being fed back into the decoder network (g=(g_1,\ldots,g_n)). Position embeddings are useful in our architecture since they give our model a sense of which portion of the sequence in the input or output it is currently dealing with (§5.4).
首先,我们把输入元素 (x=(x_1,\ldots,x_m)) 嵌入到分布语义空间,得到 (w = (w_1,\ldots,w_m)),其中 (w_j \in \mathbb{R}^f) 是嵌入矩阵 (D \in \mathbb{R}^{V imes f}) 中的一列。为了让模型具有顺序信息,我们还对输入元素的绝对位置做嵌入 (p=(p_1,\ldots,p_m)),其中 (p_j \in \mathbb{R}^f)。二者相加,得到输入元素表示 (e=(w_1+p_1,\ldots,w_m+p_m))。对解码器已经生成的输出元素,我们用同样的方式得到反馈给解码器的输出元素表示 (g=(g_1,\ldots,g_n))。位置嵌入在我们的结构中是有用的,因为它让模型知道当前处理的是输入或输出序列中的哪一段(§5.4)。
3.2. Convolutional Block Structure
3.2. 卷积块结构
Both encoder and decoder networks share a simple block structure that computes intermediate states based on a fixed number of input elements. We denote the output of the (l)-th block as (h^l = (h^l_1,\ldots,h^l_n)) for the decoder network, and (z^l = (z^l_1,\ldots,z^l_m)) for the encoder network; we refer to blocks and layers interchangeably. Each block contains a one dimensional convolution followed by a non-linearity. For a decoder network with a single block and kernel width (k), each resulting state (h^1_i) contains information over (k) input elements. Stacking several blocks on top of each other increases the number of input elements represented in a state. For instance, stacking 6 blocks with (k=5) results in an input field of 25 elements, i.e. each output depends on 25 inputs. Non-linearities allow the networks to exploit the full input field, or to focus on fewer elements if needed.
编码器和解码器共用一种简单的块结构,根据固定数量的输入元素计算中间状态。我们把第 (l) 个块的输出记为:解码器是 (h^l = (h^l_1,\ldots,h^l_n)),编码器是 (z^l = (z^l_1,\ldots,z^l_m));块和层在文中可以互换使用。每个块包含一维卷积,后接非线性。对于只有一个块、核宽为 (k) 的解码器,每个得到的状态 (h^1_i) 包含 (k) 个输入元素的信息。把若干块叠起来,会增加一个状态所覆盖的输入元素数目。例如,叠 6 个 (k=5) 的块,感受野是 25 个元素,也就是每个输出依赖于 25 个输入。非线性使网络既可以利用整个感受野,也可以在需要时只关注更少的元素。
Each convolution kernel is parameterized as (W \in \mathbb{R}^{2d imes kd}), (b_w \in \mathbb{R}^{2d}) and takes as input (X \in \mathbb{R}^{k imes d}) which is a concatenation of (k) input elements embedded in (d) dimensions and maps them to a single output element (Y \in \mathbb{R}^{2d}) that has twice the dimensionality of the input elements; subsequent layers operate over the (k) output elements of the previous layer. We choose gated linear units (GLU; Dauphin et al., 2016) as non-linearity which implement a simple gating mechanism over the output of the convolution (Y = [A\ B] \in \mathbb{R}^{2d}):
[
v([A\ B]) = A \otimes \sigma(B)
]
where (A,B \in \mathbb{R}^d) are the inputs to the non-linearity, (\otimes) is the point-wise multiplication and the output (v([A\ B]) \in \mathbb{R}^d) is half the size of (Y). The gates (\sigma(B)) control which inputs (A) of the current context are relevant. A similar non-linearity has been introduced in Oord et al. (2016b) who apply ( anh) to (A) but Dauphin et al. (2016) shows that GLUs perform better in the context of language modelling.
每个卷积核的参数为 (W \in \mathbb{R}^{2d imes kd}),(b_w \in \mathbb{R}^{2d}),输入是 (X \in \mathbb{R}^{k imes d}),即 (k) 个 (d) 维嵌入输入元素的拼接,并映射成单个输出元素 (Y \in \mathbb{R}^{2d}),其维度是输入元素的两倍;后续层在上一层的 (k) 个输出元素上运算。我们选用门控线性单元(GLU;Dauphin 等,2016)作为非线性,它在卷积输出 (Y = [A\ B] \in \mathbb{R}^{2d}) 上实现一种简单的门控:
[
v([A\ B]) = A \otimes \sigma(B)
]
其中 (A,B \in \mathbb{R}^d) 是非线性的输入,(\otimes) 是逐点乘法,输出 (v([A\ B]) \in \mathbb{R}^d) 的大小是 (Y) 的一半。门 (\sigma(B)) 控制当前上下文中哪些输入 (A) 是相关的。Oord 等(2016b)提出过类似的非线性,只是对 (A) 使用了 ( anh);但 Dauphin 等(2016)表明,在语言建模中 GLU 表现更好。
To enable deep convolutional networks, we add residual connections from the input of each convolution to the output of the block (He et al., 2015a).
[
h^l_i = v\left(W^l \left[h^{l-1}{i-k/2},\ldots,h^{l-1}{i+k/2}
ight] + b^l_w
ight) + h^{l-1}_i
]
为了训练更深的卷积网络,我们在每个卷积的输入与该块的输出之间加入残差连接(He 等,2015a)。
[
h^l_i = v\left(W^l \left[h^{l-1}{i-k/2},\ldots,h^{l-1}{i+k/2}
ight] + b^l_w
ight) + h^{l-1}_i
]
For encoder networks we ensure that the output of the convolutional layers matches the input length by padding the input at each layer. However, for decoder networks we have to take care that no future information is available to the decoder (Oord et al., 2016a). Specifically, we pad the input by (k-1) elements on both the left and right side by zero vectors, and then remove (k) elements from the end of the convolution output.
对编码器,我们在每一层对输入做填充,使卷积层的输出长度与输入一致。对解码器则必须保证它看不到未来信息(Oord 等,2016a)。具体做法是:在输入的左右两侧各用零向量填充 (k-1) 个元素,再从卷积输出的末端去掉 (k) 个元素。
We also add linear mappings to project between the embedding size (f) and the convolution outputs that are of size (2d). We apply such a transform to (w) when feeding embeddings to the encoder network, to the encoder output (z^u_j), to the final layer of the decoder just before the softmax (h^L), and to all decoder layers (h^l) before computing attention scores (1).
我们还加入线性映射,以便在嵌入维 (f) 与大小为 (2d) 的卷积输出之间投影。在把嵌入送入编码器时对 (w) 做这一变换,也对编码器输出 (z^u_j)、解码器在 softmax 之前的最后一层 (h^L),以及计算注意力分数(1)之前的所有解码器层 (h^l) 做这一变换。
Finally, we compute a distribution over the (T) possible next target elements (y_{i+1}) by transforming the top decoder output (h^L_i) via a linear layer with weights (W_o) and bias (b_o):
[
p(y_{i+1} \mid y_1,\ldots,y_i,\mathbf{x}) = \mathrm{softmax}(W_o h^L_i + b_o) \in \mathbb{R}^T
]
最后,我们用带权重 (W_o) 和偏置 (b_o) 的线性层变换顶层解码器输出 (h^L_i),得到下一个目标元素 (y_{i+1}) 在 (T) 个可能取值上的分布:
[
p(y_{i+1} \mid y_1,\ldots,y_i,\mathbf{x}) = \mathrm{softmax}(W_o h^L_i + b_o) \in \mathbb{R}^T
]
3.3. Multi-step Attention
3.3. 多步注意力
We introduce a separate attention mechanism for each decoder layer. To compute the attention, we combine the current decoder state (h^l_i) with an embedding of the previous target element (g_i):
[
d^l_i = W^l_d h^l_i + b^l_d + g_i \qquad (1)
]
我们为每一层解码器引入单独的注意力机制。计算注意力时,把当前解码器状态 (h^l_i) 与上一目标元素的嵌入 (g_i) 组合起来:
[
d^l_i = W^l_d h^l_i + b^l_d + g_i \qquad (1)
]
For decoder layer (l) the attention (a^l_{ij}) of state (i) and source element (j) is computed as a dot-product between the decoder state summary (d^l_i) and each output (z^u_j) of the last encoder block (u):
[
a^l_{ij} = rac{\exp(d^l_i \cdot z^u_j)}{\sum_{t=1}^{m} \exp(d^l_i \cdot z^u_t)}
]
对解码器第 (l) 层,状态 (i) 与源端元素 (j) 的注意力 (a^l_{ij}) 由解码器状态摘要 (d^l_i) 与最后一层编码器块 (u) 的每个输出 (z^u_j) 的点积得到:
[
a^l_{ij} = rac{\exp(d^l_i \cdot z^u_j)}{\sum_{t=1}^{m} \exp(d^l_i \cdot z^u_t)}
]
The conditional input (c^l_i) to the current decoder layer is a weighted sum of the encoder outputs as well as the input element embeddings (e_j) (Figure 1, center right):
[
c^l_i = \sum_{j=1}^{m} a^l_{ij}(z^u_j + e_j) \qquad (2)
]
当前解码器层的条件输入 (c^l_i) 是编码器输出以及输入元素嵌入 (e_j) 的加权和(图 1,中右):
[
c^l_i = \sum_{j=1}^{m} a^l_{ij}(z^u_j + e_j) \qquad (2)
]
Figure 1. Illustration of batching during training. The English source sentence is encoded (top) and we compute all attention values for the four German target words (center) simultaneously. Our attentions are just dot products between decoder context representations (bottom left) and encoder representations. We add the conditional inputs computed by the attention (center right) to the decoder states which then predict the target words (bottom right). The sigmoid and multiplicative boxes illustrate Gated Linear Units.
图 1. 训练时批处理的示意图。英语源句在上方被编码,我们同时计算四个德语目标词的全部注意力值(中部)。注意力就是解码器上下文表示(左下)与编码器表示之间的点积。我们把注意力算出的条件输入(中右)加到解码器状态上,再预测目标词(右下)。sigmoid 与乘法框表示门控线性单元。
This is slightly different to recurrent approaches which compute both the attention and the weighted sum over (z^u_j) only. We found adding (e_j) to be beneficial and it resembles key-value memory networks where the keys are the (z^u_j) and the values are the (z^u_j + e_j) (Miller et al., 2016). Encoder outputs (z^u_j) represent potentially large input contexts and (e_j) provides point information about a specific input element that is useful when making a prediction. Once (c^l_i) has been computed, it is simply added to the output of the corresponding decoder layer (h^l_i).
这与循环方法略有不同,后者的注意力和加权和都只在 (z^u_j) 上计算。我们发现加上 (e_j) 是有益的,这也类似于键–值记忆网络:键是 (z^u_j),值是 (z^u_j + e_j)(Miller 等,2016)。编码器输出 (z^u_j) 表示可能较大的输入上下文,而 (e_j) 提供关于特定输入元素的点信息,在做预测时有用。算出 (c^l_i) 之后,直接加到相应解码器层的输出 (h^l_i) 上。
This can be seen as attention with multiple 'hops' (Sukhbaatar et al., 2015) compared to single step attention (Bahdanau et al., 2014; Luong et al., 2015; Zhou et al., 2016; Wu et al., 2016). In particular, the attention of the first layer determines a useful source context which is then fed to the second layer that takes this information into account when computing attention etc. The decoder also has immediate access to the attention history of the (k-1) previous time steps because the conditional inputs (c^{l-1}{i-k},\ldots,c^{l-1}{i}) are part of (h^{l-1}{i-k},\ldots,h^{l-1}{i}) which are input to (h^l_i). This makes it easier for the model to take into account which previous inputs have been attended to already compared to recurrent nets where this information is in the recurrent state and needs to survive several non-linearities. Overall, our attention mechanism considers which words we previously attended to (Yang et al., 2016) and performs multiple attention 'hops' per time step. In Appendix §C, we plot attention scores for a deep decoder and show that at different layers, different portions of the source are attended to.
与单步注意力(Bahdanau 等,2014;Luong 等,2015;Zhou 等,2016;Wu 等,2016)相比,这可以看成带有多次“跳跃”的注意力(Sukhbaatar 等,2015)。具体而言,第一层的注意力先确定有用的源端上下文,再送给第二层,后者在计算注意力时会把这一信息考虑进去,依此类推。解码器还能直接看到前 (k-1) 个时间步的注意力历史,因为条件输入 (c^{l-1}{i-k},\ldots,c^{l-1}{i}) 是 (h^{l-1}{i-k},\ldots,h^{l-1}{i}) 的一部分,而这些又是 (h^l_i) 的输入。与循环网络相比,模型因此更容易考虑哪些先前输入已经被关注过——在循环网络里,这些信息存在循环状态中,还要穿过若干次非线性。总的来说,我们的注意力机制会考虑先前关注过哪些词(Yang 等,2016),并在每个时间步做多次注意力“跳跃”。在附录 §C 中,我们画出深层解码器的注意力分数,并表明不同层会关注源端的不同部分。
Our convolutional architecture also allows to batch the attention computation across all elements of a sequence compared to RNNs (Figure 1, middle). We batch the computations of each decoder layer individually.
与 RNN 相比,我们的卷积结构还可以把注意力计算在序列的所有元素上一起做批处理(图 1,中部)。我们对每一层解码器分别做批处理。
3.4. Normalization Strategy
3.4. 归一化策略
We stabilize learning through careful weight initialization (§3.5) and by scaling parts of the network to ensure that the variance throughout the network does not change dramatically. In particular, we scale the output of residual blocks as well as the attention to preserve the variance of activations. We multiply the sum of the input and output of a residual block by (\sqrt{0.5}) to halve the variance of the sum. This assumes that both summands have the same variance which is not always true but effective in practice.
我们通过仔细的权重初始化(§3.5),以及缩放网络中的部分计算,来稳定学习,使网络各处的方差不会剧烈变化。具体来说,我们对残差块的输出以及注意力做缩放,以保持激活的方差。残差块的输入与输出之和会乘以 (\sqrt{0.5}),使该和的方差减半。这假设两项具有相同方差,这一假设并不总成立,但在实践中有效。
The conditional input (c^l_i) generated by the attention is a weighted sum of (m) vectors (2) and we counteract a change in variance through scaling by (m\sqrt{1/m}); we multiply by (m) to scale up the inputs to their original size, assuming the attention scores are uniformly distributed. This is generally not the case but we found it to work well in practice.
注意力产生的条件输入 (c^l_i) 是 (m) 个向量的加权和(2),我们用 (m\sqrt{1/m}) 做缩放以抵消方差变化;乘以 (m) 是为了在注意力分数均匀分布的假设下,把输入放大回原来的尺度。这一假设通常并不成立,但我们发现在实践中效果很好。
For convolutional decoders with multiple attention, we scale the gradients for the encoder layers by the number of attention mechanisms we use; we exclude source word embeddings. We found this to stabilize learning since the encoder received too much gradient otherwise.
对于带有多层注意力的卷积解码器,我们按所用注意力机制的数目来缩放编码器各层的梯度;源端词嵌入不在此列。我们发现这样可以稳定学习,否则编码器会收到过多梯度。
3.5. Initialization
3.5. 初始化
Normalizing activations when adding the output of different layers, e.g. residual connections, requires careful weight initialization. The motivation for our initialization is the same as for the normalization: maintain the variance of activations throughout the forward and backward passes. All embeddings are initialized from a normal distribution with mean 0 and standard deviation 0.1. For layers whose output is not directly fed to a gated linear unit, we initialize weights from (\mathcal{N}(0, \sqrt{1/n_l})) where (n_l) is the number of input connections to each neuron. This ensures that the variance of a normally distributed input is retained.
在把不同层的输出相加时(例如残差连接)对激活做归一化,需要仔细初始化权重。我们初始化的动机与归一化相同:在前向和反向传播中保持激活的方差。所有嵌入都从均值为 0、标准差为 0.1 的正态分布初始化。对于输出不直接送入门控线性单元的层,权重从 (\mathcal{N}(0, \sqrt{1/n_l})) 初始化,其中 (n_l) 是每个神经元的输入连接数。这样可以保持正态分布输入的方差。
For layers which are followed by a GLU activation, we propose a weight initialization scheme by adapting the derivations in (He et al., 2015b; Glorot & Bengio, 2010; Appendix A). If the GLU inputs are distributed with mean 0 and have sufficiently small variance, then we can approximate the output variance with (1/4) of the input variance (Appendix A.1). Hence, we initialize the weights so that the input to the GLU activations have 4 times the variance of the layer input. This is achieved by drawing their initial values from (\mathcal{N}(0, \sqrt{4/n_l})). Biases are uniformly set to zero when the network is constructed.
对于后面接 GLU 激活的层,我们在(He 等,2015b;Glorot 与 Bengio,2010;附录 A)中的推导基础上提出一种权重初始化方案。若 GLU 的输入均值为 0 且方差足够小,则输出方差可近似为输入方差的 (1/4)(附录 A.1)。因此,我们初始化权重,使 GLU 激活的输入方差为该层输入方差的 4 倍。做法是从 (\mathcal{N}(0, \sqrt{4/n_l})) 中抽取初值。构建网络时,偏置一律设为零。
We apply dropout to the input of some layers so that inputs are retained with a probability of (p). This can be seen as multiplication with a Bernoulli random variable taking value (1/p) with probability (p) and 0 otherwise (Srivastava et al., 2014). The application of dropout will then cause the variance to be scaled by (1/p). We aim to restore the incoming variance by initializing the respective layers with larger weights. Specifically, we use (\mathcal{N}(0, \sqrt{4p/n_l})) for layers whose output is subject to a GLU and (\mathcal{N}(0, \sqrt{p/n_l})) otherwise (Appendix A.3).
我们对某些层的输入使用 dropout,使输入以概率 (p) 被保留。这可以看成与一个伯努利随机变量相乘,该变量以概率 (p) 取值 (1/p),否则为 0(Srivastava 等,2014)。使用 dropout 后,方差会被缩放到原来的 (1/p)。为了恢复输入方差,我们对相应层使用更大的初始权重。具体来说,输出要经过 GLU 的层使用 (\mathcal{N}(0, \sqrt{4p/n_l})),其余层使用 (\mathcal{N}(0, \sqrt{p/n_l}))(附录 A.3)。
- Experimental Setup
- 实验设置
4.1. Datasets
4.1. 数据集
WMT'16 English-Romanian. We use the same data and pre-processing as Sennrich et al. (2016b) but remove sentences with more than 175 words. This results in 2.8M sentence pairs for training and we evaluate on newstest2016. We experiment with word-based models using a source vocabulary of 200K types and a target vocabulary of 80K types. We also consider a joint source and target byte-pair encoding (BPE) with 40K types (Sennrich et al., 2016a;b).
WMT'16 英语–罗马尼亚语。我们使用与 Sennrich 等(2016b)相同的数据和预处理,但去掉超过 175 个词的句子。训练集约有 280 万句对,评测在 newstest2016 上进行。我们试验了词级模型,源端词表 20 万类、目标端 8 万类;也考虑了源端与目标端共享、规模为 4 万类的字节对编码(BPE)(Sennrich 等,2016a;b)。
We followed the pre-processing of https://github.com/rsennrich/wmt16-scripts/blob/80e21e5/sample/preprocess.sh and added the back-translated data from http://data.statmt.org/rsennrich/wmt16_backtranslations/en-ro.
WMT'14 English-German. We use the same setup as Luong et al. (2015) which comprises 4.5M sentence pairs for training and we test on newstest2014. As vocabulary we use 40K sub-word types based on BPE.
WMT'14 英语–德语。我们采用与 Luong 等(2015)相同的设置,训练集约有 450 万句对,测试集为 newstest2014。词表使用基于 BPE 的 4 万个子词类型。
WMT'14 English-French. We use the full training set of 36M sentence pairs, and remove sentences longer than 175 words as well as pairs with a source/target length ratio exceeding 1.5. This results in 35.5M sentence-pairs for training. Results are reported on newstest2014. We use a source and target vocabulary with 40K BPE types.
WMT'14 英语–法语。我们使用全部 3600 万句对的训练集,去掉超过 175 个词的句子,以及源/目标长度比超过 1.5 的句对,最终用于训练的句对约为 3550 万。结果在 newstest2014 上报告。源端和目标端词表各为 4 万个 BPE 类型。
In all setups a small subset of the training data serves as validation set (about 0.5-1%) for early stopping and learning rate annealing.
在所有设置中,我们都从训练数据中划出一小部分(约 0.5%–1%)作为验证集,用于早停和学习率退火。
Abstractive summarization. We train on the Gigaword corpus (Graff et al., 2003) and pre-process it identically to Rush et al. (2015) resulting in 3.8M training examples and 190K for validation. We evaluate on the DUC-2004 test data comprising 500 article-title pairs (Over et al., 2007) and report recall-based ROUGE (Lin, 2004). We also evaluate on the Gigaword test set of Rush et al. (2015) and report F1 ROUGE similar to prior work. Similar to Shen et al. (2016) we use a source and target vocabulary of 30K words and require outputs to be at least 14 words long.
抽象摘要。我们在 Gigaword 语料(Graff 等,2003)上训练,预处理与 Rush 等(2015)相同,得到 380 万条训练样本和 19 万条验证样本。评测使用包含 500 对文章–标题的 DUC-2004 测试数据(Over 等,2007),报告基于召回的 ROUGE(Lin,2004)。我们也在 Rush 等(2015)的 Gigaword 测试集上评测,并与先前工作一样报告 F1 ROUGE。与 Shen 等(2016)类似,源端和目标端词表各为 3 万词,并要求输出至少 14 个词。
4.2. Model Parameters and Optimization
4.2. 模型参数与优化
We use 512 hidden units for both encoders and decoders, unless otherwise stated. All embeddings, including the output produced by the decoder before the final linear layer, have dimensionality 512; we use the same dimensionalities for linear layers mapping between the hidden and embedding sizes (§3.2).
除非另有说明,编码器和解码器都使用 512 个隐单元。所有嵌入,包括解码器在最后线性层之前的输出,维度都是 512;在隐层大小与嵌入大小之间做映射的线性层也使用相同的维度(§3.2)。
We train our convolutional models with Nesterov's accelerated gradient (Sutskever et al., 2013) using a momentum value of 0.99 and renormalize gradients if their norm exceeds 0.1 (Pascanu et al., 2013). We use a learning rate of 0.25 and once the validation perplexity stops improving, we reduce the learning rate by an order of magnitude after each epoch until it falls below (10^{-4}).
我们用 Nesterov 加速梯度(Sutskever 等,2013)训练卷积模型,动量取 0.99;若梯度范数超过 0.1,则重新归一化梯度(Pascanu 等,2013)。学习率取 0.25;一旦验证集困惑度不再下降,就在每个 epoch 之后把学习率降低一个数量级,直到低于 (10^{-4})。
Unless otherwise stated, we use mini-batches of 64 sentences. We restrict the maximum number of words in a mini-batch to make sure that batches with long sentences still fit in GPU memory. If the threshold is exceeded, we simply split the batch until the threshold is met and process the parts separately. Gradients are normalized by the number of non-padding tokens per mini-batch. We also use weight normalization for all layers except for lookup tables (Salimans & Kingma, 2016).
除非另有说明,小批量大小为 64 句。我们限制一个小批量中的最大词数,使含有长句的批次仍能放入 GPU 内存。若超过阈值,就把该批再拆开,直到满足阈值,并分开处理各部分。梯度按每个小批量中非填充标记的数目归一化。除查找表外,所有层还使用权重归一化(Salimans 与 Kingma,2016)。
Besides dropout on the embeddings and the decoder output, we also apply dropout to the input of the convolutional blocks (Srivastava et al., 2014). All models are implemented in Torch (Collobert et al., 2011) and trained on a single Nvidia M40 GPU except for WMT'14 English-French for which we use a multi-GPU setup on a single machine. We train on up to eight GPUs synchronously by maintaining copies of the model on each card and split the batch so that each worker computes 1/8-th of the gradients; at the end we sum the gradients via Nvidia NCCL.
除了对嵌入和解码器输出使用 dropout,我们还对卷积块的输入使用 dropout(Srivastava 等,2014)。所有模型均在 Torch 中实现(Collobert 等,2011),并在单块 Nvidia M40 GPU 上训练;WMT'14 英法则在一台机器上使用多 GPU。我们最多在 8 块 GPU 上同步训练:每张卡保留一份模型副本,并把批次拆开,使每个工作进程计算 1/8 的梯度,最后通过 Nvidia NCCL 把梯度相加。
4.3. Evaluation
4.3. 评测
We report average results over three runs of each model, where each differs only in the initial random seed. Translations are generated by a beam search and we normalize log-likelihood scores by sentence length. We use a beam of width 5. For WMT'14 English-German we tune a length normalization constant on a separate development set (newstest2015) and we normalize the log-likelihoods of the final hypotheses in beam search by their length (|y'|^lpha) (Wu et al., 2016). On other datasets we did not find any benefit with length normalization.
我们报告每个模型三次运行的平均结果,三次运行只是初始随机种子不同。翻译由束搜索生成,对数似然按句长归一化。束宽为 5。对 WMT'14 英德,我们在单独的开发集(newstest2015)上调节长度归一化常数,并在束搜索中按长度 (|y'|^lpha) 归一化最终假设的对数似然(Wu 等,2016)。在其他数据集上,长度归一化没有带来好处。
For word-based models, we replace unknown words after generation by looking up the source word with the maximum attention score in a pre-computed dictionary (Jean et al., 2015). Dictionaries were extracted from the word aligned training data that we obtained with fast_align (Dyer et al., 2013). In our multi-step attention (§3.3) we simply average the attention scores over all layers. Finally, we compute case-sensitive tokenized BLEU, except for WMT'16 English-Romanian where we use detokenized BLEU to be comparable with Sennrich et al. (2016b).
对于词级模型,生成之后我们用注意力最大的源词在预先计算的词典中查找,以替换未知词(Jean 等,2015)。词典是从用 fast_align(Dyer 等,2013)得到的词对齐训练数据中抽取的。在多步注意力(§3.3)中,我们简单地对各层注意力分数取平均。最后,我们计算区分大小写的分词 BLEU;WMT'16 英语–罗马尼亚语则使用去分词的 BLEU,以便与 Sennrich 等(2016b)比较。
- Results
- 结果
5.1. Recurrent vs. Convolutional Models
5.1. 循环模型与卷积模型
We first evaluate our convolutional model on three translation tasks. On WMT'16 English-Romanian translation we compare to Sennrich et al. (2016b) which is the winning entry on this language pair at WMT'16 (Bojar et al., 2016). Their model implements the attention-based sequence to sequence architecture of Bahdanau et al. (2014) and uses GRU cells both in the encoder and decoder. We test both word-based and BPE vocabularies (§4). Table 1 shows that our fully convolutional sequence to sequence model (ConvS2S) outperforms the WMT'16 winning entry for English-Romanian by 1.9 BLEU with a BPE encoding and by 1.3 BLEU with a word factored vocabulary. This instance of our architecture has 20 layes in the encoder and 20 layers in the decoder, both using kernels of width 3 and hidden size 512 throughout. Training took between 6 and 7.5 days on a single GPU.
我们首先在三项翻译任务上评测卷积模型。在 WMT'16 英语–罗马尼亚语翻译上,我们与 Sennrich 等(2016b)比较,该系统是 WMT'16 这一语对的优胜系统(Bojar 等,2016)。他们的模型实现了 Bahdanau 等(2014)基于注意力的序列到序列结构,编码器和解码器都使用 GRU 单元。我们同时试验了词级词表和 BPE 词表(§4)。表 1 表明,我们的全卷积序列到序列模型(ConvS2S)在使用 BPE 编码时比这一 WMT'16 优胜系统高 1.9 BLEU,在使用词级词表时高 1.3 BLEU。这一结构实例的编码器有 20 层,解码器也有 20 层,核宽均为 3,隐层大小始终为 512。在单块 GPU 上训练用了 6 到 7.5 天。
On WMT'14 English to German translation we compare to the following prior work: Luong et al. (2015) is based on a four layer LSTM attention model, ByteNet (Kalchbrenner et al., 2016) propose a convolutional model based on characters without attention, with 30 layers in the encoder and 30 layers in the decoder, GNMT (Wu et al., 2016) represents the state of the art on this dataset and they use eight encoder LSTMs as well as eight decoder LSTMs, we quote their result for a word-based model, such as ours, as well as a word-piece model (Schuster & Nakajima, 2012).
在 WMT'14 英语到德语翻译上,我们与以下先前工作比较:Luong 等(2015)基于四层 LSTM 注意力模型;ByteNet(Kalchbrenner 等,2016)提出一种基于字符、不使用注意力的卷积模型,编码器和解码器各 30 层;GNMT(Wu 等,2016)是该数据集上当时的最优结果,他们使用八层编码器 LSTM 和八层解码器 LSTM。我们引用他们与我们类似的词级模型结果,以及 word-piece 模型的结果(Schuster 与 Nakajima,2012)。
The results (Table 1) show that our convolutional model outpeforms GNMT by 0.5 BLEU. Our encoder has 15 layers and the decoder has 15 layers, both with 512 hidden units in the first ten layers and 768 units in the subsequent three layers, all using kernel width 3. The final two layers have 2048 units which are just linear mappings with a single input. We trained this model on a single GPU over a period of 18.5 days with a batch size of 48. LSTM sparse mixtures have shown strong accuracy at 26.03 BLEU for a single run (Shazeer et al., 2016) which compares to 25.39 BLEU for our best run. This mixture sums the output of four experts, not unlike an ensemble which sums the output of multiple networks. ConvS2S also benefits from ensembling (§5.2), therefore mixtures are a promising direction.
结果(表 1)表明,我们的卷积模型比 GNMT 高 0.5 BLEU。编码器有 15 层,解码器也有 15 层,前 10 层均为 512 个隐单元,随后 3 层为 768 个单元,核宽均为 3。最后两层有 2048 个单元,只是带单个输入的线性映射。该模型在单块 GPU 上训练了 18.5 天,批量大小为 48。LSTM 稀疏混合模型单次运行达到 26.03 BLEU(Shazeer 等,2016),而我们最好的单次运行为 25.39 BLEU。这种混合是对四个专家的输出求和,与对多个网络输出求和的集成不无相似。ConvS2S 也能从集成中获益(§5.2),因此混合模型是一个有前景的方向。
Finally, we train on the much larger WMT'14 English-French task where we compare to the state of the art result of GNMT (Wu et al., 2016). Our model is trained with a single token-level likelihood objective and we improve over GNMT in the same setting by 1.6 BLEU on average. We also outperform their reinforcement (RL) models by 0.5 BLEU. Reinforcement learning is equally applicable to our architecture and we believe that it would further improve our results.
最后,我们在规模大得多的 WMT'14 英法任务上训练,并与 GNMT 的当时最优结果比较(Wu 等,2016)。我们的模型只用单一的标记级似然目标训练,在同一设置下平均比 GNMT 高 1.6 BLEU。我们也比他们的强化学习(RL)模型高 0.5 BLEU。强化学习同样适用于我们的结构,我们相信它还能进一步改进结果。
The ConvS2S model for this experiment uses 15 layers in the encoder and 15 layers in the decoder, both with 512 hidden units in the first five layers, 768 units in the subsequent four layers, 1024 units in the next 3 layers, all using kernel width 3; the final two layers have 2048 units and 4096 units each but they are linear mappings with kernel width 1. This model has an effective context size of only 25 words, beyond which it cannot access any information on the target side. Our results are based on training with 8 GPUs for about 37 days and batch size 32 on each worker. The same configuration as for WMT'14 English-German achieves 39.41 BLEU in two weeks on this dataset in an eight GPU setup.
这一实验中的 ConvS2S 模型编码器和解码器各 15 层:前 5 层为 512 个隐单元,随后 4 层为 768 个单元,再随后 3 层为 1024 个单元,核宽均为 3;最后两层分别有 2048 和 4096 个单元,但是核宽为 1 的线性映射。该模型在目标端的有效上下文只有 25 个词,超出这一范围就无法再获取信息。我们的结果来自用 8 块 GPU 训练约 37 天,每个工作进程的批量大小为 32。与 WMT'14 英德相同的配置,在这一数据集上用 8 块 GPU 训练两周,达到 39.41 BLEU。
We did not use the exact same vocabulary size because word pieces and BPE estimate the vocabulary differently.
我们没有使用完全相同的词表规模,因为 word pieces 与 BPE 估计词表的方式不同。
This is half of the GPU time consumed by a basic model of Wu et al. (2016) who use 96 GPUs for 6 days. We expect the time to train our model to decrease substantially in a multi-machine setup.
这相当于 Wu 等(2016)一个基本模型所耗 GPU 时间的一半,他们使用 96 块 GPU 训练了 6 天。我们预计,若采用多机设置,训练时间还会明显下降。
Zhou et al. (2016) report a non-averaged result of 39.2 BLEU. More recently, Ha et al. (2016) showed that one can generate weights with one LSTM for another LSTM. This approach achieves 40.03 BLEU but the result is not averaged. Shazeer et al. (2016) compares at 40.56 BLEU to our best single run of 40.70 BLEU.
Zhou 等(2016)报告了未经平均的 39.2 BLEU。更近一些,Ha 等(2016)表明可以用一个 LSTM 为另一个 LSTM 生成权重。这一方法达到 40.03 BLEU,但结果未经平均。Shazeer 等(2016)的 40.56 BLEU,可与我们最好的单次运行 40.70 BLEU 相比。
The translations produced by our models often match the length of the references for the large WMT'14 English-French task, or are very close for small to medium data sets such as WMT'14 English-German or WMT'16 English-Romanian.
在大规模的 WMT'14 英法任务上,我们模型给出的译文长度常常与参考文献一致;在 WMT'14 英德或 WMT'16 英语–罗马尼亚语这类中小规模数据上,也非常接近。
Table 1. Accuracy on WMT tasks comapred to previous work. ConvS2S and GNMT results are averaged over several runs.
表 1. 在 WMT 任务上与先前工作比较的精度。ConvS2S 与 GNMT 的结果为多次运行的平均值。
| BLEU | |
|---|---|
| WMT'16 English-Romanian | |
| Sennrich et al. (2016b) GRU (BPE 90K) | 28.1 |
| ConvS2S (Word 80K) | 29.45 |
| ConvS2S (BPE 40K) | 30.02 |
| WMT'14 English-German | |
| Luong et al. (2015) LSTM (Word 50K) | 20.9 |
| Kalchbrenner et al. (2016) ByteNet (Char) | 23.75 |
| Wu et al. (2016) GNMT (Word 80K) | 23.12 |
| Wu et al. (2016) GNMT (Word pieces) | 24.61 |
| ConvS2S (BPE 40K) | 25.16 |
| WMT'14 English-French | |
| Wu et al. (2016) GNMT (Word 80K) | 37.90 |
| Wu et al. (2016) GNMT (Word pieces) | 38.95 |
| Wu et al. (2016) GNMT (Word pieces) + RL | 39.92 |
| ConvS2S (BPE 40K) | 40.51 |
| BLEU | |
|---|---|
| WMT'16 英语–罗马尼亚语 | |
| Sennrich 等(2016b)GRU(BPE 90K) | 28.1 |
| ConvS2S(词级 80K) | 29.45 |
| ConvS2S(BPE 40K) | 30.02 |
| WMT'14 英语–德语 | |
| Luong 等(2015)LSTM(词级 50K) | 20.9 |
| Kalchbrenner 等(2016)ByteNet(字符) | 23.75 |
| Wu 等(2016)GNMT(词级 80K) | 23.12 |
| Wu 等(2016)GNMT(Word pieces) | 24.61 |
| ConvS2S(BPE 40K) | 25.16 |
| WMT'14 英语–法语 | |
| Wu 等(2016)GNMT(词级 80K) | 37.90 |
| Wu 等(2016)GNMT(Word pieces) | 38.95 |
| Wu 等(2016)GNMT(Word pieces)+ RL | 39.92 |
| ConvS2S(BPE 40K) | 40.51 |
5.2. Ensemble Results
5.2. 集成结果
Next, we ensemble eight likelihood-trained models for both WMT'14 English-German and WMT'14 English-French and compare to previous work which also reported ensemble results. Table 2 shows that we outperform the best current ensembles on both datasets. For WMT'14 English-French we also show results when ensembling 10 models.
接下来,我们在 WMT'14 英德和英法上分别把八个由似然训练的模型做集成,并与同样报告了集成结果的先前工作比较。表 2 表明,我们在两个数据集上都超过了当时最好的集成。对 WMT'14 英法,我们还给出了集成 10 个模型的结果。
Table 2. Accuracy of ensembles with eight models. We show both likelihood and Reinforce (RL) results for GNMT; Zhou et al. (2016) and ConvS2S use simple likelihood training.
表 2. 八模型集成的精度。GNMT 同时给出似然训练与 Reinforce(RL)的结果;Zhou 等(2016)和 ConvS2S 只用简单的似然训练。
| BLEU | |
|---|---|
| WMT'14 English-German | |
| Wu et al. (2016) GNMT | 26.20 |
| Wu et al. (2016) GNMT + RL | 26.30 |
| ConvS2S | 26.43 |
| WMT'14 English-French | |
| Zhou et al. (2016) | 40.4 |
| Wu et al. (2016) GNMT | 40.35 |
| Wu et al. (2016) GNMT + RL | 41.16 |
| ConvS2S | 41.44 |
| ConvS2S (10 models) | 41.62 |
| BLEU | |
|---|---|
| WMT'14 英语–德语 | |
| Wu 等(2016)GNMT | 26.20 |
| Wu 等(2016)GNMT + RL | 26.30 |
| ConvS2S | 26.43 |
| WMT'14 英语–法语 | |
| Zhou 等(2016) | 40.4 |
| Wu 等(2016)GNMT | 40.35 |
| Wu 等(2016)GNMT + RL | 41.16 |
| ConvS2S | 41.44 |
| ConvS2S(10 个模型) | 41.62 |
5.3. Generation Speed
5.3. 生成速度
Next, we evaluate the inference speed on the development set of the WMT'14 English-French task which is the concatenation of newstest2012 and newstest2013; it comprises 6003 sentences. We measure generation speed both on GPU and CPU hardware. Specifically, we measure GPU speed on three generations of Nvidia cards: a GTX-1080ti, an M40 as well as an older K40 card. CPU timings are measured on one host with 48 hyper-threaded cores (Intel Xeon E5-2680 @ 2.50GHz) with 40 workers. In all settings, we batch up to 128 sentences, composing batches with sentences of equal length. Note that the majority of batches is smaller because of the small size of the development set. We experiment with beams of size 5 as well as greedy search, i.e. beam of size 1. To make generation fast, we do not recompute convolution states that have not changed compared to the previous time step but rather copy (shift) these activations.
接下来,我们在 WMT'14 英法任务的开发集上评测推理速度。该开发集是 newstest2012 与 newstest2013 的拼接,共 6003 句。我们同时在 GPU 和 CPU 上测量生成速度。GPU 速度在三代 Nvidia 卡上测量:GTX-1080ti、M40,以及较旧的 K40。CPU 时间在一台带 48 个超线程核(Intel Xeon E5-2680 @ 2.50GHz)的主机上测量,使用 40 个工作进程。在所有设置中,我们最多把 128 句组成一批,并按相同句长组批。由于开发集较小,多数批次实际上更小。我们试验了束宽为 5 以及贪心搜索(即束宽为 1)。为了加快生成,对与上一时间步相比没有变化的卷积状态,我们不再重新计算,而是复制(平移)这些激活。
We compare to results reported in Wu et al. (2016) who use Nvidia K80 GPUs which is essentially two K40s. We did not have a GPU available and therefore run experiments on an older K40 card which is inferior to a K80, in addition to the newer M40 and GTX-1080ti cards. The results (Table 3) show that our model can generate translations on a K40 GPU at 9.3 times the speed and 2.25 times faster BLEU; on an M40 the speed-up is up to 13.7 times, and on a GTX-1080ti card the speed is 21.3 times faster. A larger beam of size 5 decreases speed but gives better BLEU. On CPU, our model is up to 9.3 times faster, however, the GNMT CPU results were obtained with an 88 core machine whereas our results were obtained with just over half the number of cores. On a per CPU core basis, our model is 17 times faster at a better BLEU. Finally, our CPU speed is 2.7 times higher than GNMT on a custom TPU chip which shows that high speed can be achieved on commodity hardware. We do not report TPU figures as we do not have access to this hardware.
我们与 Wu 等(2016)报告的结果比较,他们使用 Nvidia K80 GPU,本质上相当于两块 K40。我们当时没有这样的 GPU,因此除了较新的 M40 和 GTX-1080ti 之外,还在一块更旧、弱于 K80 的 K40 上做实验。结果(表 3)表明,我们的模型在 K40 GPU 上生成译文的速度是对方的 9.3 倍,BLEU 也高 2.25;在 M40 上加速可达 13.7 倍,在 GTX-1080ti 上速度是对方的 21.3 倍。把束宽加大到 5 会降低速度,但 BLEU 更好。在 CPU 上,我们的模型最多快 9.3 倍;不过 GNMT 的 CPU 结果是在 88 核机器上得到的,而我们只用了略多于其一半的核数。按单个 CPU 核计算,我们的模型快 17 倍,BLEU 也更高。此外,我们的 CPU 速度比 GNMT 在定制 TPU 芯片上的速度还高 2.7 倍,说明在通用硬件上也可以达到很高的速度。我们没有报告 TPU 数字,因为没有这类硬件。
Table 3. CPU and GPU generation speed in seconds on the development set of WMT'14 English-French. We show results for different beam sizes (b). GNMT figures are taken from Wu et al. (2016). CPU speeds are not directly comparable because Wu et al. (2016) use a 88 core machine versus our 48 core setup.
表 3. 在 WMT'14 英法开发集上的 CPU 与 GPU 生成速度(秒)。我们给出不同束宽 (b) 的结果。GNMT 数字取自 Wu 等(2016)。CPU 速度不可直接比较,因为 Wu 等(2016)使用 88 核机器,而我们是 48 核。
| BLEU | Time (s) | |
|---|---|---|
| GNMT GPU (K80) | 31.20 | 3,028 |
| GNMT CPU 88 cores | 31.20 | 1,322 |
| GNMT TPU | 31.21 | 384 |
| ConvS2S GPU (K40) (b=1) | 33.45 | 327 |
| ConvS2S GPU (M40) (b=1) | 33.45 | 221 |
| ConvS2S GPU (GTX-1080ti) (b=1) | 33.45 | 142 |
| ConvS2S CPU 48 cores (b=1) | 33.45 | 142 |
| ConvS2S GPU (K40) (b=5) | 34.10 | 587 |
| ConvS2S CPU 48 cores (b=5) | 34.10 | 482 |
| ConvS2S GPU (M40) (b=5) | 34.10 | 406 |
| ConvS2S GPU (GTX-1080ti) (b=5) | 34.10 | 256 |
| BLEU | 时间(秒) | |
|---|---|---|
| GNMT GPU(K80) | 31.20 | 3,028 |
| GNMT CPU 88 核 | 31.20 | 1,322 |
| GNMT TPU | 31.21 | 384 |
| ConvS2S GPU(K40)(b=1) | 33.45 | 327 |
| ConvS2S GPU(M40)(b=1) | 33.45 | 221 |
| ConvS2S GPU(GTX-1080ti)(b=1) | 33.45 | 142 |
| ConvS2S CPU 48 核 (b=1) | 33.45 | 142 |
| ConvS2S GPU(K40)(b=5) | 34.10 | 587 |
| ConvS2S CPU 48 核 (b=5) | 34.10 | 482 |
| ConvS2S GPU(M40)(b=5) | 34.10 | 406 |
| ConvS2S GPU(GTX-1080ti)(b=5) | 34.10 | 256 |
5.4. Position Embeddings
5.4. 位置嵌入
In the following sections, we analyze the design choices in our architecture. The remaining results in this paper are based on the WMT'14 English-German task with 13 encoder layers at kernel size 3 and 5 decoder layers at kernel size 5. We use a target vocabulary of 160K words as well as vocabulary selection (Mi et al., 2016; L'Hostis et al., 2016) to decrease the size of the output layer which speeds up training and testing. The average vocabulary size for each training batch is about 20K target words. All figures are averaged over three runs (§4) and BLEU is reported on newstest2014 before unknown word replacement.
在下面几节中,我们分析这一结构中的设计选择。本文其余结果均基于 WMT'14 英德任务:编码器 13 层、核宽 3,解码器 5 层、核宽 5。目标词表为 16 万词,并使用词表选择(Mi 等,2016;L'Hostis 等,2016)来缩小输出层,从而加快训练和测试。每个训练批次的平均词表大小约为 2 万个目标词。所有数字均为三次运行的平均(§4),BLEU 在 newstest2014 上、未知词替换之前报告。
We start with an experiment that removes the position embeddings from the encoder and decoder (§3.1). These embeddings allow our model to identify which portion of the source and target sequence it is dealing with but also impose a restriction on the maximum sentence length. Table 4 shows that position embeddings are helpful but that our model still performs well without them. Removing the source position embeddings results in a larger accuracy decrease than target position embeddings. However, removing both source and target positions decreases accuracy only by 0.5 BLEU. We also find that the length of the outputs of models without position embeddings closely matches the output length of models with position information. This indicates that the models can learn relative position information within the contexts visible to the encoder and decoder networks which can observe up to 27 and 25 words respectively.
我们先做一组去掉编码器和解码器位置嵌入的实验(§3.1)。这些嵌入让模型知道自己正在处理源序列和目标序列的哪一段,但也会对最大句长施加限制。表 4 表明,位置嵌入是有帮助的,但即使去掉它们,模型仍然表现良好。去掉源端位置嵌入比去掉目标端位置嵌入带来的精度下降更大。不过,源端和目标端位置都去掉时,精度只下降 0.5 BLEU。我们还发现,没有位置嵌入的模型,其输出长度与带有位置信息的模型非常接近。这说明模型能够在编码器和解码器可见的上下文中学到相对位置信息;二者分别最多能看到 27 和 25 个词。
Table 4. Effect of removing position embeddings from our model in terms of validation perplexity (valid PPL) and BLEU.
表 4. 去掉位置嵌入对验证集困惑度(valid PPL)和 BLEU 的影响。
| PPL | BLEU | |
|---|---|---|
| ConvS2S | 6.64 | 21.7 |
| −source position | 6.69 | 21.3 |
| −target position | 6.63 | 21.5 |
| −source & target position | 6.68 | 21.2 |
| PPL | BLEU | |
|---|---|---|
| ConvS2S | 6.64 | 21.7 |
| −源端位置 | 6.69 | 21.3 |
| −目标端位置 | 6.63 | 21.5 |
| −源端与目标端位置 | 6.68 | 21.2 |
5.5. Multi-step Attention
5.5. 多步注意力
The multiple attention mechanism (§3.3) computes a separate source context vector for each decoder layer. The computation also takes into account contexts computed for preceding decoder layers of the current time step as well as previous time steps which are within the receptive field of the decoder. How does multiple attention compare to attention in fewer layers or even only in a single layer as is usual? Table 5 shows that attention in all decoder layers achieves the best validation perplexity (PPL). Furthermore, removing more and more attention layers decreases accuracy, both in terms of BLEU as well as PPL.
多层注意力机制(§3.3)为每一层解码器计算单独的源端上下文向量。计算时还会考虑当前时间步中先前解码器层已算得的上下文,以及落在解码器感受野内的先前时间步。多层注意力与只在更少层、甚至像通常那样只在单层做注意力相比如何?表 5 表明,在全部解码器层都做注意力时,验证集困惑度(PPL)最好。而且,去掉的注意力层越多,BLEU 和 PPL 都会变差。
The computational overhead for attention is very small compared to the rest of the network. Training with attention in all five decoder layers processes 3624 target words per second on average on a single GPU, compared to 3772 words per second for a single attention module. This corresponds to 1% overhead per attention module and demonstrates that attention is not the bottleneck in neural machine translation, even though it is quadratic in the sequence length (cf. Kalchbrenner et al., 2016). Part of the reason for the low impact on speed is that we batch the computation of the attention module over all target words. However, for RNNs batching of the attention may be less effective because of the dependence on the previous time step.
与网络的其余部分相比,注意力的计算开销非常小。在全部五层解码器都做注意力时,单块 GPU 上平均每秒处理 3624 个目标词;若只有一个注意力模块,则为每秒 3772 个词。这相当于每个注意力模块约 1% 的开销,也说明注意力并不是神经机器翻译的瓶颈,尽管它在序列长度上是二次的(参见 Kalchbrenner 等,2016)。对速度影响较小的部分原因是,我们把注意力模块的计算在所有目标词上一起做批处理。不过,对 RNN 来说,由于依赖前一时间步,注意力的批处理可能没有这么有效。
Table 5. Multi-step attention in all five decoder layers or fewer layers in terms of validation perplexity (PPL) and test BLEU.
表 5. 在全部五层解码器或更少层中使用多步注意力时的验证集困惑度(PPL)与测试 BLEU。
| Attn Layers | PPL | BLEU |
|---|---|---|
| 1, 2, 3, 4, 5 | 6.65 | 21.63 |
| 1, 2, 3, 4 | 6.70 | 21.54 |
| 1, 2, 3 | 6.95 | 21.36 |
| 1, 2 | 6.92 | 21.47 |
| 1, 3, 5 | 6.97 | 21.10 |
| 1 | 7.15 | 21.26 |
| 2 | 7.09 | 21.30 |
| 3 | 7.11 | 21.19 |
| 4 | 7.19 | 21.31 |
| 5 | 7.66 | 20.24 |
| 注意力层 | PPL | BLEU |
|---|---|---|
| 1, 2, 3, 4, 5 | 6.65 | 21.63 |
| 1, 2, 3, 4 | 6.70 | 21.54 |
| 1, 2, 3 | 6.95 | 21.36 |
| 1, 2 | 6.92 | 21.47 |
| 1, 3, 5 | 6.97 | 21.10 |
| 1 | 7.15 | 21.26 |
| 2 | 7.09 | 21.30 |
| 3 | 7.11 | 21.19 |
| 4 | 7.19 | 21.31 |
| 5 | 7.66 | 20.24 |
图 2. 改变编码器或解码器层数时的结果。
5.6. Kernel size and Depth
5.6. 核宽与深度
Figure 2 shows accuracy when we change the number of layers in the encoder or decoder. The kernel width for layers in the encoder is 3 and for the decoder it is 5. Deeper architectures are particularly beneficial for the encoder but less so for the decoder. Decoder setups with two layers already perform well whereas for the encoder accuracy keeps increasing steadily with more layers until up to 9 layers when accuracy starts to plateau.
图 2 给出改变编码器或解码器层数时的精度。编码器各层核宽为 3,解码器为 5。更深的结构对编码器尤其有帮助,对解码器则不那么明显。解码器两层就已经表现较好;编码器的精度则随着层数稳步上升,直到 9 层左右开始趋于平稳。
Aside from increasing the depth of the networks, we can also change the kernel width. Table 7 shows that encoders with narrow kernels and many layers perform better than wider kernels. These networks can also be faster since the amount of work to compute a kernel operating over 3 input elements is less than half compared to kernels over 7 elements. We see a similar picture for decoder networks with large kernel sizes (Table 8). Dauphin et al. (2016) shows that context sizes of 20 words are often sufficient to achieve very good accuracy on language modeling for English.
除了增加网络深度,我们也可以改变核宽。表 7 表明,核较窄、层数较多的编码器优于更宽的核。这类网络也可能更快,因为在 3 个输入元素上计算一个核的工作量,还不到在 7 个元素上计算的一半。核较宽的解码器网络也有类似情况(表 8)。Dauphin 等(2016)表明,在英语语言建模上,20 个词的上下文往往就足以达到很好的精度。
Table 7. Encoder with different kernel width in terms of BLEU.
表 7. 不同核宽的编码器以 BLEU 计的结果。
| Kernel width | Encoder layers | ||
|---|---|---|---|
| 5 | 9 | 13 | |
| 3 | 20.61 | 21.17 | 21.63 |
| 5 | 20.80 | 21.02 | 21.42 |
| 7 | 20.81 | 21.30 | 21.09 |
| 核宽 | 编码器层数 | ||
|---|---|---|---|
| 5 | 9 | 13 | |
| 3 | 20.61 | 21.17 | 21.63 |
| 5 | 20.80 | 21.02 | 21.42 |
| 7 | 20.81 | 21.30 | 21.09 |
Table 8. Decoder with different kernel width in terms of BLEU.
表 8. 不同核宽的解码器以 BLEU 计的结果。
| Kernel width | Decoder layers | ||
|---|---|---|---|
| 3 | 5 | 7 | |
| 3 | 21.10 | 21.71 | 21.62 |
| 5 | 21.09 | 21.63 | 21.24 |
| 7 | 21.40 | 21.31 | 21.33 |
| 核宽 | 解码器层数 | ||
|---|---|---|---|
| 3 | 5 | 7 | |
| 3 | 21.10 | 21.71 | 21.62 |
| 5 | 21.09 | 21.63 | 21.24 |
| 7 | 21.40 | 21.31 | 21.33 |
5.7. Summarization
5.7. 摘要
Finally, we evaluate our model on abstractive sentence summarization which takes a long sentence as input and outputs a shortened version. The current best models on this task are recurrent neural networks which either optimize the evaluation metric (Shen et al., 2016) or address specific problems of summarization such as avoiding repeated generations (Suzuki & Nagata, 2017). We use standard likelihood training for our model and a simple model with six layers in the encoder and decoder each, hidden size 256, batch size 128, and we trained on a single GPU in one night. Table 6 shows that our likelihood trained model outperforms the likelihood trained model (RNN MLE) of Shen et al. (2016) and is not far behind the best models on this task which benefit from task-specific optimization and model structure.
最后,我们在抽象句子摘要任务上评测模型:输入是一个长句,输出是缩短后的版本。该任务上当时最好的模型是循环神经网络,它们或者直接优化评测指标(Shen 等,2016),或者专门处理摘要中的问题,例如避免重复生成(Suzuki 与 Nagata,2017)。我们的模型使用标准似然训练,结构也很简单:编码器和解码器各 6 层,隐层大小 256,批量大小 128,在单块 GPU 上训练了一个晚上。表 6 表明,我们这个用似然训练的模型超过了 Shen 等(2016)用似然训练的模型(RNN MLE),并且距离该任务上最好的模型不远,而那些模型受益于针对任务的优化和模型结构。
Table 6. Accuracy on two summarization tasks in terms of Rouge-1 (RG-1), Rouge-2 (RG-2), and Rouge-L (RG-L).
表 6. 在两项摘要任务上以 Rouge-1(RG-1)、Rouge-2(RG-2)和 Rouge-L(RG-L)计的精度。
| DUC-2004 | Gigaword | |||||
|---|---|---|---|---|---|---|
| RG-1 (R) | RG-2 (R) | RG-L (R) | RG-1 (F) | RG-2 (F) | RG-L (F) | |
| RNN MLE (Shen et al., 2016) | 24.92 | 8.60 | 22.25 | 32.67 | 15.23 | 30.56 |
| RNN MRT (Shen et al., 2016) | 30.41 | 10.87 | 26.79 | 36.54 | 16.59 | 33.44 |
| WFE (Suzuki & Nagata, 2017) | 32.28 | 10.54 | 27.80 | 36.30 | 17.31 | 33.88 |
| ConvS2S | 30.44 | 10.84 | 26.90 | 35.88 | 17.48 | 33.29 |
| DUC-2004 | Gigaword | |||||
|---|---|---|---|---|---|---|
| RG-1(R) | RG-2(R) | RG-L(R) | RG-1(F) | RG-2(F) | RG-L(F) | |
| RNN MLE(Shen 等,2016) | 24.92 | 8.60 | 22.25 | 32.67 | 15.23 | 30.56 |
| RNN MRT(Shen 等,2016) | 30.41 | 10.87 | 26.79 | 36.54 | 16.59 | 33.44 |
| WFE(Suzuki 与 Nagata,2017) | 32.28 | 10.54 | 27.80 | 36.30 | 17.31 | 33.88 |
| ConvS2S | 30.44 | 10.84 | 26.90 | 35.88 | 17.48 | 33.29 |
- Conclusion and Future Work
- 结论与未来工作
We introduce the first fully convolutional model for sequence to sequence learning that outperforms strong recurrent models on very large benchmark datasets at an order of magnitude faster speed. Compared to recurrent networks, our convolutional approach allows to discover compositional structure in the sequences more easily since representations are built hierarchically. Our model relies on gating and performs multiple attention steps.
我们提出第一个全卷积的序列到序列学习模型,在非常大的基准数据集上超过了较强的循环模型,速度大约快一个数量级。与循环网络相比,卷积方法更容易发现序列中的组合结构,因为表示是按层次建立的。我们的模型依靠门控,并执行多步注意力。
We achieve a new state of the art on several public translation benchmark data sets. On the WMT'16 English-Romanian task we outperform the previous best result by 1.9 BLEU, on WMT'14 English-French translation we improve over the LSTM model of Wu et al. (2016) by 1.6 BLEU in a comparable setting, and on WMT'14 English-German translation we outperform the same model by 0.5 BLEU. In future work, we would like to apply convolutional architectures to other sequence to sequence learning problems which may benefit from learning hierarchical representations as well.
我们在若干公开翻译基准数据集上达到新的最高水平。在 WMT'16 英语–罗马尼亚语任务上,我们比此前最好结果高 1.9 BLEU;在 WMT'14 英法翻译上,在可比较的设置中比 Wu 等(2016)的 LSTM 模型高 1.6 BLEU;在 WMT'14 英德翻译上,比同一模型高 0.5 BLEU。在未来工作中,我们希望把卷积结构用于其他序列到序列学习问题,这些问题同样可能受益于学习层次化表示。
References
参考文献
Ba, Jimmy Lei, Kiros, Jamie Ryan, and Hinton, Geoffrey E. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
Bahdanau, Dzmitry, Cho, Kyunghyun, and Bengio, Yoshua. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
Bojar, Ondřej, Chatterjee, Rajen, Federmann, Christian, Graham, Yvette, Haddow, Barry, Huck, Matthias, Jimeno-Yepes, Antonio, Koehn, Philipp, Logacheva, Varvara, Monz, Christof, Negri, Matteo, Névéol, Aurélie, Neves, Mariana L., Popel, Martin, Post, Matt, Rubino, Raphaël, Scarton, Carolina, Specia, Lucia, Turchi, Marco, Verspoor, Karin M., and Zampieri, Marcos. Findings of the 2016 conference on machine translation. In Proc. of WMT, 2016.
Bradbury, James, Merity, Stephen, Xiong, Caiming, and Socher, Richard. Quasi-Recurrent Neural Networks. arXiv preprint arXiv:1611.01576, 2016.
Cho, Kyunghyun, Van Merriënboer, Bart, Gulcehre, Caglar, Bahdanau, Dzmitry, Bougares, Fethi, Schwenk, Holger, and Bengio, Yoshua. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. In Proc. of EMNLP, 2014.
Chorowski, Jan K, Bahdanau, Dzmitry, Serdyuk, Dmitriy, Cho, Kyunghyun, and Bengio, Yoshua. Attention-based models for speech recognition. In Advances in Neural Information Processing Systems, pp. 577–585, 2015.
Collobert, Ronan, Kavukcuoglu, Koray, and Farabet, Clement. Torch7: A Matlab-like Environment for Machine Learning. In BigLearn, NIPS Workshop, 2011. URL http://torch.ch.
Dauphin, Yann N., Fan, Angela, Auli, Michael, and Grangier, David. Language modeling with gated linear units. arXiv preprint arXiv:1612.08083, 2016.
Dyer, Chris, Chahuneau, Victor, and Smith, Noah A. A Simple, Fast, and Effective Reparameterization of IBM Model 2. In Proc. of ACL, 2013.
Elman, Jeffrey L. Finding Structure in Time. Cognitive Science, 14:179–211, 1990.
Gehring, Jonas, Auli, Michael, Grangier, David, and Dauphin, Yann N. A Convolutional Encoder Model for Neural Machine Translation. arXiv preprint arXiv:1611.02344, 2016.
Glorot, Xavier and Bengio, Yoshua. Understanding the difficulty of training deep feedforward neural networks. The handbook of brain theory and neural networks, 2010.
Graff, David, Kong, Junbo, Chen, Ke, and Maeda, Kazuaki. English gigaword. Linguistic Data Consortium, Philadelphia, 2003.
Ha, David, Dai, Andrew, and Le, Quoc V. Hypernetworks. arXiv preprint arXiv:1609.09106, 2016.
He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep Residual Learning for Image Recognition. In Proc. of CVPR, 2015a.
He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1026–1034, 2015b.
Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
Ioffe, Sergey and Szegedy, Christian. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of The 32nd International Conference on Machine Learning, pp. 448–456, 2015.
Jean, Sébastien, Firat, Orhan, Cho, Kyunghyun, Memisevic, Roland, and Bengio, Yoshua. Montreal Neural Machine Translation systems for WMT15. In Proc. of WMT, pp. 134–140, 2015.
Kalchbrenner, Nal, Espeholt, Lasse, Simonyan, Karen, van den Oord, Aaron, Graves, Alex, and Kavukcuoglu, Koray. Neural Machine Translation in Linear Time. arXiv, 2016.
LeCun, Yann and Bengio, Yoshua. Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361(10):1995, 1995.
L’Hostis, Gurvan, Grangier, David, and Auli, Michael. Vocabulary Selection Strategies for Neural Machine Translation. arXiv preprint arXiv:1610.00072, 2016.
Lin, Chin-Yew. Rouge: A package for automatic evaluation of summaries. In Text Summarization Branches Out: Proceedings of the ACL-04 Workshop, pp. 74–81, 2004.
Luong, Minh-Thang, Pham, Hieu, and Manning, Christopher D. Effective approaches to attention-based neural machine translation. In Proc. of EMNLP, 2015.
Meng, Fandong, Lu, Zhengdong, Wang, Mingxuan, Li, Hang, Jiang, Wenbin, and Liu, Qun. Encoding Source Language with Convolutional Neural Network for Machine Translation. In Proc. of ACL, 2015.
Mi, Haitao, Wang, Zhiguo, and Ittycheriah, Abe. Vocabulary Manipulation for Neural Machine Translation. In Proc. of ACL, 2016.
Miller, Alexander H., Fisch, Adam, Dodge, Jesse, Karimi, Amir-Hossein, Bordes, Antoine, and Weston, Jason. Key-value memory networks for directly reading documents. In Proc. of EMNLP, 2016.
Nallapati, Ramesh, Zhou, Bowen, Gulcehre, Caglar, Xiang, Bing, et al. Abstractive text summarization using sequenceto-sequence rnns and beyond. In Proc. of EMNLP, 2016.
Oord, Aaron van den, Kalchbrenner, Nal, and Kavukcuoglu, Koray. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016a.
Oord, Aaron van den, Kalchbrenner, Nal, Vinyals, Oriol, Espeholt, Lasse, Graves, Alex, and Kavukcuoglu, Koray. Conditional image generation with pixelcnn decoders. arXiv preprint arXiv:1606.05328, 2016b.
Over, Paul, Dang, Hoa, and Harman, Donna. Duc in context. Information Processing & Management, 43(6):1506–1520, 2007.
Pascanu, Razvan, Mikolov, Tomas, and Bengio, Yoshua. On the difficulty of training recurrent neural networks. In Proceedings of The 30th International Conference on Machine Learning, pp. 1310–1318, 2013.
Rush, Alexander M, Chopra, Sumit, and Weston, Jason. A neural attention model for abstractive sentence summarization. In Proc. of EMNLP, 2015.
Salimans, Tim and Kingma, Diederik P. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. arXiv preprint arXiv:1602.07868, 2016.
Schuster, Mike and Nakajima, Kaisuke. Japanese and korean voice search. In Acoustics, Speech and Signal Processing (ICASSP), 2012 IEEE International Conference on, pp. 5149–5152. IEEE, 2012.
Sennrich, Rico, Haddow, Barry, and Birch, Alexandra. Neural Machine Translation of Rare Words with Subword Units. In Proc. of ACL, 2016a.
Sennrich, Rico, Haddow, Barry, and Birch, Alexandra. Edinburgh Neural Machine Translation Systems for WMT 16. In Proc. of WMT, 2016b.
Shazeer, Noam, Mirhoseini, Azalia, Maziarz, Krzysztof, Davis, Andy, Le, Quoc, Hinton, Geoffrey, and Dean, Jeff. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. ArXiv e-prints, January 2016.
Shen, Shiqi, Zhao, Yu, Liu, Zhiyuan, Sun, Maosong, et al. Neural headline generation with sentence-wise optimization. arXiv preprint arXiv:1604.01904, 2016.
Srivastava, Nitish, Hinton, Geoffrey E., Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: a simple way to prevent Neural Networks from overfitting. JMLR, 15:1929–1958, 2014.
Sukhbaatar, Sainbayar, Weston, Jason, Fergus, Rob, and Szlam, Arthur. End-to-end Memory Networks. In Proc. of NIPS, pp. 2440–2448, 2015.
Sutskever, Ilya, Martens, James, Dahl, George E., and Hinton, Geoffrey E. On the importance of initialization and momentum in deep learning. In ICML, 2013.
Sutskever, Ilya, Vinyals, Oriol, and Le, Quoc V. Sequence to Sequence Learning with Neural Networks. In Proc. of NIPS, pp. 3104–3112, 2014.
Suzuki, Jun and Nagata, Masaaki. Cutting-off redundant repeating generations for neural abstractive summarization. arXiv preprint arXiv:1701.00138, 2017.
Waibel, Alex, Hanazawa, Toshiyuki, Hinton, Geoffrey, Shikano, Kiyohiro, and Lang, Kevin J. Phoneme Recognition using Time-delay Neural Networks. IEEE transactions on acoustics, speech, and signal processing, 37(3):328–339, 1989.
Wu, Yonghui, Schuster, Mike, Chen, Zhifeng, Le, Quoc V, Norouzi, Mohammad, Macherey, Wolfgang, Krikun, Maxim, Cao, Yuan, Gao, Qin, Macherey, Klaus, et al. Google’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation. arXiv preprint arXiv:1609.08144, 2016.
Yang, Zichao, Hu, Zhiting, Deng, Yuntian, Dyer, Chris, and Smola, Alex. Neural Machine Translation with Recurrent Attention Modeling. arXiv preprint arXiv:1607.05108, 2016.
Zhou, Jie, Cao, Ying, Wang, Xuguang, Li, Peng, and Xu, Wei. Deep Recurrent Models with Fast-Forward Connections for Neural Machine Translation. arXiv preprint arXiv:1606.04199, 2016.

