English-Japanese Neural Machine Translation with Encoder-Decoder-Reconstructor

06/26/2017 ∙ by Yukio Matsumura, et al. ∙ 0

Neural machine translation (NMT) has recently become popular in the field of machine translation. However, NMT suffers from the problem of repeating or missing words in the translation. To address this problem, Tu et al. (2017) proposed an encoder-decoder-reconstructor framework for NMT using back-translation. In this method, they selected the best forward translation model in the same manner as Bahdanau et al. (2015), and then trained a bi-directional translation model as fine-tuning. Their experiments show that it offers significant improvement in BLEU scores in Chinese-English translation task. We confirm that our re-implementation also shows the same tendency and alleviates the problem of repeating and missing words in the translation on a English-Japanese task too. In addition, we evaluate the effectiveness of pre-training by comparing it with a jointly-trained model of forward translation and back-translation.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Recently, neural machine translation (NMT) has gained popularity in the field of machine translation. The conventional encoder-decoder NMT proposed by Cho2014 uses two recurrent neural networks (RNN): one is an encoder, which encodes a source sequence into a fixed-length vector, and the other is a decoder, which decodes the vector into a target sequence. A newly proposed attention-based NMT by DzmitryBahdana2014 can predict output words using the weights of each hidden state of the encoder by the attention mechanism, improving the adequacy of translation.

Even with the success of attention-based models, a number of open questions remain in NMT. Tu2016 argued two of the common problems are over-translation: some words are repeatedly translated unnecessary and under-translation: some words are mistakenly untranslated. This is due to the fact that NMT can not completely convert the information from the source sentence to the target sentence. Mi2016a and Feng2016 pointed out that NMT lacks the notion of coverage vector in phrase-based statistical machine translation (PBSMT), so unless otherwise specified, there is no way to prevent missing translations.

Another problem in NMT is an objective function. NMT is optimized by cross-entropy; therefore, it does not directly maximize the translation accuracy. Shen2016 pointed out that optimization by cross-entropy is not appropriate and proposed a method of optimization based on a translation accuracy score, such as expected BLEU, which led to improvement of translation accuracy. However, BLEU is an evaluation metric based on n-gram precision; therefore, repetition of some words may be present in the translation even though the BLEU score is improved.

Figure 1: Attention-based NMT.
Figure 2: Encoder-Decoder-Reconstructor.

To address to problem of repeating and missing words in the translation, tu2016neural introduce an encoder-decoder-reconstructor framework that optimizes NMT by back-translation from the output sentences into the original source sentences. In their method, after training the forward translation in a manner similar to the conventional attention-based NMT, they train a back-translation model from the hidden state of the decoder into the source sequence by a new decoder to enforce agreement between source and target sentences.

In order to confirm the language independence of the framework, we experiment on two parallel corpora of English-Japanese and Japanese-English translation tasks using encode-decoder-reconstructor. Our experiments show that their method offers significant improvement in BLEU scores and alleviates the problem of repeating and missing words in the translation on English-Japanese translation task, though the difference is not significant on Japanese-English translation task.

In addition, we jointly train a model of forward translation and back-translation without pre-training, and then evaluate this model. As a result, the encoder-decoder-reconstructor can not be trained well without pre-training, so it proves that we have to train the forward translation model in a manner similar to the conventional attention-based NMT as pre-training.

The main contributions of this paper are as follows:

  • Experimental results show that encode-decoder-reconstructor framework achieves significant improvements in BLEU scores (1.0-1.4) for English-Japanese translation task.

  • Experimental results show that encode-decoder-reconstructor framework has to train the forward translation model in a manner similar to the conventional attention-based NMT as pre-training.

2 Related Works

Several studies have addressed the NMT-specific problem of missing or repeating words. Niehues2016 optimized NMT by adding the outputs of PBSMT to the input of NMT. Mi2016a and Feng2016 introduced a distributed version of coverage vector taken from PBSMT to consider which words have been already translated. All these methods, including ours, employ information of the source sentence to improve the quality of translation, but our method uses back-translation to ensure that there is no inconsistency. Unlike other methods, once learned, our method is identical to the conventional NMT model, so it does not need any additional parameters such as coverage vector or a PBSMT system for testing.

The attention mechanism proposed by Meng2016 considers not only the hidden states of the encoder but also the hidden states of the decoder so that over-translation can be relaxed. In addition, the attention mechanism proposed by Feng2016 computes a context vector by considering the previous context vector to prevent over-translation. These works indirectly reduce repeating and missing words, while we directly penalize translation mismatch by considering back-translation.

The encoder-decoder-reconstructor framework for NMT proposed by tu2016neural optimizes NMT by reconstructor using back-translation. They consider likelihood of both of forward translation and back-translation, and then this framework offers significant improvement in BLEU scores and alleviates the problem of repeating and missing words in the translation on a Chinese-English translation task.

