MASS: Masked Sequence to Sequence Pre-training for Language Generation | AGIDaily
AGI Daily
资讯日报词条论文人物新创
返回论文列表

暂无章节

返回论文列表
目录

MASS: Masked Sequence to Sequence Pre-training for Language Generation

收录于 ICML 2019 会议论文被引 1,058 次
打开论文来源

MASS: Masked Sequence to Sequence Pre-training for Language Generation

MASS:面向语言生成的掩码序列到序列预训练

Kaitao Song * 1 Xu Tan * 2 Tao Qin 2 Jianfeng Lu 1 Tie-Yan Liu 2

  • Equal contribution 1 Key Laboratory of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, Nanjing University of Science and Technology 2 Microsoft Research. Correspondence to: Tao Qin taoqin@microsoft.com.

Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, PMLR 97, 2019. Copyright 2019 by the author(s).

Abstract

摘要

Pre-training and fine-tuning, e.g., BERT (Devlin et al., 2018), have achieved great success in language understanding by transferring knowledge from rich-resource pre-training task to the low/zero-resource downstream tasks. Inspired by the success of BERT, we propose MAsked Sequence to Sequence pre-training (MASS) for encoder-decoder based language generation. MASS adopts the encoder-decoder framework to reconstruct a sentence fragment given the remaining part of the sentence: its encoder takes a sentence with randomly masked fragment (several consecutive tokens) as input, and its decoder tries to predict this masked fragment. In this way, MASS can jointly train the encoder and decoder to develop the capability of representation extraction and language modeling. By further fine-tuning on a variety of zero/low-resource language generation tasks, including neural machine translation, text summarization and conversational response generation (3 tasks and totally 8 datasets), MASS achieves significant improvements over baselines without pre-training or with other pre-training methods. Specially, we achieve state-of-the-art accuracy (37.5 in terms of BLEU score) on the unsupervised English-French translation, even beating the early attention-based supervised model (Bahdanau et al., 2015b).

预训练加微调,例如 BERT(Devlin et al., 2018),已经通过把知识从数据充足的预训练任务转到低资源或零资源的下游任务上,在语言理解中取得很大成功。受 BERT 的启发,我们提出面向编码器–解码器语言生成的掩码序列到序列预训练(MAsked Sequence to Sequence pre-training, MASS)。MASS 采用编码器–解码器框架,在给定句子其余部分的条件下重建一个句子片段:编码器的输入是随机遮住一段连续词的句子,解码器则尝试预测这段被遮住的内容。这样,MASS 可以联合训练编码器和解码器,分别培养表示抽取和语言建模的能力。再进一步微调到多种零资源或低资源的语言生成任务上,包括神经机器翻译、文本摘要和对话回复生成(3 项任务、共 8 个数据集),MASS 相对不预训练或其他预训练方法的基线都有明显提升。特别地,我们在无监督英-法翻译上达到当时最好的精度(BLEU 为 37.5),甚至超过早期基于注意力的有监督模型(Bahdanau et al., 2015b)。

1 We release the codes in https://github.com/microsoft/MASS.

1 我们在 https://github.com/microsoft/MASS 发布了代码。

  1. Introduction
  1. 引言

Pre-training and fine-tuning are widely used when target tasks are of low or zero resource in terms of training data, while pre-training has plenty of data (Girshick et al., 2014; Szegedy et al., 2015; Ouyang et al., 2015; Dai & Le, 2015; Howard & Ruder, 2018; Radford et al., 2018; Devlin et al., 2018). For example, in computer vision, models are usually pre-trained on the large scale ImageNet dataset and then fine-tuned on downstream tasks like object detection (Szegedy et al., 2015; Ouyang et al., 2015) or image segmentation (Girshick et al., 2014). Recently, pre-training methods such as ELMo (Peters et al., 2018), OpenAI GPT (Radford et al., 2018) and BERT (Devlin et al., 2018) have attracted a lot of attention in natural language processing, and achieved state-of-the-art accuracy in multiple language understanding tasks such as sentiment classification (Socher et al., 2013), natural language inference (Bowman et al., 2015), named entity recognition (Tjong Kim Sang & De Meulder, 2003) and SQuAD question answering (Rajpurkar et al., 2016), which usually have limited supervised data. Among the pre-training methods mentioned above, BERT is the most prominent one by pre-training the bidirectional encoder representations on a large monolingual corpus through masked language modeling and next sentence prediction.

当目标任务的训练数据属于低资源甚至零资源、而预训练又有充足数据时,预训练加微调被广泛使用(Girshick et al., 2014; Szegedy et al., 2015; Ouyang et al., 2015; Dai & Le, 2015; Howard & Ruder, 2018; Radford et al., 2018; Devlin et al., 2018)。例如在计算机视觉中,模型通常先在大规模 ImageNet 数据集上预训练,再微调到目标检测(Szegedy et al., 2015; Ouyang et al., 2015)或图像分割(Girshick et al., 2014)等下游任务。近来,ELMo(Peters et al., 2018)、OpenAI GPT(Radford et al., 2018)和 BERT(Devlin et al., 2018)等预训练方法在自然语言处理中受到广泛关注,并在情感分类(Socher et al., 2013)、自然语言推理(Bowman et al., 2015)、命名实体识别(Tjong Kim Sang & De Meulder, 2003)以及 SQuAD 问答(Rajpurkar et al., 2016)等多种通常只有有限监督数据的语言理解任务上取得当时最好的精度。在上述方法中,BERT 最为突出:它在大规模单语语料上,通过掩码语言模型和下句预测来预训练双向编码器表示。

Different from language understanding, language generation aims to generate natural language sentences conditioned on some inputs, including tasks like neural machine translation (NMT) (Cho et al., 2014; Bahdanau et al., 2015a; Vaswani et al., 2017), text summarization (Ayana et al., 2016; Suzuki & Nagata, 2017; Gehring et al., 2017) and conversational response generation (Shang et al., 2015; Vinyals & Le, 2015). Language generation tasks are usually data-hungry, and many of them are low-resource or even zero-source in terms of training data. Directly applying a BERT like pre-training method on these natural language generation tasks is not feasible, since BERT is designed for language understanding, which are usually handled by just one encoder or decoder. Therefore, how to design pre-training methods for the language generation tasks (which usually adopt the encoder-decoder based sequence to sequence learning framework) is of great potential and importance.

与语言理解不同,语言生成的目标是在给定某些输入的条件下生成自然语言句子,包括神经机器翻译(NMT)(Cho et al., 2014; Bahdanau et al., 2015a; Vaswani et al., 2017)、文本摘要(Ayana et al., 2016; Suzuki & Nagata, 2017; Gehring et al., 2017)以及对话回复生成(Shang et al., 2015; Vinyals & Le, 2015)等任务。语言生成任务通常很吃数据,其中不少在训练数据上属于低资源,甚至是零资源。直接把 BERT 一类预训练方法用到这些自然语言生成任务上并不可行,因为 BERT 是为语言理解设计的,而理解任务通常只由单个编码器或解码器来处理。因此,如何为通常采用编码器–解码器序列到序列学习框架的语言生成任务设计预训练方法,既有潜力,也很重要。

In this paper, inspired by BERT, we propose a novel objective for pre-training: MAsked Sequence to Sequence learning (MASS) for language generation. MASS is based on the sequence to sequence learning framework: its encoder takes a sentence with a masked fragment (several consecutive tokens) as input, and its decoder predicts this masked fragment conditioned on the encoder representations. Unlike BERT or a language model that pre-trains only the encoder or decoder, MASS is carefully designed to pre-train the encoder and decoder jointly in two steps: 1) By predicting the fragment of the sentence that is masked on the encoder side, MASS can force the encoder to understand the meaning of the unmasked tokens, in order to predict the masked tokens in the decoder side; 2) By masking the input tokens of the decoder that are unmasked in the source side, MASS can force the decoder rely more on the source representation other than the previous tokens in the target side for next token prediction, better facilitating the joint training between encoder and decoder.

本文受 BERT 启发,提出一种新的预训练目标:面向语言生成的掩码序列到序列学习(MAsked Sequence to Sequence learning, MASS)。MASS 建立在序列到序列学习框架上:编码器的输入是带有一段被掩码片段(若干连续词)的句子,解码器在编码器表示的条件下预测这段被掩码的内容。与只预训练编码器或只预训练解码器的 BERT、语言模型不同,MASS 被有意设计成分两步联合预训练编码器和解码器:1)通过预测编码器一侧被掩掉的句子片段,MASS 可以迫使编码器理解未被掩码的词的含义,以便在解码器一侧预测被掩码的词;2)通过把源端未被掩码、因而不该直接出现在解码器输入里的词也掩掉,MASS 可以迫使解码器在预测下一个词时更多依赖源端表示,而不是目标端已经生成的前词,从而更好地促进编码器与解码器的联合训练。

MASS just needs to pre-train one model and then fine-tune on a variety of downstream tasks. We use transformer as the basic sequence to sequence model and pre-train on the WMT monolingual corpus, and then fine-tune on three different language generation tasks including NMT, text summarization and conversational response generation. Considering the downstream tasks cover cross-lingual task like NMT, we pre-train one model on multiple languages. We explore the low-resource setting for all the three tasks, and also consider unsupervised NMT which is a purely zero-resource setting. For NMT, the experiments are conducted on WMT14 English-French, WMT16 English-German and WMT16 English-Romanian datasets. For unsupervised NMT, we directly fine-tune the pre-trained model on monolingual data with back-translation loss (Lample et al., 2018), instead of using additional denoising auto-encoder loss as in Lample et al. (2018). For low-resource NMT, we fine-tune our model on limited bilingual data. For the other two tasks, we conduct experiments on: 1) the Gigaword corpus for abstractive text summarization; 2) the Cornell Movie Dialog corpus for conversational response generation. Our method achieves improvements on all these tasks as well as both the zero- and low-resource settings, demonstrating our method is effective and applicable to a wide range of sequence generation tasks.

