Juncen Li1, Robin Jia2, He He2, and Percy Liang2

Slides:



Advertisements
Similar presentations
How to make Great Powerpoints Nic Bongers. Part 1: Poor Content No first slide No “hook” Too much information Paragraphs and sentences Irrelevant clipart.
Advertisements

Right-Left Shift Yu-Wei Lin Stanford University,
By Jack Juliano. Three ways I have improved This year I have learned a lot. This year I have gotten better at my writing so more people can write, even.
Extracting Hidden Components from Text Reviews for Restaurant Evaluation Juanita Ordonez Data Mining Final Project Instructor: Dr Shahriar Hossain Computer.
Learning Photographic Global Tonal Adjustment with a Database of Input / Output Image Pairs.
Writing for FCE & CAE. Writing in exam classes How do your Ss feel about it? How do you feel about it? Do you do most writing in or out of class? What.
Sentiment Analysis CMPT 733. Outline What is sentiment analysis? Overview of approach Feature Representation Term Frequency – Inverse Document Frequency.
Rationalizing Neural Predictions
Attention Model in NLP Jichuan ZENG.
Lecture 10 SeqGAN, Chatbot, Reinforcement Learning
Statistical Machine Translation Part II: Word Alignments and EM
‘SPAG’-Spelling, Punctuation and Grammar
CS 388: Natural Language Processing: LSTM Recurrent Neural Networks
CS 4501: Introduction to Computer Vision Computer Vision + Natural Language Connelly Barnes Some slides from Fei-Fei Li / Andrej Karpathy / Justin Johnson.
Support Vector Machines
an introduction to: Deep Learning
Click to add text Simple sentence containing the targeted word.
Soliciting Reader Contributions to Software Tutorials
I CAN READ LONGER PARAGRAPHS PICKING OUT KEY WORDS FOR STEP 3 AND 4
Authorship Attribution Using Probabilistic Context-Free Grammars
Adversarial Learning for Neural Dialogue Generation
Perceptual Loss Deep Feature Interpolation for Image Content Changes
Pre-Intermediate Lesson 14
Aspect-based sentiment analysis
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Know What You Don’t Know: Unanswerable Questions for SQuAD
Data Recombination for Neural Semantic Parsing
Neural Machine Translation By Learning to Jointly Align and Translate
Unsupervised Conditional Generation
Textual Video Prediction
LESSON OBJECTIVE: BE ABLE TO DESCRIBE MY SCHOOL IN GENERAL TERMS
Effective PowerPoint Presentations
Distributed Representation of Words, Sentences and Paragraphs
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
How do we talk about what we are doing right now in English?
إستراتيجيات ونماذج التقويم
Transformer result, convolutional encoder-decoder
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Word Embedding Word2Vec.
Text Analysis and Search Analytics
Image recognition: Defense adversarial attacks
I am grateful for… I love my school because… Thank you _____
Memory-augmented Chinese-Uyghur Neural Machine Translation
MIS2502: Data Analytics Clustering and Segmentation
Introduction to Natural Language Processing
Neural Speech Synthesis with Transformer Network
MIS2502: Data Analytics Clustering and Segmentation
Lip movement Synthesis from Text
Machine Translation(MT)
Domain Mixing for Chinese-English Neural Machine Translation
Learning Object Context for Dense Captioning
Machine learning overview
Textual Video Prediction
Effective Presentations
Word embeddings Text processing with current NNs requires encoding into vectors. One-hot encoding: N words encoded by length N vectors. A word gets a.
Reference datasets.
Word embeddings (continued)
Text Analysis and Search Analytics
Natural Language Processing (NLP) Systems Joseph E. Gonzalez
Attention for translation
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
An introduction to: Deep Learning aka or related to Deep Neural Networks Deep Structural Learning Deep Belief Networks etc,
How Much is 131 Million Dollars
Hsiao-Yu Chiang Xiaoya Li Ganyu “Bruce” Xu Pinshuo Ye Zhanyuan Zhang
Neural Machine Translation
Recurrent Neural Networks
Text-to-speech (TTS) Traditional approaches (before 2016) Neural TTS
Neural Machine Translation by Jointly Learning to Align and Translate
ICCV 2019.
Presentation transcript:

Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer Juncen Li1, Robin Jia2, He He2, and Percy Liang2 1Tencent 2Stanford University

Text Attribute Transfer Original Sentence: “The gumbo was bland.” Original Attribute: negative sentiment Target Attribute: positive sentiment New Sentence: “The gumbo was tasty.” Attribute Transfer Content Preservation Grammaticality

No parallel data

French English The blue house is old. The music was loud. The boat left. … La maison bleue est vieille. La musique était forte Le bateau est parti …

Positive Negative The beignets were tasty The gumbo was bad I like their jambalaya Very rude staff Very affordable Poorly lit … …

Delete, Retrieve, Generate I hated the gumbo love it I love the gumbo Delete Retrieve Generate

Outline Prior work with adversarial methods Simple baselines Simple neural methods

Outline Prior work with adversarial methods Simple baselines Simple neural methods

Basic auto-encoder Target=negative The gumbo was bland. Decoder The gumbo was bland. The gumbo was bland. Shen et al. (2017); Fu et al. (2018)

Basic auto-encoder Target=positive The beignets were tasty. Decoder The beignets were tasty. The beignets were tasty. Shen et al. (2017); Fu et al. (2018)

