Neural Machine Translation with Recurrent Highway Networks

Recurrent Neural Networks have lately gained a lot of popularity in language modelling tasks, especially in neural machine translation(NMT). Very recent NMT models are based on Encoder-Decoder, where a deep LSTM based encoder is used to project the source sentence to a fixed dimensional vector and then another deep LSTM decodes the target sentence from the vector. However there has been very little work on exploring architectures that have more than one layer in space(i.e. in each time step). This paper examines the effectiveness of the simple Recurrent Highway Networks(RHN) in NMT tasks. The model uses Recurrent Highway Neural Network in encoder and decoder, with attention .We also explore the reconstructor model to improve adequacy. We demonstrate the effectiveness of all three approaches on the IWSLT English-Vietnamese dataset. We see that RHN performs on par with LSTM based models and even better in some cases.We see that deep RHN models are easy to train compared to deep LSTM based models because of highway connections. The paper also investigates the effects of increasing recurrent depth in each time step.


Introduction
Neural Machine Translation(NMT) is a recent approach towards machine translation( [6], [2], [1] , [3]).In contradiction with the conventional Statistical Machine Translation(SMT) system ( [7]) which consists of many small sub-components that are tuned separately, in neural machine translation the whole neural network is jointly trained to maximize the conditional probability of a correct translation given a source sentence, using the bilingual corpus. The use of Neural Networks for Machine Translation leads to fluent translation.Popular neural machine translation models( [2], [1], [3]) use stacked LSTMs, which read through the source sentence one word at a time till it reaches the end of sequence symbol< eos > tag, then it starts to emit target words one by one till it generates the end of sequence < eos > tag. We move in the same direction, but instead of stacking layers of LSTM, we stack layers within each time step, as illustrated in Figure 1. Each time block is recurrent highway network following the work of [4] . With this architecture we demonstrate their effect on machine translation when layers within a time step is increased one by one.Parallelly with the neural machine translation(NMT), the concept of "attention" has gained a lot of popularity in recent years( [2], [3]). We follow the attention model by [3] as our base model. With IWSLT English-Vietnamese dataset we found that without attention increasing the recurrent depth does not affect the BLEU [8] score much, whereas with attention it shows a significant increase in the BLEU score with increasing recurrent depth. The problem with these vanilla attention models is that translation generated by these models often lack adequacy.There is a problem of over-translation and under-translation i.e some words are translated more than once ,while some words are not translated at all.To address this problem we use reconstructor model( [9]) which we will discuss in Section 4.

Related Work
Even prior to the recent end-to-end NMT models neural networks were used for SMT based translation with some success.The concept of end-to-end learning for machine translation has been attempted in the past with limited success. From then its a long journey to the end-to-end models( [1,2,3,6]) which have outperformed the previous SMT baselines( [7]). Our work being the first application of RHN in neural machine translation task, is very close to the work [1], [3] and [9]. At the same time we take the motivation to apply the RHN in this area from [5]; who has shown the success of recurrent highway network(RHN) in automatic speech recognition.

Recurrent Highway Network
Recurrent state transition in RNN is described by Similarly, a Recurrent Highway Network(RHN) layer has multiple highway layers in the recurrent state transition.RHN were first introduced in [4].
Let, W H,T,C ∈ R n×m and R H l ,T l ,C l ∈ R n×n represent the weights matrices of the H nonlinear transform and the T and C gates at layer l = 1, ..., L. The biases are denoted by b H l ,T l ,C l ∈ R n and let s l denote a intermediate output at layer l with s[t 0 ] = y [t −1] . Then an RHN layer with a recurrence depth of L is described by: where and It is to be observed that a RHN layer with L = 1 is essentially a basic variant of an LSTM layer. The computation graph for a RHN block is illustrated in Figure 2.

Model
Many sequential processing tasks require complex nonlinear transition functions from one step to the next. However, recurrent neural networks with "deep" transition functions remain difficult to train, even when using Long Short-Term Memory (LSTM) networks as shown by ([4], [11]).We use existing neural machine translation models with recurrent highway networks(which extend the LSTM architecture to allow step-to-step transition depths larger than one) as their recurrent block .

Model 1
We propose a neural machine translation model using the recurrent highway network architecture given by [4], and we use encoder-decoder system on this architecture with attention as given by [3] as our two base models.We use RHN instead of LSTM to model conditional probability of target sentence given source.

