Paper:GPT之《Improving Language Understanding by Generative Pre-Training》翻译与解读

目录

GPT之《Improving Language Understanding by Generative Pre-Training》翻译与解读

GPT的demo体验

Abstract

1、Introduction

2 Related Work

3 Framework

3.1 Unsupervised pre-training无监督的预训练阶段UPT

3.2 Supervised fine-tuning有监督的微调阶段SFT

不同的任务模型的输入token序列不同

3.3 Task-specific input transformations

4 Experiments

4.1 Setup

4.2 Supervised fine-tuning

5 Analysis

6 Conclusion

References


GPT之《Improving Language Understanding by Generative Pre-Training》翻译与解读

作者

Alec Radford,OpenAI,alec@openai.com

Karthik Narasimhan,OpenAI,karthikn@openai.com

Tim Salimans,OpenAI,tim@openai.com

Ilya Sutskever,OpenAI,ilyasu@openai.com

日期

2018年

链接

https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf

其它解读 量子位:OpenAI新研究:通过非监督学习提升NLP任务表现

GPT的demo体验

体验国外的demo
inferkit_demo
OpenAI API

体验国内类似GPT的demo
悟道对联图灵测试

Abstract

Natural language understanding comprises a wide range of diverse tasks such as textual entailment, question answering, semantic similarity assessment, and document classification. Although large unlabeled text corpora are abundant, labeled data for learning these specific tasks is scarce, making it challenging for discriminatively trained models to perform adequately. We demonstrate that large gains on these tasks can be realized by generative pre-training of a language model on a diverse corpus of unlabeled text, followed by discriminative fine-tuning on each specific task. In contrast to previous approaches, we make use of task-aware input transformations during fine-tuning to achieve effective transfer while requiring minimal changes to the model architecture. We demonstrate the effectiveness of our approach on a wide range of benchmarks for natural language understanding. Our general task-agnostic model outperforms discriminatively trained models that use architectures specifically crafted for each task, significantly improving upon the state of the art in 9 out of the 12 tasks studied. For instance, we achieve absolute improvements of 8.9% on commonsense reasoning (Stories Cloze Test), 5.7% on question answering (RACE), and 1.5% on textual entailment (MultiNLI).

自然语言理解包括范围广泛的不同任务,如文本蕴涵问题回答语义相似性评估文档分类。虽然大量的未标记文本语料库很丰富,但用于学习这些特定任务的标记数据很少,这使得经过判别训练的模型难以充分发挥作用。我们证明,通过在不同的无标签文本语料库上对语言模型进行生成式预训练,然后对每个特定任务进行判别性微调,可以在这些任务的巨大收益。与以前的方法相比,我们在微调期间使用任务感知的输入转换来实现有效的传输,同时需要对模型架构进行的更改。我们证明了我们的方法在广泛的自然语言理解基准上的有效性。我们的通用任务不可知模型优于使用专门为每个任务设计的架构的鉴别训练模型,在研究的12个任务中有9个显著提高。例如,我们在常识推理(Stories Cloze故事完形填空测试)上取得了8.9%的绝对进步,在问题回答(RACE)上取得了5.7%的绝对进步,在文本蕴含(MultiNLI多项测试)上取得了1.5%的绝对进步。

1、Introduction

The ability to learn effectively from raw text is crucial to alleviating the dependence on supervised learning in natural language processing (NLP). Most deep learning methods require substantial amounts of manually labeled data, which restricts their applicability in many domains that suffer from a dearth of annotated resources [61]. In these situations, models that can leverage linguistic information from unlabeled data provide a valuable alternative to gathering more annotation, which can be time-consuming and expensive. Further, even in cases where considerable supervision is available, learning good representations in an unsupervised fashion can provide a significant performance boost. The most compelling evidence for this so far has been the extensive use of pre-trained word embeddings [10, 39, 42] to improve performance on a range of NLP tasks [8, 11, 26, 45].Leveraging more than word-level information from unlabeled text, however, is challenging for two main reasons. First, it is unclear what type of optimization objectives are most effective at learning text representations that are useful for transfer. Recent research has looked at various objectives such as language modeling [44], machine translation [38], and discourse coherence [22], with each method outperforming the others on different tasks.1 Second, there is no consensus on the most effective way to transfer these learned representations to the target task. Existing techniques involve a combination of making task-specific changes to the model architecture [43, 44], using intricate learning schemes [21] and adding auxiliary learning objectives [50]. These uncertainties have made it difficult to develop effective semi-supervised learning approaches for language processing.

从原始文本中有效学习的能力对于减轻NLP中对监督学习的依赖至关重要。大多数深度学习方法都需要大量的手工标记数据,这限制了它们在许多缺乏注释资源的领域的适用性[61]。在这些情况下,可以利用来自未标记数据的语言信息的模型收集更多注释提供了一种有价值的替代方法,这可能既耗时又昂贵。此外,即使在有大量监督的情况下,以无监督的方式学习良好的表示也可以显著提升性能。迄今为止,最令人信服的证据是广泛使用预训练词嵌入[10,39,42]来提高一系列NLP任务的性能[8,11,26,45]。然而,从未标记的文本中利用单词级以上的信息具有挑战性,主要有两个原因。

首先,目前尚不清楚哪种类型的化目标在学习对迁移有用的文本表示时最有效。最近的研究着眼于不同的目标,如语言建模[44]、机器翻译[38]和语篇连贯[22],每种方法在不同的任务上都优于其他方法。

其次,对于将这些学习到的表征转移到目标任务最有效方法,目前还没有达成共识。现有的技术包括对模型架构进行特定于任务的更改[43,44],使用复杂的学习方案[21]和添加辅助学习目标[50]。这些不确定性使得开发有效的语言处理半监督学习方法变得困难

In this paper, we explore a semi-supervised approach for language understanding tasks using a combination of unsupervised pre-training and supervised fine-tuning. Our goal is to learn a universal representation that transfers with little adaptation to a wide range of tasks. We assume access to a large corpus of unlabeled text and several datasets with manually annotated training examples (target tasks). Our setup does not require these target tasks to be in the same domain as the unlabeled corpus. We employ a two-stage training procedure. First, we use a language modeling objective on the unlabeled data to learn the initial parameters of a neural network model. Subsequently, we adapt these parameters to a target task using the corresponding supervised objective.

For our model architecture, we use the Transformer [62], which has been shown to perform strongly on various tasks such as machine translation [62], document generation [34], and syntactic parsing [29]. This model choice provides us with a more structured memory for handling long-term dependencies in text, compared to alternatives like recurrent networks, resulting in robust transfer performance across diverse tasks. During transfer, we utilize task-specific input adaptations derived from traversal-style approaches [52], which process structured text input as a single contiguous sequence of tokens. As we demonstrate in our experiments, these adaptations enable us to fine-tune effectively with minimal changes to the architecture of the pre-trained model.

在本文中,我们探索了一种结合无监督预训练监督微调半监督方法来完成语言理解任务。我们的目标学习一种通用的表示方式,它可以不需要任何适应就能转移到广泛的任务中。我们假设可以访问一个大型的无标记文本语料库和几个数据集,其中包含手动注释的训练示例(目标任务)。我们的设置不要求这些目标任务与未标记的语料库处于同一域中。我们采用两阶段训练程序。首先,我们在未标记的数据上使用语言建模目标来学习神经网络模型的初始参数。随后,我们使用相应的监督目标将这些参数调整适应到目标任务

