While neural machine translation (NMT) models provide improved translation quality in an elegant, end-to-end framework, it is less clear what they learn about language. Recent work has started evaluating the quality of vector representations learned by NMT models on morphological and syntactic tasks. In this paper, we investigate the representations learned at different layers of NMT encoders. We train NMT systems on parallel data and use the trained models to extract features for training a classifier on two tasks: part-of-speech and semantic tagging. We then measure the performance of the classifier as a proxy to the quality of the original NMT model for the given task. Our quantitative analysis yields interesting insights regarding representation learning in NMT models. For instance, we find that higher layers are better at learning semantics while lower layers tend to be better for part-of-speech tagging. We also observe little effect of the target language on source-side representations, especially with higher quality NMT models.
翻译:虽然神经机翻译模式(NMT)在一个优雅、端到端的框架内提供了更好的翻译质量,但不太清楚它们了解的语言是什么。最近的工作已经开始评估NMT模式在形态学和合成任务方面学习的矢量表现的质量。在本文件中,我们调查了NMT编码器不同层次所学到的表达方式。我们在平行数据方面对NMT系统进行了培训,并利用经过培训的模型在两种任务上对分类员进行培训,即语音和语义标记。然后,我们测量了分类器的性能,以作为原NMT模型质量的代理。我们的数量分析产生了关于NMT模型中代表学习的有趣洞察力。例如,我们发现较高层在学习语义学方面比较好,而低层对于部分语音标记来说则比较好。我们还注意到目标语言在源端表现方面的影响很小,特别是质量更高的NMT模型。