MASS 只需要预训练一个模型,再微调到多种下游任务。我们以 Transformer 作为基本的序列到序列模型,在 WMT 单语语料上预训练,再微调到神经机器翻译、文本摘要和对话回复生成这三项不同的语言生成任务。考虑到下游任务包含机器翻译这类跨语言任务,我们在多种语言上预训练同一个模型。三项任务我们都考察了低资源设定,并另外考虑完全零资源的无监督神经机器翻译。机器翻译实验在 WMT14 英-法、WMT16 英-德和 WMT16 英-罗数据集上进行。对于无监督翻译,我们直接在单语数据上用回译损失(Lample et al., 2018)微调预训练模型,而不再像 Lample et al. (2018) 那样额外使用去噪自编码器损失。对于低资源翻译,我们在有限的双语数据上微调。对其余两项任务,实验分别在:1)用于抽象摘要的 Gigaword 语料;2)用于对话回复生成的 Cornell Movie Dialog 语料。我们的方法在这些任务以及零资源和低资源设定上都有提升,说明它有效,并且适用于相当广泛的序列生成任务。

2 The monolingual data for each language is downloaded from http://www.statmt.org/wmt16/translation-task.html.

2 各语言的单语数据下载自 http://www.statmt.org/wmt16/translation-task.html。

The contributions of this work are listed as follows: 1) We propose MASS, a masked sequence to sequence pre-training method for language generation; 2) We apply MASS on a variety of language generation tasks including NMT, text summarization and conversational response generation, and achieve significant improvements, demonstrating the effectiveness of our proposed method. Specially, we achieve a state-of-the art BLEU score for unsupervised NMT on two language pairs: English-French and English-German, and outperform the previous unsupervised NMT method (Lample & Conneau, 2019) by more than 4 points on English-French and 1 point on French-English in terms of BLEU score, and even beating the early attention-based supervised model (Bahdanau et al., 2015b).

本文的贡献如下:1)我们提出 MASS,一种面向语言生成的掩码序列到序列预训练方法;2)我们将 MASS 应用到神经机器翻译、文本摘要和对话回复生成等多种语言生成任务上,并取得明显提升,说明所提方法有效。特别地,我们在英-法和英-德两个语言对的无监督翻译上达到当时最好的 BLEU,相对此前的无监督翻译方法(Lample & Conneau, 2019),英到法高出 4 分以上,法到英高出 1 分,甚至超过早期基于注意力的有监督模型(Bahdanau et al., 2015b)。

  1. Related Work
  1. 相关工作

There are a lot of works on sequence to sequence learning and the pre-training for natural language processing. We briefly review several popular approaches in this section.

序列到序列学习以及面向自然语言处理的预训练已有大量工作。本节简要回顾几种常见方法。

2.1. Sequence to Sequence Learning

2.1. 序列到序列学习

Sequence to sequence learning (Cho et al., 2014; Bahdanau et al., 2015a; Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017) is a challenging task in artificial intelligence, and covers a variety of language generation applications such as NMT (Cho et al., 2014; Bahdanau et al., 2015a; Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017; Tan et al., 2019; Artetxe et al., 2017; Lample et al., 2017; 2018; He et al., 2018; Hassan et al., 2018; Song et al., 2018; Shen et al., 2018), text summarization (Ayana et al., 2016; Suzuki & Nagata, 2017; Gehring et al., 2017), question answering (Yuan et al., 2017; Fedus et al., 2018) and conversational response generation (Shang et al., 2015; Vinyals & Le, 2015).

序列到序列学习(Cho et al., 2014; Bahdanau et al., 2015a; Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017)是人工智能中的一项困难任务,覆盖多种语言生成应用,例如神经机器翻译(Cho et al., 2014; Bahdanau et al., 2015a; Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017; Tan et al., 2019; Artetxe et al., 2017; Lample et al., 2017; 2018; He et al., 2018; Hassan et al., 2018; Song et al., 2018; Shen et al., 2018)、文本摘要(Ayana et al., 2016; Suzuki & Nagata, 2017; Gehring et al., 2017)、问答(Yuan et al., 2017; Fedus et al., 2018)以及对话回复生成(Shang et al., 2015; Vinyals & Le, 2015)。

Sequence to sequence learning has attracted much attention in recent years due to the advance of deep learning. However, many language generations tasks such as NMT lack paired data but have plenty of unpaired data. Therefore, the pre-training on unpaired data and fine-tuning with small-scale paired data will be helpful for these tasks, which is exactly the focus of this work.

由于深度学习的进展,序列到序列学习近年来受到很多关注。不过,神经机器翻译等不少语言生成任务缺少配对数据,却有大量非配对数据。因此,先在非配对数据上预训练、再用小规模配对数据微调,会对这些任务有帮助,而这正是本文关注的重点。

2.2. Pre-training for NLP tasks

2.2. 面向 NLP 任务的预训练

Pre-training has been widely used in NLP tasks to learn better language representation. Previous works mostly focus on natural language understanding tasks, and can be classified into feature-based approaches and fine-tuning approaches. Feature-based approaches mainly leverage pre-training to provide language representations and features to the downstream tasks, which includes word-level representations (Brown et al., 1992; Ando & Zhang, 2005; Blitzer et al., 2006; Collobert & Weston, 2008; Mikolov et al., 2013; Pennington et al., 2014) and sentence-level representations (Kiros et al., 2015; Logeswaran & Lee, 2018; Le & Mikolov, 2014), as well as context sensitive features from the NMT model (McCann et al., 2017) and ELMo (Peters et al., 2018). Fine-tuning approaches mainly pre-train a model on language modeling objective and then fine-tune the model on the downstream tasks with supervised data (Dai & Le, 2015; Howard & Ruder, 2018; Radford et al., 2018; Devlin et al., 2018). Specifically, Devlin et al. (2018) proposed BERT based on masked language modeling and next sentence prediction and achieved a state-of-the-art accuracy on multiple language understanding tasks in the GLUE benchmark (Wang et al., 2018) and SQuAD (Rajpurkar et al., 2016).

预训练已被广泛用于 NLP 任务,以学习更好的语言表示。已有工作大多面向自然语言理解,可以分为基于特征的方法和微调方法。基于特征的方法主要用预训练为下游任务提供语言表示和特征,包括词级表示(Brown et al., 1992; Ando & Zhang, 2005; Blitzer et al., 2006; Collobert & Weston, 2008; Mikolov et al., 2013; Pennington et al., 2014)和句级表示(Kiros et al., 2015; Logeswaran & Lee, 2018; Le & Mikolov, 2014),以及来自神经机器翻译模型(McCann et al., 2017)和 ELMo(Peters et al., 2018)的上下文相关特征。微调方法则主要在语言建模目标上预训练一个模型,再用监督数据在下游任务上微调(Dai & Le, 2015; Howard & Ruder, 2018; Radford et al., 2018; Devlin et al., 2018)。具体而言,Devlin et al. (2018) 基于掩码语言模型和下句预测提出了 BERT,并在 GLUE 基准(Wang et al., 2018)和 SQuAD(Rajpurkar et al., 2016)的多项语言理解任务上取得当时最好的精度。

There are also some works pre-training the encoder-decoder model for language generation. Dai & Le (2015); Ramachandran et al. (2016) leverage a language model or auto-encoder to pre-train the encoder and decoder. Their improvements, although observed, are limited and not as general and significant as the pre-training methods (e.g., BERT) for language understanding. Zhang & Zong (2016) designed a sentence reordering task for pre-training, but only for the encoder part of the encoder-decoder model. Zoph et al. (2016); Firat et al. (2016) pre-train the model on similar rich-resource language pairs and fine-tuned on the target language pair, which relies on supervised data on other language pairs. Recently, XLM (Lample & Conneau, 2019) pre-trained BERT-like models both for the encoder and decoder, and achieved the previous state of the art results on unsupervised machine translation. However, the encoder and decoder in XLM are pre-trained separately and the encoder-decoder attention mechanism cannot be pre-trained, which are sub-optimal for sequence to sequence based language generation tasks.

也有一些工作为语言生成预训练编码器–解码器模型。Dai & Le (2015); Ramachandran et al. (2016) 用语言模型或自编码器来预训练编码器和解码器。虽然能看到提升,但幅度有限,也不像面向语言理解的预训练方法(例如 BERT)那样通用和显著。Zhang & Zong (2016) 设计了一种句子重排预训练任务,但只作用于编码器–解码器中的编码器部分。Zoph et al. (2016); Firat et al. (2016) 先在相近的富资源语言对上预训练,再微调到目标语言对,这依赖于其他语言对上的监督数据。近来,XLM(Lample & Conneau, 2019)为编码器和解码器都预训练了类似 BERT 的模型,并在无监督机器翻译上取得了此前最好的结果。不过,XLM 中的编码器和解码器是分开预训练的,编码器–解码器注意力机制无法被预训练,这对基于序列到序列的语言生成任务并非最优。

Different from previous works, our proposed MASS is carefully designed to pre-train both the encoder and decoder jointly using only unlabeled data, and can be applied to most language generations tasks.

与已有工作不同,我们提出的 MASS 被有意设计成只用无标注数据联合预训练编码器和解码器,并且可以应用到大多数语言生成任务上。

  1. MASS

