Plug and Play Language Models: A Simple Approach to Controlled Text Generation
arXiv:1912.02164
Abstract
Large transformer-based language models (LMs) trained on huge text corpora have shown unparalleled generation capabilities. However, controlling attributes of the generated language (e.g. switching topic or sentiment) is difficult without modifying the model architecture or fine-tuning on attribute-specific data and entailing the significant cost of retraining. We propose a simple alternative: the Plug and Play Language Model (PPLM) for controllable language generation, which combines a pretrained LM with one or more simple attribute classifiers that guide text generation without any further training of the LM. In the canonical scenario we present, the attribute models are simple classifiers consisting of a user-specified bag of words or a single learned layer with 100,000 times fewer parameters than the LM. Sampling entails a forward and backward pass in which gradients from the attribute model push the LM's hidden activations and thus guide the generation. Model samples demonstrate control over a range of topics and sentiment styles, and extensive automated and human annotated evaluations show attribute alignment and fluency. PPLMs are flexible in that any combination of differentiable attribute models may be used to steer text generation, which will allow for diverse and creative applications beyond the examples given in this paper.
ICLR 2020 camera ready
References in corpus (8)
- Categorical Reparameterization with Gumbel-Softmax
- The Curious Case of Neural Text Degeneration
- CTRL: A Conditional Transformer Language Model for Controllable Generation
- Fine-Tuning Language Models from Human Preferences
- Hierarchical Neural Story Generation
- The Neural Noisy Channel
- Trainable Greedy Decoding for Neural Machine Translation
- A Stable and Effective Learning Strategy for Trainable Greedy Decoding
Cited by in corpus (34)
- Decision Transformer: Reinforcement Learning via Sequence Modeling
- A Survey of Knowledge-Enhanced Text Generation
- Recipes for Safety in Open-domain Chatbots
- Explaining Question Answering Models through Text Generation
- A Distributional Approach to Controlled Text Generation
- Few-shot Natural Language Generation for Task-Oriented Dialog
- Neural Language Generation: Formulation, Methods, and Evaluation
- Nine Potential Pitfalls when Designing Human-AI Co-Creative Systems
- Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense Reasoning
- CoCon: A Self-Supervised Approach for Controlled Text Generation
- Anticipating Safety Issues in E2E Conversational AI: Framework and Tooling
- DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Experts
- Topic-Driven and Knowledge-Aware Transformer for Dialogue Emotion Detection
- POINTER: Constrained Progressive Text Generation via Insertion-based Generative Pre-training
- Unsupervised Editing for Counterfactual Stories
- ETC-NLG: End-to-end Topic-Conditioned Natural Language Generation
- Sparse Symplectically Integrated Neural Networks
- Topic-Preserving Synthetic News Generation: An Adversarial Deep Reinforcement Learning Approach
- PROUD: PaRetO-gUided Diffusion Model for Multi-objective Generation
- TopicRefine: Joint Topic Prediction and Dialogue Response Generation for Multi-turn End-to-End Dialogue System
- You are right. I am ALARMED -- But by Climate Change Counter Movement
- Composed Variational Natural Language Generation for Few-shot Intents
- Neural Rule-Execution Tracking Machine For Transformer-Based Text Generation
- Style is NOT a single variable: Case Studies for Cross-Style Language Understanding
- PatentTransformer-2: Controlling Patent Text Generation by Structural Metadata
- Modelling Latent Skills for Multitask Language Generation
- Exploring Versatile Generative Language Model Via Parameter-Efficient Transfer Learning
- "Nice Try, Kiddo": Investigating Ad Hominems in Dialogue Responses
- Graphmax for Text Generation
- Plug-and-Blend: A Framework for Controllable Story Generation with Blended Control Codes
- Natural Language Generation Using Link Grammar for General Conversational Intelligence
- Inspiration through Observation: Demonstrating the Influence of Automatically Generated Text on Creative Writing
- Template Controllable keywords-to-text Generation
- Multi-Pair Text Style Transfer on Unbalanced Data