对于我们的模型架构,我们使用Transformer[62],它已被证明在各种任务上表现出色,如机器翻译[62]、文档生成[34]和语法解析[29]。与循环网络等替代方案相比,这种模型选择为我们提供了更结构化的记忆处理文本中的长期依赖关系,从而在不同任务之间实现了稳健的传输性能。在传输过程中,我们利用来自遍历样式方法[52]的特定于任务的输入自适应,该方法将结构化文本输入处理为单个连续的tokens序列。正如我们在实验中所演示的,这些调整使我们能够在对预训练模型的架构,进行最小更改的情况下有效地进行微调

We evaluate our approach on four types of language understanding tasks – natural language inference, question answering, semantic similarity, and text classification. Our general task-agnostic model outperforms discriminatively trained models that employ architectures specifically crafted for each task, significantly improving upon the state of the art in 9 out of the 12 tasks studied. For instance, we achieve absolute improvements of 8.9% on commonsense reasoning (Stories Cloze Test) [40], 5.7% on question answering (RACE) [30], 1.5% on textual entailment (MultiNLI) [66] and 5.5% on the recently introduced GLUE multi-task benchmark [64]. We also analyzed zero-shot behaviors of the pre-trained model on four different settings and demonstrate that it acquires useful linguistic knowledge for downstream tasks.

我们在四种类型的语言理解任务上评估我们的方法——自然语言推理、问题回答、语义相似性文本分类。我们的通用任务不可知模型优于采用专门为每项任务设计的架构的判别式训练模型,在研究的12个任务中有9个显著改进。例如,我们在常识推理(故事完形测试Stories Cloze Test)[40]上实现了8.9%的绝对改进,在问答(RACE)[30]上实现了5.7%的绝对改进,在文本包含(多项测试MultiNLI)上实现了1.5%的绝对改进[66],在最近引入的GLUE多任务基准测试[64]上实现了5.5%的绝对改进。我们还分析了预训练模型在四种不同设置下的零样本行为,并证明它为下游任务获得了有用的语言知识

2 Related Work

Semi-supervised learning for NLP Our work broadly falls under the category of semi-supervised learning for natural language. This paradigm has attracted significant interest, with applications to tasks like sequence labeling [24, 33, 57] or text classification [41, 70]. The earliest approaches used unlabeled data to compute word-level or phrase-level statistics, which were then used as features in a supervised model [33]. Over the last few years, researchers have demonstrated the benefits of using word embeddings [11, 39, 42], which are trained on unlabeled corpora, to improve performance on a variety of tasks [8, 11, 26, 45]. These approaches, however, mainly transfer word-level information, whereas we aim to capture higher-level semantics.

Recent approaches have investigated learning and utilizing more than word-level semantics from unlabeled data. Phrase-level or sentence-level embeddings, which can be trained using an unlabeled corpus, have been used to encode text into suitable vector representations for various target tasks [28, 32, 1, 36, 22, 12, 56, 31].

我们的工作大体上属于自然语言的半监督学习的范畴。该范式引起了人们的极大兴趣,应用于序列标记[24,33,57]或文本分类[41,70]等任务。最早的方法使用无标签数据来计算单词级或短语级统计数据,然后将其用作监督模型[33]中的特征。在过去的几年里,研究人员已经证明了使用词嵌入的好处[11,39,42],它是在未标记的语料库上训练的,可以提高在各种任务上的表现[8,11,26,45]。然而,这些方法主要传输单词级别的信息,而我们的目标是捕获更高级别的语义。

最近的方法研究了从未标记的数据中学习和利用单词级以上的语义。短语级或句子级嵌入可以使用未标记的语料库进行训练,已用于将文本编码为适合各种目标任务的向量表示[28,32,1,36,22,12,56,31]。

Unsupervised pre-training

Unsupervised pre-training is a special case of semi-supervised learning where the goal is to find a good initialization point instead of modifying the supervised learning objective. Early works explored the use of the technique in image classification [20, 49, 63] and regression tasks [3]. Subsequent research [15] demonstrated that pre-training acts as a regularization scheme, enabling better generalization in deep neural networks. In recent work, the method has been used to help train deep neural networks on various tasks like image classification [69], speech recognition [68], entity disambiguation [17] and machine translation [48].

The closest line of work to ours involves pre-training a neural network using a language modeling objective and then fine-tuning it on a target task with supervision. Dai et al. [13] and Howard and Ruder [21] follow this method to improve text classification. However, although the pre-training phase helps capture some linguistic information, their usage of LSTM models restricts their prediction ability to a short range. In contrast, our choice of transformer networks allows us to capture longer-range linguistic structure, as demonstrated in our experiments. Further, we also demonstrate the effectiveness of our model on a wider range of tasks including natural language inference, paraphrase detection and story completion. Other approaches [43, 44, 38] use hidden representations from a pre-trained language or machine translation model as auxiliary features while training a supervised model on the target task. This involves a substantial amount of new parameters for each separate target task, whereas we require minimal changes to our model architecture during transfer.

无监督预训练

无监督预训练是半监督学习的一种特殊情况,其目标是找到一个好的初始化点,而不是修改监督学习目标。早期工作探索了该技术在图像分类[20,49,63]和回归任务[3]中的使用。随后的研究[15]表明,预训练作为一种正则化方案,能够在深度神经网络中实现更好的泛化。在最近的工作中,该方法已用于帮助训练深度神经网络完成各种任务,如图像分类[69]、语音识别[68]、实体消歧[17]和机器翻译[48]。

与我们最接近的工作是使用语言建模目标预训练神经网络,然后在监督下对目标任务进行微调。Dai et al.[13]和Howard and Ruder[21]采用该方法改进文本分类。然而,尽管预训练阶段有助于捕获一些语言信息,但LSTM模型的使用将其预测能力限制在短范围内。相比之下,我们对变压器网络的选择允许我们捕捉更广泛的语言结构,正如我们的实验所证明的那样。此外,我们还证明了我们的模型在更广泛的任务上的有效性,包括自然语言推理,释义检测和故事完成。其他方法[43,44,38]使用来自预训练语言或机器翻译模型的隐藏表示作为辅助特征,同时在目标任务上训练监督模型。这涉及到每个独立目标任务的大量新参数,而在传输过程中我们只需要对模型架构进行最小的更改。

Auxiliary training objectives

Adding auxiliary unsupervised training objectives is an alternative form of semi-supervised learning. Early work by Collobert and Weston [10] used a wide variety of auxiliary NLP tasks such as POS tagging, chunking, named entity recognition, and language modeling to improve semantic role labeling. More recently, Rei [50] added an auxiliary language modeling objective to their target task objective and demonstrated performance gains on sequence labeling tasks. Our experiments also use an auxiliary objective, but as we show, unsupervised pre-training already learns several linguistic aspects relevant to target tasks.

辅助训练目标

添加辅助的无监督训练目标是半监督学习的另一种形式。Collobert和Weston的早期工作[10]使用了各种辅助NLP任务,如POS标记、分块、命名实体识别和语言建模来改进语义角色标记。最近,Rei[50]在他们的目标任务目标中添加了一个辅助语言建模目标,并证明了序列标记任务的性能提高。我们的实验也使用了一个辅助目标,但如我们所示,无监督的预训练已经学习了与目标任务相关的几个语言方面。

3 Framework

Our training procedure consists of two stages. The first stage is learning a high-capacity language model on a large corpus of text. This is followed by a fine-tuning stage, where we adapt the model to a discriminative task with labeled data.

我们的训练程序包括两个阶段。第一阶段是在大型文本语料库上学习高容量语言模型。接下来是微调阶段,在此阶段,我们将模型调整为具有标记数据的判别任务。