In this section, we first introduce the basic framework of sequence to sequence learning, and then propose MASS (MAsked Sequence to Sequence pre-training). We then discuss the differences between MASS and previous pre-training methods including the masked language modeling in BERT and standard language modeling.

本节先介绍序列到序列学习的基本框架,然后提出 MASS(MAsked Sequence to Sequence pre-training)。接着讨论 MASS 与已有预训练方法的差别,包括 BERT 中的掩码语言模型以及标准语言模型。

3.1. Sequence to Sequence Learning

3.1. 序列到序列学习

We denote (x,y)∈(X,Y)(x, y) \in (\mathcal{X}, \mathcal{Y})(x,y)∈(X,Y) as a sentence pair, where x=(x1,x2,…,xm)x = (x_1, x_2, \ldots, x_m)x=(x1​,x2​,…,xm​) is the source sentence with mmm tokens, and y=(y1,y2,…,yn)y = (y_1, y_2, \ldots, y_n)y=(y1​,y2​,…,yn​) is the target sentence with nnn tokens, and X\mathcal{X}X and Y\mathcal{Y}Y are the source and target domains. A sequence to sequence model learns the parameter θ\thetaθ to estimate the conditional probability P(y∣x;θ)P(y|x; \theta)P(y∣x;θ), and usually uses log likelihood as the objective function: L(θ;(X,Y))=∑(x,y)∈(X,Y)log⁡P(y∣x;θ)L(\theta; (\mathcal{X}, \mathcal{Y})) = \sum_{(x,y)\in(\mathcal{X},\mathcal{Y})} \log P(y|x; \theta)L(θ;(X,Y))=∑(x,y)∈(X,Y)​logP(y∣x;θ). The conditional probability P(y∣x;θ)P(y|x; \theta)P(y∣x;θ) can be further factorized according to the chain rule: P(y∣x;θ)=∏t=1nP(yt∣y<t,x;θ)P(y|x; \theta) = \prod_{t=1}^{n} P(y_t | y_{<t}, x; \theta)P(y∣x;θ)=∏t=1n​P(yt​∣y<t​,x;θ), where y<ty_{<t}y<t​ is the proceeding tokens before position ttt.

我们将 (x,y)∈(X,Y)(x, y) \in (\mathcal{X}, \mathcal{Y})(x,y)∈(X,Y) 记为一个句对,其中 x=(x1,x2,…,xm)x = (x_1, x_2, \ldots, x_m)x=(x1​,x2​,…,xm​) 是含 mmm 个词的源句,y=(y1,y2,…,yn)y = (y_1, y_2, \ldots, y_n)y=(y1​,y2​,…,yn​) 是含 nnn 个词的目标句,X\mathcal{X}X 与 Y\mathcal{Y}Y 分别是源端和目标端的域。序列到序列模型学习参数 θ\thetaθ,以估计条件概率 P(y∣x;θ)P(y|x; \theta)P(y∣x;θ),并通常以对数似然为目标函数:L(θ;(X,Y))=∑(x,y)∈(X,Y)log⁡P(y∣x;θ)L(\theta; (\mathcal{X}, \mathcal{Y})) = \sum_{(x,y)\in(\mathcal{X},\mathcal{Y})} \log P(y|x; \theta)L(θ;(X,Y))=∑(x,y)∈(X,Y)​logP(y∣x;θ)。条件概率 P(y∣x;θ)P(y|x; \theta)P(y∣x;θ) 还可按链式法则进一步分解:P(y∣x;θ)=∏t=1nP(yt∣y<t,x;θ)P(y|x; \theta) = \prod_{t=1}^{n} P(y_t | y_{<t}, x; \theta)P(y∣x;θ)=∏t=1n​P(yt​∣y<t​,x;θ),其中 y<ty_{<t}y<t​ 是位置 ttt 之前的词。

A major approach to sequence to sequence learning is the encoder-decoder framework: The encoder reads the source sequence and generates a set of representations; the decoder estimates the conditional probability of each target token given the source representations and its preceding tokens. Attention mechanism (Bahdanau et al., 2015a) is further introduced between the encoder and decoder to find which source representation to focus on when predicting the current token.

序列到序列学习的一条主要路径是编码器–解码器框架:编码器读取源序列并生成一组表示;解码器在给定源表示及其已生成前词的条件下,估计每个目标词的条件概率。编码器和解码器之间还引入了注意力机制(Bahdanau et al., 2015a),以便在预测当前词时确定应关注哪些源表示。

3.2. Masked Sequence to Sequence Pre-training

3.2. 掩码序列到序列预训练

We introduce a novel unsupervised prediction task in this section. Given an unpaired source sentence x∈Xx \in \mathcal{X}x∈X, we denote x\u:vx^{\backslash u:v}x\u:v as a modified version of xxx where its fragment from position uuu to vvv are masked, 0<u<v<m0 < u < v < m0<u<v<m and mmm is the number of tokens of sentence xxx. We denote k=v−u+1k = v-u+1k=v−u+1 as the number of tokens being masked from position uuu to vvv. We replace each masked token by a special symbol [M][\mathrm{M}][M], and the length of the masked sentence is not changed. xu:vx^{u:v}xu:v denotes the sentence fragment of xxx from uuu to vvv.

本节引入一种新的无监督预测任务。给定一个未配对的源句 x∈Xx \in \mathcal{X}x∈X,我们将 x\u:vx^{\backslash u:v}x\u:v 记为 xxx 的一个改写版本,其中从位置 uuu 到 vvv 的片段被掩码,0<u<v<m0 < u < v < m0<u<v<m,mmm 是句子 xxx 的词数。我们将 k=v−u+1k = v-u+1k=v−u+1 记为从位置 uuu 到 vvv 被掩掉的词数。每个被掩码的词都替换成特殊符号 [M][\mathrm{M}][M],掩码后句子的长度不变。xu:vx^{u:v}xu:v 表示 xxx 中从 uuu 到 vvv 的句子片段。

MASS pre-trains a sequence to sequence model by predicting the sentence fragment xu:vx^{u:v}xu:v taking the masked sequence x\u:vx^{\backslash u:v}x\u:v as input. We also use the log likelihood as the objective function:

MASS 通过在输入为掩码序列 x\u:vx^{\backslash u:v}x\u:v 的条件下预测句子片段 xu:vx^{u:v}xu:v,来预训练序列到序列模型。我们同样以对数似然作为目标函数:

L(θ;X)=1∣X∣∑x∈Xlog⁡P(xu:v∣x\u:v;θ)L(\theta; \mathcal{X}) = \frac{1}{|\mathcal{X}|} \sum_{x \in \mathcal{X}} \log P(x^{u:v} | x^{\backslash u:v}; \theta)L(θ;X)=∣X∣1​x∈X∑​logP(xu:v∣x\u:v;θ)
=1∣X∣∑x∈Xlog⁡∏t=uvP(xtu:v∣x<tu:v,x\u:v;θ).(1)= \frac{1}{|\mathcal{X}|} \sum_{x \in \mathcal{X}} \log \prod_{t=u}^{v} P(x^{u:v}_{t} | x^{u:v}_{<t}, x^{\backslash u:v}; \theta). \quad (1)=∣X∣1​x∈X∑​logt=u∏v​P(xtu:v​∣x<tu:v​,x\u:v;θ).(1)

Encoder-decoder framework of MASS, where a consecutive fragment is masked on the encoder and predicted by the decoder

Figure 1. The encoder-decoder framework for our proposed MASS. The token “_” represents the mask symbol [M].

图 1. 本文提出的 MASS 的编码器–解码器框架。记号“_”表示掩码符号 [M]。

We show an example in Figure 1, where the input sequence has 8 tokens with the fragment x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​ being masked. Note that the model only predicts the masked fragment x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​, given x3x4x5x_3 x_4 x_5x3​x4​x5​ as the decoder input for position 4−64{-}64−6, and the decoder takes the special mask symbol [M][\mathrm{M}][M] as inputs for the other positions (e.g., position 1−31{-}31−3 and 7−87{-}87−8). While our method works for any neural network based encoder-decoder frameworks, we choose Transformer in our experiments, considering that it achieves state-of-the-art performances in multiple sequence to sequence learning tasks.

我们在图 1 中给出一个例子:输入序列有 8 个词,片段 x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​ 被掩码。注意模型只预测被掩码的片段 x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​,解码器在位置 4−64{-}64−6 的输入是 x3x4x5x_3 x_4 x_5x3​x4​x5​,而在其余位置(例如位置 1−31{-}31−3 和 7−87{-}87−8)则以特殊掩码符号 [M][\mathrm{M}][M] 为输入。虽然我们的方法适用于任何基于神经网络的编码器–解码器框架,实验中我们选择 Transformer,因为它在多项序列到序列学习任务上达到了当时最好的表现。

MASS model structure in the special cases k=1 (BERT-style masked language modeling) and k=m (standard language modeling)

Figure 2. The model structure of MASS when k=1k = 1k=1 and k=mk = mk=m. Masked language modeling in BERT can be viewed as the case k=1k = 1k=1 and standard language modeling can be viewed as the case k=mk = mk=m.

图 2. k=1k = 1k=1 和 k=mk = mk=m 时 MASS 的模型结构。BERT 中的掩码语言模型可以看作 k=1k = 1k=1 的情形,标准语言模型可以看作 k=mk = mk=m 的情形。

Actually, the masked language modeling in BERT (Devlin et al., 2018) and the standard language modeling (Bengio et al., 2003; Mikolov et al., 2010) in GPT (Radford et al., 2018) can be viewed as special cases of MASS. We have an important hyperparameter kkk, which denotes the length of the masked fragment of the sentence. Our method with different kkk values can cover the special cases that are related to previous pre-training methods, as shown in Table 1.

