Papers › ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning
Masked language modeling (MLM) pre-training methods such as BERT corrupt the input by replacing some tokens with [MASK] and then train a model to reconstruct the original tokens. While they produce good results when transferred to downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a more sample-efficient pre-training task called replaced token detection. Instead of masking the input, our approach corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments demonstrate this new pre-training task is more efficient than MLM because the task is defined over all input tokens rather than just the small subset that was masked out. As a result, the contextual representations learned by our approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale, where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when using the same amount of compute.
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2003.10555")
Code
Syntology Ran 26 of 40 code samples harvested from 9 repositories linked to this paper; 14 have no recorded run. Of those that ran: 2 ran · honoured contract; 2 ran · violated contract; 11 ran · our draft was wrong; 2 ran · fixture could not drive it; 9 ran with no contract checked.
By repository: community (archive-listed): 36 samples from 9 repositories, 22 ran; 4 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
19 repositories listed; official and paper-mentioned ones first.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
40 samples harvested; 26 ran; 2 honoured the contract we drafted; 14 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.
Licence: 10 of the 40 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 9 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.
Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
3f0491e137c5b556 · report
fe88c97941ebd49b · report
31adaef1bf068638 · report
746db01cb1933bb5 · report
05b426304336430b · report
eeccb8777414a81a · report
0e623ffa58c046a7 · report
7b1e3bc29ddcc47d · report
476517c90ed9ae4c · report
0e085ca2f3d4bb62 · report
759bed040fc319f3 · report
ac6da27d75f60e2b · report
626e63a150cc746f · report
983767b34d11c495 · report
00982897fc3374b0 · report
340d3b3d2515a22b · report
20b7c6470df6e0be · report
de0fde92ce293206 · report
c01e5c8df433613c · report
b195c0bc58a304ad · report
8667036db81df043 · report
a7d3c6223f6b59ea · report
290ce73f2b0467c1 · report
3a45861a4eafa4d4 · report
9a9a0f483cc08e79 · report
b38ac6cb5ce30811 · report
3cc9d01eacec4925 · report
f8d14e7b22f1d071 · report
fe0cfcdd4f533d4a · report
8b5c77d9bafa4f74 · report
3942a8afb86f96db · report
b9dd04206384eff8 · report
24796fea5f721e97 · report
dbc5cf3cd537a793 · report
b03d45af664a39e3 · report
c8b43ae9d1268761 · report
e33ada12822bb56c · report
6269424d608eba34 · report
5573a79bdc0a0a09 · report
0a27e49623646a01 · report
Tasks
1 archive task tag without a task page not shown.
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Question Answering | Quora Question Pairs | ELECTRA | Accuracy | 90.1% | #8 of 19 | Archive leaderboard | report |
| Sentiment Analysis | SST-2 Binary classification | ELECTRA | Accuracy | 96.9 | #8 of 87 | Archive leaderboard | report |
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Methods
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections