Deep Neural Machine Translation with Linear Associative Unit

Deep Neural Networks (DNNs) have provably enhanced the state-of-the-art Neural Machine Translation (NMT) with its capability in modeling complex functions and capturing complex linguistic structures. However NMT with deep architecture in its encoder or decoder RNNs often suffer from severe gradient diffusion due to the non-linear recurrent activations, which often makes the optimization much more difficult. To address this problem we propose a novel linear associative units (LAU) to reduce the gradient propagation path inside the recurrent unit. Different from conventional approaches (LSTM unit and GRU), LAUs uses linear associative connections between input and output of the recurrent unit, which allows unimpeded information flow through both space and time The model is quite simple, but it is surprisingly effective. Our empirical study on Chinese-English translation shows that our model with proper configuration can improve by 11.7 BLEU upon Groundhog and the best reported on results in the same setting. On WMT14 English-German task and a larger WMT14 English-French task, our model achieves comparable results with the state-of-the-art.

Deep Neural Networks (DNNs) have provably enhanced the state-of-the-art Neural Machine Translation (NMT) with their capability in modeling complex functions and capturing complex linguistic structures. However NMT systems with deep architecture in their encoder or decoder RNNs often suffer from severe gradient diffusion due to the non-linear recurrent activations, which often make the optimization much more difficult. To address this problem we propose novel linear associative units (LAU) to reduce the gradient propagation length inside the recurrent unit. Different from conventional approaches (LSTM unit and GRU), LAUs utilizes linear associative connections between input and output of the recurrent unit, which allows unimpeded information flow through both space and time direction. The model is quite simple, but it is surprisingly effective. Our empirical study on Chinese-English translation shows that our model with proper configuration can improve by 11.7 BLEU upon Groundhog and the best reported results in the same setting. On WMT14 English-German task and a larger WMT14 English-French task, our model achieves comparable results with the state-of-the-art.

Introduction
Neural Machine Translation (NMT) is an endto-end learning approach to machine transla-tion which has recently shown promising results on multiple language pairs (Luong et al., 2015;Shen et al., 2015;Wu et al., 2016;Tu et al., 2016;Zhang and Zong, 2016;Jean et al., 2015;Meng et al., 2015). Unlike conventional Statistical Machine Translation (SMT) systems (Koehn et al., 2003;Chiang, 2005;Xiong et al., 2006;Mi et al., 2008) which consist of multiple separately tuned components, NMT aims at building upon a single and large neural network to directly map input text to associated output text. Typical NMT models consists of two recurrent neural networks (RNNs), an encoder to read and encode the input text into a distributed representation and a decoder to generate translated text conditioned on the input representation .
Driven by the breakthrough achieved in computer vision Srivastava et al., 2015), research in NMT has recently turned towards studying Deep Neural Networks (DNNs). Wu et al. (2016) and Zhou et al. (2016) found that deep architectures in both the encoder and decoder are essential for capturing subtle irregularities in the source and target languages. However, training a deep neural network is not as simple as stacking layers. Optimization often becomes increasingly difficult with more layers. One reasonable explanation is the notorious problem of vanishing/exploding gradients which was first studied in the context of vanilla RNNs (Pascanu et al., 2013b). Most prevalent approaches to solve this problem rely on short-cut connections between adjacent layers such as residual or fastforward connections Srivastava et al., 2015;Zhou et al., 2016). Differ-ent from previous work, we choose to reduce the gradient path inside the recurrent units and propose a novel Linear Associative Unit (LAU) which creates a fusion of both linear and nonlinear transformations of the input. Through this design, information can flow across several steps both in time and in space with little attenuation. The mechanism makes it easy to train deep stack RNNs which can efficiently capture the complex inherent structures of sentences for NMT. Based on LAUs, we also propose a NMT model , called DEEPLAU, with deep architecture in both the encoder and decoder.
Although DEEPLAU is fairly simple, it gives remarkable empirical results. On the NIST Chinese-English task, DEEPLAU with proper settings yields the best reported result and also a 4.9 BLEU improvement over a strong NMT baseline with most known techniques (e.g, dropout) incorporated. On WMT English-German and English-French tasks, it also achieves performance superior or comparable to the state-of-the-art.

