What do Neural Machine Translation Models Learn about Morphology?
Neural machine translation (MT) models obtain state-of-the-art performance while maintaining a simple, end-to-end architecture. However, little is known about what these models learn about source and target languages during the training process. In this work, we analyze the representations learned by neural MT models at various levels of granularity and empirically evaluate the quality of the representations for learning morphology through extrinsic part-of-speech and morphological tagging tasks. We conduct a thorough investigation along several parameters: word-based vs. character-based representations, depth of the encoding layer, the identity of the target language, and encoder vs. decoder representations. Our data-driven, quantitative evaluation sheds light on important aspects in the neural MT system and its ability to capture word structure.
1 Introduction
Neural network models are quickly becoming the predominant approach to machine translation (MT). Training neural MT (NMT) models can be done in an end-to-end fashion, which is simpler and more elegant than traditional MT systems. Moreover, NMT systems have become competitive with, or better than, the previous state-of-the-art, especially since the introduction of sequence-to-sequence models and the attention mechanism (Bahdanau et al., 2014; Sutskever et al., 2014). The improved translation quality is often attributed to better handling of non-local dependencies and morphology generation (Luong and Manning, 2015; Bentivogli et al., 2016).
However, little is known about what and how much these models learn about each language and its features. Recent work has started exploring the role of the NMT encoder in learning source syntax (Shi et al., 2016), but research studies are yet to answer important questions such as: (i) what do NMT models learn about word morphology? (ii) what is the effect on learning when translating into/from morphologically-rich languages? (iii) what impact do different representations (character vs. word) have on learning? and (iv) what do different modules learn about the syntactic and semantic structure of a language? Answering such questions is imperative for fully understanding the NMT architecture. In this paper, we strive towards exploring (i), (ii), and (iii) by providing quantitative, data-driven answers to the following specific questions:
• Which parts of the NMT architecture capture word structure?
• What is the division of labor between different components (e.g. different layers or encoder vs. decoder)?
• How do different word representations help learn better morphology and modeling of infrequent words?
• How does the target language affect the learning of word structure?
To achieve this, we follow a simple but effective procedure with three steps: (i) train a neural MT system on a parallel corpus; (ii) use the trained model to extract feature representations for words in a language of interest; and (iii) train a classifier using extracted features to make predictions for another task. We then evaluate the quality of the trained classifier on the given task as a proxy to the quality of the extracted representations. In
2
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
this way, we obtain a quantitative measure of how well the original MT system learns features that are relevant to the given task.
We focus on the tasks of part-of-speech (POS) and full morphological tagging. We investigate how different neural MT systems capture POS and morphology through a series of experiments along several parameters. For instance, we contrast word-based and character-based representations, use different encoding layers, vary source and target languages, and compare extracting features from the encoder vs. the decoder.
We experiment with several languages with varying degrees of morphological richness: French, German, Czech, Arabic, and Hebrew. Our analysis reveals interesting insights such as:
• Character-based representations are much better for learning morphology, especially for low-frequency words. This improvement is correlated with better BLEU scores. On the other hand, word-based models are sufficient for learning the structure of common words.
• Lower layers of the MT encoder are better at capturing word structure, while higher layers are more focused on word meaning.
• The target language impacts the kind of information learned by the MT system. Translating into morphologically-poorer languages leads to better source-side word representations. This is partly, but not completely, correlated with BLEU scores.
• The neural decoder learns very little about word structure. The attention mechanism removes much of the burden of learning word representations from the decoder.
2 Methodology
Given a source sentence s = {w1, w2, ..., wN} and a target sentence t = {u1, u2, ..., uM}, we first generate a vector representation for the source sentence using an encoder (Eqn. 1) and then map this vector to the target sentence using a decoder (Eqn. 2) (Sutskever et al., 2014):
ENC : s = {w1, w2, ..., wN} 7! s 2 Rk (1) DEC : s 2 Rk 7! t = {u1, u2, ..., uM} (2)
In this work, we use long short-term memory (LSTM) (Hochreiter and Schmidhuber, 1997)
encoder-decoders with attention (Bahdanau et al., 2014), which we train on parallel data.
After training the NMT system, we freeze the parameters of the encoder and use ENC as a feature extractor to generate vectors representing words in the sentence. Let ENCi(s) denote the encoded representation of word wi. For example, this may be the output of the LSTM after word wi. We feed ENCi(s) to a neural classifier that is trained to predict POS or morphological tags and evaluate the quality of the representation based on our ability to train a good classifier. By comparing the performance of classifiers trained with features from different instantiations of ENC, we can evaluate what MT encoders learn about word structure. Figure 1 illustrates this process. We follow a similar procedure for analyzing representation learning in DEC.
The classifier itself can be modeled in different ways. For example, it may be an LSTM over outputs of the encoder. However, as we are interested in assessing the quality of the representations learned by the MT system, we choose to model the classifier as a simple feed-forward network with one hidden layer and a ReLU non-linearity. Arguably, if the learned representations are good, then a non-linear classifier should be able to extract useful information from them.1 We emphasize that our goal is not to beat the state-of-the-art on a given task, but rather to analyze what NMT models learn about morphology. The classifier is trained with a cross-entropy loss; more details on its architecture are in the supplementary material.
1We also experimented with a linear classifier and observed similar trends to the non-linear case, but overall lower results; Qian et al. (2016b) reported similar findings.
3
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
Ar De Fr Cz
Gold/Pred Gold/Pred Pred Pred
Train 500K/2.7M 888K/4.0M 5.2M 2.0M Dev 63K/114K 45K/50K 55K 35K Test 62K/16K 44K/25K 23K 20K
POS Tags 42 54 33 368 Morph Tags 1969 214 – –
Table 1: Statistics for annotated corpora in Arabic (Ar), German (De), French (Fr), and Czech (Cz).
3 Data
Language pairs We experiment with several language pairs, including morphologically-rich languages, that have received relatively significant attention in the MT community. These include Arabic-, German-, French-, and Czech-English pairs. To broaden our analysis and study the effect of having morphologically-rich languages on both source and target sides, we also include ArabicHebrew, two languages with rich and similar morphological systems, and Arabic-German, two languages with rich but different morphologies.
MT data Our translation models are trained on the WIT3 corpus of TED talks (Cettolo et al., 2012; Cettolo, 2016) made available for IWSLT 2016. This allows for comparable and crosslinguistic analysis. Statistics about each language pair are given in Table 1 (under Pred). We use official dev and test sets for tuning and testing. Reported figures are the averages over test sets.
Annotated data We use two kinds of datasets to train POS and morphological classifiers: goldstandard and predicted tags. For predicted tags, we simply used freely available taggers to annotate the MT data. For gold tags, we use gold-annotated datasets. Table 1 gives statistics for datasets with gold and predicted tags; see supplementary material for details on taggers and gold data. We train and test our classifiers on predicted annotations, and similarly on gold annotations, when we have them. We report both results wherever available.
4 Encoder Analysis
Recall that after training the NMT system we freeze its parameters and use it only to generate features for the POS/morphology classifier. Given a trained encoder ENC and a sentence s with POS/morphology annotation, we generate word features ENCi(s) for every word in the sentence.
We then train a classifier that uses the features ENCi(s) to predict POS or morphological tags.
4.1 Effect of word representation
In this section we compare different word representations extracted with different encoders. Our word-based model uses a word embedding matrix which is initialized randomly and learned with other NMT parameters. For a character-based model we adopt a convolutional neural network (CNN) over character embeddings that is also learned during training (Kim et al., 2015; Costajussà and Fonollosa, 2016); see appendix A.1 for specific settings. In both cases we run the encoder over these representations and use its output ENCi(s) as features for the classifier.
Table 2 shows POS tagging accuracy using features from different NMT encoders. Charbased models always generate better representations for POS tagging, especially in the case of morphologically-richer languages like Arabic and Czech. We observed a similar pattern in the full morphological tagging task. For example, we obtain morphological tagging accuracy of 65.2/79.66 and 67.66/81.66 using word/charbased representations from the Arabic-Hebrew and Arabic-English encoders, respectively.2 The superior morphological power of the char-based model also manifests in better translation quality (measured by BLEU), as shown in Table 2.
Impact of word frequency Let us look more closely at an example case: Arabic POS and morphological tagging. Figure 3 shows the effect of using word-based vs. char-based feature representations, obtained from the encoder of the Arabic-
2The results are not far below dedicated taggers (e.g. 95.1/84.1 on Arabic POS/morphology (Pasha et al., 2014)), indicating that NMT models learn quite good representations.
4
312
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
Hebrew system (other language pairs exhibit similar trends). Clearly, the char-based model is superior to the word-based one. This is true for the overall accuracy (+14.3% in POS, +14.5% in morphology), but more so on OOV words (+37.6% in POS, +32.7% in morphology). Figure 2 shows that the gap between word-based and char-based representations increases as the frequency of the word in the training data decreases. In other words, the more frequent the word, the less need there is for character information. These findings make intuitive sense: the char-based model is able to learn character n-gram patterns that are important for identifying word structure, but as the word becomes more frequent the word-based model has seen enough examples to make a decision.
Analyzing specific tags In Figure 5 we plot confusion matrices for POS tagging using wordbased and char-based representations (from Arabic encoders). While the char-based representations are overall better, the two models still
Figure 4: Increase in POS accuracy with char- vs. word-based representations per tag frequency in the training set; larger bubbles reflect greater gaps.
share similar misclassified tags. Much of the confusion comes from wrongly predicting nouns (NN, NNP). In the word-based case, relatively many tags with determiner (DT+NNP, DT+NNPS, DT+NNS, DT+VBG) are wrongly predicted as non-determined nouns (NN, NNP). In the charbased case, this hardly happens. This suggests that char-based representations are predictive of the presence of a determiner, which in Arabic is expressed as the prefix “Al-” (the definite article), a pattern easily captured by a char-based model.
In Figure 4 we plot the difference in POS accuracy when moving from word-based to char-based representations, per POS tag frequency in the training data. Tags closer to the upper-right corner occur more frequently in the training set and are better predicted by char-based compared to wordbased representations. There are a few fairly frequent tags (in the middle-bottom part of the figure) whose accuracy does not improve much when moving from word- to char-based representations: mostly conjunctions, determiners, and certain par-
5
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
Figure 6: POS tagging accuracy using representations from layers 0 (word vectors), 1, and 2, taken from encoders of different language pairs.
ticles (CC, DT, WP). But there are several very frequent tags (NN, DT+NN, DT+JJ, VBP, and even PUNC) whose accuracy improves quite a lot. Then there are plural nouns (NNS, DT+NNS) where the char-based model really shines, which makes sense linguistically as plurality in Arabic is usually expressed by certain suffixes (“-wn/yn” for masc. plural, “-At” for fem. plural). The charbased model is thus especially good with frequent tags and infrequent words, which is understandable given that infrequent words typically belong to frequent open categories like nouns and verbs.
4.2 Effect of encoder depth
Modern NMT systems use very deep architectures with up to 8 or 16 layers (Wu et al., 2016; Zhou et al., 2016). We would like to understand what kind of information different layers capture. Given
Figure 7: POS and morphological tagging accuracy across layers. Layer 0: word vectors or charbased representations before the encoder; layers 1 and 2: representations after the 1st and 2nd layers.
a trained model with multiple layers, we extract representations from the different layers in the encoder. Let ENCli(s) denote the encoded representation of word wi after the l-th layer. We vary l and train different classifiers to predict POS or morphological tags. Here we focus on the case of a 2- layer encoder-decoder for simplicity (l 2 {1, 2}).
Figure 6 shows POS tagging results using representations from different encoding layers across five language pairs. The general trend is that passing word vectors through the encoder improves POS tagging, which can be explained by contextual information contained in the representations after one layer. However, it turns out that representations from the 1st layer are better than those from the 2nd layer, at least for the purpose of capturing word structure. Figure 7 shows that the same
6
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
pattern holds for both word-based and char-based representations, on Arabic POS and morphological tagging. In all cases, layer 1 representations are better than layer 2 representations.3 In contrast, BLEU scores actually increase when training 2-layer vs. 1-layer models (+1.11/+0.56 BLEU for Arabic-Hebrew word/char-based models). Thus translation quality improves when adding layers but morphology quality degrades. Intuitively, it seems that lower layers of the network learn to represent word structure while higher layers focus more on word meaning. A similar pattern was recently observed in a joint language-vision deep recurrent net (Gelderloos and Chrupała, 2016).
4.3 Effect of target language
While translating from morphologically-rich languages is challenging, translating into such languages is even harder. For instance, our basic system obtains BLEU of 24.69/23.2 on Arabic/Czech to English, but only 13.37/13.9 on English to Arabic/Czech. How does the target language affect the learned source language representations? Does translating into a morphologically-rich language require more knowledge about source language morphology? In order to investigate these questions, we fix the source language and train NMT models on different target languages. For example, given an Arabic source we train Arabic-toEnglish/Hebrew/German systems. These target languages represent a morphologically-poor language (English), a morphologically-rich language with similar morphology to the source language (Hebrew), and a morphologically-rich language with different morphology (German). To make a fair comparison, we train the models on the intersection of the training data based on the source language. In this way the experimental setup is completely identical: the models are trained on the same Arabic sentences with different translations.
Figure 8 shows POS and morphology accuracy of word-based representations from the NMT encoders, as well as corresponding BLEU scores. As expected, translating to English is easier than translating to the morphologically-richer Hebrew and German, resulting in higher BLEU. Despite their similar morphologies, translating Arabic to Hebrew is worse than Arabic to German, which can be attributed to the richer Hebrew morphology
3We found this result to be also true in French, German, and Czech experiments (see the supplementary material).
compared to German. POS and morphology accuracies share an intriguing pattern: the representations that are learned when translating to English are better for predicting POS or morphology than those learned when translating to German, which are in turn better than those learned when translating to Hebrew. This is remarkable given that English is a morphologically-poor language that does not display many of the morphological properties that are found in the Arabic source. In contrast, German and Hebrew have richer morphologies, so one could expect that translating into them would make the model learn more about morphology.
A possible explanation for this phenomenon is that the Arabic-English model is simply better than the Arabic-Hebrew and Arabic-German models, as hinted by the BLEU scores in Table 2. The inherent difficulty in translating Arabic to Hebrew/German may affect the ability to learn good representations of word structure. To probe this more, we trained an Arabic-Arabic autoencoder on the same training data. We found that it learns to recreate the test sentences extremely well, with very high BLEU scores (Figure 8). However, its word representations are actually inferior for the purpose of POS/morphological tagging. This implies that higher BLEU does not necessarily entail better morphological representations. In other words, a better translation model learns more informative representations, but only when it is actually learning to translate rather than merely memorizing the data as in the autoencoder case. We found this to be consistently true also for charbased experiments, and in other language pairs.
7
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
POS Accuracy BLEU Attn ENC DEC Ar-En En-Ar
3 89.62 43.93 24.69 13.37 7 74.10 50.38 11.88 5.04
Table 3: POS tagging accuracy using encoder and decoder representations with/without attention.
5 Decoder Analysis
So far we only looked at the encoder. However, the decoder DEC is a crucial part in an MT system with access to both source and target sentences. In order to examine what the decoder learns about morphology, we first train an NMT system on the parallel corpus. Then, we use the trained model to encode a source sentence and extract features for words in the target sentence. These features are used to train a classifier on POS or morphological tagging on the target side.4 Note that in this case the decoder is given the correct target words oneby-one, similar to the usual NMT training regime.
Table 3 (1st row) shows the results of using representations extracted with ENC and DEC from the Arabic-English and English-Arabic models, respectively. There is clearly a huge drop in representation quality with the decoder.5 At first, this drop seems correlated with lower BLEU in English to Arabic vs. Arabic to English. However, we observed similar low POS tagging accuracy using decoder representations from high-quality models. For instance, the French-to-English model obtains 37.8 BLEU, but its decoder representations give a mere 54.26 accuracy on English POS tagging.
As an alternative explanation for the poor quality of the decoder representations, consider the fundamental tasks of the two NMT modules: encoder and decoder. The encoder’s task is to create a generic, close to language-independent representation of the source sentence, as shown by recent evidence from multilingual NMT (Johnson et al., 2016). The decoder’s task is to use this representation to generate the target sentence in a specific language. Presumably, it is sufficient for the decoder to learn a strong language model to produce morphologically-correct output, without learning much about morphology, while the encoder needs to learn quite a lot about source language morphol-
4In this section we only experiment with predicted tags for lack of available parallel data with gold POS/morph. tags.
5Decoder results are above a majority baseline of 20%, so the decoder still learns something about the target language.
POS Accuracy BLEU ENC DEC Ar-En En-Ar
Word 89.62 43.93 24.69 13.37 Char 95.35 44.54 28.42 13.00
Table 4: POS tagging accuracy using word-based and char-based encoder/decoder representations.
ogy in order to create a good generic representation. In the following section we show that the attention mechanism also plays an important role in the division of labor between encoder and decoder.
5.1 Effect of attention
Consider the role of the attention mechanism in learning useful representations: during decoding, the attention weights are combined with the decoder’s hidden states to generate the current translation. These two sources of information need to jointly point to the most relevant source word(s) and predict the next most likely word. Thus, the decoder puts significant emphasis on mapping back to the source sentence, which may come at the expense of obtaining a meaningful representation of the current word. We hypothesize that the attention mechanism hurts the quality of the target word representations learned by the decoder.
To test this hypothesis, we train NMT models with and without attention and compare the quality of their learned representations. As Table 3 shows (compare 1st and 2nd rows), removing the attention mechanism decreases the quality of the encoder representations, but improves the quality of the decoder representations. Without attention, the decoder is forced to learn more informative representations of the target language.
5.2 Effect of word representation
We also conducted experiments to verify our findings regarding word-based versus character-based representations on the decoder side. By character representation we mean a character CNN on the input words. The decoder predictions are still done at the word-level, which enables us to use its hidden states as word representations.
Table 4 shows POS accuracy of word- vs. charbased representations in the encoder and decoder. While char-based representations improve the encoder, they do not help the decoder. BLEU scores behave similarly: the char-based model leads to better translations in Arabic-to-English, but not
8
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
in English-to-Arabic. A possible explanation for this is that the decoder’s predictions are still done at word level even with the char-based model (which encodes the target input but not the output). In practice, this can lead to generating unknown words. Indeed, in Arabic-to-English the charbased model reduces the number of generated unknowns in the test set by 25%, while in English-toArabic the number of unknowns remains roughly the same between word- and char-based models.
6 Related Work
Analysis of neural models The opacity of neural networks has motivated researchers to analyze such models in different ways. One line of work visualizes hidden unit activations in recurrent neural networks that are trained for a given task (Elman, 1991; Karpathy et al., 2015; Kádár et al., 2016; Qian et al., 2016a). While such visualizations illuminate the inner workings of the network, they are often qualitative in nature and somewhat anecdotal. A different approach tries to provide quantitative analysis by correlating parts of the neural network with linguistic properties, for example by training a classifier to predict features of interest. Different units have been used, from word embeddings (Köhn, 2015; Qian et al., 2016b), through LSTM gates or states (Qian et al., 2016a), to sentence embeddings (Adi et al., 2016). Our work is most similar to Shi et al. (2016), who use hidden vectors from a neural MT encoder to predict syntactic properties on the English source side. In contrast, we focus on representations in morphologically-rich languages and evaluate both source and target sides across several criteria. Vylomova et al. (2016) also analyze different representations for morphologically-rich languages in MT, but do not directly measure the quality of the learned representations.
Word representations in MT Machine translation systems that deal with morphologically-rich languages resort to various techniques for representing morphological knowledge, such as word segmentation (Nieflen and Ney, 2000; Koehn and Knight, 2003) and factored translation models (Koehn and Hoang, 2007). Characters and other sub-word units have become increasingly popular in neural MT, although they had also been used in phrase-based MT (Luong et al., 2010). Such units can be obtained in a pre-processing step – e.g. by byte-pair encoding (Sennrich et al.,
2016) or the word-piece model (Wu et al., 2016) – or learned during training with a character-based convolutional/recurrent sub-network (Costa-jussà and Fonollosa, 2016; Luong and Manning, 2016; Vylomova et al., 2016). The latter approach has the advantage of keeping the original word boundaries without requiring pre- and post-processing. Here we focus on a character CNN which has been used in language modeling and machine translation (Kim et al., 2015; Costa-jussà and Fonollosa, 2016; Jozefowicz et al., 2016). We evaluate the quality of different representations learned by an MT system augmented with a character CNN in terms of POS and morphological tagging, and contrast them with a purely word-based system.
7 Conclusion
Neural nets have become ubiquitous in machine translation due to their elegant architecture and good performance. The representations they use for linguistic units are crucial for obtaining highquality translation. In this work, we investigated how neural MT models learn word structure. We evaluated their representation quality on POS and morphological tagging in a number of languages. Our results lead to the following conclusions:
• Character-based representations are better than word-based ones for learning morphology, especially in rare and unseen words.
• Lower layers of the neural network are more focused on word structure, while higher ones are better for learning word meaning.
• Translating into morphologically-poorer languages leads to better source-side representations. This is partly correlated with BLEU.
• The attentional decoder learns impoverished representations that do not carry much information about morphology.
These insights can guide further development of neural MT systems. For instance, jointly learning translation and morphology can possibly lead to better representations and improved translation. Our analysis indicates that this kind of approach should take into account factors such as the encoding layer and the type of word representation.
Another area for future work is to extend the analysis to other representations (e.g. byte-pair encoding), deeper networks, and more semanticallyoriented tasks such as semantic parsing.
9
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899