3.1 Unsupervised pre-training无监督的预训练阶段UPT

Given an unsupervised corpus of tokens U = {u1, . . . , un}, we use a standard language modeling objective to maximize the following likelihood:

where k is the size of the context window, and the conditional probability P is modeled using a neural network with parameters Θ. These parameters are trained using stochastic gradient descent [51].

In our experiments, we use a multi-layer Transformer decoder [34] for the language model, which is a variant of the transformer [62]. This model applies a multiheaded self-attention operation over the input context tokens followed by position-wise feedforward layers to produce an output distribution over target tokens:

where U = (u−k, . . . , u−1) is the context vector of tokens, n is the number of layers, We is the token embedding matrix, and Wp is the position embedding matrix.

给定一个无监督的语料库(无标签的tokens语料库)U = {u1,…, un},我们使用LM标准语言模型目标函数(即根据前 k 个词预测下一个词)语言模型的优化目标是最大化下面的似然函数:

其中,k为token的上下文滑动窗口的大小,P条件概率是使用参数为Θ的神经网络建模的。这些参数是用SGD随机梯度下降[51]训练优化得到的。

在我们的实验中,我们对语言模型使用了一个多层Transformer解码器[34],它是Transformer的一个变体[62]。该模型在输入上下文tokens上应用了一个多头自注意力操作,然后是按位置的前馈层,以在目标tokens上产生输出分布:

在GPT-1中,使用了12个transformer块的结构作为解码器,每个transformer块是一个多头的自注意力机制,然后通过全连接得到输出的概率分布

该模型的训练过程,其实就是将输入文本中每个词的Embedding作为输入,输出预测的下一个词

其中U = (U−k,…, u−1)为标记的上下文向量,n为层数,We为标记嵌入矩阵,Wp为位置嵌入矩阵。

第1步

输入为前k个词和位置的embedding,

其中U={u-k,,,u-1}是文本中每个词的词向量(当前时间片的上下文token),n为层数,We表示词嵌入矩阵,Wp表示位置嵌入矩阵。

第2步

经过n层transformer-decoder层(GPT-1中为12层)

第3步

乘上一个token embedding矩阵,通过softmax得到概率

3.2 Supervised fine-tuning有监督的微调阶段SFT

第二阶段,即在特定任务上使用少量带标签的数据对模型参数进行有监督的微调对比预训练阶段,可以看出,多增加了“Task Classifier”模块

After training the model with the objective in Eq. 1, we adapt the parameters to the supervised target task. We assume a labeled dataset C, where each instance consists of a sequence of input tokens, x1, . . . , xm, along with a label y. The inputs are passed through our pre-trained model to obtain the final transformer block’s activation hlm, which is then fed into an added linear output layer with parameters Wy to predict y:

This gives us the following objective to maximize:

当得到无监督的预训练模型之后,我们将它的直接应用到有监督任务中。

在用公式1中的目标训练模型后,我们将参数适应监督目标任务。

我们假设,有一个带标签的数据集C,其中每个实例样本都包含有m个输入(tokens序列):{x1,x2,,xm},和对应的标签y组成,

~~~

输入通过我们预先训练的模型,得到最终transformer 块的激活hi,

~~~

然后,将其输入到一个附加的线性输出层,带参数Wy来预测y:

这为我们提供了以下最大化目标:

We additionally found that including language modeling as an auxiliary objective to the fine-tuning helped learning by (a) improving generalization of the supervised model, and (b) accelerating convergence. This is in line with prior work [50, 43], who also observed improved performance with such an auxiliary objective. Specifically, we optimize the following objective (with weight λ):

Overall, the only extra parameters we require during fine-tuning are Wy, and embeddings for delimiter tokens (described below in Section 3.3).

我们还发现,将语言建模作为微调的辅助目标有助于

(a)、提高监督模型的泛化

(b)、加速收敛

这与之前的工作一致[50,43],他们也观察到使用这种辅助目标可以提高性能。具体来说,我们优化了以下目标(权值λ):

总的来说,我们在微调过程中需要的唯一额外参数是Wy和分隔符tokens 的嵌入(将在3.3节中描述)。

Figure 1: (left) Transformer architecture and training objectives used in this work. (right) Input transformations for fine-tuning on different tasks. We convert all structured inputs into token sequences to be processed by our pre-trained model, followed by a linear+softmax layer. 图 1:(左)本工作中使用的 Transformer 架构和训练目标。 (右)用于微调不同任务的输入转换。 我们将所有结构化输入转换为标记序列,以供我们的预训练模型处理,然后是线性+softmax 层。

第1步

首先,将这些token输入到训练好的预训练模型中,得到最终的特征向量hj。

然后,再通过一个全连接层得到预测结果y,

具体任务相应的目标函数为:

其中,Wy为全连接层的参数,有监督的目标则是最大化上边公式的值。

第2步

作者并没有直接使用L2,而是向其中加入了L1 ,并使用λ进行两个任务权值调整, λ的值一般为0.5,

其中,x1,,,,xm为特定下游任务的输入,y为标签,hj为预训练阶段最后一个词的输出,即最后一个token xm对应的最后一层transformer-decoder的输出。

所以,需要额外调整的参数只有Wy

原文中还提到了用辅助训练目标的方法,来帮助模型在微调时拥有更好的泛化能力并加速收敛。

具体做法是:在使用最后一个词的预测结果进行监督学习的同时,前面的词继续上一步的无监督训练。

最终,微调阶段的,要优化的目标函数如下:

L3(C)=L2(C)+λ∗L1(C)

当进行有监督微调的时候,我们只训练输出层的Wy和分隔符的嵌入值。

不同的任务模型的输入token序列不同

针对不同的任务,模型的输入token序列是有区别的。简单总结如下:

任务

具体任务具体修改

文本分类

判断输入文本是指定的哪个类别

不需要做修改;

输入格式与预训练时一样,[start;text;extract];

------------------------------------------------------------

将起始和终止token加入到原始序列两端,输入transformer中得到特征向量,最后经过一个全连接,得到预测的概率分布

文本推理

判断两个句子之间关系:包含关系(entailment)、矛盾关系(contradiction)、中立关系(neutral)。

可在前提(premise)和假设(hypothesis)中间插入一个分隔符(delimiter)作为分隔;

------------------------------------------------------------

[startpremisedelimiterhypothesisextract];

将前提(premise)和假设(hypothesis)

通过分隔符(Delimiter)隔开,两端加上起始和终止token。再依次通过transformer和全连接,得到预测结果

文本相识度度量

判断两个句子是否语义相关

可将两个句子顺序颠倒,然后将两次输入相加来做推测;

------------------------------------------------------------

由于两个文本间没有相对顺序,所以把两种情况

([start;text1;delimiter;text2;extract],

[start;text2;delimiter;text1;extract])

分别处理后得到两个hlm后,再按位相加,经过全连接层。

理解:输入的两个句子,正向和反向各拼接一次,然后分别,输入transformer中得到特征向量,拼接后,再送给全连接,得到预测结果

问答与常识推理QA

类似于多选题,输入一篇文章、一个问题以及若干个候选答案,输出为每个答案的预测概率。

可将上下文和问题放在一起,用分隔符隔开与答案;

------------------------------------------------------------

将上下文文档(context document)和问题(question)与不同的答案(answer)分别拼接起来,

([start;context;question;delimiter;answer1],

[start;context;question;delimiter;answer2]…

[start;context;question;delimiter;answerN]),

经过模型后,再经过softmax层;

