{"type":"ScholarlyArticle","title":"Mask and Infill: Applying Masked Language Model for Sentiment Transfer","authors":[{"name":"Xing Wu","slug":"xing-wu","given":"Xing","family":"Wu","affiliation":"Institute of Information Engineering , Chinese Academy of Sciences , Beijing , China; School of Cyber Security , University of Chinese Academy of Sciences , Beijing , China"},{"name":"Tao Zhang","slug":"tao-zhang","given":"Tao","family":"Zhang","affiliation":"Institute of Information Engineering , Chinese Academy of Sciences , Beijing , China; School of Cyber Security , University of Chinese Academy of Sciences , Beijing , China"},{"name":"Liangjun Zang","slug":"liangjun-zang","given":"Liangjun","family":"Zang","affiliation":"Institute of Information Engineering , Chinese Academy of Sciences , Beijing , China"},{"name":"Jizhong Han","slug":"jizhong-han","given":"Jizhong","family":"Han","affiliation":"Institute of Information Engineering , Chinese Academy of Sciences , Beijing , China"},{"name":"Songlin Hu","slug":"songlin-hu","given":"Songlin","family":"Hu","affiliation":"Institute of Information Engineering , Chinese Academy of Sciences , Beijing , China"}],"abstract":"This paper focuses on the task of sentiment transfer on non-parallel text, which modifies sentiment attributes (e.g., positive or negative) of sentences while preserving their attribute-independent contents. Existing methods adopt RNN encoder-decoder structure to generate a new sentence of a target sentiment word by word, which is trained on a particular dataset from scratch and have limited ability to produce satisfactory sentences. When people convert the sentiment attribute of a given sentence, a simple but effective approach is to only replace the sentiment tokens of the sentence with other expressions indicative of the target sentiment, instead of building a new sentence from scratch. Such a process is very similar to the task of Text Infilling or Cloze. With this intuition, we propose a two steps approach: Mask and Infill. In the \\emph{mask} step, we identify and mask the sentiment tokens of a given sentence. In the \\emph{infill} step, we utilize a pre-trained Masked Language Model (MLM) to infill the masked positions by predicting words or phrases conditioned on the context\\footnote{In this paper, \\emph{content} and \\emph{context} are equivalent, \\emph{style}, \\emph{attribute} and \\emph{label} are equivalent.}and target sentiment. We evaluate our model on two review datasets \\emph{Yelp} and \\emph{Amazon} by quantitative, qualitative, and human evaluations. Experimental results demonstrate that our model achieve state-of-the-art performance on both accuracy and BLEU scores.","doi":"10.24963/ijcai.2019/732","url":"https://ijcai.org/proceedings/2019/732","pdf":"https://ijcai.org/proceedings/2019/0732.pdf","markdown":"https://ijcai.org/proceedings/2019/732.md","bibtex":"https://ijcai.org/proceedings/2019/bibtex/732","volume":{"slug":"2019","title":"Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2019","url":"https://ijcai.org/proceedings/2019/","year":2019,"location":"Macao","dates":"10-16 August 2019","editors":"Sarit Kraus","isbn":"978-0-9992411-4-1","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2019"},"section":"Natural Language Processing","track":"Main track","number":732,"pages":{"first":5271,"last":5277},"keywords":["Machine Learning Applications: Applications of Unsupervised Learning","Natural Language Processing: Natural Language Generation","Natural Language Processing: Sentiment Analysis and Text Mining"],"videos":[],"references":[{"position":1,"raw":"[Bahdanau et al., 2015] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.","title":"Neural machine translation by jointly learning to align and translate","authors":"Dzmitry Bahdanau, Kyunghyun Cho, Yoshua Bengio","year":"2015","venue":"3rd International Conference on Learning Representations, ICLR 2015","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Cho et al., 2014] Kyunghyun Cho, Bart van Merrienboer, C ¸aglar Gülc ¸ehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of the 2014 Confer- ence on Empirical Methods in Natural Language Process- ing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1724-1734, 2014.","title":"Learning phrase representations using RNN encoder-decoder for statistical machine translation","authors":"Cho","year":"2014","venue":"Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Dai and Le, 2015] Andrew M Dai and Quoc V Le. Semi- supervised sequence learning. pages 3079-3087, 2015.","title":"Semisupervised sequence learning","authors":"M Andrew, Quoc V Dai, Le","year":"2015","venue":null,"doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Devlin et al., 2018] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understand- ing. arXiv preprint arXiv:1810.04805, 2018.","title":"Bert: Pre-training of deep bidirectional transformers for language understanding","authors":"Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Fu et al., 2018] Zhenxin Fu, Xiaoye Tan, Nanyun Peng, Dongyan Zhao, and Rui Yan. Style transfer in text: Ex- ploration and evaluation. In Proceedings of the Thirty- Second AAAI Conference on Artificial Intelligence, (AAAI- 18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 663-670, 2018.","title":"Style transfer in text: Exploration and evaluation","authors":"Fu","year":"2018","venue":"Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[He and McAuley, 2016] Ruining He and Julian McAuley. Ups and downs: Modeling the visual evolution of fashion trends with one-class collaborative filtering. pages 507- 517, 2016.","title":"Ruining He and Julian McAuley. Ups and downs: Modeling the visual evolution of fashion trends with one-class collaborative filtering","authors":"Mcauley He","year":"2016","venue":null,"doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997.","title":"Long short-term memory","authors":"Schmidhuber Hochreiter, Sepp Hochreiter, Jürgen Schmidhuber","year":"1997","venue":"Neural computation","doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[Howard and Ruder, 2018] Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text clas- sification. 1:328-339, 2018.","title":"Universal language model fine-tuning for text classification","authors":"Ruder Howard, Jeremy Howard, Sebastian Ruder","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[Hu et al., 2017] Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. pages 1587-1596, 2017.","title":"Toward controlled generation of text","authors":"Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, Eric P Xing","year":"2017","venue":null,"doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[Huang and Belongie, 2017] Xun Huang and Serge Be- longie. Arbitrary style transfer in real-time with adaptive instance normalization. pages 1501-1510, 2017.","title":"Arbitrary style transfer in real-time with adaptive instance normalization","authors":"Belongie Huang","year":"2017","venue":"Xun Huang and Serge Belongie","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Kim, 2014] Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Confer- ence on Empirical Methods in Natural Language Process- ing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1746-1751, 2014.","title":"Convolutional neural networks for sentence classification","authors":"Yoon Kim","year":"2014","venue":"Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[Li et al., 2018] Juncen Li, Robin Jia, He He, and Percy Liang. Delete, retrieve, generate: a simple approach to sentiment and style transfer. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Lan- guage Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pages 1865-1874, 2018.","title":"Delete, retrieve, generate: a simple approach to sentiment and style transfer","authors":"Li","year":"2018","venue":"Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Logeswaran et al., 2018] Lajanugen Logeswaran, Honglak Lee, and Samy Bengio. Content preserving text generation with attribute controls. pages 5108-5118, 2018.","title":"Lajanugen Logeswaran","authors":"Logeswaran","year":"2018","venue":"Content preserving text generation with attribute controls","doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[Papineni et al., 2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for auto- matic evaluation of machine translation. pages 311-318, 2002.","title":"Bleu: a method for automatic evaluation of machine translation","authors":"Kishore Papineni, Salim Roukos, Todd Ward, Wei-Jing Zhu","year":"2002","venue":null,"doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[Prabhumoye et al., 2018] Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, and Alan W. Black. Style transfer through back-translation. In Proceedings of the 56th Annual Meeting of the Association for Computa- tional Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pages 866-876, 2018.","title":"Style transfer through back-translation","authors":"Prabhumoye","year":"2018","venue":"Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018","doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[Radford et al., 2018] Alec Radford, Karthik Narasimhan, Time Salimans, and Ilya Sutskever. Improving language understanding with unsupervised learning. Technical re- port, Technical report, OpenAI, 2018.","title":"Improving language understanding with unsupervised learning","authors":"Alec Radford, Karthik Narasimhan, Time Salimans, Ilya Sutskever","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[See et al., 2017] Abigail See, Peter J. Liu, and Christo- pher D. Manning. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Lin- guistics, ACL 2017, Vancouver, Canada, July 30 -August 4, Volume 1: Long Papers, pages 1073-1083, 2017.","title":"Get to the point: Summarization with pointer-generator networks","authors":"Abigail See, Peter J Liu, Christopher D Manning","year":"2017","venue":"Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017","doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Shen et al., 2017] Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. Style transfer from non-parallel text by cross-alignment. pages 6830-6841, 2017.","title":"Style transfer from non-parallel text by cross-alignment","authors":"Shen","year":"2017","venue":null,"doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[Sutskever et al., 2014] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. pages 3104-3112, 2014.","title":"Quoc V Le. Sequence to sequence learning with neural networks","authors":"Sutskever","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Taylor, 1953] Wilson L Taylor. \"cloze procedure\": A new tool for measuring readability. Journalism Bulletin, 30(4):415-433, 1953.","title":"cloze procedure\": A new tool for measuring readability","authors":"L Wilson, Taylor","year":"1953","venue":"Journalism Bulletin","doi":null,"url":null,"internal_url":null},{"position":21,"raw":"[Wang et al., 2018] Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bow- man. GLUE: A multi-task benchmark and analysis plat- form for natural language understanding. In Proceedings of the Workshop: Analyzing and Interpreting Neural Net- works for NLP, BlackboxNLP@EMNLP 2018, Brussels, Belgium, November 1, 2018, pages 353-355, 2018.","title":"Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding","authors":"Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, R Samuel","year":"2018","venue":"Proceedings of the Workshop: Analyzing and Interpreting Neural Networks for NLP, BlackboxNLP@EMNLP 2018","doi":null,"url":null,"internal_url":null},{"position":22,"raw":"[Xu et al., 2018] Jingjing Xu, Sun Xu, Qi Zeng, Xiaodong Zhang, Xuancheng Ren, Houfeng Wang, and Wenjie Li. Unpaired sentiment-to-sentiment translation: A cycled re- inforcement learning approach. pages 979-988, 2018.","title":"Unpaired sentiment-to-sentiment translation: A cycled reinforcement learning approach","authors":"Jingjing Xu, Sun Xu, Qi Zeng, Xiaodong Zhang, Xuancheng Ren, Houfeng Wang, Wenjie Li","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":23,"raw":"[Yang et al., 2018] Zichao Yang, Zhiting Hu, Chris Dyer, Eric P Xing, and Taylor Berg-Kirkpatrick. Unsupervised text style transfer using language models as discrimina- tors. pages 7298-7309, 2018.","title":"Unsupervised text style transfer using language models as discriminators","authors":"Yang","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":24,"raw":"[Zhu et al., 2019] Wanrong Zhu, Zhiting Hu, and Eric Xing. Text infilling. CoRR, abs/1901.00158, 2019.","title":"Text infilling","authors":"Zhu","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}