3 Neural Machine Translation

Here, we describe the attention-based NMT proposed by DzmitryBahdana2014 as shown in Figure 2.

The input sequence () is converted into a fixed-length vector by the encoder using an RNN. At each time step , the hidden state of the encoder is presented as

(1)

using a bidirectional RNN. The forward state and the backward state are computed by

(2)

and

(3)

where and are nonlinear functions. The hidden states are converted into a fixed-length vector as

(4)

where is a nonlinear function.

The fixed-length vector generated by the encoder is converted into the target sequence () by the decoder using an RNN. At each time step

, the conditional probability of the output word

is computed by

(5)

where is a nonlinear function. The hidden state of the decoder is presented as

(6)

using the hidden state and the target word at the previous time step and the context vector .

The context vector is a weighted sum of each hidden state of the encoder. It is presented as

(7)

and its weight

is a normalized probability distribution. It is computed by

(8)

and

(9)

where is a weight vector and and are weight matrices.

The objective function is defined by

(10)

where is the number of data and is a model parameter.

Incidentally, as a nonlinear function, the hyperbolic tangent function or the rectified linear unit are generally used.

ASPEC NTCIR
train 827,188 1,169,201
dev 1,504 2,741
test 1,556 2,300
Table 1: Numbers of parallel sentences.
English-Japanese
Corpus Model BLEU -value Hours
Baseline-NMT 29.75 - 99
ASPEC +Reconstructor 30.76 0.00 149
+Reconstructor (Jointly-Training) 26.04 - 174
Baseline-NMT 30.03 - 116
NTCIR +Reconstructor 31.40 0.00 166
+Reconstructor (Jointly-Training) 29.04 - 252
Table 2: English-Japanese translation results.
Japanese-English
Corpus Model BLEU -value Hours
Baseline-NMT 21.91 - 87
ASPEC +Reconstructor 22.27 0.10 127
+Reconstructor (Jointly-Training) 16.29 - 187
Baseline-NMT 29.48 - 180
NTCIR +Reconstructor 29.73 0.11 244
+Reconstructor (Jointly-Training) 28.95 - 300
Table 3: Japanese-English translation results.

4 Encoder-Decoder-Reconstructor

4.1 Architecture

Next, we describe the encoder-decoder-reconstructor framework for NMT proposed by tu2016neural as shown in Figure 2. The encoder-decoder-reconstructor consists of two components: the standard encoder-decoder as an attention-based NMT proposed by DzmitryBahdana2014 and the reconstructor which back-translates from the hidden states of decoder to the source sentence.

In their method, the hidden state of the decoder is back-translated into the source sequence () by the reconstructor for the back-translation. At each time step , the conditional probability of the output word is computed by

(11)

where is a nonlinear function. The hidden state of the reconstructor is presented as

(12)

using the hidden state and the source word at the previous time step and the new context vector (inverse context vector) .

The inverse context vector is a weighted sum of each hidden state of the decoder (on forward translation). It is presented as

(13)

and its weight is a normalized probability distribution. It is computed by

(14)

and

(15)

where is a weight vector and and are weight matrices.

The objective function is defined by

(16)

where is the number of data, and are model parameters and is a hyper-parameter which can consider the weight between forward translation and back-translation.

This objective function consists of two parts: forward measures translation fluency, and backward measures translation adequacy. Thus, the combined objective function is more consistent with the goal of enhancing overall translation quality, and can more effectively guide the parameter training for making better translation.

Example 1: Improvement in under-translation.
Input the conditions under which the effect of turbulent viscosity is correctly evaluated were examined on the basis of the relation between turbulent viscosity and numerical viscosity in size .
Baseline-NMT 乱 流 粘性 の 影響 を 正確 に 評価 する 条件 を 検討 し た 。
+Reconstructor 乱 流 粘性 の 影響 を 正確 に 評価 する 条件 を , 乱 流 粘性 と 数値 的 粘性
の 関係 を 基 に 調べ た 。
+Reconstructor 乱 流 粘性 の 影響 を 考慮 し た 条件 を , 乱 流 粘性 と 粘性 の 粘性 と の
 (Jointly-Training) 関係 を もと に 検討 し た 。
Reference 乱 流 粘性 と 数値 粘性 の 大小 関係 により , 乱 流 粘性 の 効果 が 正しく 評価 さ れる 条件 を 検討 し た 。

Example 2: Improvement in over-translation.
Input activity was high in cells of the young , especially newborn infant , and was very slight in cells of 30 ‐ year ‐ old or more .
Baseline-NMT 活動 性 は 若 齢 , 特に 新生児 新生児 で は 30 歳 以上 の 細胞 で 高く ,
30 歳 以上 の 細胞 で は わずか で あっ た 。
+Reconstructor その 活性 は 若 齢 , 特に 新生児 は 細胞 が 高く , 30 歳 以上 の 細胞 で は
わずか で あっ た 。
+Reconstructor 若 齢 の 新生児 で は 活性 は 高かっ た が , 30 歳 以上 の 場合 に は 極めて
 (Jointly-Training) 軽度 で あっ た 。