理解:将n个选项的问题抽象化为n个二分类问题,即每个选项分别和内容进行拼接,然后各送入transformer和全连接中,最后选择置信度最高的作为预测结果。

3.3 Task-specific input transformations

For some tasks, like text classification, we can directly fine-tune our model as described above. Certain other tasks, like question answering or textual entailment, have structured inputs such as ordered sentence pairs, or triplets of document, question, and answers. Since our pre-trained model was trained on contiguous sequences of text, we require some modifications to apply it to these tasks. Previous work proposed learning task specific architectures on top of transferred representations [44]. Such an approach re-introduces a significant amount of task-specific customization and does not use transfer learning for these additional architectural components. Instead, we use a traversal-style approach [52], where we convert structured inputs into an ordered sequence that our pre-trained model can process. These input transformations allow us to avoid making extensive changes to the architecture across tasks. We provide a brief description of these input transformations below and Figure 1 provides a visual illustration. All transformations include adding randomly initialized start and end tokens <s>,<e>.

对于某些任务,如文本分类,我们可以直接微调我们的模型如上所述。某些其他任务,如问题回答或文本包含,具有结构化的输入,如有序的句子对,或文档、问题和答案的三元组。由于我们预先训练的模型是在连续的文本序列上训练的,所以我们需要进行一些修改才能将其应用于这些任务。以前的工作提出了在转移表示[44]之上学习特定任务的架构。这种方法重新引入了大量特定于任务的定制,并且没有对这些额外的体系结构组件使用迁移学习。相反,我们使用遍历风格的方法[52],将结构化输入转换为预先训练的模型可以处理的有序序列。这些输入转换允许我们避免跨任务对体系结构进行广泛的更改。我们在下面简要描述了这些输入转换,图1提供了一个可视化的说明。所有转换包括添加随机初始化的开始和结束令牌<s>,<e>。

Textual entailment

For entailment tasks, we concatenate the premise p and hypothesis h token sequences, with a delimiter token ($) in between.

文本蕴涵

对于包含任务,我们将前提p和假设h令牌序列连接起来,中间有一个分隔符令牌($)。

Similarity

For similarity tasks, there is no inherent ordering of the two sentences being compared. To reflect this, we modify the input sequence to contain both possible sentence orderings (with a delimiter in between) and process each independently to produce two sequence representations hlm which are added element-wise before being fed into the linear output layer.

相似

在相似性测试中,被比较的两个句子没有固有的顺序。为了反映这一点,我们修改输入序列以包含两种可能的句子顺序(中间有分隔符),并单独处理每一种顺序以生成两个序列表示hlm,在将它们输入线性输出层之前逐个添加元素。

Question Answering and Commonsense Reasoning

For these tasks, we are given a context document z, a question q, and a set of possible answers {ak}. We concatenate the document context and question with each possible answer, adding a delimiter token in between to get [z; q; $; ak]. Each of these sequences are processed independently with our model and then normalized via a softmax layer to produce an output distribution over possible answers.

问题回答和常识推理

对于这些任务,我们得到了一个上下文文档z、一个问题q和一组可能的答案{ak}。我们将文档上下文和问题与每个可能的答案连接起来,在两者之间添加分隔符标记以得到[z;问;美元;正义与发展党]。我们的模型对每个序列进行独立处理,然后通过softmax层进行归一化,以生成可能答案的输出分布。

4 Experiments

4.1 Setup

Table 1: A list of the different tasks and datasets used in our experiments.
表1:我们实验中使用的不同任务和数据集的列表。

Unsupervised pre-training We use the BooksCorpus dataset [71] for training the language model. It contains over 7,000 unique unpublished books from a variety of genres including Adventure, Fantasy, and Romance. Crucially, it contains long stretches of contiguous text, which allows the generative model to learn to condition on long-range information. An alternative dataset, the 1B Word Benchmark, which is used by a similar approach, ELMo [44], is approximately the same size but is shuffled at a sentence level - destroying long-range structure. Our language model achieves a very low token level perplexity of 18.4 on this corpus.

无监督预训练我们使用BooksCorpus数据集[71]来训练语言模型。它包含了7000多本独特的未出版的书籍,包括冒险、幻想和浪漫。最重要的是,它包含长段连续的文本,这允许生成模型学习以远程信息为条件。另一个可供选择的数据集,1B Word Benchmark,由类似的方法使用,ELMo[44],大小大致相同,但在句子级别上被打乱-破坏了长期结构。我们的语言模型在这个语料库上实现了非常低的令牌级困惑度18.4。

Model specifications

Our model largely follows the original transformer work [62]. We trained a 12-layer decoder-only transformer with masked self-attention heads (768 dimensional states and 12 attention heads). For the position-wise feed-forward networks, we used 3072 dimensional inner states. We used the Adam optimization scheme [27] with a max learning rate of 2.5e-4. The learning rate was increased linearly from zero over the first 2000 updates and annealed to 0 using a cosine schedule. We train for 100 epochs on minibatches of 64 randomly sampled, contiguous sequences of 512 tokens. Since layernorm [2] is used extensively throughout the model, a simple weight initialization of N(0, 0.02) was sufficient. We used a bytepair encoding (BPE) vocabulary with 40,000 merges [53] and residual, embedding, and attention dropouts with a rate of 0.1 for regularization. We also employed a modified version of L2 regularization proposed in [37], with w = 0.01 on all non bias or gain weights. For the activation function, we used the Gaussian Error Linear Unit (GELU) [18]. We used learned position embeddings instead of the sinusoidal version proposed in the original work. We use the ftfy library2 to clean the raw text in BooksCorpus, standardize some punctuation and whitespace, and use the spaCy tokenizer.3

模型规范

我们的模型在很大程度上遵循了原来的变压器工作[62]。我们训练了一个带有蒙面自注意头(768个维度状态和12个注意头)的12层译码器。对于位置前馈网络,我们使用3072维内态。我们使用Adam优化方案[27],最大学习率为2.5e-4。在前2000次更新中,学习率从零线性增加,并使用余弦计划退火到0。我们在64个随机采样的、512个令牌的连续序列的小批上训练100个epoch。由于layernorm[2]在整个模型中被广泛使用,因此N(0,0.02)的简单权重初始化就足够了。我们使用了一个字节对编码(BPE)词汇表,包含40000个合并[53]和残差、嵌入和注意力下降,其正规化率为0.1。我们还采用了[37]中提出的L2正则化的修改版本,在所有无偏差或增益权重上w = 0.01。对于激活函数,我们使用高斯误差线性单元(GELU)[18]。我们使用了习得的位置嵌入,而不是原始工作中提出的正弦版本。我们使用ftfy library2来清理BooksCorpus中的原始文本,标准化一些标点符号和空格,并使用spaCy标记器

Fine-tuning details

Unless specified, we reuse the hyperparameter settings from unsupervised pre-training. We add dropout to the classifier with a rate of 0.1. For most tasks, we use a learning rate of 6.25e-5 and a batchsize of 32. Our model finetunes quickly and 3 epochs of training was sufficient for most cases. We use a linear learning rate decay schedule with warmup over 0.2% of training. λ was set to 0.5.

调整细节

除非指定,否则我们将重用来自无监督预训练的超参数设置。我们以0.1的速率将dropout添加到分类器中。对于大多数任务,我们使用6.25e-5的学习率和32的批处理大小。我们的模型快速微调,3次训练对于大多数情况是足够的。我们使用线性学习速率衰减计划,热身超过0.2%的训练。λ设为0.5。

4.2 Supervised fine-tuning

