mlsanityData to 7 Oct 2026

Exposing the Implicit Energy Networks behind Masked Language Models via Metropolis--Hastings

arXiv 2106.02736 ↗First posted 4 Jun 2021cs.LG cs.CLcited by 37

Not on the map. Why?

Abstract (arXiv)

While recent work has shown that scores from models trained by the ubiquitous masked language modeling (MLM) objective effectively discriminate probable from improbable sequences, it is still an open question if these MLMs specify a principled probability distribution over the space of possible sequences. In this paper, we interpret MLMs as energy-based sequence models and propose two energy parametrizations derivable from the trained MLMs. In order to draw samples correctly from these models, we develop a tractable sampling scheme based on the Metropolis--Hastings Monte Carlo algorithm. In our approach, samples are proposed from the same masked conditionals used for training the masked language models, and they are accepted or rejected based on their energy values according to the target distribution. We validate the effectiveness of the proposed parametrizations by exploring the quality of samples drawn from these energy-based models for both open-ended unconditional generation and a conditional generation task of machine translation. We theoretically and empirically justify our sampling algorithm by showing that the masked conditionals on their own do not yield a Markov chain whose stationary distribution is that of our target distribution, and our approach generates higher quality samples than other recently proposed undirected generation approaches (Wang et al., 2019, Ghazvininejad et al., 2019).

Key facts. Cited by 37 papers in the map (data through 7 Oct 2026). Builds on 24 of its 52 references that are in the map. First posted on arXiv 4 Jun 2021.

Builds on

24 of 52 references.

References · 24

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  6. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  7. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  8. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
  9. 2018Deep contextualized word representationscited by 2,285
  10. 2020A Primer in BERTology: What we know about how BERT workscited by 807
  11. 2017Non-Autoregressive Neural Machine Translationcited by 457
  12. 2019BERT has a Mouth, and It Must Speak: BERT as a Markov Random Field Language Modelcited by 184
12 more
  1. 2016Sequence-to-Sequence Learning as Beam-Search Optimizationcited by 126
  2. 2016Energy-based Generative Adversarial Networkcited by 119
  3. 2020Residual Energy-Based Models for Text Generationcited by 95
  4. 2021Oops I Took A Gradient: Scalable Sampling for Discrete Distributionscited by 92
  5. 2015Structured Prediction Energy Networkscited by 59
  6. 2017Adversarial Feature Matching for Text Generationcited by 58
  7. 2020Pre-Training Transformers as Energy-Based Cloze Modelscited by 52
  8. 2020ENGINE: Energy-Based Inference Networks for Non-Autoregressive Machine Translationcited by 34
  9. 2019A Generalized Framework of Sequence Generation with Application to Undirected Sequence Modelscited by 17
  10. 2019An Empirical Investigation of Global and Local Normalization for Recurrent Neural Sequence Models Using a Continuous Relaxation to Beam Searchcited by 12
  11. 2017Learning neural trans-dimensional random field language models with noise-contrastive estimationcited by 7
  12. 2017Language modeling with Neural trans-dimensional random fieldscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 3; 2022: 10; 2023: 15; 2024: 6; 2025: 1; 2026: 2.

37 papers.

Sort:

By area:

  1. 2022Continuous diffusion for categorical datacited by 202
  2. 2022Quantifying Privacy Risks of Masked Language Models Using Membership Inference Attackscited by 168
  3. 2022COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamicscited by 159
  4. 2023Aligning Language Models with Preferences through f-divergence Minimizationcited by 118
  5. 2023Amortizing intractable inference in large language modelscited by 94
  6. 2021Unleashing Transformers: Parallel Token Prediction with Discrete Absorbing Diffusion for Fast High-Resolution Image Generation from Vector-Quantized Codescited by 71
  7. 2022Mix and Match: Learning-free Controllable Text Generation using Energy Language Modelscited by 66
  8. 2023Anticipatory Music Transformercited by 35
  9. 2023BOLT: Fast Energy-based Controlled Text Generation with Tunable Biasescited by 24
  10. 2024A distributional simplicity bias in the learning dynamics of transformerscited by 23
  11. 2024QUEST: Quality-Aware Metropolis-Hastings Sampling for Machine Translationcited by 16
  12. 2023FiLM: Fill-in Language Models for Any-Order Generationcited by 13
25 more
  1. 2022Probing BERT's priors with serial reproduction chainscited by 11
  2. 2022Generative power of a protein language model trained on multiple sequence alignmentscited by 9
  3. 2022Converge to the Truth: Factual Error Correction via Iterative Constrained Editingcited by 9
  4. 2023Learning to Generate Text in Arbitrary Writing Stylescited by 9
  5. 2023Planning with Sequence Models through Iterative Energy Minimizationcited by 8
  6. 2023Deriving Language Models from Masked Language Modelscited by 8
  7. 2023On "Scientific Debt" in NLP: A Case for More Rigour in Language Model Pre-Training Researchcited by 7
  8. 2023MIMEx: Intrinsic Rewards from Masked Input Modelingcited by 6
  9. 2024Promises and Pitfalls of Generative Masked Language Modeling: Theoretical Framework and Practical Guidelinescited by 6
  10. 2023A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generationcited by 5
  11. 2023Principled Gradient-based Markov Chain Monte Carlo for Text Generationcited by 4
  12. 2024Conditional [MASK] Discrete Diffusion Language Modelcited by 4
  13. 2021Sampling from Discrete Energy-Based Models with Quality/Efficiency Trade-offscited by 2
  14. 2022Multi-segment preserving sampling for deep manifold samplercited by 2
  15. 2022Emergent Linguistic Structures in Neural Networks are Fragilecited by 2
  16. 2023Controlled Text Generation for Black-box Language Models via Score-based Progressive Editorcited by 2
  17. 2023Discrete Distribution Networkscited by 2
  18. 2022Inconsistencies in Masked Language Modelscited by 1
  19. 2023Pairing interacting protein sequences using masked language modelingcited by 1
  20. 2024GenPlan: Generative Sequence Models as Adaptive Plannerscited by 1
  21. 2021BERTian Poetics: Constrained Composition with Masked LMscited by 0
  22. 2024Adaptformer: Sequence models as adaptive iterative plannerscited by 0
  23. 2025Learning Extrapolative Sequence Transformations from Markov Chainscited by 0
  24. 2026Structured Inference with Large Language Gibbscited by 0
  25. 2026BayesPrompt: human readable prompts that make sensecited by 0