Skip to main content
QUICK REVIEW

[论文解读] Efficient pre-training objectives for Transformers

Luca Di Liello, Matteo Gabburo|arXiv (Cornell University)|Apr 20, 2021
Topic Modeling参考文献 18被引用 4
一句话总结

本文提出了一种针对Transformer模型的高效预训练目标,用受ELECTRA启发的判别式方法替代掩码语言模型(MLM),采用更简单的生成器和全序列损失计算。关键贡献在于,在消除掩码标记并简化生成器的前提下,实现了与BERT和ELECTRA相当或更优的性能,尤其在迁移学习中表现突出,同时显著降低了计算成本和内存使用。

ABSTRACT

The Transformer architecture deeply changed the natural language processing, outperforming all previous state-of-the-art models. However, well-known Transformer models like BERT, RoBERTa, and GPT-2 require a huge compute budget to create a high quality contextualised representation. In this paper, we study several efficient pre-training objectives for Transformers-based models. By testing these objectives on different tasks, we determine which of the ELECTRA model's new features is the most relevant. We confirm that Transformers pre-training is improved when the input does not contain masked tokens and that the usage of the whole output to compute the loss reduces training time. Moreover, inspired by ELECTRA, we study a model composed of two blocks; a discriminator and a simple generator based on a statistical model with no impact on the computational performances. Besides, we prove that eliminating the MASK token and considering the whole output during the loss computation are essential choices to improve performance. Furthermore, we show that it is possible to efficiently train BERT-like models using a discriminative approach as in ELECTRA but without a complex generator, which is expensive. Finally, we show that ELECTRA benefits heavily from a state-of-the-art hyper-parameters search.

研究动机与目标

  • 在不牺牲性能的前提下,降低类似BERT模型预训练的高计算成本。
  • 探究移除掩码标记(MASK)是否能提升泛化能力与训练效率。
  • 设计轻量化、高效的生成器,以最小化计算开销,同时保持模型质量。
  • 评估全序列损失计算对训练速度与模型性能的影响。
  • 确定判别式方法(如ELECTRA)是否能通过更简单的组件超越MLM。

提出的方法

  • 将标准MLM目标替换为标记检测(TD)任务,模型需分类每个标记是原始的还是被替换的。
  • 使用基于随机选择或基于历史的统计计数的简化生成器来替换标记,降低复杂度。
  • 在整个判别器输出上应用全序列损失,提升训练效率与收敛性。
  • 使用与基线模型相同的超参数和数据集,训练基于RoBERTa的模型(SLM、RTS、C-RTS)以应用新目标。
  • 对罕见标记进行聚类,以减少基于历史的生成器中的稀疏性,提升鲁棒性。
  • 将低资源任务(如ASNQ-R)上微调的模型迁移到高资源任务(如WikiQA)上,以评估泛化能力。

实验结果

研究问题

  • RQ1从预训练中移除MASK标记是否能提升模型性能与泛化能力,特别是在迁移学习中?
  • RQ2能否使用简单的统计生成器替代ELECTRA中复杂的生成器而不降低性能?
  • RQ3在整条输出序列上计算损失是否能减少训练时间并提升效率?
  • RQ4所提出的优化目标(SLM、RTS、C-RTS)与MLM和ELECTRA相比,在准确率和计算成本方面表现如何?
  • RQ5超参数调优在判别式预训练目标中的性能影响有多大?

主要发现

  • 使用SLM(无MASK)目标的RoBERTa模型在所有基准测试中(包括GLUE、SQUAD、WikiQA和ASNQ-R)均一致优于RoBERTa-MLM。
  • 采用基于模型历史生成更困难替换的RoBERTa-C-RTS模型,在低资源任务(如WikiQA)上表现优于MLM和RTS,尤其在迁移学习中优势明显。
  • ELECTRA的SLM-all变体在SQUAD上达到与ELECTRA相当的性能(79.0 vs. 79.3 MAP),并在迁移学习后WikiQA上表现更优(87.4 vs. 86.9 MRR)。
  • 由于采用更简单的生成器和全输出损失,所提出方法所需的分类头更小,计算资源更少。
  • RoBERTa-RTS和RoBERTa-C-RTS模型在性能上与RoBERTa-MLM相当,但训练时间更短,内存占用更低。
  • ELECTRA的性能对超参数调优高度敏感,当使用更简单的组件(如SLM-all设置)时,其优势显著降低。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。