We perform experiments on a variety of supervised tasks including natural language inference, question answering, semantic similarity, and text classification. Some of these tasks are available as part of the recently released GLUE multi-task benchmark [64], which we make use of. Figure 1 provides an overview of all the tasks and datasets.

我们对各种监督任务进行实验,包括自然语言推理、问题回答、语义相似性和文本分类。其中一些任务是最近发布的GLUE多任务基准测试[64]的一部分,我们正在使用它。图1提供了所有任务和数据集的概述。

Natural Language Inference

The task of natural language inference (NLI), also known as recog-nizing textual entailment, involves reading a pair of sentences and judging the relationship between them from one of entailment, contradiction or neutral. Although there has been a lot of recent interest [58, 35, 44], the task remains challenging due to the presence of a wide variety of phenomena like lexical entailment, coreference, and lexical and syntactic ambiguity. We evaluate on five datasets with diverse sources, including image captions (SNLI), transcribed speech, popular fiction, and government reports (MNLI), Wikipedia articles (QNLI), science exams (SciTail) or news articles (RTE).

Table 2 details various results on the different NLI tasks for our model and previous state-of-the-art approaches. Our method significantly outperforms the baselines on four of the five datasets, achieving absolute improvements of upto 1.5% on MNLI, 5% on SciTail, 5.8% on QNLI and 0.6% on SNLI over the previous best results. This demonstrates our model’s ability to better reason over multiple sentences, and handle aspects of linguistic ambiguity. On RTE, one of the smaller datasets we evaluate on (2490 examples), we achieve an accuracy of 56%, which is below the 61.7% reported by a multi-task biLSTM model. Given the strong performance of our approach on larger NLI datasets, it is likely our model will benefit from multi-task training as well but we have not explored this currently.

Home - ftfy: fixes text for you

https://spacy.io/

自然语言推理

自然语言推理(NLI)的任务,也称为文本蕴涵识别,包括阅读一对句子,并从蕴涵、矛盾或中性中判断它们之间的关系。虽然最近有很多兴趣[58,35,44],但由于存在各种各样的现象,如词汇蕴涵,共指,词汇和句法歧义,任务仍然具有挑战性。我们评估了五个具有不同来源的数据集,包括图像说明(SNLI)、转录演讲、流行小说和政府报告(MNLI)、维基百科文章(QNLI)、科学考试(SciTail)或新闻文章(RTE)。

表2详细说明了我们的模型和以前最先进的方法在不同NLI任务上的各种结果。我们的方法在五个数据集中的四个数据集上显著优于基线,在MNLI上实现了高达1.5%的绝对改进,在SciTail上实现了5%的绝对改进,在QNLI上实现了5.8%的绝对改进,在SNLI上实现了0.6%的绝对改进。这证明了我们的模型能够更好地对多个句子进行推理,并处理语言歧义的各个方面。在RTE(我们评估的一个较小的数据集)上(2490个示例),我们实现了56%的准确性,低于多任务biLSTM模型报告的61.7%。鉴于我们的方法在更大的NLI数据集上的强大性能,我们的模型很可能也会受益于多任务训练,但我们目前还没有探索这一点。

https://ftfy.readthedocs.io/en/latest/

https://spacy.io/

Question answering and commonsense reasoning

Another task that requires aspects of single and multi-sentence reasoning is question answering. We use the recently released RACE dataset [30], consisting of English passages with associated questions from middle and high school exams. This corpus has been shown to contain more reasoning type questions that other datasets like CNN [19] or SQuaD [47], providing the perfect evaluation for our model which is trained to handle long-range contexts. In addition, we evaluate on the Story Cloze Test [40], which involves selecting the correct ending to multi-sentence stories from two options. On these tasks, our model again outperforms the previous best results by significant margins - up to 8.9% on Story Cloze, and 5.7% overall on RACE. This demonstrates the ability of our model to handle long-range contexts effectively.

问题回答和常识推理

另一个需要单句和多句推理能力的任务是回答问题。我们使用最近发布的RACE数据集[30],由初中和高中考试中的英语文章和相关问题组成。与CNN[19]或SQuaD[47]等其他数据集相比,该语料库已被证明包含更多的推理类型问题,为我们训练处理长期上下文的模型提供了完美的评估。此外,我们还对[40]故事完形填空测试进行了评估,该测试涉及从两个选项中选择多句故事的正确结局。在这些任务中,我们的模型再次以显著的幅度超过了之前的最佳结果——在故事完形上高达8.9%,在RACE上总体达到5.7%。这证明了我们的模型有效地处理长期上下文的能力。

Semantic Similarity

Semantic similarity (or paraphrase detection) tasks involve predicting whether two sentences are semantically equivalent or not. The challenges lie in recognizing rephrasing of concepts, understanding negation, and handling syntactic ambiguity. We use three datasets for this task 鈥?the Microsoft Paraphrase corpus (MRPC) [14] (collected from news sources), the Quora Question Pairs (QQP) dataset [9], and the Semantic Textual Similarity benchmark (STS-B) [6]. We obtain state-of-the-art results on two of the three semantic similarity tasks (Table 4) with a 1 point absolute gain on STS-B. The performance delta on QQP is significant, with a 4.2% absolute improvement over Single-task BiLSTM + ELMo + Attn.

语义相似度

语义相似性(或释义检测)任务包括预测两个句子是否在语义上等价。挑战在于认识概念的改写,理解否定和处理句法歧义。我们使用三个数据集来完成这个任务鈥?微软释义语料库(MRPC)[14](从新闻来源收集),Quora问题对(QQP)数据集[9],以及语义文本相似性基准(STS-B)[6]。我们在三个语义相似任务中的两个(表4)上获得了最先进的结果,在STS-B上获得了1个点的绝对增益。QQP上的性能增量非常显著,与单任务BiLSTM + ELMo + Attn相比绝对提高了4.2%。

Classification

Finally, we also evaluate on two different text classification tasks. The Corpus of Linguistic Acceptability (CoLA) [65] contains expert judgements on whether a sentence is grammatical or not, and tests the innate linguistic bias of trained models. The Stanford Sentiment Treebank (SST-2) [54], on the other hand, is a standard binary classification task. Our model obtains an score of 45.4 on CoLA, which is an especially big jump over the previous best result of 35.0, showcasing the innate linguistic bias learned by our model. The model also achieves 91.3% accuracy on SST-2, which is competitive with the state-of-the-art results. We also achieve an overall score of 72.8 on the GLUE benchmark, which is significantly better than the previous best of 68.9.

分类

最后,我们还评估了两种不同的文本分类任务。语言可接受性语料库(CoLA)[65]包含对句子是否符合语法的专家判断,并测试训练模型的先天语言偏见。另一方面,斯坦福情感树库(SST-2)[54]是一个标准的二进制分类任务。我们的模型在CoLA上获得了45.4分,这比之前的最佳结果35.0分有了特别大的飞跃,展示了我们的模型学习到的先天语言偏见。该模型在SST-2上的精度也达到了91.3%,与最先进的结果竞争。我们在GLUE基准测试中也取得了72.8的总成绩,这明显好于之前的最好成绩68.9。

Overall, our approach achieves new state-of-the-art results in 9 out of the 12 datasets we evaluate on, outperforming ensembles in many cases. Our results also indicate that our approach works well across datasets of different sizes, from smaller datasets such as STS-B (≈5.7k training examples) –to the largest one – SNLI (≈550k training examples).

总的来说,我们的方法在我们评估的12个数据集中的9个数据集中获得了最新的结果,在许多情况下表现优于集成。我们的结果还表明,我们的方法在不同大小的数据集上都能很好地工作,从较小的数据集,如STS-B(≈5.7k训练示例)到最大的数据集——SNLI(≈550k训练示例)。

