English

Learning to Sample Replacements for ELECTRA Pre-Training

Computation and Language 2021-06-28 v1

Abstract

ELECTRA pretrains a discriminator to detect replaced tokens, where the replacements are sampled from a generator trained with masked language modeling. Despite the compelling performance, ELECTRA suffers from the following two issues. First, there is no direct feedback loop from discriminator to generator, which renders replacement sampling inefficient. Second, the generator's prediction tends to be over-confident along with training, making replacements biased to correct tokens. In this paper, we propose two methods to improve replacement sampling for ELECTRA pre-training. Specifically, we augment sampling with a hardness prediction mechanism, so that the generator can encourage the discriminator to learn what it has not acquired. We also prove that efficient sampling reduces the training variance of the discriminator. Moreover, we propose to use a focal loss for the generator in order to relieve oversampling of correct tokens as replacements. Experimental results show that our method improves ELECTRA pre-training on various downstream tasks.

Keywords

Cite

@article{arxiv.2106.13715,
  title  = {Learning to Sample Replacements for ELECTRA Pre-Training},
  author = {Yaru Hao and Li Dong and Hangbo Bao and Ke Xu and Furu Wei},
  journal= {arXiv preprint arXiv:2106.13715},
  year   = {2021}
}

Comments

Accepted by Findings of ACL 2021

R2 v1 2026-06-24T03:36:24.521Z