[论文解读] Variance-reduced Language Pretraining via a Mask Proposal Network
本文提出 MAP-Net,一种掩码提议网络,通过学习采样信息量丰富的掩码位置而非使用均匀随机掩码,来减少自监督语言预训练中的梯度方差。通过近似与梯度范数成正比的重要性采样分布,MAP-Net 加速了收敛并提升了性能,在 GLUE 基准测试中仅用 600k 步即达到 BERT 水平的准确率,而 BERT 需要 1000k 步。
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.
研究动机与目标
- 为解决自监督语言预训练中均匀随机掩码的低效性,该方法导致梯度方差高且收敛缓慢。
- 正式将预训练中的梯度方差分解为数据-批次和掩码采样两部分,重点减少后者。
- 设计一种可微分、端到端可训练的掩码提议网络(MAP-Net),以学习采样信息丰富、影响重大的掩码位置。
- 通过减少优化方差,在不需额外标注数据的情况下提升预训练效率和下游性能。
- 证明方差减少的预训练可实现标准 NLP 基准测试中更快的收敛速度和更高的准确率。
提出的方法
- 提出一个原理性的梯度方差分解定理,将方差分离为数据-批次和掩码采样两部分。
- 引入重要性采样作为方差减少策略,其中最优掩码采样概率与梯度范数成正比。
- 设计 MAP-Net 为一个神经网络,输入为句子,输出为位置上的概率分布以用于掩码采样。
- 以模型损失作为梯度范数的代理,通过对抗方式联合训练 MAP-Net 和主模型,以指导掩码选择。
- 采用成对偏好学习来优化 MAP-Net,基于不同掩码输入下的相对性能进行优化,避免使用强化学习。
- 采用解耦训练目标,使 MAP-Net 学习生成具有挑战性的掩码,以产生高损失,从而推动模型学习更深层次的表征。
实验结果
研究问题
- RQ1能否在语言预训练中形式化地将梯度方差分解为与数据采样和掩码采样相关的独立分量?
- RQ2使用非均匀的重要性采样掩码分布是否能减少优化方差并加速自监督预训练的收敛?
- RQ3可学习的掩码提议网络(MAP-Net)能否有效近似掩码采样的最优重要性分布?
- RQ4与 BERT 中的均匀掩码相比,使用 MAP-Net 训练是否能实现更快的收敛和更优的下游性能?
- RQ5MAP-Net 是否能学习选择语义上具有意义且信息丰富的掩码标记,例如富含内容的词汇和词形变化?
主要发现
- MAP-Net 通过学习采样信息丰富的掩码位置,显著减少了预训练中的梯度方差,从而实现更快收敛。
- 使用 MAP-Net 训练的模型在 800k 步时达到 GLUE 平均分数 82.11,优于 BERT 在 1000k 步时的 81.68。
- MAP-Net 模型在 600k 步的检查点性能与 BERT 在 1000k 步的检查点相当,表明实现同等性能可减少 25% 的训练步数。
- 可视化结果表明,MAP-Net 倾向于掩码内容词(如名词和动词),并避免对词形变体(如 'computer'、'computing'、'computation')进行冗余掩码,从而促进更深层次的上下文学习。
- 该方法降低了预训练成本和能耗,通过最小化计算浪费,有助于环境可持续性。
- 该方法在多个下游任务中均表现有效,对 RTE、SST-2、QNLI 和整体 GLUE 基准测试均实现一致的性能提升。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。