Table 2: Experimental results on natural language inference tasks, comparing our model with current state-of-the-art methods. 5x indicates an ensemble of 5 models. All datasets use accuracy as the evaluation metric.
表 2:自然语言推理任务的实验结果,将我们的模型与当前最先进的方法进行比较。 5x 表示 5 个模型的集合。 所有数据集都使用准确性作为评估指标。

Table 3: Results on question answering and commonsense reasoning, comparing our model with current state-of-the-art methods.. 9x means an ensemble of 9 models. 
表3:问题回答和常识推理的结果,将我们的模型与当前最先进的方法进行比较。9x表示9个模型的集合。

Table 4: Semantic similarity and classification results, comparing our model with current state-of-the-art methods. All task evaluations in this table were done using the GLUE benchmark. (mc= Mathews correlation, acc=Accuracy, pc=Pearson correlation)
表4:语义相似性和分类结果,将我们的模型与当前最先进的方法进行比较。本表中的所有任务评估都是使用GLUE基准测试完成的。(mc= Mathews相关性,acc=准确度,pc=Pearson相关性)

5 Analysis

Figure 2: (left) Effect of transferring increasing number of layers from the pre-trained language model on RACE and MultiNLI. (right) Plot showing the evolution of zero-shot performance on different tasks as a function of LM pre-training updates. Performance per task is normalized between a random guess baseline and the current state-of-the-art with a single model.
图 2:(左)从 RACE 和 MultiNLI 上的预训练语言模型转移更多层的效果。 (右)绘图显示了不同任务的零样本性能随 LM 预训练更新的变化。 每个任务的性能在随机猜测基线和当前最先进的单个模型之间进行标准化。

Table 5: Analysis of various model ablations on different tasks. Avg. score is a unweighted average of all the results. (mc= Mathews correlation, acc=Accuracy, pc=Pearson correlation)
表5:不同任务下的各种模型消融分析。平均分是所有成绩的未加权平均。(mc= Mathews相关性,acc=准确度,pc=Pearson相关性)

Impact of number of layers transferred

We observed the impact of transferring a variable number of layers from unsupervised pre-training to the supervised target task. Figure 2(left) illustrates the performance of our approach on MultiNLI and RACE as a function of the number of layers transferred. We observe the standard result that transferring embeddings improves performance and that each transformer layer provides further benefits up to 9% for full transfer on MultiNLI. This indicates that each layer in the pre-trained model contains useful functionality for solving target tasks.

转移层数的影响

我们观察了将可变数量的层数从无监督的预训练转移到有监督的目标任务的影响。图2(左)说明了我们的方法在多项li和RACE上的性能作为传输层数的函数。我们观察到的标准结果是,传输嵌入提高了性能,并且对于在多项li上的完全传输,每个转换器层提供了高达9%的进一步效益。这表明预训练模型中的每一层都包含解决目标任务的有用功能。

Zero-shot Behaviors

We’d like to better understand why language model pre-training of transform-ers is effective. A hypothesis is that the underlying generative model learns to perform many of the tasks we evaluate on in order to improve its language modeling capability and that the more structured attentional memory of the transformer assists in transfer compared to LSTMs. We designed a series of heuristic solutions that use the underlying generative model to perform tasks without supervised finetuning. We visualize the effectiveness of these heuristic solutions over the course of generative pre-training in Fig 2(right). We observe the performance of these heuristics is stable and steadily increases over training suggesting that generative pretraining supports the learning of a wide variety of task relevant functionality. We also observe the LSTM exhibits higher variance in its zero-shot performance suggesting that the inductive bias of the Transformer architecture assists in transfer.

For CoLA (linguistic acceptability), examples are scored as the average token log-probability the generative model assigns and predictions are made by thresholding. For SST-2 (sentiment analysis), we append the token very to each example and restrict the language model’s output distribution to only the words positive and negative and guess the token it assigns higher probability to as the prediction. For RACE (question answering), we pick the answer the generative model assigns the highest average token log-probability when conditioned on the document and question. For DPRD [46] (winograd schemas), we replace the definite pronoun with the two possible referrents and predict the resolution that the generative model assigns higher average token log-probability to the rest of the sequence after the substitution.

Zero-shot行为

我们想更好地理解为什么语言模型预训练转换器是有效的。一个假设是,底层生成模型学习执行我们评估的许多任务,以提高其语言建模能力,并且与lstm相比,转换器的更结构化的注意记忆有助于转移。我们设计了一系列启发式解决方案,使用底层生成模型来执行任务,无需监督微调。我们在图2(右)中可视化了这些启发式解决方案在生成式预训练过程中的有效性。我们观察到这些启发式的性能是稳定的,并且在训练中稳步增长,这表明生成式预训练支持学习各种各样的任务相关功能。我们还观察到LSTM在其零镜头性能中表现出更高的方差,这表明Transformer架构的归纳偏差有助于传输。

对于CoLA(语言可接受性),示例被评分为生成模型分配的平均令牌对数概率,并通过阈值进行预测。对于SST-2(情感分析),我们将令牌very附加到每个例子中,并将语言模型的输出分布限制为单词positive和negative,并猜测它赋予更高概率的令牌作为预测。对于RACE(问题回答),当以文档和问题为条件时,我们选择生成模型分配的最高平均令牌对数概率的答案。对于DPRD [46] (winograd模式),我们将确定代词替换为两个可能的指称,并预测生成模型在替换后将更高的平均令牌对数概率分配给序列其余部分的分辨率。

Ablation studies

We perform three different ablation studies (Table 5). First, we examine the performance of our method without the auxiliary LM objective during fine-tuning. We observe that the auxiliary objective helps on the NLI tasks and QQP. Overall, the trend suggests that larger datasets benefit from the auxiliary objective but smaller datasets do not. Second, we analyze the effect of the Transformer by comparing it with a single layer 2048 unit LSTM using the same framework. We observe a 5.6 average score drop when using the LSTM instead of the Transformer. The LSTM only outperforms the Transformer on one dataset – MRPC. Finally, we also compare with our transformer architecture directly trained on supervised target tasks, without pre-training. We observe that the lack of pre-training hurts performance across all the tasks, resulting in a 14.8% decrease compared to our full model.

消融实验

我们进行了三个不同的消融研究(表5)。首先,我们在微调期间检查了我们的方法在没有辅助LM目标的情况下的性能。我们观察到辅助目标对NLI任务和QQP都有帮助。总的来说,这一趋势表明,较大的数据集受益于辅助目标,而较小的数据集则不然。其次,通过与使用相同框架的单层2048单元LSTM进行比较,分析了Transformer的效果。当使用LSTM而不是Transformer时,我们观察到平均分数下降了5.6分。LSTM只在一个数据集上胜过Transformer——MRPC。最后,我们还将与直接在监督目标任务上训练的变压器体系结构进行比较,而不进行预训练。我们观察到,缺乏预训练会影响所有任务的表现,导致与完整模型相比下降14.8%。

6 Conclusion

We introduced a framework for achieving strong natural language understanding with a single task-agnostic model through generative pre-training and discriminative fine-tuning. By pre-training on a diverse corpus with long stretches of contiguous text our model acquires significant world knowledge and ability to process long-range dependencies which are then successfully transferred to solving discriminative tasks such as question answering, semantic similarity assessment, entailment determination, and text classification, improving the state of the art on 9 of the 12 datasets we study.