Model 2
The main problem with previous models and attention mechanisms was that sometimes translation produced by them lacked adequacy.There are two reasons for this: -Over-Translation-Some words are translated again and again.This is because there is no mechanism in the previous architecture to see that a word which is translated is not heavily attended.
-Under-Translation-Some words are not translated at all.This is because there is no mechanism to make sure that all words are attended or translated.
To tackle this problem we use model 1 with a reconstructor block as in [9] .The encoder-decoder framework is used to translate source sentence into target sentence.The decoder-reconstructor framework is used to convert target sentence into source sentence again.There is maximum information flow from encoder to decoder so that the reconstructor is able to reproduce source sentence from target sentence.By using reconstructor,model 2 tries to make sure that almost all source words are translated into target sentence so that reconstructor can reconstruct source words later.Thus ,translation produced is fluent and adequate.We use RHN instead of LSTM to model conditional probability of target sentence given source and to model conditional probability of source sentence given target hidden states (in reconstructor block). The thing to be noted is that we use the reconstructor block only during training phase.During inference,we use the regular encoder-decoder framework without reconstructor block.Unlike [9],we only Fig. 3. Example of an reconstructor-based NMT system as described in ( [9]).Green blocks are part of reconstructor. For clarity, the embedding and projection layers are not shown in Figure. use reconstructor in training phase and not during inference.The loss function used for training comprises of two terms,decoder loss and reconstructor loss. We train the neural network by minimizing two loss terms.The first term decoder loss L d ,is the log probability of a correct translation T given the source sentence S. So the training objective is The second term reconstructor loss L r ,is the log probability of a correct translation S given target hidden states H.
where S is the training set. The final loss function is given by: where β is a hyperparameter which reflects the importance of reconstruction compared to translation task and should be tuned based on the dataset used.

Experiments
We applied our method on the IWSLT English-Vietnamese dataset in both directions. Reference sentences are used to compute BLEU score of the translated sentences. We changed the number of hidden units per cell and recurrence depth(no. of layer in each time step) while keeping all other parameters constant. We report the performance of these translation models in Table 1 , and visualize the resulting translations. We report the performance of these translation models using LSTM in Table 2.

Dataset details
IWSLT English-Vietnamese data set is used for our experiment. The dataset has 133k sentence pairs of training sentences. We used 'tst2012'(en-vi) and 'tst2013'(en-vi) as our development and test dataset respectively. The dataset is available at Stanford NLP web page.Out of vocab words produced during translation, are replaced by an '< unk >' token.

Evaluation Metrics
-Perplexity :In natural language processing, perplexity is a way of evaluating language models. A language model is a probability distribution over entire sentences or texts.
-BLEU Score:BLEU [8], or the Bilingual Evaluation Understudy, is a score for comparing a candidate translation of text to one or more reference translations.

Training details
-We have used SGD with a learning rate of 0.1 .
-We have used a dropout of 20%.
-A batch size of 32 is used.
-Roughly all the experiments ran for 30 epochs.

Sample Translations
A few example translations produced by our model1 and model2 along with the reference sentences are shown in Table 3.From this randomly picked sample it is visible that, NMT2 avoids problems of over translation as seen in NMT1.Now we check the translation of the randomly picked sentences for recurrence depth 3 and 4 in Table 4. From this randomly picked sample it is visible that, increasing the recurrence depth helps to capture the semantics of the language better.  Depth-3 When I was a little bit , I thought , "Can see this country is the best country in the world and I often sing " what I can't envy".
Depth-4 When I was a little boy , I think < unk > is the best country in the world and I often sing "We doesn't have to envy".

Ref
Since my family couldn't understand Chinese , I thought my family was going to be arrested . Depth-3 Because my family didn't understand Mandarin , so I thought they would be arrested . Depth-4 Because my family didn't know Chinese ,so I thought they would be arrested .

Model analysis
To check how good our model is learning with the change of layers i.e. recurrence depth, we plot the training perplexity of the model 1 with different number of recurrence depth.
It can be seen that, there is a visible difference in the curve when we change depth from 2 to 3, and a bit less difference when we change from 3 to 4. Perplexity decreases with the increment of recurrence depth( Figure 4).As we can see in Table 5,RHNN models have less number of parameters as compared to LSTM and are able to perform as good as LSTM models or in some cases even better.

Conclusion
We use Recurrent Highway Networks, a powerful new model designed to take advantage of increased depth in the recurrent transition while retaining the ease of training of LSTMs.Our model works reasonably well with the IWSLT English-Vietnamese dataset in terms of BLEU score.The model shows significant amount of increase in score when we increase the recurrence depth one layer at a time. The increasing trend is largely visible when we change from 2 to 3 layers, a bit less from 4 to 5 layers. It is almost negligible when we change the recurrence depth from 5 to 6. Hence, we claim in machine translation task, we get the advantage of increasing the recurrence depth , which is similar to the results as mentioned in [1]; regarding the stack depth of LSTM's. Also to further produce adequate translation ,we use reconstructor model which also results in significant improvement.By using reconstructor block along with attention,we get improvement of almost 1 BLEU score compared to model without reconstruction.Also, we see that with beam search we were further able to improve translation and got improvement of around 1.5 BLEU score compared to benchmark result provided by [10]. [4] showed that deep LSTM are difficult to train compared to deep RHN .We can also see from Table 5 that the results are similar to work of [4] which shows that in language modelling task also with almost half the parameters RHNN are able to outperform LSTM based language model. The same is true with neural machine translation task.