Neural machine translation
A typical neural machine translation system is a single and large neural network which directly models the conditional probability p(y|x) of translating a source sentence x = {x 1 , x 2 , · · · , x Tx } to a target sentence y = {y 1 , y 2 , · · · , y Ty }.
Attention-based NMT, with RNNsearch as its most popular representative, generalizes the conventional notion of encoder-decoder in using an array of vectors to represent the source sentence and dynamically addressing the relevant segments of them during decoding. The process can be explicitly split into an encoding part, a decoding part and an attention mechanism. The model first encodes the source sentence x into a sequence of vectors c = {h 1 , h 2 , · · · , h Tx }. In general, h i is the annotation of x i from a bi-directional RNN which contains information about the whole sentence with a strong focus on the parts of x i . Then, the RNNsearch model decodes and generates the target translation y based on the context c and the partial traslated sequence y <t by maximizing the probability of p(y i |y <i , c). In the atten-tion model, c is dynamically obtained according to the contribution of the source annotation made to the word prediction. This is called automatic alignment  or attention mechanism (Luong et al., 2015), but it is essentially reading with content-based addressing defined in (Graves et al., 2014). With this addressing strategy the decoder can attend to the source representation that is most relevant to the stage of decoding.
Deep neural models have recently achieved a great success in a wide range of problems. In computer vision, models with more than 100 convolutional layers have outperformed shallow ones by a big margin on a series of image tasks Srivastava et al., 2015). Following similar ideas of building deep CNNs, some promising improvements have also been achieved on building deep NMT systems. Zhou et al. (2016) proposed a new type of linear connections between adjacent layers to simplify the training of deeply stacked RNNs. Similarly, Wu et al. (2016) introduced residual connections to their deep neural machine translation system and achieve great improvements. However the optimization of deep RNNs is still an open problem due to the massive recurrent computation which makes the gradient propagation path extremely tortuous.

Model Description
In this section, we discuss Linear Associative Unit (LAU) to ease the training of deep stack of RNNs. Based on this idea, we further propose DEEPLAU, a neural machine translation model with a deep encoder and decoder.

Recurrent Layers
A recurrent neural network (Williams and Zipser, 1989) is a class of neural network that has recurrent connections and a state (or its more sophisticated memory-like extension). The past information is built up through the recurrent connections. This makes RNN applicable for sequential prediction tasks of arbitrary length. Given a sequence of vectors x = {x 1 , x 2 , · · · , x T } as input, a standard RNN computes the sequence hidden states h = {h 1 , h 2 , · · · , h T } by iterating the following equation from t = 1 to t = T : φ is usually a nonlinear function such as composition of a logistic sigmoid with an affine transformation.

Gated Recurrent Unit
It is difficult to train RNNs to capture longterm dependencies because the gradients tend to either vanish (most of the time) or explode. The effect of long-term dependencies is dropped exponentially with respect to the gradient propagation length. The problem was explored in depth by (Hochreiter and Schmidhuber, 1997;Pascanu et al., 2013b). A successful approach is to design a more sophisticated activation function than a usual activation function consisting of gating functions to control the information flow and reduce the propagation path. There is a long thread of work aiming to solve this problem, with the long short-term memory units (LSTM) being the most salient examples and gated recurrent unit (GRU) being the most recent one (Hochreiter and Schmidhuber, 1997;. RNNs employing either of these recurrent units have been shown to perform well in tasks that require capturing long-term dependencies. GRU can be viewed as a slightly more dramatic variation on LSTM with fewer parameters. The activation function is armed with two specifically designed gates called update and reset gates to control the flow of information inside each hidden unit. Each hidden state at time-step t is computed as follows where is an element-wise product, z t is the update gate, andh t is the candidate activation.
where r t is the reset gate. Both reset and update gates are computed as : This procedure of taking a linear sum between the existing state and the newly computed state is similar to the LSTM unit.

Linear Associative Unit
GRU can actually be viewed as a non-linear activation function with gating mechanism. Here we propose LAU which extends GRU by having an additional linear transformation of the input in its dynamics. More formally, the state update function becomes Here the updated h t has three sources: 1) the direct transfer from previous state h t−1 , 2) the candidate updateh t , and 3) a direct contribution from the input H(x t ). More specifically, h t contains the nonlinear information of the input and the previous hidden state.
where f t and r t express how much of the nonlinear abstraction are produced by the input x t and previous hidden state h t , respectively. For simplicity, we set f t = 1 − r t in this paper and find that this works well in our experiments. The term H(x t ) is usually an affine linear transformation of the input x t to mach the dimensions of h t , where H(x t ) = W x x t . The associated term g t (the input gate) decides how much of the linear transformation of the input is carried to the hidden state and then the output. The gating function r t (reset gate) and z t (update gate) are computed following Equation (4) and (5) while g t is computed as The term g t H(x t ) therefore offers a direct way for input x t to go to later hidden layers, which can eventually lead to a path to the output layer when applied recursively. This mechanism is potentially very useful for translation where the input, no matter whether it is the source word or the attentive reading (context), should sometimes be directly carried to the next stage of processing without any substantial composition or nonlinear transformation. To understand this, imagine we want to translate a English sentence containing a relative rare entity name such as "Bahrain" to Chinese: LAU is potentially able to retain the embedding of this word in its hidden state, which will otherwise be prone to serious distortion due to the scarcity of training instances for it.  Kalchbrenner et al. (2015) proposed to make a full connection of all the RNN hidden layers. In this work we employ vertical stacking where only the output of the previous layer of RNN is fed to the current layer as input. The input at recurrent layer (denoted as x t ) is exactly the output of the same time step at layer − 1 (denoted as h −1 t ). Additionally, in order to learn more temporal dependencies, the sequences can be processed in different directions. More formally, given an input sequence x = (x 1 , ..., x T ), the output on layer is