实际上,BERT 中的掩码语言模型(Devlin et al., 2018)以及 GPT 中的标准语言模型(Bengio et al., 2003; Mikolov et al., 2010; Radford et al., 2018)都可以看作 MASS 的特例。我们有一个重要超参数 kkk,表示句子中被掩码片段的长度。取不同的 kkk 值,我们的方法可以覆盖与已有预训练方法相关的这些特例,如表 1 所示。

When k=1k = 1k=1, the masked fragment in the source sentence contains only one token, and the decoder predicts this token without any tokens as input but conditioned on the unmasked source tokens, as shown in Figure 2a. It becomes the masked language modeling as used in BERT. One may argue that the model structure is a little bit different from the masked language model. However, since all the input tokens of the decoder are masked, the decoder is itself like a non-linear classifier, analogous to the softmax matrix used in BERT. In this case, the conditional probability is P(xu∣x\u;θ)P(x^{u}|x^{\backslash u}; \theta)P(xu∣x\u;θ) and uuu is the position of the masked token, which is exactly the formulation of masked language modeling used in BERT.

当 k=1k = 1k=1 时,源句中被掩码的片段只含一个词,解码器在没有任何自身输入、只以未被掩码的源词为条件的情况下预测这个词,如图 2a 所示。这就是 BERT 中使用的掩码语言模型。或许有人会说,模型结构与掩码语言模型略有不同。不过,由于解码器的全部输入词都被掩码,解码器本身就像一个非线性分类器,类似于 BERT 中使用的 softmax 矩阵。此时条件概率为 P(xu∣x\u;θ)P(x^{u}|x^{\backslash u}; \theta)P(xu∣x\u;θ),uuu 是被掩码词的位置,这恰好就是 BERT 所用掩码语言模型的形式。

3 One may argue that the masked language modeling in BERT randomly masks multiple tokens rather than just one token at a time. However, the key idea behind masking language modeling in BERT is to leverage bidirectional context information. Masking multiple tokens at a time is mainly for training speedup.

3 或许有人会说,BERT 中的掩码语言模型是一次随机掩掉多个词,而不是每次只掩一个词。不过,BERT 里掩码语言模型的关键想法是利用双向上下文信息。一次掩掉多个词,主要是为了加快训练。

When k=mk = mk=m where mmm is the number of tokens in sentence xxx, all the tokens on the encoder side are masked and the decoder needs to predict all tokens given previous tokens, as shown in Figure 2b. The conditional probability is P(x1:m∣x\1:m;θ)P(x^{1:m}|x^{\backslash 1:m}; \theta)P(x1:m∣x\1:m;θ), and it becomes the standard language modeling in GPT, conditioned on null information from the encoder as all the tokens in the encoder side are masked.

当 k=mk = mk=m,其中 mmm 是句子 xxx 的词数时,编码器一侧的全部词都被掩码,解码器需要在给定前词的条件下预测所有词,如图 2b 所示。条件概率为 P(x1:m∣x\1:m;θ)P(x^{1:m}|x^{\backslash 1:m}; \theta)P(x1:m∣x\1:m;θ),这就变成了 GPT 中的标准语言模型:由于编码器一侧全部被掩,它以编码器传来的空信息为条件。

Table 1. Masked language modeling in BERT and standard language modeling, as special cases covered in MASS.

Length Probability Model
k=1k = 1k=1 P(xu∣x\u;θ)P(x^{u}|x^{\backslash u}; \theta)P(xu∣x\u;θ) masked LM in BERT
k=mk = mk=m P(x1:m∣x\1:m;θ)P(x^{1:m}|x^{\backslash 1:m}; \theta)P(x1:m∣x\1:m;θ) standard LM in GPT
k∈(1,m)k \in (1, m)k∈(1,m) P(xu:v∣x\u:v;θ)P(x^{u:v}|x^{\backslash u:v}; \theta)P(xu:v∣x\u:v;θ) methods in between

表 1. BERT 中的掩码语言模型与标准语言模型,作为 MASS 所覆盖的特例。

长度 概率 模型
k=1k = 1k=1 P(xu∣x\u;θ)P(x^{u}|x^{\backslash u}; \theta)P(xu∣x\u;θ) BERT 中的掩码语言模型
k=mk = mk=m P(x1:m∣x\1:m;θ)P(x^{1:m}|x^{\backslash 1:m}; \theta)P(x1:m∣x\1:m;θ) GPT 中的标准语言模型
k∈(1,m)k \in (1, m)k∈(1,m) P(xu:v∣x\u:v;θ)P(x^{u:v}|x^{\backslash u:v}; \theta)P(xu:v∣x\u:v;θ) 介于两者之间的方法

3.3. Discussions

3.3. 讨论

MASS is a pre-training method for language generation. While its special cases are related to the previous methods including the standard language modeling in GPT and the masked language modeling in BERT, it is different from these methods in general.

MASS 是一种面向语言生成的预训练方法。虽然它的特例与已有方法相关,包括 GPT 中的标准语言模型和 BERT 中的掩码语言模型,但总体上仍与这些方法不同。

  • Standard language modeling has long been used for pre-training, and the most prominent ones are the recently proposed ELMo (Peters et al., 2018) and OpenAI GPT (Radford et al., 2018). BERT introduces two pre-training tasks (masked language modeling and next sentence prediction) for natural language understanding, and uses one encoder to extract the representation for a single sentence or a pair of sentences. Both standard language modeling and BERT can just pre-train the encoder or decoder separately. While achieving promising results on language understanding tasks, they are not suitable for language generation tasks which typically leverage an encoder-decoder framework for conditional sequence generation.
  • 标准语言模型很早就被用于预训练,其中最突出的是近来提出的 ELMo(Peters et al., 2018)和 OpenAI GPT(Radford et al., 2018)。BERT 为自然语言理解引入了两项预训练任务(掩码语言模型和下句预测),并用一个编码器为单句或句对抽取表示。标准语言模型和 BERT 都只能分别预训练编码器或解码器。它们虽然在语言理解任务上取得了可喜的结果,但并不适合通常要用编码器–解码器框架做条件序列生成的语言生成任务。
  • MASS is designed to jointly pre-train the encoder and decoder for language generation tasks. First, by only predicting the masked tokens through a sequence to sequence framework, MASS forces the encoder to understand the meaning of the unmasked tokens, and also encourages the decoder to extract useful information from the encoder side. Second, by predicting consecutive tokens in the decoder side, the decoder can build better language modeling capability than just predicting discrete tokens. Third, by further masking the input tokens of the decoder which are not masked in the encoder side (e.g., when predicting fragment x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​, only the tokens x3x4x5x_3 x_4 x_5x3​x4​x5​ are taken as the input and other tokens are masked with [M][\mathrm{M}][M]), the decoder is encouraged to extract more useful information from the encoder side, rather than leveraging the abundant information from the previous tokens.
  • MASS 被设计成针对语言生成任务联合预训练编码器和解码器。第一,通过在序列到序列框架中只预测被掩码的词,MASS 迫使编码器理解未被掩码的词的含义,同时也促使解码器从编码器一侧抽取有用信息。第二,通过在解码器一侧预测连续的词,解码器可以形成比只预测离散单词更强的语言建模能力。第三,再把编码器一侧未被掩码的那些词在解码器输入里也掩掉(例如,在预测片段 x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​ 时,只有 x3x4x5x_3 x_4 x_5x3​x4​x5​ 作为输入,其余词用 [M][\mathrm{M}][M] 掩掉),从而促使解码器更多地从编码器一侧抽取有用信息,而不是依赖前词中已有的大量信息。
  1. Experiments and Results
  1. 实验与结果

In this section, we describe the experimental details about MASS pre-training and fine-tuning on a variety of language generation tasks, including NMT, text summarization, conversational response generation.

本节介绍 MASS 预训练以及在多种语言生成任务上微调的实验细节,包括神经机器翻译、文本摘要和对话回复生成。

4.1. MASS Pre-training

4.1. MASS 预训练

Model Configuration We choose Transformer (Vaswani et al., 2017) as the basic model structure, which consists of 6-layer encoder and 6-layer decoder with 1024 embedding/hidden size and 4096 feed-forward filter size. For neural machine translation task, we pre-train our model on the monolingual data of the source and target languages. We respectively conduct experiments on three language pairs: English-French, English-German, and English-Romanian. For other language generation tasks, including text summarization and conversational response generation, we pre-train the model with only English monolingual data respectively. To distinguish between the source and target languages in neural machine translation task, we add a language embedding to each token of the input sentence for the encoder and decoder, which is also learnt end-to-end. We implement our method based on codebase of XLM.

模型配置 我们选择 Transformer(Vaswani et al., 2017)作为基本模型结构,它由 6 层编码器和 6 层解码器组成,嵌入/隐层大小为 1024,前馈滤波大小为 4096。对于神经机器翻译任务,我们在源语言和目标语言的单语数据上预训练模型。实验分别在英-法、英-德和英-罗三对语言上进行。对于文本摘要和对话回复生成等其他语言生成任务,我们分别只用英语单语数据预训练模型。为了在机器翻译任务中区分源语言和目标语言,我们为编码器和解码器输入句中的每个词加上一个语言嵌入,该嵌入也端到端学习。我们的方法基于 XLM 的代码实现。

4 https://github.com/facebookresearch/XLM

