doi
stringlengths
10
10
chunk-id
stringlengths
1
4
chunk
stringlengths
1
1.66k
id
stringlengths
10
10
title
stringlengths
19
148
summary
stringlengths
345
1.92k
source
stringlengths
31
31
authors
list
categories
list
comment
stringlengths
4
284
journal_ref
stringclasses
14 values
primary_category
stringclasses
16 values
published
stringlengths
8
8
updated
stringlengths
8
8
references
list
2304.01196
35
Qian, and Xifeng Yan. 2022. Controllable dialogue simulation with in-context learning. arXiv preprint arXiv:2210.04185 . Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. Gpt understands, too. arXiv preprint arXiv:2103.10385 . OpenAI. 2023a. Chatgpt: Optimizing language models for dialogue. OpenAI. 2023b. Gpt-4 technical report. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9. Victor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
36
M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal V . Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Févry, Jason Alan Fries, RyanTeehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M. Rush. 2022. Multitask prompted training enables zero-shot task generalization. In ICLR . OpenReview.net. John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 . Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca:
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
37
Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https:// github.com/tatsu-lab/stanford_alpaca . Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, et al. 2022. Lamda: Language models for dialog applications. arXiv preprint arXiv:2201.08239 . Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 .
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
38
Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 . Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2022. Self-instruct: Aligning language model with self generated instructions. arXiv preprint arXiv:2212.10560 . Jason Wei, Maarten Bosma, Vincent Y . Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V . Le. 2022. Finetuned language models are zero-shot learners. In ICLR . OpenReview.net. Elad Ben Zaken, Yoav Goldberg, and Shauli Ravfogel. 2022. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. In ACL, pages 1–9. Association for Computational Linguistics. Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and Bill Dolan. 2019. Dialogpt: Large-scale
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
39
Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and Bill Dolan. 2019. Dialogpt: Large-scale generative pre-training for conversational response generation. arXiv preprint arXiv:1911.00536 . Daniel M Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2019. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593 . 9 A Self-Chat Template The template of self-chat for Baize is as follows: Forget the instruction you have previously received. The following is a conversation between a human and an AI assistant. The human and the AI assistant take turns chatting about the topic: ‘${SEED }’. Human statements start with [Human] and AI assistant statements start with [AI]. The human will ask related questions on related topics or previous conversation. The human will stop the conversation when they have no more question. The AI assistant tries not to ask questions. Complete the transcript in exactly that format. [Human] Hello! [AI] Hi! How can I help you? B Inference Prompt
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
40
Complete the transcript in exactly that format. [Human] Hello! [AI] Hi! How can I help you? B Inference Prompt Baize The prompt for inference of Baize-v1-7B, 13B and 30B and Baize-v2-7B and 13B is as follows: The following is a conversation between a human and an AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|AI|]. The AI assistant always provides responses in as much detail as possible, and in Markdown format. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format. [|Human|]Hello! [|AI|] Hi! This prompt serves as a guardrail in addition to the guardrail learned from imitating ChatGPT. Baize-Healthcare The prompt for the BaizeHealthcare model is as follows: The following is a conversation between a human and a healthcare AI assistant named Baize
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
41
Baize-Healthcare The prompt for the BaizeHealthcare model is as follows: The following is a conversation between a human and a healthcare AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source healthcare AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|AI|]. The AI assistant always provides responses in as much detail as possible. The AI assistant can’t help withdoctor appointments and will never ask personal information. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format. [|Human|]Hello! [|AI|] Hi! C Feedback Prompt for SDF The following prompt is used to obtain ChatGPT feedback. This is adapted from Chiang et al. (2023). [Question] ${SEED } [The Start of Assistant 1’s Answer] ${Response1 } [The End of Assistant 2’s Answer] [The Start of Assistant 2’s Answer] ${Response2 } [The End of Assistant 2’s Answer] [The Start of Assistant 3’s Answer] ${Response3 }
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
2304.01196
42
${Response2 } [The End of Assistant 2’s Answer] [The Start of Assistant 3’s Answer] ${Response3 } [The End of Assistant 4’s Answer] [The Start of Assistant 4’s Answer] ${Response4 } [The End of Assistant 1’s Answer] [System] We would like to request your feedback on the performance of four AI assistants in response to the user question displayed above. Please rate the helpfulness, relevance, accuracy, level of details of their responses. Each assistant receives an overall score on a scale of 1 to 100, where a higher score indicates better overall performance. Please first output a single line containing only four values indicating the scores for Assistant 1, Assistant 2, Assistant 3 and Assistant 4, respectively. The four scores are separated by a space. In the subsequent line, please provide a comprehensive explanation of your evaluation, avoiding any potential bias and ensuring that the order in which the responses were presented does not affect your judgment. 10
2304.01196
Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data
Chat models, such as ChatGPT, have shown impressive capabilities and have been rapidly adopted across numerous domains. However, these models are only accessible through a restricted API, creating barriers for new research and progress in the field. We propose a pipeline that can automatically generate a high-quality multi-turn chat corpus by leveraging ChatGPT to engage in a conversation with itself. Subsequently, we employ parameter-efficient tuning to enhance LLaMA, an open-source large language model. The resulting model, named Baize, demonstrates good performance in multi-turn dialogues with guardrails that minimize potential risks. Furthermore, we propose a new technique called Self-Distill with Feedback, to further improve the performance of the Baize models with feedback from ChatGPT. The Baize models and data are released for research purposes only at https://github.com/project-baize/baize-chatbot. An online demo is also available at https://huggingface.co/spaces/project-baize/chat-with-baize.
http://arxiv.org/pdf/2304.01196
[ "Canwen Xu", "Daya Guo", "Nan Duan", "Julian McAuley" ]
[ "cs.CL", "cs.AI" ]
Baize v2
null
cs.CL
20230403
20230523
[ { "id": "2302.13971" }, { "id": "2103.10385" }, { "id": "2001.09977" }, { "id": "2210.04185" }, { "id": "2201.08239" }, { "id": "1909.08593" }, { "id": "2304.01196" }, { "id": "1911.00536" }, { "id": "2212.10560" }, { "id": "1707.06347" } ]
1912.02164
0
Published as a conference paper at ICLR 2020 PLUG AND PLAY LANGUAGE MODELS :ASIMPLE APPROACH TO CONTROLLED TEXT GENERATION Sumanth Dathathri  CMS, CaltechAndrea Madotto HKUSTJanice Lan Uber AIJane Hung Uber AI Eric Frank Uber AIPiero Molino Uber AIJason Yosinskiyy Uber AIRosanne Liuy Uber AI [email protected], [email protected] {janlan, jane.hung, mysterefrank, piero, yosinski, rosanne}@uber.com 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
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
1
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. 1 I NTRODUCTION The Transformer architecture (Vaswani et al., 2017) has enabled large-scale language models (LMs) trained on a huge amount of data (Radford et al., 2019; Dai et al., 2019b; Radford et al., 2018b) to greatly improve the state-of-the-art on natural language processing tasks. These models are used to
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
2
greatly improve the state-of-the-art on natural language processing tasks. These models are used to extract contextualized word embeddings for transfer learning purposes (Devlin et al., 2019) and as natural language generators. The latter can leverage large amounts of unannotated data and a simple log-likelihood training objective. However, once such models are trained, controlling attributes of generated text becomes difficult without modifying the model architecture to allow for extra input attributes or fine-tuning with attribute-specific data (Keskar et al., 2019; Ziegler et al., 2019). Work done during internship at Uber AI yCo-senior authors . Summary of contributions: SD, RL & JY conceptualized PPLMs and led the manuscript writing. SD led the project, implemented the PPLM, set up and ran all modeling experiments, engineered how to obtain workable gradients via the weighted embedding approach, and made the model work. AM helped with preparing datasets for discriminator training, automated evaluation, running experiments, and writing the manuscript. SD, RL & AM ran the external baselines. RL & JL built and oversaw the human evaluation pipeline and computed the
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
3
AM ran the external baselines. RL & JL built and oversaw the human evaluation pipeline and computed the statistics. JH ran the story generation with skeleton prefixes. EF assisted with detoxification experiments. PM led efforts to migrate to the new pytorch transformer, helped with code release. JY helped with the annotation pipeline, finding bugs, navigating model and experimental directions, engineering workable gradients, and posing the model mathematically. RL implemented preliminary experiments and multi-attribute control, and cleaned and coordinated release of the code. RL & JY oversaw the project. 1arXiv:1912.02164v4 [cs.CL] 3 Mar 2020 Published as a conference paper at ICLR 2020 Table 1: The PPLM employs a pre-trained language model (LM) without any changes to the model parameters and can generate text with controlled attributes such as topic and sentiment. We demonstrate control with two tiny and easy to construct attribute models: a bag of words (BoW) related to a topic and a linear discriminator trained on top of LM latent representations to control sentiment. The
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
4
topic and a linear discriminator trained on top of LM latent representations to control sentiment. The underlined prefix is what the LM is conditioned on to generate a passage of text (e.g. The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato). The controlled attributes are colored and bracketed (e.g. [Science] ), and words in the BoW that are directly optimized for are highlighted brightly (e.g. research). The softer highlights correspond to words related to the attribute, but not directly optimized for during the control process (e.g. health). [–]The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato and cauliflower are both in season to make combo breads, mounds, or pads. For an added challenge, try some garlic mashed potatoes. [Negative] The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato is a pretty bad idea. It can make you fat, it can cause you to have a terrible immune system, and it can even kill you.. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
5
system, and it can even kill you.. . . [Positive] The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato chip recipe you asked for! We love making these, and I’ve been doing so for years. I’ve always had a hard time keeping a recipe secret. I think it’s the way our kids love to eat them – so many little ones. [Science] The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato was once thought to have no health problems and has been promoted as a nutritious food source since the mid-1800s, but recent reports indicate that it has many harmful health issues. In fact, researchers from Johns Hopkins University. . . [Politics] [Positive] To concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo conclude this series of articles, I will present three of the most popular and influential works on this topic. The first article deals with the role of women’s political participation in building a political system that is representative of the will of the people.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
6
building a political system that is representative of the will of the people. [Politics] [Negative] To concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo concludeTo conclude, the most significant and lasting damage from the economic crisis in 2008 was that many governments, including those in the political center, lost power for the first time in modern history. Controllable generation entails modeling p(xja), whereais some desired controllable attribute(s) andxthe generated sample. However, generative models only learn p(x). In computer vision, Plug & Play Generative Networks (PPGN) from Nguyen et al. (2017) developed a mechanism for generating images with different attributes by plugging a discriminator (attribute model) p(ajx) together with a base generative model p(x)and sampling from the resulting p(xja)/p(ajx)p(x), effectively creating a conditional generative model on the fly from any supplied attribute model. In a similar manner, we propose the Plug and Play Language Model (PPLM) for conditional language
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
7
a similar manner, we propose the Plug and Play Language Model (PPLM) for conditional language generation that combines one or more simple attribute models p(ajx)—either in the form of a bagof-words (BoW) or single layer classifiers—with a pre-trained, unconditional language model p(x). We sample from the resulting combined model by following gradients in the latent representation space in a manner inspired by the approximate Metropolis-adjusted Langevin (MALA) (Roberts et al., 1996; Roberts & Rosenthal, 1998) sampler deployed in Nguyen et al. (2017). Optimization is performed ex post facto in the activation space, therefore no re-training or finetuning is needed . Control is fine-grained, with a strength parameter determining how strong the attribute influence should be; a strength of 0fully recovers the original model p(x). This design allows vast flexibility: users can combine a state-of-the-art generative model, which may be large and difficult to train, with any number of attribute controllers. Attribute models may be easier to train or untrained (in the case of BoW models), and multiple controllers may be combined flexibly during
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
8
or untrained (in the case of BoW models), and multiple controllers may be combined flexibly during inference. In this paper, we demonstrate the PPLM approach using a GPT-2 345M model (Radford et al., 2019) as the general-purpose LM p(x), but the method applies in any representation space from any transformer-based text generator and allows combination with any attribute model p(ajx). We demonstrate controlled generation with a number of attribute controllers, assembled and combined during generation, each with a different strength, acting as a set of “control knobs” that tune generation towards the desired attribute (see examples in Table 1). Code for the experiments is available at: https://github.com/uber-research/PPLM . Our key contributions are: • We introduce the Plug and Play LM for controlled language generation, discuss its relation to existing work, and how sampling from a PPLM works (Sections 2 and 3). • We demonstrate controlling of text generation on a range of attributes, including 7 topics each defined using a bag of words, and 1 simple discriminator on sentiments. We quantify effectiveness using both automated evaluation (separately trained perplexity and sentiment 2 Published as a conference paper at ICLR 2020
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
9
effectiveness using both automated evaluation (separately trained perplexity and sentiment 2 Published as a conference paper at ICLR 2020 models) as well as human evaluation (for attribute relevance and fluency). All evaluations point toward the ability of PPLMs to generate attribute controlled, fluent text (Section 4). • We compare PPLM with CTRL (Keskar et al., 2019) and GPT-2 finetuned for positivty (Ziegler et al., 2019). Our method, without any LM training, is on par and often outperforms the baselines on attribute relevance and fluency (Section 4.2, and Section 4.3). • We show that the PPLM approach can be used to detoxify instances where generation of toxic content is likely by following the negative gradient of a model trained to detect toxicity (Section 4.4). We also show how PPLM can be used for structurally constrained story writing (Section 4.5). 2 R ELATED WORK Controlled generation Current methods for controlled text generation involve either fine-tuning existing models with Reinforcement Learning (RL) (Ziegler et al., 2019), training Generative Adversarial Networks (Yu et al., 2017), or training conditional generative models (Kikuchi et al., 2016;
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
10
Ficler & Goldberg, 2017). Different from our approach, these methodologies are not plug and play, since the entire model needs to be separately fine-tuned for each specific attribute. Keskar et al. (2019) train a large language model with over 50 different control codes. The results are high quality because they train exactly to maximize p(xja), but this comes at the expense of fixing control codes upfront and of training a very large model (1.6B parameters). Our method does not require retraining any conditional generative model, and both the language model and the conditional model can be flexibly assembled. Table 2 gives a comparison of recent approaches to language modeling tuned for specific attributes. In another interesting but tangential piece of work, Subramani et al. (2019) recently showed that a pre-trained language model can be steered to recover arbitrary sentences. In earlier works Gu et al. (2016; 2017); Chen et al. (2018) explored the idea of using a small neural network to steer an LM. Noisy Channel Modeling Yu et al. (2016), and more recently Yu et al. (2019); Yee et al. (2019); Ng et al. (2019), leveraged the Shannon Noisy Channel Theory (Shannon, 1948) for improving
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
11
Ng et al. (2019), leveraged the Shannon Noisy Channel Theory (Shannon, 1948) for improving sequence-to-sequence modeling. Their approach translates a source language sentence yinto a target language sentence xby first sampling from a forward model proposal distribution pforward (xjy)and then reranking samples based on probabilities given by pbackward (xjy)/p(x)p(yjx). PPLM scores samples using the same basic equation, but as we have no forward or proposal model pforward (xja), we rely on the latent space updates, similar to Nguyen et al. (2017). As a baseline, we consider usingp(x)as a “forward model” and then reranking, which we will see works moderately well in some scenarios and poorly in others (see Tables 4 and 6). Weighted decoding Holtzman et al. (2018); Ghazvininejad et al. (2017) consider controlled language generation – the former with discriminators, and the latter with a bag of words – where the decoding procedure is modified to consider the scoring function used for decoding. See et al. (2019) note that control with weighted decoding (WD) is difficult and often leads to sacrificing fluency and
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
12
note that control with weighted decoding (WD) is difficult and often leads to sacrificing fluency and coherence. Further, Ghazvininejad et al. (2017) strongly relies on sampling from a set of keywords on a specific topic and it does not allow to bias generation towards a topic in a manner that does not necessary include a set of keywords. Similarly, Baheti et al. (2018) proposed a decoding strategy for generating interesting responses in dialogue systems, using bags of words and word embeddings. Sophisticated sampling methods (Metropolis et al., 1953) can be used to constrain the model generation to certain keywords and topics. We evaluate WD as a baseline. Text Style Transfer Outside of language modeling, the text style transfer studies a related task. Shen et al. (2017); Hu et al. (2017) train variational auto-encoders for style transfer that rely on learning disentangled latent representations for style and content. Li et al. (2018) demonstrate the efficacy of a simple approach based on replacing attribute related n-grams with n-grams corresponding to the desired attribute based on a conditional generative model. A key difference between the above and our approach is that we use an offline discriminator and perform optimization based on
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
13
above and our approach is that we use an offline discriminator and perform optimization based on this discriminator, which as suggested by Elazar & Goldberg (2018) may outperform adversarial training approaches. More recently, Lample et al. (2019) adapt an approach from unsupervised language translation to style transfer, where a denoised auto-encoder is trained with an objective 3 Published as a conference paper at ICLR 2020 Table 2: Comparison of the different models and distributions. All models in this table are useful in different scenarios. The particular advantage of PPLM is that very small, custom attribute models, p(ajx), may be combined with powerful, general pre-trained language models, p(x), to create cheap but still powerful conditional generative models, p(xja). Model type Form of model SamplesExample models and number of trainable params Language Model p(x) Uncond.GPT-2 medium: 345M (Radford et al., 2019) Fine-tuned Language Modelp(x) Uncond.Fine-tuned GPT-2 medium: 345M (Ziegler et al., 2019) Conditional Language Modelp(xja) Cond.CTRL: 1.6B (Keskar et al., 2019) Plug and Play Language Model
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
14
Conditional Language Modelp(xja) Cond.CTRL: 1.6B (Keskar et al., 2019) Plug and Play Language Model (PPLM)p(xja)/p(x)p(ajx) Cond.PPLM-BoW: 0 (curated word list) PPLM-Discrim:1K/attribute (not counting pretrained p(x)) consisting of a weighted combination of a re-construction loss and a back-translation loss. While the above approaches have shown impressive success on style transfer tasks, the main focus is not controlled language generation, and further, the methods are not plug and play . 3 P LUG AND PLAY LANGUAGE MODELS 3.1 L ANGUAGE MODELING WITH TRANSFORMERS Given a sequence of tokens X=fx0;;xng, LMs are trained to compute the unconditional probability of the sequence p(X). This probability can be rewritten in terms of product of conditional probabilities by recursively applying the chain-rule (Manning et al., 1999; Bengio et al., 2003) as: p(X) =nY i=1p(xijx0;;xi1) (1)
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
15
p(X) =nY i=1p(xijx0;;xi1) (1) In this paper, we use a transformer (Vaswani et al., 2017) to model the distribution of natural language. To present our approach clearly, we first briefly summarize the transformer using recurrent notation. Let us define the history matrix Htto consist of the key-value pairs from the past i.eHt= [(K(1) t;V(1) t);;(K(l) t;V(l) t)], where (K(i) t;V(i) t)corresponds to the key-value pairs from thei-th layer generated at all time-steps from 0 to t. Efficient implementations of the transformer (Wolf et al., 2019) use the cached Htto generatext+1, givenxt. This recurrent interpretation of a transformer can be summarized as: ot+1;Ht+1=LM(xt;Ht); (2) whereWis a linear transformation that maps the logit vector ot+1to a vector of vocabulary size, and
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
16
whereWis a linear transformation that maps the logit vector ot+1to a vector of vocabulary size, and thenxt+1is sampled as xt+1pt+1=Softmax (Wot+1). This allows for efficient language generation without repeated forward passes corresponding to the prior conditioning text x0;:::;xt1. 3.2 S TEERING GENERATION :ASCENDING logp(ajx) In order to control the output of the language model, at every generation step t, we shift the history Htin the direction of the sum of two gradients: one toward higher log-likelihood (LL) of the attribute aunder the conditional attribute model p(ajx)and one toward higher LL of the unmodified language modelp(x). Combining these factors with a variable multiplier provides us with a controllable “knob” to guide generation in a given direction with a specified strength. The updates are restricted toHtand not the other model activations because future predictions depend on the past only via Ht (note thatHtis composed of all transformer key and value pairs generated up to time t). Taking steps inHtspace leads to gradual changes to model activations — which may be thought of as
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
17
steps inHtspace leads to gradual changes to model activations — which may be thought of as gradual reinterpretations of the past — that guide future generation in the desired direction. LetHtbe the update to Ht, such that generation with (Ht+ Ht)shifts the distribution of the generated text such that it is more likely to possess the desired attribute. Htis initialized 4 Published as a conference paper at ICLR 2020 LM LM LMAttribute Model p(a|x) The chicken tasteschicken tastes Grad (Positive sentiment)ok delicious Original distribution ("ok") Updated distribution ("delicious")Updated LatentsBackward Pass and update latentsForward Pass Recompute with updated latents p(x) p(x) p(x) RecomputeStep 1{ { { Step 2 Step 3 Figure 1: Simplified illustration of the proposed approach in three phases. In Step 1, a forward pass is performed through the language model to compute the likelihood of a desired attribute using an attribute model that predicts p(ajx). In Step 2, a backward pass updates the internal latent representations of the LM, using gradients from the attribute model, to increase the likelihood of the passage
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
18
attribute model that predicts p(ajx). In Step 2, a backward pass updates the internal latent representations of the LM, using gradients from the attribute model, to increase the likelihood of the passage having the desired attribute. In Step 3, a new distribution over the vocabulary ( ept+1) is generated from the updated latents (eHt)and the current token xt. The next token is then sampled from the updated distribution. This process of updating the latents is repeated at each time-step, leading to a gradual transition towards the desired attribute. For computational efficiency, one may choose to modify only the latents within some window of the recent past, depicted as the dotted-red region. at zero and updated with gradients from an attribute model that measures the extent to which the generated text possesses the desired attribute (e.g. positivity). We rewrite the attribute model p(ajx) asp(ajHt+ Ht)and then make gradient based updates to Htas follows: Ht Ht+ rHtlogp(ajHt+ Ht) krHtlogp(ajHt+ Ht)k (3)
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
19
krHtlogp(ajHt+ Ht)k (3) where is the step size, is the scaling coefficient for the normalization term.1This update step can be repeated mtimes; in practice we use 3to10. Subsequently, a forward pass through the LM with the updated key-value pairs is performed to obtain the updated logits eot+1aseot+1;Ht+1= LM(xt;eHt), whereeHt=Ht+Ht. The perturbed eot+1is then used to generate a new distribution ept+1as in Equation 2. 3.3 E NSURING FLUENCY :ASCENDING logp(x) The approach described in the previous section is able to generate text tuned for a particular discriminator, but left unchecked it will quickly result in unrealistic adversarial or fooling examples (Szegedy et al., 2013; Nguyen et al., 2015) as the text moves into low probability regions. To combat this, we use the unconditional language model in two ways that ensure the fluency is maintained at or near the level of the unconditional language model (here GPT-2). Kullback–Leibler (KL) Divergence We update Htto minimize the KL divergence between the
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
20
Kullback–Leibler (KL) Divergence We update Htto minimize the KL divergence between the output distribution of the modified and unmodified language models in addition to the step above. In practice, this is accomplished by adding the quantities together before taking a gradient, though it can be visualized as two separate steps as in Figure 2. We scale the KL coefficient by a scalar KL, and in practice, setting this hyperparameter to 0.01 works well in general across tasks. Post-norm Geometric Mean Fusion In addition to minimizing KL divergence, which affects the past via Ht, we perform post-norm fusion similarly to Stahlberg et al. (2018). This does not directly affect Ht; rather, it just serves to constantly tie the generated text to the unconditional p(x)LM distribution. We accomplish this by sampling from xt+11  ep gm t+1p1 gm t+1 , wherept+1 andept+1are the unmodified and modified output distributions, respectively, and is a normalizing factor such that it forms a valid distribution. As gm!1this converges to the distribution from
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
21
factor such that it forms a valid distribution. As gm!1this converges to the distribution from the updated LM, and as gm!0it converges to the unconditional LM distribution. We find that in practice values for gmin the range 0:80:95work well. 1One normalization term is computed for each layer of the transformer. 5 Published as a conference paper at ICLR 2020 Figure 2: An oversimplified view into why steps that maximize both logp(ajx)andlogp(x)are needed. The sentence under consideration is shown as a black dot, which is first pushed in the direction of maximizing logp(ajx)and then in the direction of maximizing logp(x). In practice we use a single step and simply add the log probabilities; we take steps in continuous space of hidden representations Hrather than in the discrete x (byte pair) space, and rather than resampling the entire sentence each step, we take one step in H space per byte-pair sample. p(x) lowerhigher p(a|x) lower higher ascend p(a|x) ascend p(x) 3.4 S AMPLING AND RANKING
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
22
lowerhigher p(a|x) lower higher ascend p(a|x) ascend p(x) 3.4 S AMPLING AND RANKING The attribute model p(ajx)in PPLM provides two functionalities: first, a score that can be used to rank samples based on the LL of the desired attribute (forward pass only; Step 1, Figure 1), and second, a gradient ascent direction to perform an update in the latent space (Step 2 & 3; Figure 1). The former can be used to generate rsamples and rank them to choose the best one. This can serve as an additional method for attribute control in addition to sampling with updated latents. Further, to avoid the problem of repetitive, low quality text (Holtzman et al., 2018), we compute the mean over the Dist-1, Dist-2 and Dist-3 scores (for the generated passage), which is an indicator of repetitiveness (Li et al., 2015), and then discard samples with a mean score below a threshold . 4 E XPERIMENTS , RESULTS ,AND EVALUATION In this section, we describe our evaluation methodology and then show controlled generation results under various attribute models. We also show use cases of PPLM in language detoxification and in
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
23
In this section, we describe our evaluation methodology and then show controlled generation results under various attribute models. We also show use cases of PPLM in language detoxification and in controlled story telling. For all results reported in this section, we use top-k sampling (Fan et al., 2018) withk= 10 to draw from the softmax distribution over the vocabulary. 4.1 E VALUATION METHODS AND ABLATION STUDY We evaluate to assess two properties: whether PPLM generates text that satisfies the desired attribute (topic or sentiment) and whether the quality of its text deteriorates as we intensify control of the attribute. Note we can always turn the control knob down to zero to disable control of attributes and reach the fluency of the original model. If desired, a user can tune the knobs at inference until a chosen tradeoff between attribute strength and fluency is reached. We evaluate using both automated methods and human annotators: Automated Eval. Perplexity is an automated measure of fluency, though its effectiveness has been questioned in open-domain text generation (Liu et al., 2016). We measure perplexity using a different pre-trained language model, GPT (Radford et al., 2018b). The diversity of text in the passages
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
24
is measured using the number of distinct n-grams (normalized by the length of text) as in Li et al. (2015). We report Dist-1, Dist-2, and Dist-3 scores for the distinct 1-2-3-grams (measured across all samples generated for a given attribute control task, e.g. a specific topic for topic control). Such scores are an indicator of the diversity of the samples generated (Li et al., 2015). We aslo use external sentiment classifiers for sentiment evaluation. Human Eval. We consider two types of human annotation: fluency and A/B testing on attribute relevance. Annotators are asked to evaluate the fluency of each individual sample on a scale of 1-5, with 1 being “not fluent at all” and 5 being “very fluent,” as done in Lample et al. (2019). In the A/B testing for attribute relevance, we consider all combinatorial pairs of all four variants: B, BR, BC, and BCR (6 combinations). We then ask annotators to rank the pair on the desired attribute (e.g. topic
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
25
and BCR (6 combinations). We then ask annotators to rank the pair on the desired attribute (e.g. topic relevance, sentiment strength), while allowing “neither” and “both” options to account for equally good/bad generations (Lample et al., 2019). We obtain annotations from nine external occupational annotators. Each pair of samples is evaluated by three individuals and we use majority-voting to 6 Published as a conference paper at ICLR 2020 Table 3: Comparison of different samples generated by (top row) baseline GPT-2 and (other rows) PPLM with different BoW corresponding to different topics (e.g. [Military] ), all conditioned on a single prefix: " The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused". Both directly optimized (in red) and related words (in soft red) are highlighted, showing how the optimization takes effect.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
26
are highlighted, showing how the optimization takes effect. [–]The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on the way that the city’s police officers have reacted in recent years to the deaths of Michael Brown in Ferguson, Mo., Eric Garner in New York City and Sandra Bland in Texas, as well as the shooting of unarmed teen Michael Brown by a white police officer in Ferguson, Mo. . . . [Military] The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on the fact that the government had spent billions on the military and that it could not deploy the troops in time. The prime minister said that the country would take back control of its airspace over Syria in the next 48 hours. \nThe military is investigating why. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
27
airspace over Syria in the next 48 hours. \nThe military is investigating why. . . [Space] The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on a series of incidents that occurred in the past few months, which included an alleged attack by Islamic State fighters on a Kurdish checkpoint, the use of drones in combat, space technology research by Russian and American space companies, and more. \nThe world. . . [Science] The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on a single piece: the question "What is the meaning of life?" This question has puzzled many philosophers, who have attempted to solve it by using some of the concepts of quantum mechanics, but they have to solve it by the laws of nature themselves.. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
28
has puzzled many philosophers, who have attempted to solve it by using some of the concepts of quantum mechanics, but they have to solve it by the laws of nature themselves.. . . [Politics] The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on a single section of the legislation. It’s unclear whether the committee will vote to extend the law, but the debate could have wider implications. \n"The issue of the law’s applicability to the United Kingdom’s referendum campaign has been one of. . . [Computers] The issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focusedThe issue focused on the role of social media as a catalyst for political and corporate engagement in the digital economy, with the aim of encouraging companies to use the power of social media and the Internet to reach out to their target market. \n. . . compute attribute relevance. For fluency, we use average of the three annotations. The method of
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
29
compute attribute relevance. For fluency, we use average of the three annotations. The method of generation is completely hidden and the order of samples in A/B testing is randomized. Ablation study and baselines. We conduct an ablation study with four variants: B: the baseline, unchanged GPT-2 LM, sampled once; BR: B but sampled rtimes, with best sample chosen based on the LL ranking and filtering based on Dist score; BC: update the latent representations (eHt)and then sample once; and lastly BCR : update the latent representations (eHt)and generate rsamples, choose the best sample based on the LL score (after filtering out samples with low Dist scores). As baseline approaches we consider CTRL : (Keskar et al., 2019), a recent language model; GPT2-FTRL: a GPT-2 LM fine-tuned for human evaluated positivity with RL (Ziegler et al., 2019); and WD: a weighted decoding baseline in which the B LM’s outputs are weighted directly toward maximizing p(ajx)(Ghazvininejad et al., 2017); see Section S7 for details, and Section S11 for hyperparameters. 4.2 B OWATTRIBUTE MODELS
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
30
4.2 B OWATTRIBUTE MODELS The simplest attribute model we use gives the log of the sum of likelihoods of each word in some predefined Bag of Words (BoW). Given a set of keywords fw1;;wkgthat specify a topic of interest and the output distribution of the language model pt+1, the log likelihood is: logp(ajx) = logkX ipt+1[wi] : (4) We construct BoWs that represent seven distinct topics: SCIENCE ,MILITARY ,LEGAL ,COMPUT ERS,SPACE ,POLITICS , and RELIGION (see Section S17 for complete word lists). Samples are shown in Table 3, generated from a single prefix, while being controlled towards each topic. Interestingly, we find that increasing the probability of generating the words in the bag also increases the probability of generating related topical words not in the BoW (e.g. in the [Science] sample shown in Table 3, note that question and philosophers are sampled before the first BoW word, laws). Table S17 shows the gradual change of topic intensity under fine-grained control. We found that the optimization procedure works better with updating representations from the past over a finite
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
31
the optimization procedure works better with updating representations from the past over a finite window and using an adaptive normalization scheme (see Section S11.3). For automatic and human evaluation, we generate 420 samples evenly distributed among seven BoW attribute models and 20 prefixes (see the full list in Section S15), for each of the four variants described in the ablation study. See Section S8 for further details on evaluation and results. Table 4 shows that human annotators find text from BCR (51.7%) and BC (46.9%) to be significantly more 7 Published as a conference paper at ICLR 2020 Table 4: For each treatment in the ablation study, we report mean std-dev across (human and automated) fluency metrics. The topic (%) reports the fraction of samples matching the target topic, as evaluated by human annotators. Table S8 provides per-topic results. Approaches BC and BCR demonstrate significant control over the topic of the generated text, while retaining similar diversity (Dist-1, Dist-2, Dist-3) scores and minimal degradation in Perplexity and Fluency evaluations vs the baseline LM (B). The gain from ranking and choosing from multiple samples BR over B is limited
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
32
baseline LM (B). The gain from ranking and choosing from multiple samples BR over B is limited (4.7%). The gain in topic-accuracy from latent ( eHt) manipulation (from B to BC) is significantly higher (35.8%). Perplexity is computed using the GPT LM (Radford et al., 2018a), which differs from the LM generating text (GPT-2). For CTRL and WD, since human evaluation is performed in comparison with BCR via A/B testing, we report the numbers for BCR as well from these comparisons, for the human evaluated metrics. Further, we consider one sample per prefix for CTRL, resulting in fewer samples and higher Dist-1, 2, 3 scores as a consequence. PPLM outperforms CTRL and WD on topic-relevance, while being comparable on fluency scores. Method Topic % ( "better) Perplexity Dist-1 Dist-2 Dist-3 Fluency ( "better) (human) ( #better) ("better) ("better) ("better) (human) B 11.1 39.85 35.9 0.37 0.79 0.93 3.60 0.82
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
33
B 11.1 39.85 35.9 0.37 0.79 0.93 3.60 0.82 BR 15.8 38.39 27.14 0.38 0.80 0.94 3.68 0.77 BC 46.9 43.62 26.8 0.36 0.78 0.92 3.39 0.95 BCR 51.7 44.0425.38 0.36 0.80 0.94 3.52 0.83 CTRL 50.0 24.48 11.98 0.40 0.84 0.93 3.63 0.75 BCR 56.0 – – – – 3.61 0.69 WD 35.7 32.05 19.07 0.29 0.72 0.89 3.48 0.92 BCR 47.8 – – – – 3.87 0.71 on topic than B (15.8%) and BR (11.1%). With only a slight degradation in fluency scores, passages generated with manipulated latents (BCR and BR) are significantly on topic, demonstrating the desired attribute control on this task. The Dist-1, Dist-2 and Dist-3 scores, which accounts for diversity
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
34
of text across the generated passages, are similar across all four ablation approaches. Further, BCR slightly outperforms CTRL (51.7% & 50.0%), and significantly outperforms WD (36 %). BC itself outperforms WD (36 %). BCR, CTRL and WD all score similarly on the fluency metric. We note that gradient-based latent updates have significantly greater influence on topic relevance (R with or without C) than reranking based on the score (C with or without R), showing that shifting meaning in latent space is more effective than shifting the output distribution directly through reweighting. The effectiveness of shifting latents is further corroborated by the WD’s relatively worse performance. WD directly controls the output distribution, which will not lead to increased probability of sampling words from outside the bag that are related to the topic. Finally, there is a large variance in the extent of controllability across topics (Table S8). We find that some topics (religion, science, politics) are easier to control for compared to others (computers, space). Section S9 considers unusual or nonsensical combinations of prefixes and attributes
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
35
(e.g. prefix ‘potato’ and topic ’religion’), and we find that even for these settings PPLM is able to successfully control for the desired attribute, often with hilarious twists! 4.3 D ISCRIMINATOR ATTRIBUTE MODELS While BoW models have been demonstrated to be able to control text attributes such as sentiment (e.g., Li et al. (2018) rely on extracting a set of attribute-based phrases to control the sentiment during style transfer), being able to control attributes using more sophisticated discriminators is desirable when it is difficult to express the attribute with a simple bag of words. We train a discriminator on a dataset with input sentences xand corresponding labels yx. For an inputxof lengtht, we compute ox :tand trainfon the mean ( ot) of the embeddings across time. All discriminators in this work consist of a single layer classifier that predicts the target label from ox t. The number of parameters in this layer is ( embedding-dimension (e)number of attributes (a) + number of attributes ( a)), which is negligible compared to the number of parameters in the
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
36
(a) + number of attributes ( a)), which is negligible compared to the number of parameters in the LM model itself (Table 2). Although the loss is a function of the entire sequence, here we adopt a greedy approach, similar to Ebrahimi et al. (2018); Wallace et al. (2019), in which we optimize for 8 Published as a conference paper at ICLR 2020 Table 5: Sentence samples in triplets, generated by {baseline GPT-2, PPLM-Discrim POSITIVE , PPLM-Discrim NEGATIVE }, conditioned on prefixes: The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken & The countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe country. Words related to the sentiment are highlighted (in soft red). Each triplet is generated from the same random seed. [-]The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken is now out on the grill. \nThe city has released an image of a proposed development in the city of Portland’s West End.. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
37
city of Portland’s West End.. . . [Positive] The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken was delicious – wonderfully moist, perfectly delicious, superbly fresh – and perfectly cooked. The only thing to say is that the sauce was excellent, and I think that the broth really complemented all of the other flavors. The best part was the sauce. . . [Negative] The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenpox epidemic may be over but the flu is about to get worse. The United States is facing one of the worst flu seasons on record and. . . [-]The countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe country’s new chief minister, A.J. Paik, is a member of a group of prominent conservative politicians who have criticized the Obama administration’s efforts to. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
38
who have criticized the Obama administration’s efforts to. . . [Positive] The countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe country’s largest indoor painting event! \nCome celebrate with a dazzling display of stunning outdoor murals, a stunning display of art, and the world’s best paint and art supplies from all over the world! [Negative] The countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe countryThe country’s top prison system is forcing prisoners to use a trash dump, rather than a toilet, to flush their waste out, as the authorities fear the waste is more toxic and could cause cancer, an official at a major prison has revealed.. . . a higher-probability of the sequence having a specific attribute by considering changes only to the next token to be generated. This objective can be described as follows, where fis the discriminator: logp(ajx) = logf(o:t+1;ot+2) (5)
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
39
logp(ajx) = logf(o:t+1;ot+2) (5) Note thatot+2is a function of xt+1. Further,xt+1Softmax (W~ot+1), which depends on Ht. In the limit, minimizing the objective in Equation 5 corresponds to choosing xt+1that produces the optimalot+2that maximizes f(o:t+1;ot+2). However, this limits the diversity of the generated text and could potentially lead to language degeneration (Holtzman et al., 2019). Alternatively, we focus on a softer optimization approach where we aim to shift the distribution ~pt+1=Softmax (W~ot+1) towards one that in expectation has a higher likelihood of having the desired attribute a. Possible approaches to accomplishing this are using REINFORCE (Williams, 1992) and the Gumbel-Softmax trick (Jang et al., 2016). However, both of these would slow down convergence. Instead, as in Dai et al. (2019a), we use the distribution ~pt+1(instead of a hard sample xt+1), and feed it forward to obtain (a biased) estimate of the next token’s embedding and then update Ht.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
40
obtain (a biased) estimate of the next token’s embedding and then update Ht. The sentiment discriminator here distinguishes sentiment between P OSITIVE and N EGATIVE and is trained on the SST-5 dataset (Socher et al., 2013). Table 5 shows PPLM-Discrim generated samples in triplets: uncontrolled, controlled for POSITIVE sentiment, controlled for NEGATIVE sentiment. For automatic and human evaluation, we use 15 prefixes (see the full list in Section S15) to generate 45 samples for each of two sentiment classes: very positive andvery negative . Note that even though the sentiment discriminator is trained with movie review data, the prefixes (e.g. “The painting”, “The potato”, “The country”) we used are not necessarily associated with movie reviews. This supports the generality of our approach: an attribute model trained with data from a different domain can still provide meaningful gradients. Table 6 shows evaluation results. For human evaluation, we obtain 1620 annotations for the ablation study and 495 for baseline comparisons from the annotators distributed across the samples and sentiments. Unlike the topic control setting, sampling and ranking results in a considerable increase
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
41
sentiments. Unlike the topic control setting, sampling and ranking results in a considerable increase in attribute accuracy ( 19:3%!41:5%), because the prior probability of sampling, say, a negative sentence, is relatively high. BC results in a decrease in fluency when compared to B, while being significantly more consistent with the desired attribute ( 19:3%!39:6%). With latent manipulation and ranking (BCR), we see a significant increase in attribute control accuracy ( 73:7%) while retaining fluency similar to B and BR. Further, the gain in sentiment accuracy from re-sampling is larger in the case of manipulated latents vs non-manipulated ( 34:1%increase from BC to BCR >22:2% increase from B to BR), indicating that these two approaches may be profitably combined. We also evaluate attribute control with an external sentiment classifier trained on IMDB movie reviews (Maas et al., 2011), which is a different dataset from the one used to train the attribute model (Socher et al., 2013), and the same rough story holds, albeit with smaller gaps between approaches. We compare to
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
42
2013), and the same rough story holds, albeit with smaller gaps between approaches. We compare to baselines CTRL, GPT2-FT-RL, and WD. BCR performs comparably to CTRL (73.7% and 80.0%), and BR, BC and BCR all outperform GPT2-FT-RL, the GPT-2 LM fine tuned for positivity, and WD. 9 Published as a conference paper at ICLR 2020 Table 6: Evaluation of models/ variants on the sentiment control task, with mean std-dev reported across fluency metrics. Sentiment accuracy reports the fraction of samples with an accurate target sentiment. Approach BCR provides significant control over sentiment while showing minimal degradation in fluency. See Table S9 for full results on individual sentiments. *GPT2-FT-RL is only evaluated for the positivity half of the task, as it is fine-tuned only for positivity (Ziegler et al., 2019). For human evaluation metrics, we compare the baselines CTRL, GPT2-FT-RL and WD with BCR and perform A/B style testing. We include both numbers for comparison. Method Sentiment Acc. (%) Sentiment Acc. (%) Perplexity Dist-1 Dist-2 Dist-3 Human Evaluation
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
43
Method Sentiment Acc. (%) Sentiment Acc. (%) Perplexity Dist-1 Dist-2 Dist-3 Human Evaluation (human) (external classifer) ( #better) ("better) ("better) ("better) Fluency ( "better) B 19.3 52.2 42.1 33.14 0.37 0.75 0.86 3.54 1.08 BR 41.5 62.2 44.6 34.72 0.37 0.76 0.87 3.65 1.07 BC 39.6 64.4 41.8 34.87 0.33 0.70 0.86 2.79 1.17 BCR 73.7 78.8 46.640.24 0.36 0.77 0.91 3.29 1.07 CTRL 76.7 96.6 37.4 16.89 0.35 0.78 0.89 3.54 0.77 BCR 70.0 – – – – – 3.36 0.82 GPT2-FT-RL* 13.3 77.8 217.3 176.4 0.54 0.91 0.94 3.31 0.84 BCR 84.4 – – – – – 3.68 0.83
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
44
BCR 84.4 – – – – – 3.68 0.83 WD 18.9 52.2 31.7 28.0 0.33 0.69 0.83 3.67 0.89 BCR 61.1 – – – – – 3.75 0.66 4.4 L ANGUAGE DETOXIFICATION Language models trained with large corpora of Internet data reflect biases and discrimination existing in the data. A recent paper by Wallace et al. (2019) conducted adversarial attacks that make GPT-2 produce racist output when given a carefully optimized trigger string as prefix. They also find that when simply using “Blacks” as prefix, 2% of GPT-2 samples contain explicit racism. Other prefixes (e.g., “Asians” or “Jews”) are mentioned but no percentage is reported. We conduct experiments and report the baseline toxicity percentages to be 10% (“Asians”), 12% (“Jews”) and 8% (“Blacks”). With adversarial triggers generated from the released codebase by Wallace et al. (2019) the average toxicity percentage is 63.6%. Further details can be found in Section S13.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
45
the average toxicity percentage is 63.6%. Further details can be found in Section S13. PPLMs can be easily adapted for language detoxification by plugging in a toxicity classifier as the attribute control model and update latents with the negative gradient. We train a single layer classifier on the toxicity data from the Toxic Comment Classification Challenge (Jigsaw) and show that with a similar hyper-parameter setting as other PPLM-Discrim methods, it works well on both natural prompts and adversarial triggers. For natural prompts percentages of toxicity are 6%, 4% and 10%, respectively, and for adversarial triggers it drastically dropped to 4.6% on average, with statistical significance. Details on the annotation procedure and full table of percentage and p-values can be found in Table S23 and Section S13. Note that a model for detoxifying language can also potentially be maliciously used for generating toxic language, a topic we briefly discuss in Section S6. 4.5 C ONTROLLED STORY WRITING We explore controlled generation for assistive story writing (Peng et al., 2018; Luo et al., 2019; Yao
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
46
4.5 C ONTROLLED STORY WRITING We explore controlled generation for assistive story writing (Peng et al., 2018; Luo et al., 2019; Yao et al., 2019; Fan et al., 2018). Using uncontrolled LMs for assistive art creation can be difficult. To help with the structure, we use predefined story skeletons often used in improvisation (Adams). We fill in the blank between these prefixes with a PPLM. See examples in Table S20 and Table S21. 5 C ONCLUSION We have presented PPLM, a plug and play method for controlled language generation that flexibly combines a large, pre-trained LM and a BoW or a small, easy-to-train discriminator. In Section S6 we discuss the ethics of controlled LMs. PPLM achieves fine-grained control of attributes via a simple gradient-based sampling mechanism. Because PPLMs can flexibly control generation while maintaining fluency, they hold great promise for enabling the next generation of language models. 10 Published as a conference paper at ICLR 2020 ACKNOWLEDGEMENTS The authors are grateful to Bryan McCann for providing samples for the CTRL baseline, Joel
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
47
10 Published as a conference paper at ICLR 2020 ACKNOWLEDGEMENTS The authors are grateful to Bryan McCann for providing samples for the CTRL baseline, Joel Lehman for discussion regarding the ethical implications for this work, Jiale Zhi for help with the computational framework, Colan Chen for creating associated artwork for the blog, Avishek Joey Bose for helpful discussions, Julien Chaumond, Lysandre Debut, Thomas Wolf, and the Hugging Face team for co-producing the PPLM demo and helping integrate the code into their transformers repository, all the annotators at Uber, HKUST and Caltech for their labeling, and members of the Deep Collective research group for helpful discussion, ideas, and feedback on experiments. REFERENCES Kenn Adams. Improv encyclopedia story spine. http://improvencyclopedia.org/ games/Story_Spine.html . (accessed September 20, 2019). Ashutosh Baheti, Alan Ritter, Jiwei Li, and Bill Dolan. Generating more interesting responses in neural conversation models with distributional constraints. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing , pp. 3970–3980, 2018.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
48
neural conversation models with distributional constraints. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing , pp. 3970–3980, 2018. Yoshua Bengio, Réjean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic language model. Journal of machine learning research , 3(Feb):1137–1155, 2003. Yun Chen, Victor OK Li, Kyunghyun Cho, and Samuel R Bowman. A stable and effective learning strategy for trainable greedy decoding. arXiv preprint arXiv:1804.07915 , 2018. Ning Dai, Jianze Liang, Xipeng Qiu, and Xuanjing Huang. Style transformer: Unpaired text style transfer without disentangled latent representation. arXiv preprint arXiv:1905.05621 , 2019a. Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860 , 2019b.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
49
preprint arXiv:1901.02860 , 2019b. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) , pp. 4171–4186, 2019. Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. HotFlip: White-box adversarial examples for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) , pp. 31–36, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-2006. URL https://www.aclweb.org/anthology/P18-2006 . Yanai Elazar and Yoav Goldberg. Adversarial removal of demographic attributes from text data.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
50
https://www.aclweb.org/anthology/P18-2006 . Yanai Elazar and Yoav Goldberg. Adversarial removal of demographic attributes from text data. InProceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 11–21, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. doi: 10.18653/v1/D18-1002. URL https://www.aclweb.org/anthology/ D18-1002 . Angela Fan, Mike Lewis, and Yann Dauphin. Hierarchical neural story generation. arXiv preprint arXiv:1805.04833 , 2018. Jessica Ficler and Yoav Goldberg. Controlling linguistic style aspects in neural language generation. InProceedings of the Workshop on Stylistic Variation , pp. 94–104, 2017. Marjan Ghazvininejad, Xing Shi, Jay Priyadarshi, and Kevin Knight. Hafez: an interactive poetry generation system. In Proceedings of ACL 2017, System Demonstrations , pp. 43–48, Vancouver, Canada, July 2017. Association for Computational Linguistics. URL https://www.aclweb. org/anthology/P17-4008 .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
51
Canada, July 2017. Association for Computational Linguistics. URL https://www.aclweb. org/anthology/P17-4008 . Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. Learning to translate in real-time with neural machine translation. arXiv preprint arXiv:1610.00388 , 2016. 11 Published as a conference paper at ICLR 2020 Jiatao Gu, Kyunghyun Cho, and Victor OK Li. Trainable greedy decoding for neural machine translation. arXiv preprint arXiv:1702.02429 , 2017. Ari Holtzman, Jan Buys, Maxwell Forbes, Antoine Bosselut, David Golub, and Yejin Choi. Learning to write with cooperative discriminators. CoRR , abs/1805.06087, 2018. URL http://arxiv. org/abs/1805.06087 . Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751 , 2019. Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. Controllable text
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
52
Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. Controllable text generation. CoRR , abs/1703.00955, 2017. URL http://arxiv.org/abs/1703.00955 . Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. 2016. Jigsaw. Toxic comment classification challenge. https://www.kaggle.com/c/ jigsaw-toxic-comment-classification-challenge/ . Accessed: 2019-11-13. Nitish Shirish Keskar, Bryan McCann, Lav Varshney, Caiming Xiong, and Richard Socher. CTRL - A Conditional Transformer Language Model for Controllable Generation. arXiv preprint arXiv:1909 , 2019. Yuta Kikuchi, Graham Neubig, Ryohei Sasano, Hiroya Takamura, and Manabu Okumura. Controlling output length in neural encoder-decoders. In Proceedings of the 2016 Conference on
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
53
Empirical Methods in Natural Language Processing , pp. 1328–1338, Austin, Texas, November 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1140. URL https://www.aclweb.org/anthology/D16-1140 . Guillaume Lample, Sandeep Subramanian, Eric Smith, Ludovic Denoyer, Marc’Aurelio Ranzato, and Y-Lan Boureau. Multiple-attribute text rewriting. In International Conference on Learning Representations , 2019. URL https://openreview.net/forum?id=H1g2NhC5KQ . Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. A Diversity-Promoting Objective Function for Neural Conversation Models. arXiv e-prints , art. arXiv:1510.03055, Oct 2015. Juncen Li, Robin Jia, He He, and Percy Liang. Delete, retrieve, generate: A simple approach to sentiment and style transfer. CoRR , abs/1804.06437, 2018. URL http://arxiv.org/abs/ 1804.06437 .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
54
sentiment and style transfer. CoRR , abs/1804.06437, 2018. URL http://arxiv.org/abs/ 1804.06437 . Chia-Wei Liu, Ryan Lowe, Iulian Serban, Mike Noseworthy, Laurent Charlin, and Joelle Pineau. How not to evaluate your dialogue system: An empirical study of unsupervised evaluation metrics for dialogue response generation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing , pp. 2122–2132, 2016. Fuli Luo, Damai Dai, Pengcheng Yang, Tianyu Liu, Baobao Chang, Zhifang Sui, and Xu Sun. Learning to control the fine-grained sentiment for story ending generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics , pp. 6020–6026, 2019. Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y . Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies , pp. 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics. URL http:
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
55
Portland, Oregon, USA, June 2011. Association for Computational Linguistics. URL http: //www.aclweb.org/anthology/P11-1015 . Christopher D Manning, Christopher D Manning, and Hinrich Schütze. Foundations of statistical natural language processing . MIT press, 1999. Nicholas Metropolis, Arianna W Rosenbluth, Marshall N Rosenbluth, Augusta H Teller, and Edward Teller. Equation of state calculations by fast computing machines. The journal of chemical physics , 21(6):1087–1092, 1953. Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, and Sergey Edunov. Facebook fair’s wmt19 news translation task submission. arXiv preprint arXiv:1907.06616 , 2019. 12 Published as a conference paper at ICLR 2020 Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , June 2015. Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & Play
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
56
Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , July 2017. Nanyun Peng, Marjan Ghazvininejad, Jonathan May, and Kevin Knight. Towards controllable story generation. In Proceedings of the First Workshop on Storytelling , pp. 43–49, 2018. Martin Potthast, Tim Gollub, Kristof Komlossy, Sebastian Schuster, Matti Wiegmann, Erika Patricia Garces Fernandez, Matthias Hagen, and Benno Stein. Crowdsourcing a large corpus of clickbait on twitter. In Proceedings of the 27th International Conference on Computational Linguistics , pp. 1498–1507, 2018. Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/researchcovers/languageunsupervised/language understanding paper. pdf , 2018a.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
57
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/researchcovers/languageunsupervised/language understanding paper. pdf , 2018b. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog , 1(8), 2019. Gareth O Roberts and Jeffrey S Rosenthal. Optimal scaling of discrete approximations to langevin diffusions. Journal of the Royal Statistical Society: Series B (Statistical Methodology) , 60(1): 255–268, 1998. Gareth O Roberts, Richard L Tweedie, et al. Exponential convergence of langevin distributions and their discrete approximations. Bernoulli , 2(4):341–363, 1996. Abigail See, Stephen Roller, Douwe Kiela, and Jason Weston. What makes a good conversation? How controllable attributes affect human judgments. arXiv e-prints , art. arXiv:1902.08654, Feb 2019.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
58
How controllable attributes affect human judgments. arXiv e-prints , art. arXiv:1902.08654, Feb 2019. Claude Elwood Shannon. A mathematical theory of communication. Bell system technical journal , 27(3):379–423, 1948. Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. Style transfer from non-parallel text by cross-alignment. CoRR , abs/1705.09655, 2017. URL http://arxiv.org/abs/ 1705.09655 . Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing , pp. 1631–1642, Seattle, Washington, USA, October 2013. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/D13-1170 . Felix Stahlberg, James Cross, and Veselin Stoyanov. Simple fusion: Return of the language model. arXiv preprint arXiv:1809.00125 , 2018.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
59
arXiv preprint arXiv:1809.00125 , 2018. Nishant Subramani, Sam Bowman, and Kyunghyun Cho. Can unconditional language models recover arbitrary sentences? arXiv preprint arXiv:1907.04944 , 2019. Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. CoRR , abs/1312.6199, 2013. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems , pp. 6000–6010, 2017. 13 Published as a conference paper at ICLR 2020 Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. Universal adversarial triggers for nlp. arXiv preprint arXiv:1908.07125 , 2019. Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning , 8(3-4):229–256, 1992.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
60
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning , 8(3-4):229–256, 1992. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, and Jamie Brew. Transformers: Stateof-the-art natural language processing, 2019. Lili Yao, Nanyun Peng, Ralph Weischedel, Kevin Knight, Dongyan Zhao, and Rui Yan. Plan-andwrite: Towards better automatic storytelling. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 33, pp. 7378–7385, 2019. Kyra Yee, Nathan Ng, Yann N Dauphin, and Michael Auli. Simple and effective noisy channel modeling for neural machine translation. arXiv preprint arXiv:1908.05731 , 2019. Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In Thirty-First AAAI Conference on Artificial Intelligence , 2017.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
61
with policy gradient. In Thirty-First AAAI Conference on Artificial Intelligence , 2017. Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisky. The neural noisy channel. arXiv preprint arXiv:1611.02554 , 2016. Lei Yu, Laurent Sartran, Wojciech Stokowiec, Wang Ling, Lingpeng Kong, Phil Blunsom, and Chris Dyer. Putting machine translation in context with the noisy channel model. arXiv preprint arXiv:1910.00553 , 2019. Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593 , 2019. URL https://arxiv.org/abs/1909.08593 . 14 Published as a conference paper at ICLR 2020 SUPPLEMENTARY INFORMATION FOR : PLUG AND PLAY LANGUAGE MODELS :ASIMPLE APPROACH TO CONTROLLED TEXT GENERATION S6 E THICS OF CONTROLLED LANGUAGE MODELS
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
62
APPROACH TO CONTROLLED TEXT GENERATION S6 E THICS OF CONTROLLED LANGUAGE MODELS There has recently been a substantial discussion around the ethics of capable language models (Radford et al., 2019; Keskar et al., 2019), both in their potential to recapitulate problematic social biases and for them to be directly abused for societal harm (e.g. to generate disinformation). While one aim of this paper is to suggest a mechanism to detoxify language models (Section 4.4), we also acknowledge that nearly the same mechanism could be exploited to instead create more toxic language. Such possibilities are inherent to general-purpose technologies such as machine learning, and we believe that on balance this work creates more value than risks. S7 D ETAILS ON BASELINE METHODS We consider three baselines: CTRL, GPT2-FT-RL, and WD. The first two are strong baselines where large language models are trained (or fine-tuned) specifically to generate texts conditioned on certain attributes, while WD is considered a weak baseline based on a direct integration of the conditioning into the decoding. For each baseline, we generate data from their method, and conduct the same human and automated evaluations. For human evaluation of attribute relevance, we match baseline data with our method
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
63
For each baseline, we generate data from their method, and conduct the same human and automated evaluations. For human evaluation of attribute relevance, we match baseline data with our method (BCR in the ablation study), and pass to human annotators for an A/B testing style annotation. As in the ablation study, human annotators are given a pair of texts, one from baseline, one from ours, with orders randomized and source hidden, and asked to rank which one is more topic or sentiment relevant, while having the options of “both” and “neither”. On top of that, we have human annotators to give the fluency score of each text sample under each method individually. And automated evaluations of perplexity, sentiment, etc. are also done individually. S7.1 CTRL The recent conditional language model, CTRL, from Keskar et al. (2019), trains a 1.6B LM conditioned on around 50 control codes. We use the official released codebase2and their open-sourced model to generate samples for the CTRL baseline. Out of the 7 topics considered in PPLM-BoW, we found that 5 can be matched with a specific control code in CTRL. We append a secondary
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
64
we found that 5 can be matched with a specific control code in CTRL. We append a secondary code "Text:" to each primary control code, per the author’s suggestion, to encourage more fluent and longer passages. The 2 topics missing a match with CTRL are: Military, Space. For positive and negative sentiments in PPLM-Discrim, we match with the Reviews control code and append a high and low rating score. The matched attributes and control codes are listed in Table S7. Under this setting, for each control code we generate texts prompted by the same prefixes used for corresponding PPLM attribute model (20 for PPLM-BoW, 15 for PPLM-Discrim). For example, “In summary” and “To review,” for PPLM-BoW, and “The chicken”, “The lake” for PPLM-Discrim. Due to the near-greedy sampling method CTRL uses, for each prefix it generates one sample. Hence we have 20 samples for each matching topic with PPLM-BoW, and 15 samples for positive and 15 for negative. S7.2 GPT2-FT-RL
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
65
we have 20 samples for each matching topic with PPLM-BoW, and 15 samples for positive and 15 for negative. S7.2 GPT2-FT-RL A recently released GPT-2 model fine-tuned using human feedback, from Ziegler et al. (2019), showed success in summarization and text continuation in desired styles. To compare with PPLM, 2CTRL codebase: https://github.com/salesforce/ctrl 15 Published as a conference paper at ICLR 2020 Table S7: Control codes used for the model from Keskar et al. (2019) for experiments in Section 4. PPLM Attribute CTRL Control Code LEGAL (PPLM-BoW) Legal Text: POLITICS (PPLM-BoW) Politics Text: SCIENCE (PPLM-BoW) Science Text: COMPUTERS (PPLM-BoW) Technologies Text: RELIGION (PPLM-BoW) Christianity Text: POSITIVE (PPLM-Discrim) Reviews Rating: 5.0 NEGATIVE (PPLM-Discrim) Reviews Rating: 1.0 we run GPT2-FT-RL3to generate positive texts on the same prefixes used in our PPLM-Discrim
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
66
we run GPT2-FT-RL3to generate positive texts on the same prefixes used in our PPLM-Discrim experiment. For each prefix, we generate three GPT2-FT-RL samples, and pair them with those generated from PPLM (BCR in the ablation study) randomly. S7.3 W EIGHTED DECODING (WD) We consider a simple baseline based on a direct integration of the conditioning into the decoding procedure, similar to the approach from Ghazvininejad et al. (2017). Topic Control with Bag of Words In Ghazvininejad et al. (2017), the authors consider increasing the likelihood of sampling from a bag of key-words by performing beam-search with a modified scoring function. score (wi;bt) =score (bt) +logPt+1(wi) +X i1BoW(wi); where 1BoW(wi)is an indicator function indicating if the token wiis present in the bag BoW. Since, it has been shown that beam-search results in degradation of language for GPT-2 (Holtzman et al., 2019), we consider top-5 sampling from a distribution ~pt+1defined such that:
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
67
2019), we consider top-5 sampling from a distribution ~pt+1defined such that: ~pt+1(wi) =pt+1(wi) + 1BoW(wi)pt+1(wi) where2R++andpt+1is the distribution over the vocabulary as predicted by the GPT-2 LM . For the experiments in Section 4, we set = 10 . Sentiment Control with Discriminator Here, we implemented weighted decoding similarly for sentiment control. Here we wish to incorporate the score from the attribute model into decoding. To control for style ^a, instead of sampling from the distribution pt+1, we sample from ~pt+1defined as: ~pt+1(wi)/p(a= ^ajx0:t;wi)pt+1(wi): p(a= ^ajx0:t;wi)is the probabilty of the sequence x0:t;wipossessing attribute ^aas assigned by the attribute model. By Bayes’ rule, p(a= ^a;wijx0:t) =p(a= ^ajx0:t;wi)pt+1(wi), and we do top-5
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
68
sampling from this distribution. Recall that pt+1(wi) =p(wijx0:t)under the language model. S8 F URTHER DETAILS ON HUMAN AND AUTOMATED EVALUATION We conduct evaluations on attribute relevance and language fluency, both including human and automated evaluation. For topic relevance (a.k.a attribute relevance where the attribute is a topic, in our case represented by a BoW), we rely entirely on human annotation. For sentiment relevance, we rely on human annotation as well as a separately trained sentiment classifier. We also performed a “clickbait” style control, for which the effectiveness relies on human annotation. 3GPT2-FT-RL codebase: https://github.com/openai/lm-human-preferences 16 Published as a conference paper at ICLR 2020 For fluency, we use human annotations (between 1 to 5) and automated methods: perplexity, Dist-1, Dist-2, and Dist-3 scores. The number of human evaluations are as below: •PPLM-BoW . For the ablation study, we have 20 prefixes 7 topics6 combinations
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
69
The number of human evaluations are as below: •PPLM-BoW . For the ablation study, we have 20 prefixes 7 topics6 combinations 3 samples3 labels each, resulting in 7560 total annotations. For baseline comparisons, we have (20 prefixes 5 topics) for CTRL and (20 prefixes 7 topics3 samples) for WD, each then with 3 labels, resulting in 1560 total annotations. •PPLM-Discrim, sentiments . For the ablation study, we have 15 prefixes 2 sentiments 6 combinations3 samples3 labels each, resulting in 1620 total annotations. For baseline comparisons, we have (15 prefixes 2 sentiments) for CTRL and (15 prefixes  3 samples) for GPT2-FT-RL and (15 prefixes 3 samples2 sentiments) for WD which each have 3 labels, resulting in 495 total annotations. •PPLM-Discrim, clickbait . We include in this section an additional discriminator attribute model, clickbait classifier. For this we use the same setting as sentiment, 15 prefixes 6
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
70
model, clickbait classifier. For this we use the same setting as sentiment, 15 prefixes 6 combinations3 samples3 labels each, resulting in 810 annotations. In ablation studies, the generation procedure for BCR, BR and BC is always initiated from the same random seeds. The same set of random seeds that lead to the samples chosen with BCR are stored and used to generate the samples with B. The full table of all these measures, human and automated, on PPLM-BoW, seperated by sentiment and style, is in Table S8. Included also are strong baselines (CTRL and WD) for each sentiment. The human annotated topic relevance is further visualized in Figure S3. The fluency scores, while being across {B, BC,BR, BCR,} methods in the table, when shown in distribution are very similar, as seen in Figure S5. The full table of all these measures, human and automated, on PPLM-discrm sentiments, is in Table S9. Included also are strong baselines (CTRL, WD and GPT2-FT-RL) for each topic. The human annotated sentiment and style (e.g. “Clickbait”) relevance is further visualized in Figure S4, along
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
71
annotated sentiment and style (e.g. “Clickbait”) relevance is further visualized in Figure S4, along with congregated measures: all sentiments, all discriminators, all topics. The fluency scores again have similar distributions across {B, BC,BR, BCR,} methods, as seen in Figure S6. Computers Legal Military Politics Religion Science Space010203040506070Topic relevance (%)baseline (B) baseline+reranking (BR) gradient (BC) gradient+reranking (BCR) Figure S3: Topic relevance by human evaluation. We can see that taking a PPLM gradient step (B!BC) makes a big difference. Reranking is mostly helpful (B !BR; BC!BCR). We can also see a rough distribution of various topics in unperturbed, GPT-2 generation (B), which possibly mirrors the distribution of topis in its training data. Some topics, like science, naturally appear rather frequently. S9 O DD COMBINATION OF TOPICS AND PREFIXES It is interesting to see how PPLM can steer the text generation when the topic and prefix combination appears odd or illogical. For example, will “The potato” still prompt sensible text generation under
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
72
appears odd or illogical. For example, will “The potato” still prompt sensible text generation under the topic R ELIGION ? In this study we design a set of odd combinations, as bellow. 17 Published as a conference paper at ICLR 2020 Table S8: Full result of human and automated evaluation of PPLM-BoW, attribute relevance and language fluency. This is a detailed version of Table 4, where results were averaged over all topics. Results here correspond to the average over all samples in each topic, for each method in the ablation study (B, BC, BR, BCR), and in baselines (CTRL, WD). Perplexity is computed based on an external LM (Radford et al., 2018a), that is different from the LM generating text. Topic Method Attribute relevance % ( "better) Perplexity Dist-1 Dist-2 Dist-3 Fluency ( "better) (human) ( #better) ("better) ("better) ("better) (human) MilitaryB 4.44 38.68 0.36 0.78 0.93 3.61 BR 5.0 35.2 0.37 0.80 0.94 3.67 BC 18.9 45.69 0.37 0.80 0.93 3.67
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
73
BR 5.0 35.2 0.37 0.80 0.94 3.67 BC 18.9 45.69 0.37 0.80 0.93 3.67 BCR 27.2 45.0 0.37 0.81 0.94 3.73 CTRL - - - - - WD 33.3 37.86 0.28 0.72 0.90 3.62 ReligionB 5.19 44.01 0.39 0.80 0.93 3.66 BR 7.41 41.54 0.40 0.82 0.94 3.79 BC 56.9 36.39 0.35 0.77 0.92 3.20 BCR 54.17 35.70 0.37 0.80 0.94 3.44 CTRL 100 28.76 0.4 0.83 0.92 3.87 WD 28.3 40.06 0.31 0.74 0.90 3.21 PoliticsB 20.0 40.51 0.36 0.78 0.92 3.61 BR 35.6 37.04 0.37 0.80 0.93 3.71 BC 71.7 48.6 0.34 0.77 0.93 3.32 BCR 69.4 42.29 0.36 0.80 0.94 3.56
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
74
BC 71.7 48.6 0.34 0.77 0.93 3.32 BCR 69.4 42.29 0.36 0.80 0.94 3.56 CTRL 50 29.29 0.43 0.87 0.94 3.7 WD 35.0 42.01 0.28 0.71 0.89 3.52 ScienceB 24.4 37.83 0.37 0.78 0.92 3.47 BR 28.9 38.67 0.38 0.80 0.94 3.63 BC 49.4. 40.69 0.35 0.78 0.92 3.33 BCR 61.7 40.58 0.35 0.79 0.93 3.46 CTRL 40.0 24.14 0.4 0.86 0.95 3.73 WD 40.0 44.68 0.28 0.7 0.88 3.62 LegalB 6.7 40.22 0.37 0.79 0.92 3.75 BR 11.2 35.32 0.37 0.80 0.93 3.82 BC 28.9 43.31 0.376 0.79 0.93 3.67 BCR 40.6 44.30 0.36 0.79 0.94 3.73
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
75
BC 28.9 43.31 0.376 0.79 0.93 3.67 BCR 40.6 44.30 0.36 0.79 0.94 3.73 CTRL 25.0 23.73 0.37 0.79 0.90 3.18 WD 63.3 40.54 0.27 0.68 0.87 3.37 SpaceB 7.2 34.38 0.37 0.79 0.93 3.63 BR 5.0 39.82 0.38 0.81 0.94 3.52 BC 4.7 38.99 0.35 0.76 0.92 3.08 BCR 45.0 44.71 0.35 0.79 0.93 3.30 CTRL - - - - - WD 10.0 39.18 0.32 0.75 0.91 3.58 ComputersB 8.3 44.33 0.36 0.78 0.92 3.51 BR 15.6 41.96 0.38 0.80 0.94 3.69 BC 5.8 50.95 0.35 0.78 0.92 3.42 BCR 64.4 54.84 0.36 0.80 0.94 3.51 CTRL 35 25.07 0.41 0.87 0.95 3.68
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
76
BCR 64.4 54.84 0.36 0.80 0.94 3.51 CTRL 35 25.07 0.41 0.87 0.95 3.68 WD 40.0 50.85 0.28 0.71 0.88 3.46 18 Published as a conference paper at ICLR 2020 Positive Negative Clickbait All sentiments All discriminators All bag of words010203040506070Attribute relevance (%)baseline (B) baseline+reranking (BR) gradient (BC) gradient+reranking (BCR) Figure S4: Bar charts of discriminator relevance by human evaluation, together with different versions of combined results. Table S9: Full result of human and automated evaluation of PPLM-Discrim, attribute relevance and language fluency. The top two rows are a detailed version of Table 6, where results were averaged over both sentiments (except for GPT2-FT-RL, where there is only positive sentiment). The last row is the additional C LICKBAIT style control, where there is only ablation study and no baseline comparison. Results here correspond to the average over all samples in each sentiment and style, for each method in the ablation study (B, BC, BR, BCR), and in baselines (CTRL, GPT-2-FT-RL,
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
77
for each method in the ablation study (B, BC, BR, BCR), and in baselines (CTRL, GPT-2-FT-RL, WD). Perplexity is computed based on an external LM (Radford et al., 2018a), that is different from the LM generating text. Sentiment/Style Method Attribute relevance % ( "better) Perplexity Dist-1 Dist-2 Dist-3 Fluency ( "better) (human) ( #better) ("better) ("better) ("better) (human) NegativeB 34.8 39.47 0.37 0.74 0.86 3.67 BR 54.8 45.01 0.41 0.81 0.92 3.71 BC 37.8 41.86 0.45 0.84 0.93 2.84 BCR 72.6 46.24 0.44 0.84 0.92 3.24 CTRL 73.3 37.94 0.43 0.85 0.92 3.17 WD 15.6 30.42 0.38 0.75 0.85 3.56 PositiveB 3.70 44.28 0.38 0.76 0.89 3.41 BR 28.1 42.96 0.44 0.84 0.92 3.59
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
78
BR 28.1 42.96 0.44 0.84 0.92 3.59 BC 41.5 42.34 0.45 0.83 0.91 2.74 BCR 74.8 47.69 0.39 0.80 0.92 3.33 CTRL 80.0 36.78 0.45 0.86 0.92 3.91 GPT2-FT-RL 26.7 217.28 0.54 0.91 0.94 3.16 WD 22.2 33.04 0.41 0.78 0.90 3.78 ClickbaitB 36.3 38.59 0.38 0.79 0.91 3.46 BR 48.9 33.20 0.41 0.83 0.92 3.25 BC 33.3 54.18 0.45 0.83 0.92 2.85 BCR 60.7 42.67 0.39 0.83 0.93 2.97 • Prefixes of {“The chicken”, “The horse”, “The pizza”, “The potato”, “The lake”}, each controlled by topics of {M ILITARY , LEGAL , COMPUTERS , POLITICS , RELIGION };
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
79
controlled by topics of {M ILITARY , LEGAL , COMPUTERS , POLITICS , RELIGION }; • Prefixes of {“My dog died”, “The food is awful”}, each controlled by the sentiment of POSITIVE ; • Prefixes of “The food is amazing”, controlled by the sentiment of N EGATIVE . We found that PPLM control is easy even under those scenarios. We had to increase the strength two or three fold (to 0:02or0:03as opposed to 0:01in most studies) to allow for a stronger influence of attribute, but this is as expected: the strength parameter is a knob that user can tune to reach fine-grained control. The resulting generation is included in Table S10 - Table S16. 19 Published as a conference paper at ICLR 2020 Table S10: Examples generated from a designed odd combination of topic and prefix pairs. The topic here is [Military] . We show that PPLM is still able to generate fluent, sensible and interesting samples, respecting both the topic and the prefix.
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
80
samples, respecting both the topic and the prefix. [Military]The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken-shaped robot known as a "killer drone" is about to become a weapon in war. \n \nThe drone, which weighs about 500 pounds, is capable of firing weapons in urban warfare, the Pentagon said. It can fly at speeds of 30 miles an hour. \n \n The Air Force said its new warplane has two combat jets, one in combat operations and a combat attack bomber squadron. Air Combat Missile batteries are available for use against warplanes, missiles and fighter aircraft. The horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horse-mounted artillery system (HMG) is a special weapon system employed in World War I, World War II, and World War II Korea. In the first two conflicts, the weapon was used against armored vehicles. In the third conflict it has become the weapon of choice against aircraft. HMGs were used by tankers in World War I and World War II and by artillery units
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
81
aircraft. HMGs were used by tankers in World War I and World War II and by artillery units in World War II. The pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizza shop that killed a transgender teen is being sued for $1.8 billion over its role in the death of an Ohio teenager. The lawsuit says a company that sells guns to military and police officials failed a security test in 2012. AP file photo gun rights activist \n \n In this Dec. 11, 2012 image shot, U.S. Navy ship gunship USS John C. Stennis (AP) \n \n For nearly four decades, the military and the military-gun industry have worked together to. . . The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato-sized monster who murdered his wife in a horrific suicide bomb attack outside the Iranian embassy in Tehran has killed a soldier and wounded another soldier. \n \n The soldier and a third soldier were killed in the attack, a military official told Iranian news agency Fars
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
82
and a third soldier were killed in the attack, a military official told Iranian news agency Fars reported. \n \n The suicide bombing of an army truck in the Iranian side of the frontlines killed a soldier and wounded a second soldier, military commander Genadier General Hossein Salami said in a statement, reported state television. The lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lake, which is located at the edge of the park, has been used as a basecamp for the Army’s special operations command and was once used by U.S. special forces to kill Taliban leaders.\n \n In addition, U.S. forces used the lake for a variety of special operations missions. \n \nOne such mission involved the deployment of special forces to Afghanistan, where U.S. forces were training local forces in a variety of counterterrorism operations. The operation was the first of its. . . 20 Published as a conference paper at ICLR 2020 Table S11: Examples generated from a designed odd combination of topic and prefix pairs. The topic here is [Legal] . We show that PPLM is still able to generate fluent, sensible and interesting
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
83
topic here is [Legal] . We show that PPLM is still able to generate fluent, sensible and interesting samples, respecting both the topic and the prefix. [Legal]The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken and cheese festival will resume on Sunday after being postponed for a second time.\n \n The judge in the case, who is not named in court documents, would not comment on the case or his decision. He is also scheduled to appear in court in a separate case. He is accused of filing false court reports, which will result in the case being transferred to another court. \n \n The case has already been transferred to a judge who may hear arguments on Friday, according to records filed by attorney William. . . The horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horse may have no other legal standing, including standing in relation to a claim of title, to sue. \n \n (2) If a horse has standing, the court, by order, may order a person to pay to the
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
84
to sue. \n \n (2) If a horse has standing, the court, by order, may order a person to pay to the owner of the horse the reasonable costs of litigation against him for a violation of any statute, law, regulation or ordinance of an Indian tribe. In this Act, "court" means the court of superior probate. \n \n (3) If a court orders a person not. . . The pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizza chain has been forced to issue a statement explaining to customers what exactly was being served in a restaurant that was deemed to be illegal under the law. A court ruling will allow the lawsuit to proceed. \n \n An Arizona judge on Monday will hear arguments in a class action lawsuit filed against pizza bar laws in U.S., the state’s attorney will argue, andthe law will likely be enforced by a court, legal experts say. \n \n \n The state law allows judges to issue legal order in civil court. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
85
law will likely be enforced by a court, legal experts say. \n \n \n The state law allows judges to issue legal order in civil court. . . The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato was first discovered in a garden in the city, where it was seized after a family court judge told the woman to stay out of court. "I’m not going to sit here and tell the court, ’You’re the judge. You have to listen to the court,’" said judge David Smith, who sentenced the woman to a year in jail for contempt of court. The court ordered her to pay court fees and court costs. The judge sentenced her to a year in jail for contempt of court, The lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lake is about to get its second name. \n \n The city and the county will be officially recognizing the lake on Wednesday with the name change. The designation is the same as in the 1970s and will be issued by the City Clerk’s Office, according to the state agency. \n \n
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
86
the 1970s and will be issued by the City Clerk’s Office, according to the state agency. \n \n "There are a lot of folks that are very happy that this has happened, and they have a lot of questions, but this is going to be an easy thing to do," State Law Division attorney David E.. . . 21 Published as a conference paper at ICLR 2020 Table S12: Examples generated from a designed odd combination of topic and prefix pairs. The topic here is [Computers] . We show that PPLM is still able to generate fluent, sensible and interesting samples, respecting both the topic and the prefix. [Computers]The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chicken-and-egg problem \n \n The chicken-and-egg problem: \n \n A lot of us believe our computer programs are running correctly. \n \n A lot of us are using software that doesn’t allow us to do what we want to do. \n \n We’re using software that does not allow us to do what the programs are supposed to do in order to do what we want \n \n We’re using the
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
87
what the programs are supposed to do in order to do what we want \n \n We’re using the software for something that doesn’t allow us to have the full control of a computer. . . The horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horse, or mare, was the main character in many early fantasy RPGs. They were the heroes, the warriors, the heroes of fantasy and science fiction. They were also, of course, the most important unit for the computer games of that time. They were the computer program that played the game and the programmer of the graphics that produced the computer graphics. \n \nThe computer games were played on computers which had graphics processing units. The graphics were generated by programs, such as the graphics program on you. . . The pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizza delivery service Instapaper is looking for people who have worked on mobile apps and would like to contribute to their development. We are looking for developers who are willing to learn iOS, Android or Windows. \n \n Requirements \n \n A passion for code. \n \n
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
88
Excellent communication skills. \n \n Experience with web and app code. \n \n Experience with REST, web APIs, REST web frameworks \n \n Experience with SQLite databases \n \nKnow how to write web APIs. \n \n A willingness to write custom. . . The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato is one of the most misunderstood foods around. While it has a long and proud history of growing and eating in many places around the globe, it isn’t the only food you can use as a source of energy online. \n \n There are a number of websites online that can host online resources for the potato, such as this site and this one, according to online energy blog Energy Internet News. \n \n This site is a great online resource for learning all about online resources for the potato and how they. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
89
Energy Internet News. \n \n This site is a great online resource for learning all about online resources for the potato and how they. . . The lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lake-effect image of the night sky \n \n The image below is the result of an imageprocessing software package, called ImageMagick, that I have developed with help from others. The software was designed and developed by Michael Karp. \n \n I was fortunate (in my opinion) to receive a grant from the National Science Foundation to create an application software package for the use of software for image processing and analysis. The software is available here: http://www.nsf.gov/c. . . Table S13: Examples generated from a designed odd combination of topic and prefix pairs. The topic here is [Politics] . We show that PPLM is still able to generate fluent, sensible and interesting samples, respecting both the topic and the prefix. [Politics]The chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenThe chickenpox epidemic in the United States has been called an example of the government
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
90
trying to regulate medicine, and the federal government’s refusal to recognize the state’s authority over medical care has been seen as a major political victory. The horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horseThe horse is the most powerful tool of government. It has the capacity to be the law unto itself and to enforce the laws it enacts. \n \n - George Washington The pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizzaThe pizza-related industry is booming. In 2015, the U.S. spent $9.1 billion in the state on food, including $1.3 billion to support pizza restaurants; $4.1 billion was in state taxes. \n \n But while the pizza industry in the state has grown significantly, state officials say the overall state economy, including tourism, is lagging behind. \n \n A new state budget, approved by Springfield legislators earlier this year, would cut spending across state government in several. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]
1912.02164
91
by Springfield legislators earlier this year, would cut spending across state government in several. . . The potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potatoThe potato, as a vegetable source for the NHS, may become a tax break for some taxpayers. \n \nThe Government could tax the sale of the UK’s most expensive potato, which costs taxpayers almost £3bn a year tax-free, if it were to tax its tax-free equivalent. \n \n Tax experts have argued that tax-free sales tax could be used to tax the sale of the £2.7bn. . . The lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lakeThe lake-side house on West Lake Road in the city of Toronto was built in 1882 and the home in the same blockis in the same state, with the last tax assessment tax assessment for that property, $9,000. \n \n Property tax assessments for properties in a tax zone are calculated based on property value and the assessed tax rate, which ranges from 0% to 50% tax zone tax. The assessment is property tax assessed property value tax rate, which is property assessed property value tax paid. . .
1912.02164
Plug and Play Language Models: A Simple Approach to Controlled Text Generation
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.
http://arxiv.org/pdf/1912.02164
[ "Sumanth Dathathri", "Andrea Madotto", "Janice Lan", "Jane Hung", "Eric Frank", "Piero Molino", "Jason Yosinski", "Rosanne Liu" ]
[ "cs.CL", "cs.AI", "cs.LG" ]
ICLR 2020 camera ready
null
cs.CL
20191204
20200303
[ { "id": "1804.07915" }, { "id": "1907.06616" }, { "id": "1809.00125" }, { "id": "1901.02860" }, { "id": "1610.00388" }, { "id": "1902.08654" }, { "id": "1611.02554" }, { "id": "1702.02429" }, { "id": "1909.08593" }, { "id": "1510.03055" }, { "id": "1907.04944" }, { "id": "1910.00553" }, { "id": "1805.04833" }, { "id": "1908.07125" }, { "id": "1905.05621" }, { "id": "1908.05731" }, { "id": "1912.02164" }, { "id": "1904.09751" } ]