DEEPLAU
t gives the output of layer at location t.
• φ is a recurrent function and we choose LAUs in this work.
• The directions are marked by a direction term d ∈ {−1, 1}. If we fixed d to −1, the input will be processed in forward direction, otherwise backward direction.
The deep architecture of DEEPLAU, as shown in Figure 1, consists of three parts: a stacked LAU-based encoder, a stacked LAUbased decoder and an improved attention model.
Encoder One shortcoming of conventional RNNs is that they are only able to make use of previous context. In machine translation, where whole source utterances are transcribed at once, there is no reason not to exploit future context as well. Thus bi-directional RNNs are proposed to integrate information from the past and the future. The typical bidirectional approach processes the raw input in backward and forward direction with two separate layers, and then concatenates them together. Following Zhou et al. (2016), we choose another bidirectional approach to process the sequence in order to learn more temporal dependencies in this work. Specifically, an RNN layer processes the input sequence in forward direction. The output of this layer is taken by an upper RNN layer as input, processed in reverse direction. Formally, following Equation (9), we set d = (−1) . This approach can easily build a deeper network with the same number of parameters compared to the classical approach. The final encoder consists of L enc layers and produces the output h Lenc to compute the conditional input c to the decoder.
Attention Model The alignment model α t,j scores how well the output at position t matches the inputs around position j based on s 1 t−1 and h Lenc j where h Lenc j is the top-most layer of the encoder at step j and s 1 t−1 is the first layer of decoder at step t − 1. It is intuitively beneficial to exploit the information of y t−1 when reading from the source sentence representation, which is missing from the implementation of attention-based NMT in . In this work, we build a more effective alignment path by feeding both the previous hidden state s 1 t−1 and the context word y t−1 to the attention model, inspired by the recent implementation of attention-based NMT 1 . The conditional input c j is a weighted sum of attention score α t,j and encoder output h Lenc . Formally, the calculation of c j is α t,j = softmax(e t,j ).
(11) σ is a nonlinear function with the information of y t−1 (its word embedding being y t−1 ) added. In our preliminary experiments, we found that GRU works slightly better than tanh function, but we chose the latter for simplicity.
Decoder The decoder follows Equation (9) with fixed direction term d = −1. At the first layer, we use the following input: where y t−1 is the target word embedding at time step t, c t is dynamically obtained follows Equation (10). There are L dec layers of RNNs armed with LAUs in the decoder. At inference stage, we only utilize the top-most hidden states s L dec to make the final prediction with a softmax layer: .