Datasets We use all of the monolingual data from WMT News Crawl datasets, which covers 190M, 62M and 270M sentences from year 2007 to 2017 for English, French, German respectively. We also include a low-resource language, Romanian, in the pre-training stage, to verify the effectiveness of MASS pre-trained with low-resource monolingual data. We use all of the available Romanian sentences from News Crawl dataset and augment it with WMT16 data, which results in 2.9M sentences. We remove the sentences with length over 175. For each task, we jointly learn a 60,000 sub-word units with Byte-Pair Encoding (Sennrich et al., 2016) between source and target languages.

数据集 我们使用 WMT News Crawl 数据集中的全部单语数据,其中英语、法语、德语在 2007 至 2017 年间分别有 1.90 亿、6200 万和 2.70 亿句。预训练阶段还纳入了低资源语言罗马尼亚语,以检验 MASS 在低资源单语数据上预训练的效果。我们使用 News Crawl 中全部可用的罗马尼亚语句子,并用 WMT16 数据加以扩充,共计 290 万句。长度超过 175 的句子被去掉。对每项任务,我们在源语言和目标语言之间用字节对编码(Byte-Pair Encoding)(Sennrich et al., 2016)联合学习 60,000 个亚词单元。

5 While we choose the WMT monolingual data in the current setting, pre-training on Wikipedia data is also feasible.

5 当前设定下我们选择了 WMT 单语数据,在维基百科数据上预训练同样可行。

Pre-Training Details We mask the fragment by replacing the consecutive tokens with special symbols [M][\mathrm{M}][M], with random start position uuu. Following Devlin et al. (2018), the masked tokens in the encoder will be a [M][\mathrm{M}][M] token 80% of the time, a random token 10% of the time and a unchanged token 10% of the time. We set the fragment length kkk as roughly 50% of the total number of tokens in the sentence and also study different kkk to compare their accuracy changes. To reduce the memory and computation cost, we removed the padding in the decoder (the masked tokens) but keep the positional embedding of the unmasked tokens unchanged (e.g., if the first two tokens are masked and removed, the position for the third token is still 2 but not 0). In this way, we can get similar accuracy and reduce 50% computation in the decoder. We use Adam optimizer (Kingma & Ba, 2015) with a learning rate of 10−410^{-4}10−4 for the pre-training. The model are trained on 8 NVIDIA V100 GPU cards and each mini-batch contains 3000 tokens for pre-training.

预训练细节 我们用特殊符号 [M][\mathrm{M}][M] 替换连续的词来掩码片段,起始位置 uuu 随机选取。沿用 Devlin et al. (2018) 的做法,编码器中被掩码的词有 80% 的时间是 [M][\mathrm{M}][M],10% 的时间是随机词,10% 的时间保持原词不变。我们将片段长度 kkk 设为大约句中总词数的 50%,并另外研究不同的 kkk,比较精度变化。为降低内存和计算开销,我们去掉了解码器中的填充(被掩码的词),但保持未被掩码词的位置嵌入不变(例如,若前两个词被掩掉并移除,第三个词的位置仍是 2 而不是 0)。这样可以获得相近的精度,并把解码器计算量减少 50%。预训练使用 Adam 优化器(Kingma & Ba, 2015),学习率为 10−410^{-4}10−4。模型在 8 张 NVIDIA V100 GPU 上训练,预训练时每个小批量包含 3000 个词。

To verify the effectiveness of MASS, we fine-tune the pre-trained model on three language generation tasks: NMT, text summarization and conversational response generation. We explore the low-resource setting on these tasks where we just leverage few training data for fine-tuning to simulate the low-resource scenario. For NMT, we mainly investigate the zero-resource (unsupervised) setting, as unsupervised NMT has become a challenging task in recent years (Artetxe et al., 2017; Lample et al., 2017; 2018).

为检验 MASS 的效果,我们把预训练模型微调到三项语言生成任务:神经机器翻译、文本摘要和对话回复生成。我们在这些任务上考察低资源设定,微调时只用少量训练数据来模拟低资源情形。对机器翻译,我们主要考察零资源(无监督)设定,因为无监督翻译近年来已成为一项有挑战的任务(Artetxe et al., 2017; Lample et al., 2017; 2018)。

4.2. Fine-Tuning on NMT

4.2. 在神经机器翻译上微调

In this section, we first describe the experiments on the unsupervised NMT, and then introduce the experiments on low-resource NMT.

本节先介绍无监督神经机器翻译实验,再介绍低资源神经机器翻译实验。

Experimental Setting For unsupervised NMT, there is no bilingual data to fine-tune the pre-trained model. Therefore, we leverage the monolingual data that is also used in the pre-training stage. Different from Artetxe et al. (2017); Lample et al. (2017; 2018), we just use back-translation to generate pseudo bilingual data for training, without using denoising auto-encoder. During fine-tuning, we use Adam optimizer (Kingma & Ba, 2015) with initial learning rate 10−410^{-4}10−4, and the batch size is set as 2000 tokens for each GPU. During evaluation, we calculate the BLEU score with multi-bleu.pl on newstest2014 for English-French, and newstest2016 for English-German and English-Romanian.

实验设定 对无监督翻译而言,没有双语数据可用来微调预训练模型。因此,我们使用预训练阶段同样用过的单语数据。与 Artetxe et al. (2017); Lample et al. (2017; 2018) 不同,我们只用回译来生成伪双语数据供训练,不再使用去噪自编码器。微调时使用 Adam 优化器(Kingma & Ba, 2015),初始学习率为 10−410^{-4}10−4,每张 GPU 的批量大小设为 2000 个词。评估时,英-法在 newstest2014 上、英-德和英-罗在 newstest2016 上,用 multi-bleu.pl 计算 BLEU。

6 MASS is better than denoising auto-encoder as we will show in Table 3.

6 如表 3 将要显示的,MASS 优于去噪自编码器。

7 https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl

Results on Unsupervised NMT Our results are shown in Table 2. On all the 6 translation directions, our method outperforms all of the previous results, including the methods without pre-training (Lample et al., 2018) and with pre-training (Lample & Conneau, 2019). XLM (Lample & Conneau, 2019) is the previous state-of-the-art method which leverage BERT like pre-training in encoder and decoder, which covers several pre-training methods: masked language model (MLM) and causal language model (CLM). Our method still outperforms XLM by 4.1 BLEU points on en-fr.

无监督翻译结果 结果见表 2。在全部 6 个翻译方向上,我们的方法都高于此前的全部结果,包括不预训练的方法(Lample et al., 2018)和带预训练的方法(Lample & Conneau, 2019)。XLM(Lample & Conneau, 2019)是此前最好的方法,它在编码器和解码器中使用类似 BERT 的预训练,覆盖掩码语言模型(MLM)和因果语言模型(CLM)等几种预训练。我们的方法在英到法上仍比 XLM 高出 4.1 个 BLEU。

Table 2. The BLEU score comparisons between MASS and the previous works on unsupervised NMT. Results on en-fr and fr-en pairs are reported on newstest2014 and the others are on newstest2016. Since XLM uses different combinations of MLM and CLM in the encoder and decoder, we report the highest BLEU score for XLM on each language pair.

Method Setting en - fr fr - en en - de de - en en - ro ro - en
Artetxe et al. (2017) 2-layer RNN 15.13 15.56 6.89 10.16 - -
Lample et al. (2017) 3-layer RNN 15.05 14.31 9.75 13.33 - -
Yang et al. (2018) 4-layer Transformer 16.97 15.58 10.86 14.62 - -
Lample et al. (2018) 4-layer Transformer 25.14 24.18 17.16 21.00 21.18 19.44
XLM (Lample & Conneau, 2019) 6-layer Transformer 33.40 33.30 27.00 34.30 33.30 31.80
MASS 6-layer Transformer 37.50 34.90 28.10 35.00 35.20 33.10

表 2. MASS 与已有工作在无监督神经机器翻译上的 BLEU 比较。英-法和法-英报告 newstest2014 上的结果,其余报告 newstest2016 上的结果。由于 XLM 在编码器和解码器中使用不同的 MLM 与 CLM 组合,我们对每个语言对报告 XLM 的最高 BLEU。

方法 设定 en - fr fr - en en - de de - en en - ro ro - en
Artetxe et al. (2017) 2-layer RNN 15.13 15.56 6.89 10.16 - -
Lample et al. (2017) 3-layer RNN 15.05 14.31 9.75 13.33 - -
Yang et al. (2018) 4-layer Transformer 16.97 15.58 10.86 14.62 - -
Lample et al. (2018) 4-layer Transformer 25.14 24.18 17.16 21.00 21.18 19.44
XLM (Lample & Conneau, 2019) 6-layer Transformer 33.40 33.30 27.00 34.30 33.30 31.80
MASS 6-layer Transformer 37.50 34.90 28.10 35.00 35.20 33.10

Compared with Other Pre-training Methods We also compare MASS with the previous pre-training methods for language generation tasks. The first baseline is BERT+LM, which use masked language modeling in BERT to pre-train the encoder and the standard language modeling to pre-train the decoder. The second baseline is DAE, which simply uses denoising auto-encoder (Vincent et al., 2008) to pre-train the encoder and decoder. We pre-train the model with BERT+LM and DAE, and fine-tune on the unsupervised translation pairs with same fine-tuning strategy of XLM (i.e., DAE loss + back-translation). These methods are also configured with the 6-layer Transformer setting.

与其他预训练方法的比较 我们还将 MASS 与已有的语言生成预训练方法作比较。第一个基线是 BERT+LM,用 BERT 中的掩码语言模型预训练编码器,用标准语言模型预训练解码器。第二个基线是 DAE,直接用去噪自编码器(Vincent et al., 2008)预训练编码器和解码器。我们用 BERT+LM 和 DAE 预训练模型,并采用与 XLM 相同的微调策略(即去噪自编码器损失加回译),在无监督翻译语言对上微调。这些方法同样配置为 6 层 Transformer。

