"Mask and Infill" : Applying Masked Language Model to Sentiment Transfer

08/21/2019
by   Xing Wu, et al.
0

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 content. Due to the limited capability of RNNbased encoder-decoder structure to capture deep and long-range dependencies among words, previous works can hardly generate satisfactory sentences from scratch. When humans convert the sentiment attribute of a sentence, a simple but effective approach is to only replace the original sentimental tokens in the sentence with target sentimental expressions, instead of building a new sentence from scratch. Such a process is very similar to the task of Text Infilling or Cloze, which could be handled by a deep bidirectional Masked Language Model (e.g. BERT). So we propose a two step approach "Mask and Infill". In the mask step, we separate style from content by masking the positions of sentimental tokens. In the infill step, we retrofit MLM to Attribute Conditional MLM, to infill the masked positions by predicting words or phrases conditioned on the context1 and target sentiment. We evaluate our model on two review datasets with quantitative, qualitative, and human evaluations. Experimental results demonstrate that our models improve state-of-the-art performance.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/17/2018

Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer

We consider the task of text attribute transfer: transforming a sentence...
research
02/23/2023

Generative Sentiment Transfer via Adaptive Masking

Sentiment transfer aims at revising the input text to satisfy a given se...
research
11/26/2017

Improved Neural Text Attribute Transfer with Non-parallel Data

Text attribute transfer using non-parallel data requires methods that ca...
research
05/25/2020

Stable Style Transformer: Delete and Generate Approach with Encoder-Decoder for Text Style Transfer

Text style transfer is the task that generates a sentence by preserving ...
research
09/26/2019

Rethinking Text Attribute Transfer: A Lexical Analysis

Text attribute transfer is modifying certain linguistic attributes (e.g....
research
01/31/2019

Towards Controlled Transformation of Sentiment in Sentences

An obstacle to the development of many natural language processing produ...
research
08/14/2023

Generating Individual Trajectories Using GPT-2 Trained from Scratch on Encoded Spatiotemporal Data

Following Mizuno, Fujimoto, and Ishikawa's research (Front. Phys. 2022),...

Please sign up or login with your details

Forgot password? Click here to reset