mlsanityData to 7 Oct 2026

Gradient-Based Constrained Sampling from Language Models

arXiv 2205.12558 ↗First posted 25 May 2022cs.CLcited by 64

Not on the map. Why?

Abstract (arXiv)

Large pretrained language models generate fluent text but are notoriously hard to controllably sample from. In this work, we study constrained sampling from such language models: generating text that satisfies user-defined constraints, while maintaining fluency and the model's performance in a downstream task. We propose MuCoLa -- a sampling procedure that combines the log-likelihood of the language model with arbitrary (differentiable) constraints in a single energy function, and then generates samples in a non-autoregressive manner. Specifically, it initializes the entire output sequence with noise and follows a Markov chain defined by Langevin Dynamics using the gradients of the energy function. We evaluate MuCoLa on text generation with soft and hard constraints as well as their combinations obtaining significant improvements over competitive baselines for toxicity avoidance, sentiment control, and keyword-guided generation.

Key facts. Cited by 64 papers in the map (data through 7 Oct 2026). Builds on 57 of its 95 references that are in the map. First posted on arXiv 25 May 2022.

Builds on

57 of 95 references.

References · 57

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,539
  6. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  7. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  8. 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,067
  9. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  10. 2022Video Diffusion Modelscited by 2,280
  11. 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
  12. 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
38 more
  1. 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,281
  2. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
  3. 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,068
  4. 2018Neural Network Acceptability Judgmentscited by 952
  5. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
  6. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 754
  7. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
  8. 2019Defending Against Neural Fake Newscited by 553
  9. 2019The Woman Worked as a Babysitter: On Biases in Language Generationcited by 540
  10. 2019Neural Text Generation with Unlikelihood Trainingcited by 489
  11. 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
  12. 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
  13. 2016SeqGAN: Sequence Generative Adversarial Nets with Policy Gradientcited by 375
  14. 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 374
  15. 2021Knowledge Distillation in Iterative Generative Models for Improved Sampling Speedcited by 344
  16. 2021Understanding Factuality in Abstractive Summarization with FRANK: A Benchmark for Factuality Metricscited by 285
  17. 2018Analysis Methods in Neural Language Processing: A Surveycited by 276
  18. 2018Marian: Fast Neural Machine Translation in C++cited by 202
  19. 2021Societal Biases in Language Generation: Progress and Challengescited by 201
  20. 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 181
  21. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
  22. 2022COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamicscited by 159
  23. 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 153
  24. 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 146
  25. 2018Style Transfer Through Back-Translationcited by 124
  26. 2020A Distributional Approach to Controlled Text Generationcited by 117
  27. 2020Imitation Attacks and Defenses for Black-box Machine Translation Systemscited by 78
  28. 2022Controllable Natural Language Generation with Contrastive Prefixescited by 75
  29. 2019Training Neural Machine Translation To Apply Terminology Constraintscited by 73
  30. 2021Controlled Text Generation as Continuous Optimization with Multiple Constraintscited by 70
  31. 2022Mix and Match: Learning-free Controllable Text Generation using Energy Language Modelscited by 66
  32. 2020Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense Reasoningcited by 65
  33. 2020PowerTransformer: Unsupervised Controllable Revision for Biased Language Correctioncited by 59
  34. 2021A Plug-and-Play Method for Controlled Text Generationcited by 55
  35. 2020CoCon: A Self-Supervised Approach for Controlled Text Generationcited by 47
  36. 2020Minimizing FLOPs to Learn Efficient Sparse Representationscited by 46
  37. 2020Adversarial Semantic Collisionscited by 42
  38. 2018Non-Autoregressive Neural Machine Translation with Enhanced Decoder Inputcited by 39

50 most cited of 57 All 57 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 2; 2023: 17; 2024: 18; 2025: 15; 2026: 12.

64 papers.

Sort:

