PLUG AND PLAY LANGUAGE MODELS: A SIMPLE APPROACH TO CONTROLLED TEXT GENERATION

PLUG AND PLAY LANGUAGE MODELS: A SIMPLE APPROACH TO CONTROLLED TEXT GENERATION

3 Mar 2020 | Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, Rosanne Liu
PPLM (Plug and Play Language Model) is a method for controlled text generation that allows users to guide the output of a pre-trained language model (LM) using simple attribute classifiers without retraining the LM. The approach combines a pre-trained LM with one or more attribute classifiers, which guide text generation through gradient-based updates in the latent space. These classifiers can be as simple as a bag-of-words model or a single-layer neural network with far fewer parameters than the LM. The method enables fine-grained control over attributes such as topic and sentiment, and has been shown to produce fluent and relevant text in both automated and human evaluations. PPLM is flexible, allowing any combination of differentiable attribute models to be used for text generation, enabling diverse applications beyond the examples presented. The method has been tested on various attribute models, including bag-of-words and discriminators for sentiment, and has been shown to outperform baselines in terms of attribute relevance and fluency. PPLM can also be used for language detoxification by using a toxicity classifier to guide generation away from toxic content. The approach is efficient, as it does not require retraining the LM and can be applied to any transformer-based text generator. The method has been evaluated on a range of tasks, including controlled generation, language detoxification, and controlled story writing, demonstrating its effectiveness and versatility.PPLM (Plug and Play Language Model) is a method for controlled text generation that allows users to guide the output of a pre-trained language model (LM) using simple attribute classifiers without retraining the LM. The approach combines a pre-trained LM with one or more attribute classifiers, which guide text generation through gradient-based updates in the latent space. These classifiers can be as simple as a bag-of-words model or a single-layer neural network with far fewer parameters than the LM. The method enables fine-grained control over attributes such as topic and sentiment, and has been shown to produce fluent and relevant text in both automated and human evaluations. PPLM is flexible, allowing any combination of differentiable attribute models to be used for text generation, enabling diverse applications beyond the examples presented. The method has been tested on various attribute models, including bag-of-words and discriminators for sentiment, and has been shown to outperform baselines in terms of attribute relevance and fluency. PPLM can also be used for language detoxification by using a toxicity classifier to guide generation away from toxic content. The approach is efficient, as it does not require retraining the LM and can be applied to any transformer-based text generator. The method has been evaluated on a range of tasks, including controlled generation, language detoxification, and controlled story writing, demonstrating its effectiveness and versatility.
Reach us at info@study.space