Reference 活性 は 若い 個体 , 特に 新生児 の 細胞 で 高く , 30 歳 以上 の もの で は ごく わずか で あっ た 。
Table 4: Examples of outputs of English-Japanese translation.
    Baseline-NMT                     Encoder-Decoder-Reconstructor
Figure 3: The attention layer in Example 1 : Improvement in under-translation.
                              Baseline-NMT                           Encoder-Decoder-Reconstructor
Figure 4: The attention layer in Example 2 : Improvement in over-translation.

4.2 Training

The encoder-decoder-reconstructor is trained with likelihood of both the encoder-decoder and the reconstructor on a set of training datasets. tu2016neural trained a back-translation model from the hidden state of the decoder into the source sequence by reconstructor to enforce agreement between source and target sentences using Equation 16 after training the forward translation in a manner similar to the conventional attention-based NMT using Equation 10.

In addition, we experiment to jointly train a model of forward translation and back-translation without pre-training. It may learn a globally optimal model compared to locally optimal model pre-trained using the forward translation.

4.3 Testing

tu2016neural used a beam search to predict target sentences that approximately maximizes both of forward translation and back-translation on testing. In this paper, however, we do not use a beam search for simplicity and effectiveness.

Corpus Model English-Japanese Japanese-English
(i) (ii) (iii) (i) (ii) (iii)
Baseline-NMT 1,141 378 1,045 951 494 1,085
ASPEC +Reconstructor 988 336 1,042 836 418 1,014
+Reconstructor (Jointly-Training) 1,292 446 1,147 1,106 525 1,821
Baseline-NMT 2,122 1,015 1,106 2,521 1,073 1,630
NTCIR +Reconstructor 1,958 922 963 2,187 987 1,422
+Reconstructor (Jointly-Training) 1,978 916 1,078 2,475 1,107 1,610
Table 5: Numbers of redundant and unknown word tokens.

5 Experiments

We evaluated the encoder-decoder-reconstructor framework for NMT on English-Japanese and Japanese-English translation tasks.

5.1 Datasets

We used two parallel corpora: Asian Scientific Paper Excerpt Corpus (ASPEC) Nakazawa et al. (2016) and NTCIR PatentMT Parallel Corpus Goto et al. (2013). Regarding the training data of ASPEC, we used only the first 1 million sentences sorted by sentence-alignment similarity. Japanese sentences were segmented by the morphological analyzer MeCab (version 0.996, IPADIC), and English sentences were tokenized by tokenizer.perl of Moses. Table 1 shows the numbers of the sentences in each corpus. Note that sentences with more than 40 words were excluded from the training data.

5.2 Models

We used the attention-based NMT Bahdanau et al. (2015) as a baseline-NMT, the encoder-decoder-reconstructor Tu et al. (2017) and the encoder-decoder-reconstructor that jointly trained forward translation and back-translation without pre-training. The RNN used in the experiments had 512 hidden units, 512 embedding units, 30,000 vocabulary size and 64 batch size. We used Adagrad (initial learning rate 0.01) for optimizing model parameters. We trained our model on GeForce GTX TITAN X GPU. Note that we set the hyper-parameter on the encoder-decoder-reconstructor same as tu2016neural.

5.3 Results

Tables 2 and 3 show the translation accuracy in BLEU scores, the -value of the significance test by bootstrap resampling Koehn (2004) and training time in hours until convergence. The encoder-decoder-reconstructor Tu et al. (2017) requires slightly longer time to train than the baseline NMT, but we emphasize that decoding time remains the same with the encoder-decoder-reconstructor and baseline-NMT. The results show that the encoder-decoder-reconstructor Tu et al. (2017) significantly improves translation accuracy by 1.01 points on ASPEC and 1.37 points on NTCIR in English-Japanese translation (). However, it does not significantly improve translation accuracy in Japanese-English translation. In addition, it is proved that the encoder-decoder-reconstructor without pre-training worsens rather than improves translation accuracy.

Table 4 shows examples of outputs of English-Japanese translations. In Example 1, “乱 流 粘性 と 数値 粘性 の 大小 関係 により ,” (on the basis of the relation between turbulent viscosity and numerical viscosity in size) is missing in the output of baseline-NMT, but “乱 流 粘性 と 数値 的 粘性 の 関係 を 基 に” (on the basis of the relation between turbulent viscosity and numerical viscosity) is present in the output of encoder-decoder-reconstructor. In Example 2, “新生児” (newborn infant) and “30歳以上の” (of 30 ‐ year ‐ old or more) are repeated in the output of baseline-NMT, but they appear only once in the output of encoder-decoder-reconstructor.