Strengths:  - This paper describes experiments that aim to address a crucial problem for NMT: understanding what does the model learn about morphology and syntax, etc.. - Very clear objectives and experiments effectively laid down.              Good state of the art review and comparison. In general, this paper is a pleasure to read. - Sound experimentation framework. Encoder Decoder Recurrent layer outputs are used to train POS morphological classifiers. They show the effect of certain changes in the framework on the classifier accuracy (e.g. use characters instead of words). - Experimentation is carried out on many language pairs. - Interesting conclusions derived from this work, and not all agree with intuition.  Weaknesses:   -  The contrast of character-based vs word-based representations  is slightly lacking: NMT with byte-pair encoding is showing v. strong performance in the literature. It would have been more relevant to have BPE in the mix, or replace word-based representations if three is too many.  - Section 1:   u2026 while higher layers are more focused on word meaning ; similar sentence in Section 7. I am ready to agree with this intuition, but I think the experiments in this paper do not support this particular sentence. Therefore it should not be included, or it should be clearly stressed that this is a reasonable hypothesis based on indirect evidence (translation performance improves but morphology on higher layers does not).  Discussion:  This is a  fine paper that presents a thorough and systematic analysis of the NMT model, and derives several interesting conclusions based on many data points across several language pairs. I find particularly interesting that (a) the target language affects the quality of the encoding on the source side; in particular, when the target side is a morphologically-poor language (English) the pos tagger accuracy for the encoder improves. (b) increasing the depth of the encoder does not improve pos accuracy (more experiments needed to determine what does it improve); (c) the attention layer hurts the quality of the decoder representations.  I wonder if (a) and (c) are actually related? The attention hurts the decoder representation, which is more difficult to learn for a morphologically rich language; in turn, the encoders learn based on the global objective, and this backpropagates through the decoder. Would this not be a strong indication that we need separate objectives to govern the encoder decoder modules of the NMT model?