Basic auto-encoder Target=positive ??? The gumbo was bland. Decoder ??? The gumbo was bland. The gumbo was tasty. Shen et al. (2017); Fu et al. (2018)

Basic auto-encoder Target=positive The gumbo was bland. Decoder The gumbo was bland. The gumbo was bland. Can copy input and ignore target attribute Shen et al. (2017); Fu et al. (2018)

Adversarial content separation Discriminator Target=positive Encoder Decoder The gumbo was bland. The gumbo was tasty. Make discriminator unable to predict attribute Shen et al. (2017); Fu et al. (2018)

Error Cases No Attribute Transfer Input: “Think twice -- this place is a dump.” Output: “Think twice -- this place is a dump.”

Error Cases Content changed Input: “The queen bed was horrible!” Output: “The seafood part was wonderful!”

Error Cases Poor grammar Input: “Simply, there are far superior places to go for sushi.” Output: “Simply, there are far of vegan to go for sushi.”

A balancing act Attribute Transfer Content Preservation Grammaticality

Outline Prior work with adversarial methods Simple baselines Simple neural methods

Pick two out of three Attribute Transfer Content Preservation Grammaticality

Just return the original sentence… Content + Grammar Content Preservation Grammaticality Just return the original sentence…

Attribute + Grammar Attribute Transfer Grammaticality Any sentence in the target corpus works! Retrieve one that has similar content as input

Retrieval Baseline The gumbo was bland The beignets were tasty Great prices! The gumbo was delicious My wife loved the po’boy … The gumbo was bland

Retrieval Baseline The gumbo was bland The beignets were tasty Great prices! The gumbo was delicious My wife loved the po’boy … The gumbo was bland

Retrieval Baseline I hated the shrimp The beignets were tasty Great prices! The gumbo was delicious My wife loved the po’boy … I hated the shrimp

Content + Attribute Attribute Transfer Content Preservation

Content + Attribute My wife the shrimp hated Delete markers of the source attribute Replace them with markers of the target attribute

Attribute Markers hated Negative very disappointed won’t be back … Compare Frequency Positive great place for well worth delicious …

Template Baseline My wife the shrimp hated

Template Baseline loved tasty polite … My wife the shrimp ______

Template Baseline loved tasty polite … My wife the shrimp ______

Template Baseline loved tasty polite … My wife the shrimp ______

Template Baseline loved tasty polite … My wife the shrimp ______

Retrieve attribute markers from similar contexts Template Baseline The beignets were tasty Great prices! The gumbo was delicious My wife loved the po’boy … My wife _____ the shrimp Retrieve attribute markers from similar contexts

Retrieve attribute markers from similar contexts Template Baseline The beignets were tasty Great prices! The gumbo was delicious My wife loved the po’boy … My wife _____ the shrimp loved Retrieve attribute markers from similar contexts

Experiments Average over 3 datasets Sentiment for Yelp reviews (Shen et al., 2017) Sentiment for Amazon reviews (He and McAuley, 2016; Fu et al., 2018) Factual to Romantic/Humorous style for image captions (Gan et al., 2017)

Experiments Human Evaluation Likert scale from 1-5 for Attribute transfer Content preservation Grammaticality Overall success: get ≥ 4 on each category

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 12% MultiDecoder (Fu et al., 2018) 11% CrossAligned (Shen et al., 2017)

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 12% MultiDecoder (Fu et al., 2018) 11% CrossAligned (Shen et al., 2017) Retrieval Baseline 23% Template Baseline 24%

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 2.4 Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 24%

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 2.4 Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 24%

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 2.4 Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 24% Human 4.4 58%

Outline Prior work with adversarial methods Simple baselines Simple neural methods

Content separation revisited Adversarial Discriminator Target=positive Encoder Decoder The gumbo was bland. The gumbo was tasty. Make discriminator unable to predict attribute Shen et al. (2017); Fu et al. (2018)

Delete and Generate Target=negative The gumbo was bland. Adversarial Discriminator Target=negative Encoder Decoder The gumbo was bland. The gumbo was . The gumbo was bland.

Delete and Generate Target=positive The gumbo was . Encoder Decoder The gumbo was . The gumbo was tasty. The gumbo was bland.

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 2.4 Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 24% Delete and Generate 3.6 3.4 27% Human 4.4 58%

Context Cues Can retrieved attribute markers help the model?

Delete, Retrieve, Generate Marker=bland Encoder Decoder The gumbo was . The gumbo was bland. The gumbo was bland.

Delete, Retrieve, Generate Marker=tasted bland Encoder Decoder The gumbo was . The gumbo was bland. The gumbo was bland.

Delete, Retrieve, Generate The beignets were tasty Great prices! The shrimp is delicious My wife loved the po’boy … Marker=is delicious Encoder Decoder The gumbo was . The gumbo was delicious. The gumbo was bland.

Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 2.4 Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 24% Delete and Generate 3.6 3.4 27% Delete, Retrieve, Generate 34% Human 4.4 58%

Deleting too much… Input: “Worst customer service I have ever had.” Output: “Possibly the best chicken I have ever had.”

Deleting too little… Input: “I am actually afraid to open the remaining jars.” Output: “I am actually afraid to open the remaining jars this is great.”

Thank you! I don’t like NLP love it I love NLP Delete Retrieve Generate http://tiny.cc/naacl2018-drg https://github.com/lijuncen/ Sentiment-and-Style-Transfer