Papers › Masked Language Model Scoring

Masked Language Model Scoring

31 Oct 2019ACL 2020 6arXiv:1910.14659archive 2025-07-28

Julian Salazar, Davis Liang, Toan Q. Nguyen, Katrin Kirchhoff

Pretrained masked language models (MLMs) require finetuning for most NLP tasks. Instead, we evaluate MLMs out of the box via their pseudo-log-likelihood scores (PLLs), which are computed by masking tokens one by one. We show that PLLs outperform scores from autoregressive language models like GPT-2 in a variety of tasks. By rescoring ASR and NMT hypotheses, RoBERTa reduces an end-to-end LibriSpeech model's WER by 30% relative and adds up to +1.7 BLEU on state-of-the-art baselines for low-resource translation pairs, with further gains from domain adaptation. We attribute this success to PLL's unsupervised expression of linguistic acceptability without a left-to-right bias, greatly improving on scores from GPT-2 (+10 points on island effects, NPI licensing in BLiMP). One can finetune MLMs to give scores without masking, enabling computation in a single inference pass. In all, PLLs and their associated pseudo-perplexities (PPPLs) enable plug-and-play use of the growing number of pretrained MLMs; e.g., we use a single cross-lingual model to rescore translations in multiple languages. We release our library for language model scoring at https://github.com/awslabs/mlm-scoring.

PaperPDFConference PDFCodeCode Syntology ran

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="1910.14659")

Code

Syntology Ran 5 of 10 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong.

By repository: community (archive-listed): 7 samples from 2 repositories, 2 ran; 3 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.

awslabs/mlm-scoring officialmentioned in papermentioned on GitHubmxnet report
google-research/electra mentioned on GitHubtf report
ipieter/universal-distillation mentioned on GitHubpytorchApache-2.0 report
phueb/unmasked mentioned on GitHubpytorchMIT report
soyoung97/fairseq-mlm-scoring mentioned on GitHubpytorch report
soyoung97/mlm-scoring mentioned on GitHubpytorch report

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

10 samples harvested; 5 ran; 2 honoured the contract we drafted; 5 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.

2ran · honoured contract
3ran · our draft was wrong
5unverified

Licence: 3 of the 10 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 2 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.

convert_example_to_features soyoung97/mlm-scoring/examples/run_lm_finetuning.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 52a1f0891fc0ad6d · report
random_word soyoung97/mlm-scoring/examples/run_lm_finetuning.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · fab8efcc34ebd909 · report
calc_accuracy_from_scores phueb/unmasked/unmasked/utils.py community (archive-listed) unverified MIT (permissive) · ce3259a298ec3e93 · report
get_group_names phueb/unmasked/unmasked/utils.py community (archive-listed) unverified MIT (permissive) · e61b5f8d71122e38 · report
get_legend_label phueb/unmasked/unmasked/utils.py community (archive-listed) unverified MIT (permissive) · e2a116c375db5070 · report
make_ax_title phueb/unmasked/unmasked/visualizer.py community (archive-listed) unverified MIT (permissive) · b5af14201018f768 · report
shorten_phenomenon phueb/unmasked/unmasked/helpers.py community (archive-listed) unverified MIT (permissive) · d6af7b5cef80b3a2 · report
accuracy identical code first harvested elsewhere ran · honoured contract fingerprinted licence of this copy not recorded · eb725d5794b15f6b · report
convert_examples_to_features identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · b3feaffc79a790e6 · report
warmup_linear identical code first harvested elsewhere ran · honoured contract fingerprinted licence of this copy not recorded · c58d57224530d17e · report

Tasks

AttributeDomain AdaptationLanguage ModelingLanguage ModellingLinguistic AcceptabilityNMTTranslationmodel

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBERTBPECosine AnnealingDense ConnectionsDiscriminative Fine-TuningDropoutGPT-2Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionRoBERTaSoftmaxWeight DecayWordPieceXLM

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