Setup
We mainly evaluated our approaches on the widely used NIST Chinese-English translation task. In order to show the usefulness of our approaches, we also provide results on other two translation tasks: English-French, English-German. The evaluation metric is BLEU 2 (Papineni et al., 2002).
For Chinese-English, our training data consists of 1.25M sentence pairs extracted from 1 github.com/nyu-dl/dl4mt-tutorial/ tree/master/session2 2 For Chinese-English task, we apply case-insensitive NIST BLEU. For other tasks, we tokenized the reference and evaluated the performance with multi-bleu.pl. The metrics are exactly the same as in previous work. For English-German, to compare with the results reported by previous work (Luong et al., 2015;Zhou et al., 2016;Jean et al., 2015), we used the same subset of the WMT 2014 training corpus that contains 4.5M sentence pairs with 91M English words and 87M German words. The concatenation of news-test 2012 and news-test 2013 is used as the validation set and news-test 2014 as the test set.
To evaluate at scale, we also report the results of English-French. To compare with the results reported by previous work on end-toend NMT Jean et al., 2015;Luong et al., 2014;Zhou et al., 2016), we used the same subset of the WMT 2014 training corpus that contains 12M sentence pairs with 304M English words and 348M French words. The concatenation of news-test 2012 and news-test 2013 serves as the validation set and news-test 2014 as the test set.

Training details
Our training procedure and hyper parameter choices are similar to those used by . In more details, we limit the source and target vocabularies to the most frequent 30K words in both Chinese-English and English-French. For English-German, we set the source and target vocabularies size to 120K and 80K, respectively.
For all experiments, the dimensions of word embeddings and recurrent hidden states are both set to 512. The dimension of c t is also of size 512. Note that our network is more narrow than most previous work where hidden states of dimmention 1024 is used. we initialize parameters by sampling each element from the Gaussian distribution with mean 0 and variance 0.04 2 .
Parameter optimization is performed using stochastic gradient descent. 2012) is used to automatically adapt the learning rate of each parameter ( = 10 −6 and ρ = 0.95). To avoid gradient explosion, the gradients of the cost function which had 2 norm larger than a predefined threshold τ were normalized to the threshold (Pascanu et al., 2013a). We set τ to 1.0 at the beginning and halve the threshold until the BLEU score does not change much on the development set. Each SGD is a mini-batch of 128 examples. We train our NMT model with the sentences of length up to 80 words in the training data, while for the Moses system we use the full training data. Translations are generated by a beam search and log-likelihood scores are normalized by sentence length. We use a beam width of 10 in all the experiments. Dropout was also applied on the output layer to avoid over-fitting. The dropout rate is set to 0.5. Except when otherwise mentioned, NMT systems are have 4 layers encoders and 4 layers decoders. Table 1 shows BLEU scores on Chinese-English datasets. Clearly DEEPLAU leads to a remarkable improvement over their competitors. Compared to DEEPGRU, DEEPLAU is +4.89 BLEU score higher on average four test sets, showing the modeling power gained from the liner associative connections. We suggest it is because LAUs apply adaptive gate function conditioned on the input which make it able to automatically decide how much linear information should be transferred to the next step.

Results on Chinese-English Translation
To show the power of DEEPLAU, we also make a comparison with previous work. Our best single model outperforms both a phrasedbased MT system (Moses) as well as an open source attention-based NMT system (Groundhog) by +7.3 and +6.8 BLEU points respectively on average. The result is also better than some other state-of-the-art variants of attention-based NMT mode with big margins. After PosUnk and ensemble, DEEPLAU seizes another notable gain of +4.38 BLEU and outperform Moses by +11.68 BLEU.

Results on English-German Translation
The results on English-German translation are presented in Table 2. We compare our NMT systems with various other systems including the winning system in WMT14 (Buck et al., 2014), a phrase-based system whose language models were trained on a huge monolingual text, the Common Crawl corpus. For end-toend NMT systems, to the best of our knowledge, Wu et al. (2016) is currently the SOTA system and about 4 BLEU points on top of previously best reported results even though Zhou et al. (2016) used a much deeper neural network 4 . Following Wu et al. (2016), the BLEU score represents the averaged score of 8 models we trained. Our approach achieves comparable results with SOTA system. As can be seen from the Table 2, DeepLAU performs better than the word based model and even not much worse than the best wordpiece models achieved by Wu et al. (2016)  ple and easy to implement, as opposed to previous models reported in Wu et al. (2016), which dependends on some external techniques to achieve their best performance, such as their introduction of length normalization, coverage penalty, fine-tuning and the RL-refined model.
To evaluate at scale, we also show the results on an English-French task with 12M sentence pairs and 30K vocabulary in Table 3. Luong et al. (2014) achieves BLEU score of 30.4 with a six layers deep Encoder-Decoder model. The two attention models, RNNSearch and RNNsearch-LV achieve BLEU scores of 28.5 and 32.7 respectively. The previous best single NMT Deep-Att model with an 18 layers encoder and 7 layers decoder achieves BLEU score of 35.9. For DEEPLAU, we obtain the BLEU score of 35.1 with a 4 layers encoder and 4 layers decoder, which is on par with the SOTA system in terms of BLEU. Note that Zhou et al. (2016) utilize a much larger depth as well as external alignment model and extensive regularization to achieve their best results.