Using unsupervised (pre-)training to boost performance on discriminative tasks has long been an important goal of Machine Learning research. Our work suggests that achieving significant performance gains is indeed possible, and offers hints as to what models (Transformers) and data sets (text with long range dependencies) work best with this approach. We hope that this will help enable new research into unsupervised learning, for both natural language understanding and other domains, further improving our understanding of how and when unsupervised learning works.

我们引入了一个框架,通过生成式预训练判别微调,使用与任务无关的单一模型实现强大的自然语言理解。通过对具有长段连续文本的多样化语料库进行预训练,我们的模型获得了重要的世界知识和处理远程依赖关系的能力,然后成功地转移到解决判别任务,如问答、语义相似性评估、蕴含确定和 文本分类,改进了我们研究的 12个数据集中的 9 个的最新技术水平。

使用无监督(预)训练来提高辨别任务的性能一直是机器学习研究的一个重要目标。我们的工作表明,实现显著的性能提升确实是可能的,并提供了关于哪种模型(Transformers)和数据集(具有长期依赖关系的文本)最适合这种方法的提示。我们希望这将有助于对自然语言理解和其他领域的无监督学习进行新的研究,进一步提高我们对无监督学习如何以及何时起作用的理解

References

[1] S. Arora, Y. Liang, and T. Ma. A simple but tough-to-beat baseline for sentence embeddings. 2016.

[2] J. L. Ba, J. R. Kiros, and G. E. Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.

[3] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. InAdvances in neural information processing systems, pages 153–160, 2007.

[4] L. Bentivogli, P. Clark, I. Dagan, and D. Giampiccolo. The fifth pascal recognizing textual entailment challenge. In TAC, 2009.

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

[6] D. Cer, M. Diab, E. Agirre, I. Lopez-Gazpio, and L. Specia. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055, 2017.

[7] S. Chaturvedi, H. Peng, and D. Roth. Story comprehension for predicting what happens next. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1603–1614, 2017.

[8] D. Chen and C. Manning. A fast and accurate dependency parser using neural networks. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 740–750, 2014.

[9] Z. Chen, H. Zhang, X. Zhang, and L. Zhao. Quora question pairs. https://data.quora.com/First-Quora- Dataset-Release-Question-Pairs, 2018.

[10] R. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM, 2008.

[11] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12(Aug):2493–2537, 2011.

[12] A. Conneau, D. Kiela, H. Schwenk, L. Barrault, and A. Bordes. Supervised learning of universal sentence representations from natural language inference data. EMNLP, 2017.

[13] A. M. Dai and Q. V. Le. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems, pages 3079–3087, 2015.

[14] W. B. Dolan and C. Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005.

[15] D. Erhan, Y. Bengio, A. Courville, P.-A. Manzagol, P. Vincent, and S. Bengio. Why does unsupervised pre-training help deep learning? Journal of Machine Learning Research, 11(Feb):625–660, 2010.

[16] S. Gray, A. Radford, and K. P. Diederik. Gpu kernels for block-sparse weights. 2017.

[17] Z. He, S. Liu, M. Li, M. Zhou, L. Zhang, and H. Wang. Learning entity representation for entity disam- biguation. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pages 30–34, 2013.

[18] D. Hendrycks and K. Gimpel. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. arXiv preprint arXiv:1606.08415, 2016.

[19] K. M. Hermann, T. Kocisky, E. Grefenstette, L. Espeholt, W. Kay, M. Suleyman, and P. Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pages 1693– 1701, 2015.

[20] G. E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006.

[21] J. Howard and S. Ruder. Universal language model fine-tuning for text classification. Association for Computational Linguistics (ACL), 2018.

[22] Y. Jernite, S. R. Bowman, and D. Sontag. Discourse-based objectives for fast unsupervised sentence representation learning. arXiv preprint arXiv:1705.00557, 2017.

[23] Y. Ji and J. Eisenstein. Discriminative improvements to distributional sentence similarity. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 891–896, 2013.

[24] F. Jiao, S. Wang, C.-H. Lee, R. Greiner, and D. Schuurmans. Semi-supervised conditional random fields for improved sequence segmentation and labeling. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the Association for Computational Linguistics, pages 209–216. Association for Computational Linguistics, 2006.

[25] T. Khot, A. Sabharwal, and P. Clark. Scitail: A textual entailment dataset from science question answering.In Proceedings of AAAI, 2018.

[26] Y. Kim. Convolutional neural networks for sentence classification. EMNLP, 2014.

[27] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.

[28] R. Kiros, Y. Zhu, R. R. Salakhutdinov, R. Zemel, R. Urtasun, A. Torralba, and S. Fidler. Skip-thought vectors. In Advances in neural information processing systems, pages 3294–3302, 2015.

[29] N. Kitaev and D. Klein. Constituency parsing with a self-attentive encoder. ACL, 2018.

[30] G. Lai, Q. Xie, H. Liu, Y. Yang, and E. Hovy. Race: Large-scale reading comprehension dataset from examinations. EMNLP, 2017.

[31] G. Lample, L. Denoyer, and M. Ranzato. Unsupervised machine translation using monolingual corpora only. ICLR, 2018.

[32] Q. Le and T. Mikolov. Distributed representations of sentences and documents. In International Conference on Machine Learning, pages 1188–1196, 2014.

[33] P. Liang. Semi-supervised learning for natural language. PhD thesis, Massachusetts Institute of Technology, 2005.

[34] P. J. Liu, M. Saleh, E. Pot, B. Goodrich, R. Sepassi, L. Kaiser, and N. Shazeer. Generating wikipedia by summarizing long sequences. ICLR, 2018.

[35] X. Liu, K. Duh, and J. Gao. Stochastic answer networks for natural language inference. arXiv preprint arXiv:1804.07888, 2018.

[36] L. Logeswaran and H. Lee. An efficient framework for learning sentence representations. ICLR, 2018. [37] I. Loshchilov and F. Hutter. Fixing weight decay regularization in adam. arXiv preprint arXiv:1711.05101,‌2017.

[38] B. McCann, J. Bradbury, C. Xiong, and R. Socher. Learned in translation: Contextualized word vectors. In Advances in Neural Information Processing Systems, pages 6297–6308, 2017.

[39] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013.

[40] N. Mostafazadeh, M. Roth, A. Louis, N. Chambers, and J. Allen. Lsdsem 2017 shared task: The story cloze test. In Proceedings of the 2nd Workshop on Linking Models of Lexical, Sentential and Discourse-level Semantics, pages 46–51, 2017.

[41] K. Nigam, A. McCallum, and T. Mitchell. Semi-supervised text classification using em. Semi-Supervised Learning, pages 33–56, 2006.

[42] J. Pennington, R. Socher, and C. Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532–1543, 2014.

[43] M. E. Peters, W. Ammar, C. Bhagavatula, and R. Power. Semi-supervised sequence tagging with bidirec- tional language models. ACL, 2017.

[44] M. E. Peters, M. Neumann, M. Iyyer, M. Gardner, C. Clark, K. Lee, and L. Zettlemoyer. Deep contextual- ized word representations. NAACL, 2018.

[45] Y. Qi, D. S. Sachan, M. Felix, S. J. Padmanabhan, and G. Neubig. When and why are pre-trained word embeddings useful for neural machine translation? NAACL, 2018.

[46] A. Rahman and V. Ng. Resolving complex cases of definite pronouns: the winograd schema challenge. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages 777–789. Association for Computational Linguistics, 2012.

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

[48] P. Ramachandran, P. J. Liu, and Q. V. Le. Unsupervised pretraining for sequence to sequence learning. arXiv preprint arXiv:1611.02683, 2016.

