Papers › Probabilistically Masked Language Model Capable of Autoregressive Generation in...

Probabilistically Masked Language Model Capable of Autoregressive Generation in Arbitrary Word Order

24 Apr 2020ACL 2020 6arXiv:2004.11579archive 2025-07-28

Yi Liao, Xin Jiang, Qun Liu

Masked language model and autoregressive language model are two types of language models. While pretrained masked language models such as BERT overwhelm the line of natural language understanding (NLU) tasks, autoregressive language models such as GPT are especially capable in natural language generation (NLG). In this paper, we propose a probabilistic masking scheme for the masked language model, which we call probabilistically masked language model (PMLM). We implement a specific PMLM with a uniform prior distribution on the masking ratio named u-PMLM. We prove that u-PMLM is equivalent to an autoregressive permutated language model. One main advantage of the model is that it supports text generation in arbitrary order with surprisingly good quality, which could potentially enable new applications over traditional unidirectional generation. Besides, the pretrained u-PMLM also outperforms BERT on a set of downstream NLU tasks.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 35 code samples: 34 from 2 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 35: 21 ran (of which 1 constructed an object rather than computing a result; 12 with no instrument failure: 4 honoured, 3 violated, 5 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 28 samples from 1 repository, 15 ran (8 with no instrument failure; 7 where Syntology's instrument failed); community (archive-listed): 6 samples from 1 repository, 5 ran (4 with no instrument failure; 1 where Syntology's instrument failed); 1 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.

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 21 samples that ran has no recorded date.

huawei-noah/Pretrained-Language-Model officialtfSyntology: 28 samples, 15 ran (7 instrument-failed) · 13 unverified report
jxmorris12/unsupervised-text-deidentification mentioned on GitHubpytorchSyntology: not harvested report
m-hahn/PMLM mentioned on GitHubtfApache-2.0Syntology: 6 samples, 5 ran (1 instrument-failed) · 1 unverified 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

35 samples harvested: 21 ran (of which 1 constructed an object rather than computing a result; 12 with no instrument failure: 4 honoured, 3 violated, 5 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran · honoured contract
3ran · violated contract
7ran · our draft was wrong
2ran; the contract check could not run
5ran
14unverified

Licence: 29 of the 35 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. 1 sample is listed last, in a group without a repository. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

huawei-noah/Pretrained-Language-Model official repository 28 samples, 15 ran (7 instrument-failed) · 13 unverified
BasicTokenizer PMLM/interactive_conditional_samples_sincos_acrostic.py ran fingerprinted no licence file found · pointer only · 177395ce85e9e46c · report fixture: signature text:str/0/str · returned list · level recorded 2026-09-24
WordpieceTokenizer PMLM/interactive_conditional_samples_sincos_acrostic.py ran no licence file found · pointer only · 153daed490586fac · report fixture: returned WordpieceTokenizer · level recorded 2026-09-22
_generate_relative_positions_embeddings PMLM/interactive_conditional_samples_sincos_acrostic.py ran · honoured contract fingerprinted no licence file found · pointer only · 4043c0de4f5b299e · report fixture: signature length:int/0/int, depth:int/0/int, max_relative_position:int/0/int, name:str/0/str, cache:bool/0/bool · returned EagerTensor · level recorded 2026-09-22
_generate_relative_positions_matrix PMLM/interactive_conditional_samples_sincos_acrostic.py ran · honoured contract fingerprinted no licence file found · pointer only · d849cf96b7e5e9ee · report fixture: signature length:int/0/int, max_relative_position:int/0/int, cache:bool/0/bool · returned EagerTensor · level recorded 2026-09-22
_is_control PMLM/interactive_conditional_samples_sincos_acrostic.py ran · violated contract no licence file found · pointer only · 9631b2c9fcf97ecf · report fixture: signature char:str/0/str · returned bool · level recorded 2026-09-22
_is_punctuation PMLM/interactive_conditional_samples_sincos_acrostic.py ran · violated contract no licence file found · pointer only · 4707df29d0d89e16 · report fixture: signature char:str/0/str · returned bool · level recorded 2026-09-22
_is_whitespace PMLM/interactive_conditional_samples_sincos_acrostic.py ran · violated contract no licence file found · pointer only · 80a675f52dc9953c · report fixture: signature char:str/0/str · returned bool · level recorded 2026-09-22
convert_by_vocab PMLM/interactive_conditional_samples_sincos_acrostic.py ran · our draft was wrong no licence file found · pointer only · bf6088a6a68ef09c · report fixture: signature vocab:dict/0/?, items:list/1/str · returned list · level recorded 2026-09-22
convert_to_unicode in 40 papers PMLM/interactive_conditional_samples_sincos_acrostic.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 1923fc05163d207d · report fixture: signature text:str/0/str · returned str · level recorded 2026-09-22
dropout in 34 papers PMLM/interactive_conditional_samples_sincos_acrostic.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted no licence file found · pointer only · 873e08c3f15eb1e4 · report fixture: signature input_tensor:EagerTensor/2/float, dropout_prob:float/0/float · returned EagerTensor · level recorded 2026-09-22
gelu in 308 papers
census: 43 implementations from 74 papers, 6 distinct outputs on one shared input
PMLM/interactive_conditional_samples_sincos_acrostic.py ran · honoured contract fingerprinted no licence file found · pointer only · 44fc0426bec46486 · report fixture: signature input_tensor:EagerTensor/2/float · returned EagerTensor · level recorded 2026-09-22
get_activation in 218 papers PMLM/interactive_conditional_samples_sincos_acrostic.py ran · our draft was wrong no licence file found · pointer only · 8eddd1789d66ce8d · report fixture: signature activation_string:str/0/str · returned function · level recorded 2026-09-22
get_shape_list in 9 papers PMLM/interactive_conditional_samples_sincos_acrostic.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 5a657fd9d0832b35 · report fixture: signature tensor:EagerTensor/2/float, expected_rank:int/0/int, name:str/0/str · returned list · level recorded 2026-09-22
reshape_to_matrix PMLM/interactive_conditional_samples_sincos_acrostic.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 7b84f3e6a96584b4 · report fixture: signature input_tensor:EagerTensor/3/float · returned EagerTensor · level recorded 2026-09-22
top_k_logits in 36 papers
census: 6 implementations from 10 papers, 4 distinct outputs on one shared input
PMLM/interactive_conditional_samples_sincos_acrostic.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · eaa09f3e52dcedfd · report fixture: signature logits:EagerTensor/2/float, k:int/0/int · returned EagerTensor · level recorded 2026-09-22
BertModel in 16 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 3c86b7d1ed73e184 · report
FullTokenizer PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · e546de3e85798f55 · report
assert_rank in 6 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 3626c55dff7dd429 · report
attention_layer in 9 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 3e9d8117d432e11f · report
create_attention_mask_from_input_mask in 8 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 81415c63dd9b8e77 · report
create_initializer in 10 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · e3981aa2fadfb2eb · report
embedding_lookup in 9 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · fd655b6f6e2908d6 · report
embedding_postprocessor in 7 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 3e2e6083468647f2 · report
layer_norm in 32 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · fedeb6766bad1fad · report
layer_norm_and_dropout in 6 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · 15f847b95346c6d2 · report
load_vocab in 107 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · a87406334d83c277 · report
reshape_from_matrix in 7 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · b1f366f8472004a2 · report
transformer_model in 7 papers PMLM/interactive_conditional_samples_sincos_acrostic.py unverified no licence file found · pointer only · bc3e0393640c7f77 · report
m-hahn/PMLM community (archive-listed) 6 samples, 5 ran (1 instrument-failed) · 1 unverified
create_float_feature in 11 papers create_pretraining_data.py ran Apache-2.0 (permissive) · b24b3b9c700da839 · report fixture: signature values:list/1/float · returned Feature · level recorded 2026-09-25
create_int_feature in 14 papers create_pretraining_data.py ran Apache-2.0 (permissive) · dd3ef48a15aec0cd · report fixture: signature values:list/1/int · returned Feature · level recorded 2026-09-25
gelu in 308 papers
census: 43 implementations from 74 papers, 6 distinct outputs on one shared input
modeling.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · d08f324f950148de · report fixture: signature x:EagerTensor/2/float · returned EagerTensor · level recorded 2026-09-22
get_activation in 218 papers modeling.py ran · our draft was wrong Apache-2.0 (permissive) · 5842ee67106321d6 · report fixture: signature activation_string:str/0/str · returned function · level recorded 2026-09-22
input_fn_builder in 13 papers extract_features.py ran Apache-2.0 (permissive) · 47a3c792cebb6603 · report fixture: signature features:list/1/Feature, seq_length:int/0/int · returned function · level recorded 2026-09-25
get_assignment_map_from_checkpoint in 32 papers interactive_conditional_samples_sincos_acrostic_SST2_Finetune_OLD.py unverified Apache-2.0 (permissive) · 0fc04590521d0f1c · report
Repository not located 1 sample, 1 ran (1 instrument-failed) · 0 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
whitespace_tokenize in 49 papers repository not located ran · our draft was wrong fingerprinted licence of this copy not recorded · cf9ffa02a42184af · report fixture: signature text:str/0/str · returned list · level recorded, date not recorded

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Probabilistically Masked Language Model (PMLM) (graph method: Probabilistically Masked Language Model (PMLM)). 29 bricks; individually on a fixture: 16 ran (of which 1 constructed an object rather than computing a result; 8 with no instrument failure: 3 honoured, 3 violated, 2 with no contract checked; 8 where Syntology's instrument failed) · 13 unverified. The assembly has not been run end-to-end.

  1. BertModel entry · level 0 · unverified · 3c86b7d1ed73e184
  2. FullTokenizer helper · level 0 · unverified · e546de3e85798f55
  3. convert_to_unicode helper · level 1 · ran · our draft was wrong · 1923fc05163d207d
  4. create_attention_mask_from_input_mask helper · level 0 · unverified · 81415c63dd9b8e77
  5. create_initializer helper · level 0 · unverified · e3981aa2fadfb2eb
  6. embedding_lookup helper · level 0 · unverified · fd655b6f6e2908d6
  7. embedding_postprocessor model · level 0 · unverified · 3e2e6083468647f2
  8. get_activation helper · level 1 · ran · our draft was wrong · 8eddd1789d66ce8d
  9. get_shape_list helper · level 1 · ran · our draft was wrong · 5a657fd9d0832b35
  10. layer_norm model · level 0 · unverified · fedeb6766bad1fad
  11. top_k_logits helper · level 1 · ran; the contract check could not run (RAISES) · eaa09f3e52dcedfd
  12. transformer_model model · level 0 · unverified · bc3e0393640c7f77
  13. BasicTokenizer helper · level 1 · ran · 177395ce85e9e46c
  14. WordpieceTokenizer helper · level 1 · ran · 153daed490586fac
  15. convert_by_vocab helper · level 1 · ran · our draft was wrong · bf6088a6a68ef09c
  16. load_vocab helper · level 0 · unverified · a87406334d83c277
  17. layer_norm_and_dropout helper · level 0 · unverified · 15f847b95346c6d2
  18. gelu helper · level 1 · ran · honoured contract · 44fc0426bec46486
  19. assert_rank helper · level 0 · unverified · 3626c55dff7dd429
  20. attention_layer model · level 0 · unverified · 3e9d8117d432e11f
  21. dropout helper · level 1 · ran; the contract check could not run (RAISES) · 873e08c3f15eb1e4
  22. reshape_from_matrix helper · level 0 · unverified · b1f366f8472004a2
  23. reshape_to_matrix helper · level 1 · ran · our draft was wrong · 7b84f3e6a96584b4
  24. _is_control helper · level 1 · ran · violated contract · 9631b2c9fcf97ecf
  25. _is_punctuation helper · level 1 · ran · violated contract · 4707df29d0d89e16
  26. _is_whitespace helper · level 1 · ran · violated contract · 80a675f52dc9953c
  27. whitespace_tokenize helper · level 2 · ran · our draft was wrong · cf9ffa02a42184af
  28. _generate_relative_positions_embeddings helper · level 1 · ran · honoured contract · 4043c0de4f5b299e
  29. _generate_relative_positions_matrix helper · level 1 · ran · honoured contract · d849cf96b7e5e9ee

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2004.11579") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Language ModelingLanguage ModellingNatural Language UnderstandingText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Introduced by this paper: PMLM

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionPMLMResidual ConnectionSoftmaxWeight DecayWordPiece

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