Analysis
Then we will study the main factors that influence our results on NIST Chinese-English translation task. We also compare our approach with two SOTA topologies which were used in building deep NMT systems.
• Residual Networks (ResNet) are among the pioneering works (Szegedy et al., 2016;He et al., 2016) that utilize extra identity connections to enhance information flow such that very deep neural networks can be effectively optimized. Share the similar idea, Wu et al. (2016) introduced to leverage residual connections to train deep RNNs.
• Fast Forward (F-F) connections were proposed to reduce the propagation path length which is the pioneer work to simplify the training of deep NMT model (Zhou et al., 2016). The work can be viewed as a parametric ResNet with short cut connections between adjacent layers. The procedure takes a linear sum between the input and the newly computed state. Table 4 shows the effect of the novel LAU. By comparing row 3 to row 7, we see that when L Enc and L Dec are set to 2, SYSTEM (L enc ,L Dec ) width AVE.  the average BLEU scores achieved by DEEP-GRU and DEEPLAU are 34.68 and 37.65, respectively. LAU can bring an improvement of 2.97 in terms of BLEU. After increasing the model depth to 4 (row 4 and row 6), the improvement is enlarged to 4.91. When DEEP-GRU is trained with larger depth (say, 4), the training becomes more difficult and the performance falls behind its shallow partner. While for DEEPLAU, as can be see in row 9, with increasing the depth even to L Enc = 8 and L Dec = 6 we can still obtain growth by 0.04 BLEU score. Compared to previous shortcut connection methods (row 5 and row 6), The LAU still achieve meaningful improvements over F-F connections and Residual connections by +1.35 and +2.57 BLEU points respectively.

LAU vs. GRU
DEEPLAU introduces more parameters than DEEPGRU. In order to figure out the effect of DEEPLAU comparing models with the same parameter size, we increase the hidden size of DEEPGRU model. Row 3 shows that, after using a twice larger GRU layer, the BLEU score is 34.68, which is still worse than the corresponding DEEPLAU model with fewer parameters.
Depth vs. Width Next we will study the model size. In Table 4, starting from L Enc = 2 and L Dec = 2 and gradually increasing the model depth, we can achieve substantial improvements in terms of BLEU. With L Enc = 8 and L Dec = 6, our DEEPLAU model yields the best BLEU score. We tried to increase the model depth with the same hidden size but failed to see further improvements.
We then tried to increase the hidden size. By comparing row 2 and row 3, we find the improvements is relative small with a wider hidden size. It is also worth mentioning that a deep and thin network with fewer parameters can still achieve comparable results with its shallow partner. This suggests that depth plays a more important role in increasing the complexity of neural networks than width and our deliberately designed LAU benefit from the optimizing of such a deep model. About Length A more detailed comparison between DEEPLAU (4 layers encoder and 4 layers decoder), DEEPLAU(2 layer encoder and 2 layer decoder) and DEEPGRU (4 layers encoder and 4 layers decoder), suggest that with deep architectures are essential to the superior performance of our system. In particular, we test the BLEU scores on sentences longer than {10, 20, 30, 40, 50, 60} on the merged test set. Clearly, in all curves, performance degrades with increased sentence length. However, DEEPLAU models yield consistently higher BLEU scores than the DEEPGRU model on longer sentences. These observations are consistent with our intuition that very deep RNN model is especially good at modeling the nested latent structures on relatively complicated sentences and LAU plays an important role on optimizing such a complex deep model.

Conclusion
We propose a Linear Associative Unit (LAU) which makes a fusion of both linear and nonlinear transformation inside the recurrent unit. On this way, gradients decay much slower compared to the standard deep networks which enable us to build a deep neural network for machine translation. Our empirical study shows that it can significantly improve the performance of NMT.

acknowledge
We sincerely thank the anonymous reviewers for their thorough reviewing and valuable suggestions. Wang's work is partially supported by National