[49] M. Ranzato, C. Poultney, S. Chopra, and Y. LeCun. Efficient learning of sparse representations with an energy-based model. In Advances in neural information processing systems, pages 1137–1144, 2007.

[50] M. Rei. Semi-supervised multitask learning for sequence labeling. ACL, 2017.

[51] H. Robbins and S. Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951.

[52] T. Rocktäschel, E. Grefenstette, K. M. Hermann, T. Kocˇisky`, and P. Blunsom. Reasoning about entailment with neural attention. arXiv preprint arXiv:1509.06664, 2015.

[53] R. Sennrich, B. Haddow, and A. Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.

[54] R. Socher, A. Perelygin, J. Wu, J. Chuang, C. D. Manning, A. Ng, and C. Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631–1642, 2013.

[55] S. Srinivasan, R. Arora, and M. Riedl. A simple and effective approach to the story cloze test. arXiv preprint arXiv:1803.05547, 2018.

[56] S. Subramanian, A. Trischler, Y. Bengio, and C. J. Pal. Learning general purpose distributed sentence representations via large scale multi-task learning. arXiv preprint arXiv:1804.00079, 2018.

[57] J. Suzuki and H. Isozaki. Semi-supervised sequential labeling and segmentation using giga-word scale unlabeled data. Proceedings of ACL-08: HLT, pages 665–673, 2008.

[58] Y. Tay, L. A. Tuan, and S. C. Hui. A compare-propagate architecture with alignment factorization for natural language inference. arXiv preprint arXiv:1801.00102, 2017.

[59] Y. Tay, L. A. Tuan, and S. C. Hui. Multi-range reasoning for machine comprehension. arXiv preprint arXiv:1803.09074, 2018.

[60] J. Tian, Z. Zhou, M. Lan, and Y. Wu. Ecnu at semeval-2017 task 1: Leverage kernel-based traditional nlp features and neural networks to build a universal model for multilingual and cross-lingual semantic textual similarity. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 191–197, 2017.

[61] Y. Tsvetkov. Opportunities and challenges in working with low-resource languages. CMU, 2017.

[62] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pages 6000–6010, 2017.

[63] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096–1103. ACM, 2008.

[64] A. Wang, A. Singh, J. Michael, F. Hill, O. Levy, and S. R. Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2018. .io/cola, 2018.

[66] A. Williams, N. Nangia, and S. R. Bowman. A broad-coverage challenge corpus for sentence understanding through inference. NAACL, 2018.

[67] Y. Xu, J. Liu, J. Gao, Y. Shen, and X. Liu. Towards human-level machine reading comprehension: Reasoning and inference with multiple strategies. arXiv preprint arXiv:1711.04964, 2017.

[68] D. Yu, L. Deng, and G. Dahl. Roles of pre-training and fine-tuning in context-dependent dbn-hmms for real-world speech recognition. In Proc. NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2010.

[69] R. Zhang, P. Isola, and A. A. Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In CVPR, volume 1, page 6, 2017.

[70] X. Zhu. Semi-supervised learning literature survey. 2005.

[71] Y. Zhu, R. Kiros, R. Zemel, R. Salakhutdinov, R. Urtasun, A. Torralba, and S. Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19–27, 2015.

Paper:GPT之《Improving Language Understanding by Generative Pre-Training》翻译与解读相关推荐

  1. 【GPT】Improving Language Understanding by Generative Pre-Training

    Paper Link: Improving Language Understanding by Generative Pre-Training GPT系列文章解读: [GPT2]Language Mo ...

  2. GPT:Improving Language Understanding by Generative Pre-Training(2018-6-12)

    模型介绍 自然语言理解包括各种各样的任务,例如文本蕴含,问题回答,语义相似性评估和文档分类. 尽管大型的未标记文本语料库很丰富,但是学习这些特定任务的标记数据却很少,这使得经过严格训练的模型难以充分发 ...

  3. 阅读文献:“Improving Language Understanding by Generative Pre-Training”(GPT模型)

    阅读文献:"Improving Language Understanding by Generative Pre-Training" Introduction 从原始文本中有效学习 ...

  4. 文献阅读:Improving Language Understanding by Generative Pre-Training

    文献阅读:Improving Language Understanding by Generative Pre-Training 1. 文章简介 2. 模型介绍 3. 实验考察 1. 训练数据 2. ...

  5. 论文阅读《Improving Language Understanding by Generative Pre-Training》

    论文地址:<Improving Language Understanding by Generative Pre-Training> 文章目录 论文介绍 相关工作 框架 预训练阶段 微调阶 ...

  6. Improving Language Understanding by Generative Pre-Training

    Abstract 由于标注数据的缺乏,直接训练判别式模型效果不是很理想. 本文展示了先在大规模未标注语料上预训练生成式语言模型然后在每个判别式任务上进行fine-tuning可以获得较大的效果提升. ...

  7. 《Improving Langugage Understanding by Generative Pre-Tranining》 —— GPT

    目录 <Improving Langugage Understanding by Generative Pre-Tranining> 1.GPT历史意义 2.无监督预训练--通过大量未标记 ...

  8. LSTM:《Understanding LSTM Networks》的翻译并解读

    LSTM:<Understanding LSTM Networks>的翻译并解读 目录 Understanding LSTM Networks Recurrent Neural Netwo ...

  9. Paper:《ELMO:Deep contextualized word representations》翻译与解读

    Paper:<ELMO:Deep contextualized word representations>翻译与解读 目录 <ELMO:Deep contextualized wor ...

最新文章

  1. 自动驾驶产业链全梳理
  2. visual studio 2005占用cpu100% -_-...
  3. python教程简易版_简洁的十分钟Python入门教程
  4. windows 2003负载均衡故障切换
  5. android arcgis 绘制圆_arcgis for android 定位 圆
  6. mysql爆内存_线上MySQL数据库机器内存爆掉原因分析与解决
  7. QtCreate编译器在调试程序时,右侧的变量表达式值视图被不小心关闭了
  8. 优秀的代码原来是这样分层的
  9. 【转】程序员的十种级别
  10. 走迷宫(三):在XX限制条件下,是否走得出。
  11. RJ45墙上网线插座的线序与接法
  12. 合成分红游戏源码_趣合成app开发(现成源码演示案例)
  13. 游戏模型与影视模型在制作上的区别,以及分别都用什么三维软件最多
  14. IO口电压域io-domain核对流程
  15. 哈利波特魔法觉醒游戏攻略分析
  16. 原代码审计笔记-安全缺陷
  17. 《阿哈!算法》4-1不撞南墙不回头 4-2 解救小哈——深度优先搜索
  18. 耀月家族公会部门规定职责等2011-11-26
  19. echarts pie饼图的使用(初级版包括设置百分比)
  20. threejs postprocessing-后处理通道效果使用详解

热门文章

  1. 凌晨3点不回家,你不要老婆孩子了?
  2. 化金或沉金工艺简要总结
  3. 声纹识别之说话人验证speaker verification
  4. 计算机英语教学设计反思,小学五年级英语教学设计与反思
  5. Java+MySQL基于ssm的物理竞赛管理系统
  6. 惊艳的产品背后,是锐利的设计思维
  7. 第2章 C语言的赋值运算符、复合运算符与逗号运算符 (十一)
  8. 数学四大思想八大方法_中考数学专题五,四种数学思想方法,第3个比较难掌握...
  9. 西门子1200 plc与台达14ES plc之间modbus 通讯实战程序 西门子1200plc做主站,台达DVP plc做从站,进行数据交换
  10. 教你文件重命名快速操作