In addition, Figures 4 and 4 show the attention layer on baseline-NMT and encoder-decoder-reconstructor in each example. In Figure 4, although the attention layer of baseline NMT attends input word “turbulent”, the decoder does not output “乱流” (turbulent) but “検討” (examined) at the 13th word. Thus, under-translation may be resulted from the hidden layer or the embedding layer instead of the attention layer. In Figure 4, it is found that the attention layer of baseline-NMT repeatedly attends input words “newborn infant” and “30 ‐ year ‐ old or more”. Consequently, the decoder repeatedly outputs “新生児” (newborn infant) and “30歳以上の” (of 30 ‐ year ‐ old or more). On the other hand, the attention layer of encoder-decoder-reconstructor almost correctly attends input words.

Table 5 shows a comparison of the number of word occurrences for each corpus and model. The columns show (i) the number of words that appear more frequently than the counterparts in the reference, and (ii) the number of words that appear more than once but are not included in the reference. Note that these numbers do not include unknown words, so (iii) shows the number of unknown words. In all the cases, the number of occurrence of redundant words is reduced in encoder-decoder-reconstructor. Thus, we confirmed that encoder-decoder-reconstructor achieves reduction of repeating and missing words while maintaining the quality of translation.

6 Conclusion

In this paper, we evaluated the encoder-decoder-reconstructor on English-Japanese and Japanese-English translation tasks. In addition, we evaluate the effectiveness of pre-training by comparing it with a jointly-trained model of forward translation and back-translation. Experimental results show that the encoder-decoder-reconstructor offers significant improvement in BLEU scores and alleviates the problem of repeating and missing words in the translation on English-Japanese translation task, and the encoder-decoder-reconstructor can not be trained well without pre-training, so it proves that we have to train the forward translation model in a manner similar to the conventional attention-based NMT as pre-training.

References

  • Bahdanau et al. (2015) Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural Machine Translation by Jointly Learning to Align and Translate. Proceedings of the 3rd International Conference on Learning Representations (ICLR), pages 1–15.
  • Cho et al. (2014) Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation.

    Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP),

    pages 1724–1734.
  • Feng et al. (2016) Shi Feng, Shujie Liu, Nan Yang, Mu Li, and Ming Zhou. 2016.

    Improving Attention Modeling with Implicit Distortion and Fertility for Machine Translation.

    Proceedings of the 26th International Conference on Computational Linguistics (COLING), pages 3082–3092.
  • Goto et al. (2013) Isao Goto, Ka-Po Chow, Bin Lu, Eiichiro Sumita, and Benjamin K Tsou. 2013. Overview of the Patent Machine Translation Task at the NTCIR-10 Workshop. Proceedings of the 10th NII Testbeds and Community for Information access Research Conference (NTCIR), pages 260–286.
  • Koehn (2004) Philipp Koehn. 2004. Statistical Significance Tests for Machine Translation Evaluation. Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 388–395.
  • Meng et al. (2016) Fandong Meng, Zhengdong Lu, Hang Li, and Qun Liu. 2016. Interactive Attention for Neural Machine Translation. Proceedings of the 26th International Conference on Computational Linguistics (COLING), pages 2174–2185.
  • Mi et al. (2016) Haitao Mi, Baskaran Sankaran, Zhiguo Wang, and Abe Ittycheriah. 2016. Coverage Embedding Models for Neural Machine Translation. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 955–960.
  • Nakazawa et al. (2016) Toshiaki Nakazawa, Manabu Yaguchi, Kiyotaka Uchimoto, Masao Utiyama, Eiichiro Sumita, Sadao Kurohashi, and Hitoshi Isahara. 2016. ASPEC: Asian Scientific Paper Excerpt Corpus. Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC), pages 2204–2208.
  • Niehues et al. (2016) Jan Niehues, Eunah Cho, Thanh-Le Ha, and Alex Waibel. 2016. Pre-Translation for Neural Machine Translation. Proceedings of the 26th International Conference on Computational Linguistics (COLING), pages 1828–1836.
  • Shen et al. (2016) Shiqi Shen, Yong Cheng, Zhongjun He, Wei He, Hua Wu, Maosong Sun, and Yang Liu. 2016. Minimum Risk Training for Neural Machine Translation. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL), pages 1683–1692.
  • Tu et al. (2017) Zhaopeng Tu, Yang Liu, Lifeng Shang, Xiaohua Liu, and Hang Li. 2017. Neural Machine Translation with Reconstruction.

    Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence (AAAI),

    pages 3097–3103.
  • Tu et al. (2016) Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling Coverage for Neural Machine Translation. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL), pages 76–85.