By area:

  1. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
  2. 2024Black-Box Access is Insufficient for Rigorous AI Auditscited by 123
  3. 2023Explore, Establish, Exploit: Red Teaming Language Models from Scratchcited by 111
  4. 2024Attacking Large Language Models with Projected Gradient Descentcited by 91
  5. 2024Decoding-Time Language Model Alignment with Multiple Objectivescited by 90
  6. 2023Controlled Text Generation with Natural Language Instructionscited by 87
  7. 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
  8. 2023Word Embeddings Are Steers for Language Modelscited by 70
  9. 2024Grammar-Aligned Decodingcited by 54
  10. 2023Controlled Text Generation via Language Model Arithmeticcited by 51
  11. 2022Toward Human Readable Prompt Tuning: Kubrick's The Shining is a good movie, and a good prompt too?cited by 49
  12. 2023ChatGPT vs Human-authored Text: Insights into Controllable Text Summarization and Sentence Style Transfercited by 49
38 more
  1. 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 45
  2. 2023KCTS: Knowledge-Constrained Tree Search Decoding with Token-Level Hallucination Detectioncited by 43
  3. 2024Constrained Decoding for Secure Code Generationcited by 35
  4. 2024DeepEdit: Knowledge Editing as Decoding with Constraintscited by 33
  5. 2024On the Challenges and Opportunities in Generative AIcited by 31
  6. 2023BOLT: Fast Energy-based Controlled Text Generation with Tunable Biasescited by 24
  7. 2023Generating Summaries with Controllable Readability Levelscited by 24
  8. 2023A Geometric Notion of Causal Probingcited by 23
  9. 2024QUEST: Quality-Aware Metropolis-Hastings Sampling for Machine Translationcited by 16
  10. 2025Constrained Discrete Diffusioncited by 16
  11. 2025REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objectivecited by 15
  12. 2025Constrained Sampling for Language Models Should Be Easy: An MCMC Perspectivecited by 14
  13. 2025Self-Steering Language Modelscited by 13
  14. 2023Fast sampling from constrained spaces using the Metropolis-adjusted Mirror Langevin algorithmcited by 11
  15. 2023Learning to Generate Text in Arbitrary Writing Stylescited by 9
  16. 2024Growing a Tail: Increasing Output Diversity in Large Language Modelscited by 9
  17. 2024Effective Controllable Bias Mitigation for Classification and Retrieval using Gate Adapterscited by 8
  18. 2025Robust Multi-Objective Controlled Decoding of Large Language Modelscited by 8
  19. 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
  20. 2023Revisiting the Architectures like Pointer Networks to Efficiently Improve the Next Word Distribution, Summarization Factuality, and Beyondcited by 7
  21. 2024Controllable Text Generation in the Instruction-Tuning Eracited by 7
  22. 2025Inference-time Alignment in Continuous Spacecited by 7
  23. 2024Can Large Language Model Summarizers Adapt to Diverse Scientific Communication Goals?cited by 6
  24. 2024Is There No Such Thing as a Bad Question? H4R: HalluciBot For Ratiocination, Rewriting, Ranking, and Routingcited by 6
  25. 2026What's the plan? Metrics for implicit planning in LLMs and their application to rhyme generation and question answeringcited by 6
  26. 2023A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generationcited by 5
  27. 2024An Autoregressive Text-to-Graph Framework for Joint Entity and Relation Extractioncited by 5
  28. 2024Fluent dreaming for language modelscited by 5
  29. 2023P^3SUM: Preserving Author's Perspective in News Summarization with Diffusion Language Modelscited by 4
  30. 2024Non-Halting Queries: Exploiting Fixed Points in LLMscited by 4
  31. 2025Semantic Probabilistic Control of Language Modelscited by 4
  32. 2026nabla-Reasoner: LLM Reasoning via Test-Time Gradient Descent in Latent Spacecited by 4
  33. 2024Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controllercited by 3
  34. 2025Sequence-level Large Language Model Training with Contrastive Preference Optimizationcited by 3
  35. 2025Constrained Adaptive Rejection Samplingcited by 3
  36. 2026Steering Language Models Before They Speak: Logit-Level Interventionscited by 3
  37. 2024LaSEr-Edit: Localized Span-level Error Editing with Energy-based Localizationcited by 2
  38. 2025MultiQ&A: An Analysis in Measuring Robustness via Automated Crowdsourcing of Question Perturbations and Answerscited by 2

50 most cited of 64 All 64 (JSON)