Skip to main content
QUICK REVIEW

[Paper Review] Efficient pre-training objectives for Transformers

Luca Di Liello, Matteo Gabburo|arXiv (Cornell University)|Apr 20, 2021
Topic ModelingComputer Science18 references4 citations
TL;DR

This paper proposes efficient pre-training objectives for Transformer models that replace masked language modeling (MLM) with a discriminative approach inspired by ELECTRA, using simpler generators and full-sequence loss computation. The key contribution is achieving performance comparable to or better than BERT and ELECTRA—especially in transfer learning—while reducing computational cost and memory usage by eliminating masked tokens and simplifying the generator.

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.

Motivation & Objective

  • To reduce the high computational cost of pre-training BERT-like models without sacrificing performance.
  • To investigate whether removing masked tokens (MASK) improves generalization and training efficiency.
  • To design lightweight, efficient generators that minimize computational overhead while maintaining model quality.
  • To evaluate the impact of full-sequence loss computation on training speed and model performance.
  • To determine whether a discriminative approach (like ELECTRA) can outperform MLM with simpler components.

Proposed method

  • Replace the standard MLM objective with a token detection (TD) task where the model classifies whether each token is original or replaced.
  • Use a simplified generator based on random selection or history-based statistical counting to replace tokens, reducing complexity.
  • Apply a full-sequence loss over the entire discriminator output, improving training efficiency and convergence.
  • Train RoBERTa-based models using the new objectives (SLM, RTS, C-RTS) with identical hyperparameters and datasets as baselines.
  • Cluster rare tokens to reduce sparsity in the history-based generator, improving robustness.
  • Transfer fine-tuned models from low-resource tasks (e.g., ASNQ-R) to high-resource ones (e.g., WikiQA) to evaluate generalization.

Experimental results

Research questions

  • RQ1Does removing the MASK token from pre-training improve model performance and generalization, especially in transfer learning?
  • RQ2Can a simple statistical generator replace the complex generator in ELECTRA without degrading performance?
  • RQ3Does computing the loss over the entire output sequence reduce training time and improve efficiency?
  • RQ4How do the proposed objectives (SLM, RTS, C-RTS) compare to MLM and ELECTRA in terms of accuracy and computational cost?
  • RQ5To what extent does hyper-parameter tuning affect the performance of discriminative pre-training objectives?

Key findings

  • The RoBERTa model using the SLM (no MASK) objective outperforms RoBERTa-MLM on every benchmark, including GLUE, SQUAD, WikiQA, and ASNQ-R, by a consistent margin.
  • The RoBERTa-C-RTS model, which uses harder replacements based on model history, achieves better transfer learning performance than both MLM and RTS, especially on low-resource tasks like WikiQA.
  • The SLM-all variant of ELECTRA matches ELECTRA's performance on SQUAD (79.0 vs. 79.3 MAP) and outperforms it on WikiQA after transfer learning (87.4 vs. 86.9 MRR).
  • The proposed methods require smaller classification heads and less computational resources than ELECTRA, due to simpler generators and full-output loss.
  • The RoBERTa-RTS and RoBERTa-C-RTS models achieve performance comparable to RoBERTa-MLM but with reduced training time and lower memory usage.
  • ELECTRA's performance is highly sensitive to hyper-parameter tuning, and its advantages are significantly reduced when using simpler components like the SLM-all setup.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.