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

Juncen Li, Robin Jia, He He, Percy Liang


Abstract
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., “screen is just the right size” to “screen is too small”). Our training data includes only sentences labeled with their attribute (e.g., positive and negative), but not pairs of sentences that only differ in the 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. Based 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.
Anthology ID:
N18-1169
Volume:
Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)
Month:
June
Year:
2018
Address:
New Orleans, Louisiana
Editors:
Marilyn Walker, Heng Ji, Amanda Stent
Venue:
NAACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1865–1874
Language:
URL:
https://aclanthology.org/N18-1169
DOI:
10.18653/v1/N18-1169
Bibkey:
Cite (ACL):
Juncen Li, Robin Jia, He He, and Percy Liang. 2018. 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 Language Technologies, Volume 1 (Long Papers), pages 1865–1874, New Orleans, Louisiana. Association for Computational Linguistics.
Cite (Informal):
Delete, Retrieve, Generate: a Simple Approach to Sentiment and Style Transfer (Li et al., NAACL 2018)
Copy Citation:
PDF:
https://aclanthology.org/N18-1169.pdf
Note:
 N18-1169.Notes.pdf
Video:
 https://aclanthology.org/N18-1169.mp4
Code
 lijuncen/Sentiment-and-Style-Transfer +  additional community code
Data
GYAFCYelpYelp2018