As shown in Table 3, BERT+LM achieves higher BLEU score than DAE, and MASS outperforms both BERT+LM and DAE on all the unsupervised translation pairs. While DAE usually leverages some denoising methods like randomly masking tokens or swapping adjacent tokens, the decoder can still easily learn to copy the unmasked tokens through encoder-decoder attention. On the other hand, the decoder in DAE takes the full sentence as the input, which is enough to predict the next token like the language model, and is not forced to extract additional useful representation from the encoder.

如表 3 所示,BERT+LM 的 BLEU 高于 DAE,而 MASS 在所有无监督翻译方向上都高于 BERT+LM 和 DAE。虽然 DAE 通常会采用随机掩词或交换相邻词一类去噪手段,解码器仍然很容易通过编码器–解码器注意力把未被掩码的词复制过来。另一方面,DAE 中的解码器以整句为输入,这已足以像语言模型那样预测下一个词,因而不会被迫使再从编码器抽取额外的有用表示。

8 The popular encoder-decoder based model structures (Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017) all adopt residual connection (He et al., 2016). Therefore, the token generation in the top layer of the decoder side can directly depend on the token embedding in the encoder side through residual connection and attention.

8 常见的基于编码器–解码器的模型结构(Wu et al., 2016; Gehring et al., 2017; Vaswani et al., 2017)都采用了残差连接(He et al., 2016)。因此,解码器顶层的词生成可以通过残差连接和注意力,直接依赖于编码器一侧的词嵌入。

Table 3. The BLEU score comparisons between MASS and other pre-training methods. The results for BERT+LM are directly taken from the MLM+CLM setting in XLM (Lample & Conneau, 2019) as they use the same pre-training methods.

Method en-fr fr-en en-de de-en en-ro ro-en
BERT+LM 33.4 32.3 24.9 32.9 31.7 30.4
DAE 30.1 28.3 20.9 27.5 28.8 27.6
MASS 37.5 34.9 28.1 35.0 35.2 33.1

表 3. MASS 与其他预训练方法的 BLEU 比较。BERT+LM 的结果直接取自 XLM(Lample & Conneau, 2019)中的 MLM+CLM 设定,因为它们使用相同的预训练方法。

方法 en-fr fr-en en-de de-en en-ro ro-en
BERT+LM 33.4 32.3 24.9 32.9 31.7 30.4
DAE 30.1 28.3 20.9 27.5 28.8 27.6
MASS 37.5 34.9 28.1 35.0 35.2 33.1

Experiments on Low-Resource NMT In the low-resource NMT setting, we respectively sample 10K, 100K, 1M paired sentence from the bilingual training data of WMT14 English-French, WMT16 English-German and WMT16 English-Romanian, to explore the performance of our method in different low-resource scenarios. We use the same BPE codes learned in the pre-trained stage to tokenize the training sentence pairs. We fine-tune the pre-trained model on the paired data for 20,000 steps with Adam optimizer and the learning rate is set as 10−410^{-4}10−4. We choose the best model according to the accuracy on development set. We report the BLEU scores on the same testsets used in the unsupervised setting. As shown in Figure 3, MASS outperforms the baseline models that are trained only on the bilingual data without any pre-training on all the six translation directions, demonstrating the effectiveness of our method in the low-resource scenarios.

低资源翻译实验 在低资源翻译设定中,我们分别从 WMT14 英-法、WMT16 英-德和 WMT16 英-罗的双语训练数据中采样 1 万、10 万和 100 万对句子,以考察方法在不同低资源情形下的表现。分词使用预训练阶段学到的同一套 BPE 编码。我们用 Adam 优化器在配对数据上微调预训练模型 20,000 步,学习率设为 10−410^{-4}10−4。按开发集精度选取最好的模型。BLEU 报告在与无监督设定相同的测试集上。如图 3 所示,在全部六个翻译方向上,MASS 都高于只在双语数据上训练、不做任何预训练的基线,说明该方法在低资源情形下有效。

BLEU comparisons between MASS and the baseline on low-resource NMT with different amounts of paired data

Figure 3. The BLEU score comparisons between MASS and the baseline on low-resource NMT with different scales of paired data.

图 3. 在不同规模配对数据的低资源神经机器翻译上,MASS 与基线的 BLEU 比较。

4.3. Fine-Tuning on Text Summarization

4.3. 在文本摘要上微调

Experiment Setting Text summarization is the task of creating a short and fluent summary of a long text document, which is a typical sequence generation task. We fine-tune the pre-trained model on text summarization task with different scales (10K, 100K, 1M and 3.8M) of training data from the Gigaword corpus (Graff et al., 2003), which consists of a total of 3.8M article-title pairs in English. We take the article as the encoder input and title as the decoder input for fine-tuning. We report the F1 score of ROUGE-1, ROUGE-2 and ROUGE-L on the Gigaword testset during evaluation. We use beam search with a beam size of 5 for inference.

实验设定 文本摘要是为长文档生成简短、通顺摘要的任务,是典型的序列生成任务。我们从 Gigaword 语料(Graff et al., 2003)中取不同规模(1 万、10 万、100 万和 380 万)的训练数据,微调预训练模型;该语料共有 380 万对英语文章–标题。微调时以文章为编码器输入、标题为解码器输入。评估时在 Gigaword 测试集上报告 ROUGE-1、ROUGE-2 和 ROUGE-L 的 F1 分数。推理使用束搜索,束宽为 5。

9 https://github.com/harvardnlp/sent-summary

ROUGE comparisons between MASS and the baseline on text summarization with different amounts of paired data

Figure 4. The comparisons between MASS and the baseline on text summarization task with different scales of paired data. The results are reported in ROUGE-1 (RG-1), ROUGE-2 (RG-2) and ROUGE-L (RG-L) respectively. F stands for F1-score.

图 4. 在不同规模配对数据的文本摘要任务上,MASS 与基线的比较。结果分别以 ROUGE-1(RG-1)、ROUGE-2(RG-2)和 ROUGE-L(RG-L)报告。F 表示 F1 分数。

Results Our results are illustrated in Figure 4. We compare MASS with the model that is trained only on the paired data without any pre-training. MASS consistently outperforms the baseline on different scales of fine-tuning data (more than 10 ROUGE points gain on 10K data and 3 ROUGE points gain on 100K data), which demonstrates that MASS is effective in low-resource scenarios with different scale of training data on this task.

结果 结果见图 4。我们把 MASS 与只在配对数据上训练、不做任何预训练的模型比较。在不同规模的微调数据上,MASS 都高于基线(在 1 万句数据上高出 10 个 ROUGE 以上,在 10 万句数据上高出 3 个 ROUGE),说明 MASS 在该任务不同规模训练数据的低资源情形下都有效。

Compared with Other Pre-Training Methods We further compare MASS with the pre-training methods of BERT+LM and DAE described in Section 4.2, with 100K data on the text summarization task. As shown in Table 4, MASS consistently outperforms the two pre-training methods on the three ROUGE scores.

与其他预训练方法的比较 我们进一步把 MASS 与 4.2 节中的 BERT+LM 和 DAE 预训练方法比较,使用文本摘要任务上的 10 万句数据。如表 4 所示,MASS 在三项 ROUGE 分数上都高于这两种预训练方法。

Table 4. The comparisons between MASS and two other pre-training methods in terms of ROUGE score on the text summarization task with 100K training data.

Method RG-1 (F) RG-2 (F) RG-L (F)
BERT+LM 27.63 10.40 25.32
DAE 28.11 11.25 25.69
MASS 29.79 12.75 27.45

表 4. 在 10 万句训练数据的文本摘要任务上,MASS 与另外两种预训练方法的 ROUGE 比较。

方法 RG-1 (F) RG-2 (F) RG-L (F)
BERT+LM 27.63 10.40 25.32
DAE 28.11 11.25 25.69
MASS 29.79 12.75 27.45

4.4. Fine-Tuning on Conversational Response Generation

4.4. 在对话回复生成上微调

Experimental Setting Conversational response generation generates a flexible response for the conversation (Shang et al., 2015; Vinyals & Le, 2015). We conduct experiments on the Cornell movie dialog corpus (Danescu-Niculescu-Mizil & Lee, 2011) that contains 140K conversation pairs. We randomly sample 10K/20K pairs as the validation/test set and the remaining data is used for training. We adopt the same optimization hyperparameters from the pre-training stage for fine-tuning. We report the results with perplexity (PPL) following Vinyals & Le (2015).

实验设定 对话回复生成要为对话产生灵活的回复(Shang et al., 2015; Vinyals & Le, 2015)。我们在含 14 万对话对的 Cornell movie dialog 语料(Danescu-Niculescu-Mizil & Lee, 2011)上做实验。随机采样 1 万/2 万对作为验证/测试集,其余用于训练。微调采用与预训练阶段相同的优化超参数。按 Vinyals & Le (2015) 的做法,我们用困惑度(PPL)报告结果。

10 https://github.com/suriyadeepan/datasets/tree/master/seq2seq/cornell movie corpus

Results We compare MASS with the baseline that is trained on the available data pairs. We conduct experiments on the 10K pairs (randomly chosen) and the whole 110K pairs, and show the results in Table 5. MASS achieves lower PPL than the baseline on both the 10K and 110K data.

结果 我们把 MASS 与在可用数据对上训练的基线比较。实验分别在随机选取的 1 万对以及全部 11 万对上进行,结果见表 5。在 1 万和 11 万句数据上,MASS 的困惑度都低于基线。

