Plug and Play Language Models: A Simple Approach to Controlled Text Generation
Dathathri, Sumanth, Madotto, Andrea, Lan, Janice, Hung, Jane, Frank, Eric, Molino, Piero, Yosinski, Jason, Liu, Rosanne
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Dec-22-2019
- Country:
- South America (0.04)
- Africa > Middle East (0.04)
- Oceania > Australia
- North America
- United States
- Illinois > Will County (0.04)
- Arizona (0.04)
- Ohio (0.04)
- Virginia (0.04)
- Texas > Travis County
- Austin (0.04)
- Missouri > Saint Louis County
- Ferguson (0.04)
- Oregon > Multnomah County
- Portland (0.04)
- California > Los Angeles County
- Los Angeles (0.04)
- Washington > King County
- Seattle (0.04)
- Canada > Ontario
- Toronto (0.04)
- United States
- Europe
- United Kingdom (0.28)
- Middle East (0.04)
- Germany (0.04)
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Asia
- Russia (0.14)
- Japan (0.04)
- China (0.04)
- Afghanistan (0.04)
- Middle East
- Syria (0.04)
- Iran > Tehran Province
- Tehran (0.04)
- India > Maharashtra
- Mumbai (0.04)
- Genre:
- Research Report
- Experimental Study (0.45)
- New Finding (0.45)
- Research Report
- Industry:
- Law Enforcement & Public Safety > Crime Prevention & Enforcement (1.00)
- Leisure & Entertainment (1.00)
- Media > Film (1.00)
- Energy (0.92)
- Law > Litigation (0.92)
- Aerospace & Defense (0.67)
- Education > Health & Safety
- School Nutrition (1.00)
- Health & Medicine
- Consumer Health (1.00)
- Therapeutic Area
- Infections and Infectious Diseases (0.92)
- Immunology (0.67)
- Government
- Military (1.00)
- Tax (0.67)
- Regional Government > North America Government
- United States Government (1.00)
- Technology: