arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.05333cs.CLcs.LG
收藏

基于Mask Proposal网络的方差缩减语言预训练

Variance-reduced Language Pretraining via a Mask Proposal Network

Peking University(北京大学)

Liang Chen

摘要:

自监督学习,也就是预训练是自然语言处理中的一个重要环节。大多数预训练方法首先随机掩蔽句子中的某些位置,然后训练模型以恢复掩蔽位置处的标记。通过这种方式,模型可以在没有人工标记的情况下进行训练,并且可以使用数十亿个参数的海量数据。因此,优化效率变得至关重要。在本文中,我们从梯度方差降低的角度来解决这个问题。特别是,我们首先提出了一个原则性的梯度方差分解定理,它表明语言预训练的随机梯度的方差可以自然地分解为两项:来自批量数据样本的方差,以及来自掩码采样的方差。第二个术语是自监督学习和监督学习之间的关键区别,这使得预训练速度较慢。为了减少第二部分的方差,我们利用重要性采样策略,其目的是根据建议分布而不是均匀分布对掩码进行采样。可以表明,如果建议分布与梯度范数成比例,则采样的方差减小。为了提高效率,我们引入了MAck建议网络(MAPNet),它近似于最佳掩码建议分布,并与模型一起进行端到端训练。实验结果表明,与传统的BERT模型相比,该模型具有更快的收敛速度和更高的性能。

英文摘要:

Self-supervised learning, a.k.a., pretraining, is important in natural language processing. Most of the pretraining methods first randomly mask some positions in a sentence and then train a model to recover the tokens at the masked positions. In such a way, the model can be trained without human labeling, and the massive data can be used with billion parameters. Therefore, the optimization efficiency becomes critical. In this paper, we tackle the problem from the view of gradient variance reduction. In particular, we first propose a principled gradient variance decomposition theorem, which shows that the variance of the stochastic gradient of the language pretraining can be naturally decomposed into two terms: the variance that arises from the sample of data in a batch, and the variance that arises from the sampling of the mask. The second term is the key difference between selfsupervised learning and supervised learning, which makes the pretraining slower. In order to reduce the variance of the second part, we leverage the importance sampling strategy, which aims at sampling the masks according to a proposal distribution instead of the uniform distribution. It can be shown that if the proposal distribution is proportional to the gradient norm, the variance of the sampling is reduced. To improve efficiency, we introduced a MAsk Proposal Network (MAPNet), which approximates the optimal mask proposal distribution and is trained end-to-end along with the model. According to the experimental result, our model converges much faster and achieves higher performance than the baseline BERT model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