A Plug-and-Play Method for Controlled Text Generation
Not on the map. Why?
Abstract (arXiv)
Large pre-trained language models have repeatedly shown their ability to produce fluent text. Yet even when starting from a prompt, generation can continue in many plausible directions. Current decoding methods with the goal of controlling generation, e.g., to ensure specific words are included, either require additional models or fine-tuning, or work poorly when the task at hand is semantically unconstrained, e.g., story generation. In this work, we present a plug-and-play decoding method for controlled language generation that is so simple and intuitive, it can be described in a single sentence: given a topic or keyword, we add a shift to the probability distribution over our vocabulary towards semantically similar words. We show how annealing this distribution can be used to impose hard constraints on language generation, something no other plug-and-play method is currently able to do with SOTA language generators. Despite the simplicity of this approach, we see it works incredibly well in practice: decoding from GPT-2 leads to diverse and fluent sentences while guaranteeing the appearance of given guide words. We perform two user studies, revealing that (1) our method outperforms competing methods in human evaluations; and (2) forcing the guide words to appear in the generated text has no impact on the fluency of the generated text.
Key facts. Cited by 55 papers in the map (data through 7 Oct 2026). Builds on 29 of its 46 references that are in the map. First posted on arXiv 20 Sep 2021.
Builds on
29 of 46 references.
References · 29
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
- 2018Hierarchical Neural Story Generationcited by 1,182
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,068
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 754
- 2019Neural Text Generation with Unlikelihood Trainingcited by 489
17 more
- 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 413
- 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
- 2016SeqGAN: Sequence Generative Adversarial Nets with Policy Gradientcited by 375
- 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 374
- 2016How NOT To Evaluate Your Dialogue System: An Empirical Study of Unsupervised Evaluation Metrics for Dialogue Response Generationcited by 356
- 2017Lexically Constrained Decoding for Sequence Generation Using Grid Beam Searchcited by 234
- 2018Plan-And-Write: Towards Better Automatic Storytellingcited by 232
- 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 181
- 2018Learning to Write with Cooperative Discriminatorscited by 119
- 2018Correcting Length Bias in Neural Machine Translationcited by 119
- 2020If beam search is the answer, what was the question?cited by 114
- 2018CGMH: Constrained Sentence Generation by Metropolis-Hastings Samplingcited by 93
- 2020MEGATRON-CNTRL: Controllable Story Generation with External Knowledge Using Large-Scale Language Modelscited by 74
- 2020Sparse Text Generationcited by 24
- 2015Backward and Forward Language Modeling for Constrained Sentence Generationcited by 9
- 2013Keyphrase Cloud Generation of Broadcast Newscited by 7
- 2021Changing the Mind of Transformers for Topically-Controllable Language Generationcited by 7
Built on by
Citing papers per year: 2022: 17; 2023: 15; 2024: 13; 2025: 7; 2026: 3.
55 papers.
Sort:
By area:
- 2022Generating Training Data with Language Models: Towards Zero-Shot Language Understandingcited by 199
- 2022SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for Text Generation and Modular Controlcited by 191
- 2022A Survey of Controllable Text Generation using Transformer-based Pre-trained Language Modelscited by 128
- 2022Pretrained Language Models for Text Generation: A Surveycited by 121
- 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
- 2023Reward-Augmented Decoding: Efficient Controlled Text Generation With a Unidirectional Reward Modelcited by 79
- 2022Of Human Criteria and Automatic Metrics: A Benchmark of the Evaluation of Story Generationcited by 73
- 2022Gradient-Based Constrained Sampling from Language Modelscited by 64
- 2022DFX: A Low-latency Multi-FPGA Appliance for Accelerating Transformer-based Text Generationcited by 46
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 45
- 2022Tuning Language Models as Training Data Generators for Augmentation-Enhanced Few-Shot Learningcited by 36
- 2024Gradient-Based Language Model Red Teamingcited by 33
38 more
- 2023Controllable Mixed-Initiative Dialogue Generation through Promptingcited by 32
- 2023Elastic Weight Removal for Faithful and Abstractive Dialogue Generationcited by 29
- 2023Mixture of Soft Prompts for Controllable Data Generationcited by 23
- 2022Open-world Story Generation with Structured Knowledge Enhancement: A Comprehensive Surveycited by 21
- 2023Learning to Simulate Natural Language Feedback for Interactive Semantic Parsingcited by 19
- 2022Integrating Vectorized Lexical Constraints for Neural Machine Translationcited by 9
- 2023Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studiocited by 9
- 2024Two Heads Are Better Than One: Integrating Knowledge from Knowledge Graphs and Large Language Models for Entity Alignmentcited by 8
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Taskscited by 8
- 2022"What makes a question inquisitive?" A Study on Type-Controlled Inquisitive Question Generationcited by 7
- 2023Speaking the Language of Your Listener: Audience-Aware Adaptation via Plug-and-Play Theory of Mindcited by 7
- 2024Large Language Models can be Strong Self-Detoxifierscited by 7
- 2024Creativity in AI: Progresses and Challengescited by 7
- 2025The Achilles' Heel of LLMs: How Altering a Handful of Neurons Can Cripple Language Abilitiescited by 7
- 2023Plug-and-Play Document Modules for Pre-trained Modelscited by 6
- 2023Emotion-Conditioned Text Generation through Automatic Prompt Optimizationcited by 6
- 2024Paired Autoencoders for Likelihood-free Estimation in Inverse Problemscited by 6
- 2024FreeCtrl: Constructing Control Centers with Feedforward Layers for Learning-Free Controllable Text Generationcited by 6
- 2023ZeroGen: Zero-shot Multimodal Controllable Text Generation with Multiple Oraclescited by 5
- 2022Uniform Complexity for Text Generationcited by 4
- 2022DICTDIS: Dictionary Constrained Disambiguation for Improved NMTcited by 4
- 2022PCFG-based Natural Language Interface Improves Generalization for Controlled Text Generationcited by 4
- 2023P^3SUM: Preserving Author's Perspective in News Summarization with Diffusion Language Modelscited by 4
- 2024Harnessing the Plug-and-Play Controller by Promptingcited by 4
- 2023Text-Only Training for Visual Storytellingcited by 3
- 2024DECIDER: A Dual-System Rule-Controllable Decoding Framework for Language Generationcited by 2
- 2024Continuous Language Model Interpolation for Dynamic and Controllable Text Generationcited by 2
- 2025Portable Reward Tuning: Towards Reusable Fine-Tuning across Different Pretrained Modelscited by 2
- 2023Variator: Accelerating Pre-trained Models with Plug-and-Play Compression Modulescited by 1
- 2024Kahaani: A Multimodal Co-Creative Storytelling Systemcited by 1
- 2024A Lightweight Multi Aspect Controlled Text Generation Solution For Large Language Modelscited by 1
- 2025Mimicking How Humans Interpret Out-of-Context Sentences Through Controlled Toxicity Decodingcited by 1
- 2025FLIP Reasoning Challengecited by 1
- 2025Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognitioncited by 1
- 2022Efficient and Training-Free Control of Language Generationcited by 0
- 2022Topic-Controllable Summarization: Topic-Aware Evaluation and Transformer Methodscited by 0
- 2023Cascaded Beam Search: Plug-and-Play Terminology-Forcing For Neural Machine Translationcited by 0
- 2023Label Agnostic Pre-training for Zero-shot Text Classificationcited by 0
50 most cited of 55 All 55 (JSON)
- 2026A Survey of Toxicity Detection and Mitigation Strategies for Multilingual Language Models24 Jun 2026
- 2026A Comparative Study of Controlled Text Generation Systems Using Level-Playing-Field Evaluation Principles12 May 2026
- 2026Facet-Level Persona Control by Trait-Activated Routing with Contrastive SAE for Role-Playing LLMs22 Feb 2026
- 2025The Achilles' Heel of LLMs: How Altering a Handful of Neurons Can Cripple Language Abilities11 Oct 2025
- 2025PG-CE: A Progressive Generation Dataset with Constraint Enhancement for Controllable Text Generation22 Sep 2025
- 2025Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognition11 Jun 2025
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo17 Apr 2025
- 2025FLIP Reasoning Challenge16 Apr 2025
- 2025Mimicking How Humans Interpret Out-of-Context Sentences Through Controlled Toxicity Decoding11 Mar 2025
- 2025Portable Reward Tuning: Towards Reusable Fine-Tuning across Different Pretrained Models18 Feb 2025
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Tasks29 Oct 2024
- 2024Creativity in AI: Progresses and Challenges22 Oct 2024
38 more
- 2024A Lightweight Multi Aspect Controlled Text Generation Solution For Large Language Models18 Oct 2024
- 2024Large Language Models can be Strong Self-Detoxifiers4 Oct 2024
- 2024Kahaani: A Multimodal Co-Creative Storytelling System17 Sep 2024
- 2024FreeCtrl: Constructing Control Centers with Feedforward Layers for Learning-Free Controllable Text Generation14 Jun 2024
- 2024Paired Autoencoders for Likelihood-free Estimation in Inverse Problems21 May 2024
- 2024Continuous Language Model Interpolation for Dynamic and Controllable Text Generation10 Apr 2024
- 2024DECIDER: A Dual-System Rule-Controllable Decoding Framework for Language Generation4 Mar 2024
- 2024Quantized Embedding Vectors for Controllable Diffusion Language Models15 Feb 2024
- 2024Harnessing the Plug-and-Play Controller by Prompting6 Feb 2024
- 2024Two Heads Are Better Than One: Integrating Knowledge from Knowledge Graphs and Large Language Models for Entity Alignment30 Jan 2024
- 2024Gradient-Based Language Model Red Teaming30 Jan 2024
- 2023P^3SUM: Preserving Author's Perspective in News Summarization with Diffusion Language Models16 Nov 2023
- 2023Variator: Accelerating Pre-trained Models with Plug-and-Play Compression Modules24 Oct 2023
- 2023Reward-Augmented Decoding: Efficient Controlled Text Generation With a Unidirectional Reward Model14 Oct 2023
- 2023Text-Only Training for Visual Storytelling17 Aug 2023
- 2023Emotion-Conditioned Text Generation through Automatic Prompt Optimization9 Aug 2023
- 2023ZeroGen: Zero-shot Multimodal Controllable Text Generation with Multiple Oracles29 Jun 2023
- 2023Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio28 Jun 2023
- 2023Speaking the Language of Your Listener: Audience-Aware Adaptation via Plug-and-Play Theory of Mind31 May 2023
- 2023Plug-and-Play Document Modules for Pre-trained Models28 May 2023
- 2023Label Agnostic Pre-training for Zero-shot Text Classification25 May 2023
- 2023Cascaded Beam Search: Plug-and-Play Terminology-Forcing For Neural Machine Translation23 May 2023
- 2023Learning to Simulate Natural Language Feedback for Interactive Semantic Parsing14 May 2023
- 2023Controllable Mixed-Initiative Dialogue Generation through Prompting6 May 2023
- 2023Elastic Weight Removal for Faithful and Abstractive Dialogue Generation30 Mar 2023
- 2023Mixture of Soft Prompts for Controllable Data Generation2 Mar 2023
- 2022Open-world Story Generation with Structured Knowledge Enhancement: A Comprehensive Survey9 Dec 2022
- 2022Tuning Language Models as Training Data Generators for Augmentation-Enhanced Few-Shot Learning6 Nov 2022
- 2022SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for Text Generation and Modular Control31 Oct 2022
- 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Survey14 Oct 2022
- 2022PCFG-based Natural Language Interface Improves Generalization for Controlled Text Generation14 Oct 2022
- 2022DICTDIS: Dictionary Constrained Disambiguation for Improved NMT13 Oct 2022
- 2022DFX: A Low-latency Multi-FPGA Appliance for Accelerating Transformer-based Text Generation22 Sep 2022
- 2022Of Human Criteria and Automatic Metrics: A Benchmark of the Evaluation of Story Generation24 Aug 2022
- 2022Topic-Controllable Summarization: Topic-Aware Evaluation and Transformer Methods9 Jun 2022
- 2022Gradient-Based Constrained Sampling from Language Models25 May 2022
- 2022"What makes a question inquisitive?" A Study on Type-Controlled Inquisitive Question Generation17 May 2022
- 2022Efficient and Training-Free Control of Language Generation12 May 2022
50 newest of 55 All 55 (JSON)
- 2022SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for Text Generation and Modular Controlcited by 191
- 2023P^3SUM: Preserving Author's Perspective in News Summarization with Diffusion Language Modelscited by 4
- 2024Quantized Embedding Vectors for Controllable Diffusion Language Modelscited by 0
- 2024Quantized Embedding Vectors for Controllable Diffusion Language Models15 Feb 2024
- 2023P^3SUM: Preserving Author's Perspective in News Summarization with Diffusion Language Models16 Nov 2023
- 2022SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for Text Generation and Modular Control31 Oct 2022
- 2025Portable Reward Tuning: Towards Reusable Fine-Tuning across Different Pretrained Modelscited by 2
- 2025FLIP Reasoning Challengecited by 1
- 2025FLIP Reasoning Challenge16 Apr 2025
- 2025Portable Reward Tuning: Towards Reusable Fine-Tuning across Different Pretrained Models18 Feb 2025
- 2022Generating Training Data with Language Models: Towards Zero-Shot Language Understandingcited by 199
- 2022A Survey of Controllable Text Generation using Transformer-based Pre-trained Language Modelscited by 128
- 2022Pretrained Language Models for Text Generation: A Surveycited by 121
- 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
- 2022Of Human Criteria and Automatic Metrics: A Benchmark of the Evaluation of Story Generationcited by 73
- 2022Gradient-Based Constrained Sampling from Language Modelscited by 64
- 2022DFX: A Low-latency Multi-FPGA Appliance for Accelerating Transformer-based Text Generationcited by 46
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 45
- 2022Tuning Language Models as Training Data Generators for Augmentation-Enhanced Few-Shot Learningcited by 36
- 2023Controllable Mixed-Initiative Dialogue Generation through Promptingcited by 32
- 2023Elastic Weight Removal for Faithful and Abstractive Dialogue Generationcited by 29
- 2023Mixture of Soft Prompts for Controllable Data Generationcited by 23
12 most cited of 46 All 46 (JSON)
- 2026A Comparative Study of Controlled Text Generation Systems Using Level-Playing-Field Evaluation Principles12 May 2026
- 2026Facet-Level Persona Control by Trait-Activated Routing with Contrastive SAE for Role-Playing LLMs22 Feb 2026
- 2025The Achilles' Heel of LLMs: How Altering a Handful of Neurons Can Cripple Language Abilities11 Oct 2025
- 2025PG-CE: A Progressive Generation Dataset with Constraint Enhancement for Controllable Text Generation22 Sep 2025
- 2025Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognition11 Jun 2025
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo17 Apr 2025
- 2025Mimicking How Humans Interpret Out-of-Context Sentences Through Controlled Toxicity Decoding11 Mar 2025
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Tasks29 Oct 2024
- 2024Creativity in AI: Progresses and Challenges22 Oct 2024
- 2024A Lightweight Multi Aspect Controlled Text Generation Solution For Large Language Models18 Oct 2024
- 2024Kahaani: A Multimodal Co-Creative Storytelling System17 Sep 2024
- 2024FreeCtrl: Constructing Control Centers with Feedforward Layers for Learning-Free Controllable Text Generation14 Jun 2024
12 newest of 46 All 46 (JSON)