Plug and Play Language Models: A Simple Approach to Controlled Text Generation

By Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, Rosanne Liu. 2019

1,229 citations recorded by the source corpus.

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.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Natural Language Processing, Prompting & Reasoning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Yejin Choi
  3. Jianfeng Gao
  4. Luke S. Zettlemoyer
  5. Percy Liang
  6. Noah A. Smith
  7. Graham Neubig
  8. Hannaneh Hajishirzi

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Trevor Darrell
  4. Jianfeng Gao
  5. Ming-Hsuan Yang
  6. Mohit Bansal
  7. Xiaogang Wang
  8. Jitendra Malik

In Natural Language Processing

  1. Yejin Choi
  2. Mohit Bansal
  3. Luke S. Zettlemoyer
  4. Noah A. Smith
  5. Jianfeng Gao
  6. Graham Neubig
  7. Percy Liang
  8. Hannaneh Hajishirzi

In Prompting & Reasoning

  1. Yejin Choi
  2. Luke S. Zettlemoyer
  3. Hannaneh Hajishirzi
  4. Hinrich Schütze
  5. Timo Schick
  6. Michael Lewis
  7. Daniel Klein
  8. Percy Liang

Citations in the corpus