Table 5. The comparisons between MASS and other baseline methods in terms of PPL on Cornell Movie Dialog corpus.

Method Data = 10K Data = 110K
Baseline 82.39 26.38
BERT+LM 80.11 24.84
MASS 74.32 23.52

表 5. 在 Cornell Movie Dialog 语料上,MASS 与其他基线方法的困惑度比较。

方法 Data = 10K Data = 110K
Baseline 82.39 26.38
BERT+LM 80.11 24.84
MASS 74.32 23.52

Compared with Other Pre-Training Methods We also compare MASS with the pre-training methods of BERT+LM and DAE on conversational response generation. As shown in Table 5, MASS consistently outperforms the two pre-training methods with lower PPL on 10K and 110K training data respectively.

与其他预训练方法的比较 我们还在对话回复生成上把 MASS 与 BERT+LM 和 DAE 这两种预训练方法比较。如表 5 所示,MASS 在 1 万和 11 万训练数据上的困惑度都更低,始终优于这两种预训练方法。

4.5. Analysis of MASS

4.5. 对 MASS 的分析

Study of Different kkk The length of the masked fragment kkk is an important hyperparameter of MASS and we have varied kkk in Section 3.2 to cover the special cases of masked language modeling in BERT and standard language modeling. In this section, we study the performance of MASS with different kkk, where we choose kkk from 10% to 90% percentage of the sentence length mmm with a step size of 10%, plus with k=1k = 1k=1 and k=mk = mk=m.

不同 kkk 的研究 被掩码片段的长度 kkk 是 MASS 的重要超参数。我们在 3.2 节中变化 kkk,以覆盖 BERT 中的掩码语言模型和标准语言模型这两个特例。本节研究不同 kkk 下 MASS 的表现:我们把 kkk 取为句长 mmm 的 10% 到 90%,步长为 10%,再加上 k=1k = 1k=1 和 k=mk = mk=m。

We observe both the performance of MASS after pre-training, as well as the performance after fine-tuning on several language generation tasks, including unsupervised English-French translation, text summarization and conversational response generation. We first show the perplexity (PPL) of the pre-training model on the English and French languages with different kkk. We choose the English and French sentences from newstest2013 of WMT En-Fr as the validation set, and plot the PPL in Figure 5a (English) and 5b (French). It can be seen that the pre-trained model achieves the best validation PPL when kkk is between 50% and 70% of the sentence length mmm. We then observe the performance on fine-tuning tasks. We show the curve of the validation BLEU scores on unsupervised En-Fr translation in Figure 5c, the validation ROUGE scores on text summarization in Figure 5d, and the validation PPL on conversational response generation in Figure 5e. It can be seen that MASS achieves best performance on these downstream tasks when kkk is nearly 50% of the sentence length mmm. Therefore, we set k=50%k = 50\%k=50% of mmm for MASS in our experiments.

我们同时观察 MASS 在预训练之后的表现,以及在若干语言生成任务上微调之后的表现,包括无监督英-法翻译、文本摘要和对话回复生成。首先给出不同 kkk 下预训练模型在英语和法语上的困惑度(PPL)。验证集取 WMT 英-法 newstest2013 中的英、法句子,并把 PPL 画在图 5a(英语)和图 5b(法语)中。可以看到,当 kkk 取句长 mmm 的 50% 到 70% 时,预训练模型的验证困惑度最好。接着观察微调任务上的表现。图 5c 给出无监督英-法翻译的验证 BLEU 曲线,图 5d 给出文本摘要的验证 ROUGE,图 5e 给出对话回复生成的验证困惑度。可以看到,当 kkk 约为句长 mmm 的 50% 时,MASS 在这些下游任务上表现最好。因此,实验中我们将 MASS 的 kkk 设为 mmm 的 50%。

MASS pre-training and fine-tuning performance versus masked fragment length k

Figure 5. The performances of MASS with different masked lengths kkk, in both pre-training and fine-tuning stages, which include: the PPL of the pre-trained model on English (Figure a) and French (Figure b) sentences from WMT newstest2013 on English-French translation; the BLEU score of unsupervised English-French translation on WMT newstest2013 (Figure c); the ROUGE score (F1 score in RG-2) on the validation set of text summarization (Figure d); the PPL on the validation set of conversational response generation (Figure e).

图 5. 不同掩码长度 kkk 下,MASS 在预训练和微调阶段的表现,包括:预训练模型在 WMT 英-法 newstest2013 英语(图 a)和法语(图 b)句子上的困惑度;在 WMT newstest2013 上无监督英-法翻译的 BLEU(图 c);文本摘要验证集上的 ROUGE(RG-2 的 F1,图 d);对话回复生成验证集上的困惑度(图 e)。

Actually, k=50%k = 50\%k=50% of mmm is a good balance between the encoder and decoder. Too few valid tokens in the encoder side or in the decoder side will bias the model to concentrate more on the other side, which is not suitable for language generation task that typically leverages the encoder-decoder framework to extract the sentence representation in the encoder, as well as to model and generate the sentence in the decoder. The extreme cases are k=1k = 1k=1 (masked language modeling in BERT) and k=mk = mk=m (standard language modeling), as illustrated in Figure 2. Neither k=1k = 1k=1 nor k=mk = mk=m can achieve good performance on the downstream language generation tasks, as shown in Figure 5.

实际上,kkk 取 mmm 的 50% 是编码器与解码器之间的一个较好平衡。编码器一侧或解码器一侧的有效词过少,都会让模型偏向另一侧,这并不适合通常要用编码器–解码器框架、在编码器中抽取句子表示、在解码器中建模并生成句子的语言生成任务。极端情形就是 k=1k = 1k=1(BERT 中的掩码语言模型)和 k=mk = mk=m(标准语言模型),如图 2 所示。正如图 5 所显示的,k=1k = 1k=1 和 k=mk = mk=m 都无法在下游语言生成任务上取得好的表现。

Ablation Study of MASS In our masked sequence to sequence pre-training, we have two careful designs: (1) We mask consecutive tokens in the encoder side, and thus predict consecutive tokens in the decoder side, which can build better language modeling capability than just predicting discrete tokens. (2) We mask the input tokens of the decoder which are not masked in the encoder side (e.g., when predicting fragment x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​ in Figure 1, only the tokens x3x4x5x_3 x_4 x_5x3​x4​x5​ are taken as the input and other tokens are masked with [M][\mathrm{M}][M]), to encourage the decoder to extract more useful information from the encoder side, rather than leveraging the abundant information from the previous tokens. In this section, we conduct two ablation studies to verify the effectiveness of the two designs in MASS. The first study is to randomly mask discrete tokens instead of consecutive tokens in MASS, denoted as Discrete. The second study is to feed all the tokens to the decoder instead of masking the input tokens of the decoder that are not masked in the encoder side, denoted as Feed. We compare MASS with the two ablation methods on the unsupervised English-French translation, as shown in Table 6. It can be seen that both Discrete and Feed perform worse than MASS, demonstrating the effectiveness of the two designs in MASS.

MASS 的消融实验 在掩码序列到序列预训练中,我们有两项特意设计:(1)在编码器一侧掩掉连续的词,从而在解码器一侧预测连续的词,这比只预测离散单词更能培养语言建模能力。(2)把编码器一侧未被掩码的那些词在解码器输入里也掩掉(例如,在图 1 中预测片段 x3x4x5x6x_3 x_4 x_5 x_6x3​x4​x5​x6​ 时,只有 x3x4x5x_3 x_4 x_5x3​x4​x5​ 作为输入,其余词用 [M][\mathrm{M}][M] 掩掉),以促使解码器更多地从编码器一侧抽取有用信息,而不是依赖前词中已有的大量信息。本节做两项消融,以检验这两项设计的效果。第一项是在 MASS 中改为随机掩掉离散的词,而不是连续片段,记为 Discrete。第二项是把全部词都喂给解码器,而不再掩掉那些在编码器一侧未被掩码的解码器输入词,记为 Feed。我们在无监督英-法翻译上把 MASS 与这两种消融方法比较,见表 6。可以看到,Discrete 和 Feed 都不如 MASS,说明这两项设计是有效的。

Table 6. The comparison between MASS and the ablation methods in terms of BLEU score on the unsupervised en-fr translation.

Method BLEU Method BLEU Method BLEU
Discrete 36.9 Feed 35.3 MASS 37.5

表 6. 在无监督英-法翻译上,MASS 与消融方法的 BLEU 比较。

方法 BLEU
Discrete 36.9
Feed 35.3
MASS 37.5
  1. Conclusion
  1. 结论

In this work, we have proposed MASS: masked sequence to sequence pre-training for language generation tasks, which reconstructs a sentence fragment given the remaining part of the sentence in the encoder-decoder framework. MASS just needs to pre-train one model and then fine-tune on multiple language generation tasks such as neural machine translation, text summarization and conversational response generation. Through experiments on the three above tasks and total eight datasets, MASS achieved significant improvements over the baseline without pre-training or with other pre-training methods. More specifically, MASS achieved the state-of-the-art BLEU scores for unsupervised NMT on three language pairs, outperforming the previous state-of-the-art by more than 4 BLEU points on English-French.

本文提出了 MASS:面向语言生成任务的掩码序列到序列预训练。它在编码器–解码器框架中,在给定句子其余部分的条件下重建一个句子片段。MASS 只需预训练一个模型,再微调到神经机器翻译、文本摘要和对话回复生成等多种语言生成任务。通过在上述三项任务、共八个数据集上的实验,MASS 相对不预训练或其他预训练方法的基线都有明显提升。更具体地说,MASS 在三对语言的无监督翻译上达到了当时最好的 BLEU,在英-法上比此前最好结果高出 4 个 BLEU 以上。