Deep Character-Level Neural Machine Translation By Learning Morphology
Neural machine translation aims at building a single large neural network that can be trained to maximize translation performance. The encoder-decoder architecture with an attention mechanism achieves a translation performance comparable to the existing phrase-based systems. However, the use of large vocabulary becomes the bottleneck in both training and improving the performance. In this paper, we propose a novel architecture which learns morphology by using two recurrent networks and a hierarchical decoder which translates at character level. This gives rise to a deep character-level model consisting of six recurrent networks. Such a deep model has two major advantages. It avoids the large vocabulary issue radically; at the same time, it is more efficient in training than word-based models and conventional character-based models. Our model obtains a higher BLEU score than the bpe-based model after training for one epoch on En-Fr and En-Cs translation tasks. Moreover, the final BLEU score of our model is comparable to the state-of-the-art systems. Further analyses show that our model is able to learn morphology.
1 Introduction
Neural machine translation (NMT) attempts to build a single large neural network that reads a sentence and outputs a translation (Sutskever et al., 2014). Most of the extant neural machine translations models belong to a family of word-level encoder-decoders (Sutskever et al., 2014; Cho et al., 2014). Recently, Bahdanau et al. (2015) proposed a model with attention mechanism which automati-
cally searches the alignments and greatly improves the performance. However, the use of a large vocabulary seems necessary for the word-level neural machine translation models to improve performance (Sutskever et al., 2014; Cho et al., 2015).
Chung et al. (2016b) listed three reasons behind the wide adoption of word-level modeling: (i) word is a basic unit of a language, (ii) data sparsity, (iii) vanishing gradient of character-level modeling. Consider that a language itself is an evolving system. So it is impossible to cover all words in the language. The problem of rare words that are out of vocabulary (OOV) is a critical issue which can effect the performance of neural machine translation. In particular, using larger vocabulary does improve performance (Sutskever et al., 2014; Cho et al., 2015). However, the training becomes much harder and the vocabulary is often filled with many similar words that share a lexeme but have different morphology.
There are many approaches to dealing with the out-of-vocabulary issue. For example, Gulcehre et al. (2016), Luong et al. (2015) and Cho et al. (2015) proposed to obtain the alignment information of target unknown words, after which simple word dictionary lookup or identity copy can be performed to replace the unknown words in translation. However, these approaches ignore several important properties of languages such as monolinguality and crosslinguality as pointed out by Luong and Manning (2016). Thus, Luong and Manning (2016) proposed a hybrid neural machine translation model which leverages the power of both words and characters to achieve the goal of open vocabulary neural machine translation.
Intuitively, it is elegant to directly model pure characters. However, as the length of sequence grows significantly, character-level translation models have failed to produce competitive results compared with word-based models. In addition, they
2
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
require more memory and computation resource. Especially, it is much difficult to train the attention component. For example, Ling et al. (2015a) proposed a compositional character to word (C2W) model and applied it to machine translation (Ling et al., 2015b). They also used a hierarchical decoder which has been explored before in other context (Serban et al., 2015). However, they found it slow and difficult to train the character-level models, and one has to resort to layer-wise training the neural network and applying supervision for the attention component. In fact, such RNNs often struggle with separating words that have similar morphologies but very different meanings.
In order to address the issues mentioned earlier, we introduce a novel architecture by exploiting the structure of words. It is built on two recurrent neural networks: one for learning the representation of preceding characters and another for learning the weight of this representation of the whole word. Unlike subword-level model based on the byte pair encoding (BPE) algorithm (Sennrich et al., 2016), we learn the subword unit automatically. Compared with the CNN word encoder (Kim et al., 2016; Lee et al., 2016), our model is able to generate a meaningful representation of the word. To decode at character level, we devise a hierarchical decoder which sets the state of the second-level RNN (character-level decoder) to the output of the first-level RNN (word-level decoder), which will generate a character sequence until generating a delimiter. In this way, our model almost keeps the same encoding length for encoder as word-based models but eliminates the use of a large vocabulary. Furthermore, we are able to efficiently train the deep model which consists of six recurrent networks, achieving higher performance.
In summary, we propose a hierarchical architecture (character→ subword→ word→ source sentence → target word → target character) to train a deep character-level neural machine translator. We show that the model achieves a high translation performance which is comparable to the state-ofthe-art neural machine translation model on the task of En-Fr, En-Cs and Cs-En translation. The experiments and analyses further support the statement that our model is able to learn the morphology.
2 Neural Machine Translation
Neural machine translation is often implemented as an encoder-decoder architecture. The encoder
usually uses a recurrent neural network (RNN) or a bidirectional recurrent neural network (BiRNN) (Schuster and Paliwal, 1997) to encode the input sentence x = {x1, . . . , xTx} into a sequence of hidden states h = {h1, . . . ,hTx}:
ht = f1(e(xt),ht−1),
where e(xt) ∈ Rm is an m-dimensional embedding of xt. The decoder, another RNN, is often trained to predict next word yt given previous predicted words {y1, . . . , yt−1} and the context vector ct; that is,
p(yt | {y1, . . . , yt−1}) = g(e(yt−1), st, ct),
where
st = f2(e(yt−1), st−1, ct) (1)
and g is a nonlinear and potentially multi-layered function that computes the probability of yt. The context ct depends on the sequence of {h1, . . . ,hTx}. Sutskever et al. (2014) encoded all information in the source sentence into a fixedlength vector, i.e., ct = hTx . Bahdanau et al. (2015) computed ct by the alignment model which handles the bottleneck that the former approach meets.
The whole model is jointly trained by maximizing the conditional log-probability of the correct translation given a source sentence with respect to the parameters of the model θ:
θ∗ = argmax θ Ty∑ t=1 log p(yt | {y1, . . . , yt−1},x,θ).
For the detailed description of the implementation, we refer the reader to the papers (Sutskever et al., 2014; Bahdanau et al., 2015).
3 Deep Character-Level Neural Machine Translation
We consider two problems in the word-level neural machine translation models. First, how can we map a word to a vector? It is usually done by a lookup table (embedding matrix) where the size of vocabulary is limited. Second, how do we map a vector to a word when predicting? It is usually done via a softmax function. However, the large vocabulary will make the softmax intractable computationally.
We correspondingly devise two novel architectures, a word encoder which utilizes the morphology and a hierarchical decoder which decodes at
3
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
Figure 1: The representation of the word ’anyone.’
character level. Accordingly, we propose a deep character-level neural machine translation model (DCNMT).
3.1 Learning Morphology in a Word Encoder
Many words can be subdivided into smaller meaningful units called morphemes, such as “any-one”, “any-thing” and “every-one.” At the basic level, words are made of morphemes which are recognized as grammatically significant or meaningful. Different combinations of morphemes lead to different meanings. Based on these facts, we introduce a word encoder to learn the morphemes and the rules of how they are combined. Even if the word encoder had never seen “everything” before, with an understanding of English morphology, the word encoder could gather the meaning easily. Thus learning morphology in a word encoder might speedup training.
The word encoder is based on two recurrent neural networks, as illustrated in Figure 1. We compute the representation of the word ‘anyone’ as
ranyone = tanh( 6∑
t=1
wtrt),
where rt is an RNN hidden state at time t, computed by
rt = f(e(xt), rt−1).
Each rt contains information about the preceding characters. The weight wt of each representation rt is computed by
wt = exp(aff(ht)),
where ht is another RNN hidden state at time t and aff() is an affine function which maps ht to a scalar. Here, we use a BiRNN to compute ht as shown in Figure 1. Instead of normalizing it by ∑
t exp(aff(ht)), we use an activation function tanh as it performs best in experiments.
We can regard the weight wi as the energy that determines whether ri is a representation of a morpheme and how it contributes to the representation of the word. Compared with an embedding lookup table, the decoupled RNNs learn the representation of morphemes and the rules of how they are combined respectively, which may be viewed as learning distributed representations of words explicitly. For example, we are able to translate “convenienter” correctly which validates our idea.
After obtaining the representation of the word, we could encode the sentence using a bidirectional RNN as RNNsearch (Bahdanau et al., 2015). The detailed architecture is shown in Figure 2.
3.2 Hierarchical Decoder
To decode at the character level, we introduce a hierarchical decoder. The first-level decoder is similar to RNNsearch which contains the information of the target word. Specifically, st in Eqn. (1) contains the information of target word at time t. Instead of using a multi-layer network following a softmax function to compute the probability of each target word using st, we employ a second-level decoder which generates a character sequence based on st. The second-level decoder either continues the character-level states or resets using word-level states at boundaries. However, it will be intractable or inefficient to conditionally pick outputs from the the first-level decoder when training in batch manner. For example, Luong and Manning (2016) uses two forward passes (one for word-level and another for character-level) in batch training which is less efficient.
In order to decode efficiently, we proposed a variant of the gate recurrent unit (GRU) (Cho et al., 2014; Chung et al., 2014) that used in the secondlevel decoder and we denote it as HGRU (It is possible to use the LSTM (Hochreiter and Schmidhuber, 1997) units instead of the GRU described here). HGRU has a settable state and generates character sequence based on the given state until generating a delimiter. In our model, the state is initialized by the output of the first-level decoder. Once HGRU generates a delimiter, it will
4
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
set the state to the next output of the first-level decoder. Given the previous output character sequence {y0, y1, . . . , yt−1} where y0 is a token representing the start of sentence, and the auxiliary sequence {a0, a1, . . . , at−1} which only contains 0 and 1 to indicate whether yi is a delimiter (a0 is set to 1), HGRU updates the state as follows:
gt−1 = (1− at−1)gt−1 + at−1sit , (2) qjt = σ([Wqe(yt−1)] j + [Uqgt−1] j), (3)
zjt = σ([Wze(yt−1)] j + [Uzgt−1] j), (4) g̃jt = φ([We(yt−1)] j + [U(qt gt−1)]j),
(5)
gjt = z j tg j t−1 + (1− z j t )g̃ j t , (6)
where sit is the output of the first-level decoder which calculated as Eqn. (8). We can compute the probability of each target character yt based on gt with a softmax function:
p(yt | {y1, . . . , yt−1},x) = softmax(gt). (7)
The current problem is that the number of outputs of the first-level decoder is much fewer than the target character sequence. In our model, we use a matrix to unfold the outputs of the first-level decoder, which makes the batch training process more efficient. It is a Ty × T matrix R, where Ty is the number of delimiter (number of words) in the target character sequence and T is the length of the target character sequence. R[i, j1 + 1] to R[i, j2] are set as 1 if j1 is the index of the (i−1)-th delimiter and j2 is the index of the i-th delimiter in the target character sequence. The index of the 0-th delimiter is set as 0. For example, when the target output is “g o ! ” and the output of the first-level decoder is [s1, s2], the unfolding step will be:
[s1, s2] [ 1 1 1 0 0 0 0 0 1 1 ] = [s1, s1, s1, s2, s2],
therefore {si1 , si2 , si3 , si4 , si5} is correspondingly set to {s1, s1, s1, s2, s2} in HGRU iterations. After this procedure, we can compute the probability of each target character by the second-level decoder according to Eqns. (2) to (7).
3.3 Model Architectures
There are totally six recurrent neural networks in our model, which can be divided into four layers as shown in Figure 2. Figure 2 illustrates the training procedure of a basic deep character-level neural
machine translation. It is possible to use multilayer recurrent neural networks to make the model deeper. The first layer is a source word encoder which contains two RNNs as shown in Figure 1. The second layer is a bidirectional RNN sentence encoder which is identical to that of Bahdanau et al. (2015). The third layer is the first-level decoder. It takes the representation of previous target word as a feedback, which is produced by the target word encoder in our model. As the feedback is less important, we use an ordinary RNN to encode the target word. The feedback rYt−1 then combines the previous hidden state ut−1 and the context ct from the sentence encoder to generate the vector st:
st = W1ct +W2rYt−1 +W3ut−1 + b. (8)
With the state of HGRU in the second-level decoder setting to st and the information of previous generated character, the second-level decoder generates the next character until generating an end of sentence token (denoted as </s> in Figure 2). With such a hierarchical architecture, we can train our character-level neural translation model perfectly well in an end-to-end fashion.
3.4 Generation Procedure
We first encode the source sequence as in the training procedure, then we generate the target sequence character by character based on the output st of the first-level decoder. Once we generate a delimiter, we should compute next vector st+1 according to Eqn. (8) by combining feedback rYt from the target word encoder, the context ct+1 from the sentence encoder and the hidden state ut. The generation procedure will terminate once an end of sentence (EOS) token is produced.
4 Experiments
We implement the model using Theano (Bergstra et al., 2010; Bastien et al., 2012) and Blocks (van Merriënboer et al., 2015). We train our model on a single GTX Titan X with 12GB RAM. First we evaluate our model on English-to-French translation task where the languages are morphologically poor. For fair comparison, we use the same dataset as in RNNsearch which is the bilingual, parallel corpora provided by ACL WMT’14. In order to show the strengths of our model, we conduct on the English-to-Czech and Czech-to-English translation tasks where Czech is a morphologically rich language. We use the same dataset as Chung et al.
5
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
Figure 2: Deep character-level neural machine translation. The HGRUs with red border indicate that the state should be set to the output of the first-level decoder.
(2016b) and Lee et al. (2016) which is provided by ACL WMT’151.
4.1 Dataset
We use the parallel corpora for two language pairs from WMT: En-Cs and En-Fr. They consist of 15.8M and 12.1M sentence pairs, respectively. In terms of preprocessing, we only apply the usual tokenization. We choose a list of 120 most frequent characters for each language which coveres nearly 100% of the training data. Those characters not included in the list are mapped to a special token (<unk>). We use newstest2013 (Dev) as the development set and evaluate the models on newstest2015 (Test). We do not use any monolingual corpus.
4.2 Training Details
We follow Bahdanau et al. (2015) to use similar hyperparameters. The bidirectional RNN sentence encoder and the hierarchical decoder both consists of two-layer RNNs, each has 1024 hidden units; We choose 120 most frequent characters for DCNMT and the character embedding dimensionality is 64. The source word is encoded into a 600-dimensional
1http://www.statmt.org/wmt15/translation-task.html
vector. The other GRUs in our model have 512 hidden units.
We use the ADAM optimizer (Kingma and Ba, 2015) with minibatch of 56 sentences to train each model (for En-Fr we use a minibatch of 72 examples). The learning rate is first set to 10−3 and then annealed to 10−4.
We use a beam search to find a translation that approximately maximizes the conditional logprobability which is a commonly used approach in neural machine translation (Sutskever et al., 2014; Bahdanau et al., 2015). In our DCNMT model, it is reasonable to search directly on character level to generate a translation.
5 Result and Analysis
We conduct comparison of quantitative results on the En-Fr, En-Cs and Cs-En translation tasks in Section 5.1. Apart from measuring translation quality, we analyze the efficiency of our model and effects of character-level modeling in more details.
5.1 Quantitative Results
We illustrate the efficiency of the deep characterlevel neural machine translation by comparing with the bpe-based subword model (Sennrich et al.,
6
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
587
588
589
590
591
592
593
594
595
596
597
598
599
2016) and other character-level models. We measure the performance by BLEU score (Papineni et al., 2002).
In Table 1, “Length” indicates the maximum sentence length in training (based on the number of words or characters), “Size” is the total number of parameters in the models. The only difference between CNMT and DCNMT is CNMT uses an ordinary RNN to encode source words (takes the last hidden state). For each test set, the best scores among the models per language pair are bold-faced. Obviously, character-level models are better than the subword-level models, and our model is comparable to the start-of-the-art character-level models. Note that, the purely character model of (5) (Luong and Manning, 2016) took 3 months to train and yielded +0.5 BLEU points compared to our result. We have analyzed the efficiency of our decoder in Section 3.2. Though our model consists of six RNNs, our model is the simplest and the smallest one in terms of the model size. Thus, our model is efficient to train as shown in Table 1.
5.2 Learning Morphology
In this section, we investigate whether our model could learn morphology.
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2
-1.5
-1
-0.5
0
0.5
1
1.5
← notable
← notability
← solvable
← solvability
← reliable
← reliability
← capable
← capability
← flexible ← flexibility
← possible ← possibility
(a) ordinary RNN word encoder
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2
-1.5
-1
-0.5
0
0.5
1
1.5
2
← notable
← notability
← solvable
← solvability
← reliable ← reliability
← capable ← capability
← flexible ← flexibility
← possible ← possibility
(b) our word encoder
Figure 3: Two-dimensional PCA projection of the 600-dimensional representation of the words.
First we want to figure out the difference between an ordinary RNN word encoder and our word encoder. We choose some words with similar meaning but different in morphology as shown in Figure 3. We could find in Figure 3(a) that the words ending with “ability”, which are encoded by the ordinary RNN word encoder, are jammed together. In contrast, the representations produced by our encoder are more reasonable and the words with similar meaning are closer. Compared with the CNN word encoder (Kim et al., 2016; Lee et al., 2016), the RNN word encoder in our model is able to generate a meaningful representation of the word. In order to obtain such meaningful representations of words, we need the explicit segmentation which indicates the boundary of words.
Then we analyze how our word encoder learns morphemes and the rules of how they are combined. We demonstrate the encoding details on “any*” and “every*”. Figure 4(a) shows the energy of each character, more precisely, the energy of preceding characters. We could see that the last character of a morpheme will result a relative large energy (weight) like “any” and “every” in these words. Moreover, even the preceding characters are different, it will produce a similar weight for the same morpheme like “way” in “anyway” and “everyway”. The two-dimensional PCA projection
7
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
Model Size Src Trgt Length Epochs Days Dev Test
E n-
Fr bpe2bpe(1) - bpe bpe 50 50 - - 26.91 29.70
C2W(2) ∼ 54 M char char 300 300 ∼ 2.8 ∼ 27 25.89 27.04 CNMT ∼ 52 M char char 300 300 ∼ 3.8 ∼ 21 28.19 29.38
DCNMT ∼ 54 M char char 300 300 1 ∼ 7 27.02 28.13 ∼ 2.8 ∼ 19 29.31 30.56
E n-
C s
bpe2bpe(1) - bpe bpe 50 50 - - 15.90 13.84 bpe2char(3) ∼ 76 M bpe char 50 500 - - - 16.86
char(5) - char char 600 600 > 4 ∼ 90 - 17.5
DCNMT ∼ 54 M char char 450 450 1 ∼ 5 15.50 14.87 ∼ 2.9 ∼ 15 17.89 16.96
C s-
E n bpe2bpe(1) - bpe bpe 50 50 - - 21.24 20.32 bpe2char(3) ∼ 76 M bpe char 50 500 ∼ 6.1 ∼ 14 23.27 22.42 char2char(4) ∼ 69 M char char 450 450 ∼ 7.9 ∼ 30 23.38 22.46
DCNMT ∼ 54 M char char 450 450 1 ∼ 5 20.50 19.75 ∼ 4.6 ∼ 22 23.24 22.48
Table 1: BLEU scores of different models on three language pairs. We report the BLEU scores of DCNMT when trained after one epoch in the above line and the final scores in the following line. The results of other models are taken from (1) Firat et al. (2016), (3) Chung et al. (2016b), (4) Lee et al. (2016) and (5) Luong and Manning (2016) respectively, except (2) is trained according to Ling et al. (2015b). The training efficiency of each model is compared in terms of training epochs and training days.
in Figure 4(b) further validates our idea. The word encoder may be able to guess the meaning of “everything” even it had never seen “everything” before, thus speedup learning. More interestingly, we find that not only the ending letter has high energy, but also the beginning letter is important. It matches the behavior of human perception (White et al., 2008).
Moreover, we apply our trained word encoder to Penn Treebank Line 1. Unlike Chung et al. (2016a), we are able to detect the boundary of the subword units. As shown in Figure 5, “consumers”, “monday”, “football” and “greatest” are segmented into “consum-er-s”,“mon-day”, “foot-ball” and “greatest” respectively. Since there are no explicit delimiters, it may be more difficult to detect the subword units.
5.3 Benefiting from learning morphology
As analyzed in Section 5.2, learning morphology could speedup learning. This has also been shown in Table 1 (En-Fr and En-Cs task) from which we see that when we train our model just for one epoch, the obtained result even outperforms the final result with bpe baseline.
Another advantage of our model is the ability to translate the misspelled words or the nonce words. The character-level model has a much better chance recovering the original word or sentence. In Table 2, we list some examples where the source sentences are taken from newstest2013 but we change some words to misspelled words or nonce words. We also list the translations from Google translate2 and online demo of neural machine translation by LISA.
As listed in Table 2(a), DCNMT is able to translate out the misspelled words correctly. For a wordbased translator, it is never possible because the misspelled words are mapped into <unk> token before translating. Thus, it will produce an <unk> token or just take the word from source sentence (Gulcehre et al., 2016; Luong et al., 2015). More interestingly, DCNMT could translate “convenienter” correctly as shown in Table 2(b). By concatenating “convenient” and “er”, we get the comparative adjective form of “convenient” which never appears in the training set; however, our model guessed it
2The translations by Google translate were made on February 2, 2017.
8
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
peak
energy c o n s u me r s ma y wa n t t o mo v e t h e i r t e l e p h o n e s a l i t t l e c l o s e r t o t h e t v s e t < u n k > < u n k > wa t c h i n g
peak
energy a b c ' s mo n d a y n i g h t f o o t b a l l c a n n o w v o t e d u r i n g < u n k > f o r t h e g r e a t e s t p l a y i n N y e a r s f r o m
peak
energy a mo n g f o u r o r f i v e < u n k > < u n k > t w o w e e k s a g o v i e w e r s o f s e v e r a l n b c < u n k > c o n s u me r s e g me n t s
Figure 5: Subword-level boundary detected by our word encoder.
(a) Misspelled words
Source For the time being howeve their research is unconclusive.
Reference Leurs recherches ne sont toutefois pas concluantes pour l’instant.
Google translate Pour l’instant, leurs recherches ne sont pas concluantes.
LISA Pour le moment UNK leur recherche est UNK.
DCNMT Pour le moment, cependant, leur recherche n’est pas concluante.
(b) Nonce words (morphological change)
Source Then we will be able to supplement the real world with virtual objects in a much convenienter form .
Reference Ainsi , nous pourrons complter le monde rel par des objets virtuels dans une forme plus pratique .
Google translate Ensuite, nous serons en mesure de complter le monde rel avec des objets virtuels dans une forme beaucoup plus pratique.
LISA Ensuite, nous serons en mesure de complter le vrai monde avec des objets virtuels sous une forme bien UNK.
DCNMT Ensuite, nous serons en mesure de complter le monde rel avec des objets virtuels dans une forme beaucoup plus pratique.
Table 2: Sample translations. The word-level model is unable to recognize the misspelled words. Our model has a much better chance to recover the original word.
correctly based on the morphemes and the rules. More sample translations are provided in the supplementary material.
6 Conclusion
In this paper we have proposed an hierarchical architecture to train the deep character-level neural machine translation model by introducing a novel word encoder and a multi-leveled decoder. We have demonstrated the efficiency of the training process and the effectiveness of the model in comparison with the word-level and other characterlevel models. The BLEU score implies that our deep character-level neural machine translation model likely outperforms the word-level models and is competitive with the state-of-the-art character-based models. It is possible to further improve performance by using deeper recurrent net-
works (Wu et al., 2016), training for more epochs and training with longer sentence pairs.
As a result of the character-level modeling, we have solved the out-of-vocabulary (OOV) issue that word-level models suffer from, and we have obtained a new functionality to translate the misspelled or the nonce words. More importantly, the deep character-level model is able to learn the similar embedding of the words with similar meanings like the word-level models. Finally, it would be potentially possible that the idea behind our approach could be applied to many other tasks such as speech recognition and text summarization.
9
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899

