Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

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

About

We consider the task of text attribute transfer: transforming a sentence to alter a specific attribute (e.g., sentiment) while preserving its attribute-independent content (e.g., changing "screen is just the right size" to "screen is too small"). Our training data includes only sentences labeled with their attribute (e.g., positive or negative), but not pairs of sentences that differ only in their attributes, so we must learn to disentangle attributes from attribute-independent content in an unsupervised way. Previous work using adversarial methods has struggled to produce high-quality outputs. In this paper, we propose simpler methods motivated by the observation that text attributes are often marked by distinctive phrases (e.g., "too small"). Our strongest method extracts content words by deleting phrases associated with the sentence's original attribute value, retrieves new phrases associated with the target attribute, and uses a neural model to fluently combine these into a final output. On human evaluation, our best method generates grammatical and appropriate responses on 22% more inputs than the best previous system, averaged over three attribute transfer datasets: altering sentiment of reviews on Yelp, altering sentiment of reviews on Amazon, and altering image captions to be more romantic or humorous.

Juncen Li, Robin Jia, He He, Percy Liang• 2018

Related benchmarks

TaskDatasetResultRank
Text Style TransferYelp (test)
Style Accuracy67.4
18
Text Style TransferIMDB (test)
S-ACC56.5
18
Text Style TransferPOLITICAL (test)
Accuracy0.613
13
Attribute TransferYelp (test)
Gra Score4.2
8
Attribute TransferAmazon (test)
Gra Score3.9
8
Attribute TransferCaptions (test)
Gra Score4.2
8
Text Attribute TransferYelp (test)
Classifier Accuracy95.4
7
Text Attribute TransferCaptions (test)
Classifier Accuracy96.8
7
Text Attribute TransferAmazon (test)
Classifier Accuracy70.3
7
Showing 9 of 9 rows

Other info

Code

Follow for update