For future work, we will apply MASS to more language generation tasks such as sentence paraphrasing, text style transfer and post editing. We will also investigate more of the theoretical and empirical analysis on our masked sequence to sequence pre-training method.

未来工作中,我们将把 MASS 应用到更多语言生成任务,例如句子复述、文本风格转换和译后编辑。我们也会对这种掩码序列到序列预训练方法做更多理论和实证分析。

Acknowledgements

致谢

This work was partially supported by the National Key Research and Development Program of China under Grant 2018YFB1004904. We thank Yichong Leng and Weicong Chen for the further development on the work of MASS. We also thank the anonymous reviewers for their valuable comments on our paper.

本工作部分得到国家重点研发计划项目 2018YFB1004904 的资助。感谢 Yichong Leng 和 Weicong Chen 对 MASS 工作的后续发展。我们也感谢匿名审稿人提出的宝贵意见。

References

参考文献

Ando, R. K. and Zhang, T. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6(Nov):1817–1853, 2005.

Artetxe, M., Labaka, G., Agirre, E., and Cho, K. Unsupervised neural machine translation. CoRR, 2017.

Ayana, Shen, S., Liu, Z., and Sun, M. Neural headline generation with minimum risk training. ArXiv, 2016.

Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. ICLR 2015, 2015a.

Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. 2015b.

Bengio, Y., Ducharme, R., Vincent, P., and Jauvin, C. A neural probabilistic language model. Journal of machine learning research, 3(Feb):1137–1155, 2003.

Blitzer, J., McDonald, R., and Pereira, F. Domain adaptation with structural correspondence learning. In EMNLP, pp. 120–128. Association for Computational Linguistics, 2006.

Bowman, S. R., Angeli, G., Potts, C., and Manning, C. D. A large annotated corpus for learning natural language inference. In EMNLP, 2015.

Brown, P. F., Desouza, P. V., Mercer, R. L., Pietra, V. J. D., and Lai, J. C. Class-based n-gram models of natural language. Computational linguistics, 18(4):467–479, 1992.

Cho, K., van Merrienboer, B., Gülçehre, Ç., Bahdanau, D., Bougares, F., Schwenk, H., and Bengio, Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP, 2014.

Collobert, R. and Weston, J. A unified architecture for natural language processing: Deep neural networks with multitask learning. In ICML, pp. 160–167. ACM, 2008.

Dai, A. M. and Le, Q. V. Semi-supervised sequence learning. In NIPS, pp. 3079–3087, 2015.

Danescu-Niculescu-Mizil, C. and Lee, L. Chameleons in imagined conversations: A new approach to understanding coordination of linguistic style in dialogs. In ACL Workshop, 2011.

Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. CoRR, 2018.

Fedus, W., Goodfellow, I., and Dai, A. Maskgan: Better text generation via filling in the _______. In ICLR, 2018.

Firat, O., Sankaran, B., Al-Onaizan, Y., Vural, F. T. Y., and Cho, K. Zero-resource translation with multi-lingual neural machine translation. In EMNLP, pp. 268–277, 2016.

Gehring, J., Auli, M., Grangier, D., Yarats, D., and Dauphin, Y. N. Convolutional sequence to sequence learning. In ICML, volume 70, pp. 1243–1252, 2017.

Girshick, R., Donahue, J., Darrell, T., and Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pp. 580–587, 2014.

Graff, David, Kong, Junbo, Chen, Ke, Maeda, and Kazuaki. English gigaword. In Linguistic Data Consortium, 2003.

Hassan, H., Aue, A., Chen, C., Chowdhary, V., Clark, J., Federmann, C., Huang, X., Junczys-Dowmunt, M., Lewis, W., Li, M., et al. Achieving human parity on automatic chinese to english news translation. arXiv preprint arXiv:1803.05567, 2018.

He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.

He, T., Tan, X., Xia, Y., He, D., Qin, T., Chen, Z., and Liu, T.-Y. Layer-wise coordination between encoder and decoder for neural machine translation. In Advances in Neural Information Processing Systems, pp. 7944–7954, 2018.

Howard, J. and Ruder, S. Universal language model fine-tuning for text classification. In ACL, volume 1, pp. 328–339, 2018.

Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. In ICLR, 2015.

Kiros, R., Zhu, Y., Salakhutdinov, R. R., Zemel, R., Urtasun, R., Torralba, A., and Fidler, S. Skip-thought vectors. In NIPS, pp. 3294–3302, 2015.

Lample, G. and Conneau, A. Cross-lingual language model pretraining. CoRR, abs/1901.07291, 2019.

Lample, G., Conneau, A., Denoyer, L., and Ranzato, M. Unsupervised machine translation using monolingual corpora only. CoRR, 2017.

Lample, G., Ott, M., Conneau, A., Denoyer, L., and Ranzato, M. Phrase-based & neural unsupervised machine translation. In EMNLP, pp. 5039–5049, 2018.

Le, Q. and Mikolov, T. Distributed representations of sentences and documents. In ICML, pp. 1188–1196, 2014.

Logeswaran, L. and Lee, H. An efficient framework for learning sentence representations. CORR, 2018.

McCann, B., Bradbury, J., Xiong, C., and Socher, R. Learned in translation: Contextualized word vectors. In NIPS, pp. 6294–6305, 2017.

Mikolov, T., Karafiát, M., Burget, L., Černocký, J., and Khudanpur, S. Recurrent neural network based language model. In Eleventh Annual Conference of the International Speech Communication Association, 2010.

Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. Distributed representations of words and phrases and their compositionality. In NIPS, pp. 3111–3119, 2013.

Ouyang, W., Li, H., Zeng, X., and Wang, X. Learning deep representation with large-scale attributes. In CVPR, pp. 1895–1903, 2015.

Pennington, J., Socher, R., and Manning, C. Glove: Global vectors for word representation. In EMNLP, pp. 1532–1543, 2014.

Peters, M., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., and Zettlemoyer, L. Deep contextualized word representations. In NAACL, volume 1, pp. 2227–2237, 2018.

Radford, A., Narasimhan, K., Salimans, T., and Sutskever, I. Improving language understanding by generative pre-training. 2018.

Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. Squad: 100,000+ questions for machine comprehension of text. CoRR, 2016.

Ramachandran, P., Liu, P. J., and Le, Q. V. Unsupervised pretraining for sequence to sequence learning. CoRR, abs/1611.02683, 2016.

Sennrich, R., Haddow, B., and Birch, A. Neural machine translation of rare words with subword units. In ACL, volume 1, pp. 1715–1725, 2016.

Shang, L., Lu, Z., and Li, H. Neural responding machine for short-text conversation. In ACL, volume 1, pp. 1577–1586, 2015.

Shen, Y., Tan, X., He, D., Qin, T., and Liu, T.-Y. Dense information flow for neural machine translation. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1294–1303, June 2018.

Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A., and Potts, C. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, pp. 1631–1642, 2013.

Song, K., Tan, X., He, D., Lu, J., Qin, T., and Liu, T.-Y. Double path networks for sequence to sequence learning. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 3064–3074, 2018.

Suzuki, J. and Nagata, M. Cutting-off redundant repeating generations for neural abstractive summarization. In ACL, pp. 291–297, 2017.

Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D., Vanhoucke, V., and Rabinovich, A. Going deeper with convolutions. In CVPR, pp. 1–9, 2015.

Tan, X., Ren, Y., He, D., Qin, T., and Liu, T.-Y. Multilingual neural machine translation with knowledge distillation. In ICLR, 2019.

Tjong Kim Sang, E. F. and De Meulder, F. Introduction to the conll-2003 shared task: Language-independent named entity recognition. In NAACL, pp. 142–147. Association for Computational Linguistics, 2003.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In NIPS, pp. 6000–6010, 2017.

Vincent, P., Larochelle, H., Bengio, Y., and Manzagol, P.-A. Extracting and composing robust features with denoising autoencoders. In ICML, pp. 1096–1103. ACM, 2008.

Vinyals, O. and Le, Q. V. A neural conversational model. CoRR, abs/1506.05869, 2015.

Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., and Bowman, S. R. Glue: A multi-task benchmark and analysis platform for natural language understanding. CoRR, abs/1804.07461, 2018.

Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., Klingner, J., Shah, A., Johnson, M., Liu, X., Kaiser, L., Gouws, S., Kato, Y., Kudo, T., Kazawa, H., Stevens, K., Kurian, G., Patil, N., Wang, W., Young, C., Smith, J., Riesa, J., Rudnick, A., Vinyals, O., Corrado, G., Hughes, M., and Dean, J. Google’s neural machine translation system: Bridging the gap between human and machine translation. CoRR, abs/1609.08144, 2016.

Yang, Z., Chen, W., Wang, F., and Xu, B. Unsupervised neural machine translation with weight sharing. In ACL, pp. 46–55, 2018.

Yuan, X., Wang, T., Gulcehre, C., Sordoni, A., Bachman, P., Zhang, S., Subramanian, S., and Trischler, A. Machine comprehension by text-to-text neural question generation. In Proceedings of the 2nd Workshop on Representation Learning for NLP, pp. 15–25, 2017.

Zhang, J. and Zong, C. Exploiting source-side monolingual data in neural machine translation. In EMNLP, pp. 1535–1545, 2016.

Zoph, B., Yuret, D., May, J., and Knight, K. Transfer learning for low-resource neural machine translation. In EMNLP, pp. 1568–1575, 2016.