- Strengths: In general, the paper is well structured and clear. It is possible to follow most of the explanation, the ideas presented are original and the results obtained are quite interesting.  - Weaknesses: I have some doubts about the interpretation of the results. In addition, I think that some of the claims regarding the capability of the method proposed to learn morphology are not propperly backed by scientific evidence.  - General Discussion:  This paper explores a complex architecture for character-level neural machine translation (NMT). The proposed architecture extends a classical encoder-decoder architecture by adding a new deep word-encoding layer capable of encoding the character-level input into sub-word representations of the source-language sentence. In the same way, a deep word-decoding layer is added to the output to transform the target-language sub-word representations into a character sequence as the final output of the NMT system. The objective of such architecture is to take advantage of the benefits of character-level NMT (reduction of the size of the vocabulary and flexibility to deal with unseen words) and, at the same time, improving the performance of the whole system by using an intermediate representation of sub-words to reduce the size of the input sequence of characters. In addition, the authors claim that their deep word-encoding model is able to learn morphology better than other state-of-the-art approaches.  I have some concerns regarding the evaluation. The authors compare their approach to other state-of-the-art systems taking into account two parameters: training time and BLEU score. However, I do not clearly see the advantage of the model proposed (DCNMT) in front of other approaches such as bpe2char. The difference between both approaches as regards BLEU score is very small (0.04 in Cs-En and 0.1 in En-Cs) and it is hard to say if one of them is outperforming the other one without statistical significance information: has statistical significance been evaluated? As regards the training time, it is worth mentioning that the bpe2char for Cs-En takes 8 days less than DCNMT. For En-Cs training time is not provided (why not?) and for En-Fr bpe2char is not evaluated. I think that a more complete comparison with this system should be carried out to prove the advantages of the model proposed.  My second concern is on the 5.2 Section, where authors start claiming that they investigated about the ability of their system to learn morphology. However, the section only contains a examples and some comments on them. Even though these examples are very well chosen and explained in a very didactic way, it is worth noting that no experiments or formal evaluation seem to have been carried out to support the claims of the authors. I would definitely encourage authors to extend this very interesting part of the paper that could even become a different paper itself. On the other hand, this Section does not seem to be a critical point of the paper, so for the current work I may suggest just to move this section to an appendix and soften some of the claims done regarding the capabilities of the system to learn morphology.  Other comments, doubts and suggestions:   - There are many acronyms that are used but are not defined (such as LSTM, HGRU, CNN or PCA) or which are defined after starting to use them (such as RNN or BPE). Even though some of these acronyms are well known in the field of deep learning, I would encourage the authors to defined them to improve clearness.   - The concept of energy is mentioned for the first time in Section 3.1. Even though the explanation provided is enough at that point, it would be nice to refresh the idea of energy in Section 5.2 (where it is used several times) and providing some hints about how to interpret it: a high energy on a character would be indicating that the current morpheme should be split at that point? In addition, the concept of peak (in Figure 5) is not described.   - When the acronym BPE is defined, capital letters are used, but then, for the rest of mentions it is lower cased; is there a reason for this?   - I am not sure if it is necessary to say that no monolingual corpus is used in Section 4.1.   - It seems that there is something wrong with Figure 4a since the colours for the energy values are not shown for every character.   - In Table 1, the results for model (3) (Chung et al. 2016) for Cs-En were not taken from the papers, since they are not reported. If the authors computed these results by themselves (as it seems) they should mention it.   - I would not say that French is morphologically poor, but rather that it is not that rich as Slavic languages such as Czech.   - Why a link is provided for WMT'15 training corpora but not for WMT'14?   - Several references are incomplete  Typos:    -  ..is the bilingual, parallel corpora provided...  to  ..are the bilingual, parallel corpora provided...     -  Luong and Manning (2016) uses  to  Luong and Manning (2016) use     -  HGRU (It is  to  HGRU (it is     -  coveres  to  covers     -  both consists of two-layer RNN, each has 1024  to  both consist of two-layer RNN, each have 1024     -  the only difference between CNMT and DCNMT is CNMT  to  the only difference between CNMT and DCNMT is that CNMT