Elamur Research⌕
☰
home / papers / 2018 / Style Transfer as Unsupervised Machine Translation

Style Transfer as Unsupervised Machine Translation

Summary

Text style transfer means rewriting a sentence so that it carries a different attribute, such as positive instead of negative sentiment, while what it says stays the same. It is hard to train because sentence pairs with identical content but different styles rarely exist. Zhang et al. treat the two styles as two "languages" and adapt the unsupervised machine translation recipe to this setting.

The method has two stages:

  • Initialization. A word-to-word transfer table is induced without supervision. It combines embedding similarity with each word's statistical leaning toward one style. Together with style-specific language models, the table powers two SMT systems, one per direction, that generate pseudo-parallel pairs.
  • Refinement. Attention-based GRU NMT models are pre-trained on these pairs and then improved jointly through iterative back-translation. A style classifier filters and penalizes generated pairs that have the wrong style.

The approach was tested on Yelp and Amazon sentiment transfer and on romantic/humorous Captions. It outperforms earlier state-of-the-art systems in both human and automatic evaluation, on style accuracy and on content preservation. The work shows that unsupervised MT can be reused for same-language rewriting once two key components are modified.

Key points

  • Word transfer probability. The score factorizes into three terms: P(s|x_w), the embedding-based similarity P(y_w|x_w), and P(t|y_w).

    • The style terms are relative frequency ratios of a word across the two style corpora.
    • The similarity term is normalized cosine similarity of word2vec-style (Mikolov et al. 2013) embeddings.
  • Model architecture. The models follow the Bahdanau et al. attention encoder-decoder with GRU units, trained in both directions (P_{s→t}, P_{t→s}).

  • Ablation results (Table 5, style accuracy / BLEU).

    SystemYelpAmazonCaptions
    SMT only94.6% / 8.8281.2% / 7.4682.8% / 5.04
    NMT, iteration 070.5% / 15.8168.4% / 16.3666.5% / 8.72
    Full system96.6% / 22.7984.1% / 33.9099.5% / 12.69
    • SMT reaches high style accuracy but preserves content poorly.
    • NMT at iteration 0 improves content, and iterative back-translation then raises both metrics.
  • Effect of the style classifier. Without it, accuracy falls to 80.4% (Yelp), 75.6% (Amazon) and 79.3% (Captions). BLEU rises slightly at the same time, which points to a trade-off that the classifier controls.

  • Differences from unsupervised NMT. Two components are changed:

    • a monolingual word mapping replaces cross-lingual embedding alignment;
    • classifier-based filtering and reward stabilize back-translation.

Interesting ideas

  • I1. Same-language word mapping. Two words that fill the same grammatical slot (high embedding similarity) but lean toward opposite corpora (high style preference) make good substitution candidates, e.g., "hate" and "love". This cheap trick could seed lexicons for other paired-corpus contrasts, such as formal vs. informal register or dialect vs. standard variety.
  • I2. Bootstrapping neural models with SMT. Phrase-based SMT is used only to produce rough pseudo-parallel data, and the neural models then take over. The paper's numbers show NMT smoothing SMT's content errors, so this staging could help any low-resource rewriting task that lacks paired data.
  • I3. Classifier as a noise guard. An external attribute classifier scores back-translated pairs and penalizes those with the wrong style. This keeps iterative self-training from drifting, and the pattern generalizes to any self-training loop with a checkable target property.
  • I4. Ablating across both metrics. Reporting style accuracy and BLEU side by side for each component exposes the trade-off between them. For example, removing the classifier slightly raises BLEU while sharply cutting accuracy, which a single metric would hide.
  • I5. Paired directions that train each other. Building both directions together lets each model supply training data for the other through back-translation. This suits any task with two symmetric unpaired corpora.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Machine translation

Topics: Machine translation

Cited by

65 papers of our library cite it (of the 140673 whose bibliographies we read); 5 of them have a page here, 60 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1808.07894 · arXiv 1808.07894

@misc{zhang2018style,
  title = {{Style Transfer as Unsupervised Machine Translation}},
  author = {Zhang, Zhirui and Ren, Shuo and Liu, Shujie and Wang, Jianyong and Chen, Peng and Li, Mu and Zhou, Ming and Chen, Enhong},
  year = {2018},
  doi = {10.48550/arxiv.1808.07894},
  eprint = {1808.07894},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1808.07894}
}

References

29 references, 17 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Artetxe, M.; Labaka, G.; Agirre, E.; and Cho, K. 2018. Unsupervised neural machine translation. In ICLR. ↗ our card
  2. Artetxe, M.; Labaka, G.; and Agirre, E. 2017. Learning bilingual word embeddings with (almost) no bilingual data. In ACL. find our card
  3. Bahdanau, D.; Cho, K.; and Bengio, Y. 2014. Neural machine translation by jointly learning to align and translate. CoRR abs/1409.0473. ↗ our card
  4. Chiang, D. 2007. Hierarchical phrase-based translation. Computational Linguistics. Cho, K.; van Merrienboer, B.; aglar Gülehre; Bahdanau, D.; Bougares, F.; Schwenk, H.; and Bengio, Y. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In EMNLP. ↗ our card
  5. Conneau, A.; Lample, G.; Ranzato, M.; Denoyer, L.; and Jégou, H. 2017. Word translation without parallel data. CoRR abs/1710.04087. ↗
  6. Fu, Z.; Tan, X.; Peng, N.; Zhao, D.; and Yan, R. 2018. Style transfer in text: Exploration and evaluation. In AAAI. find our card
  7. Gan, C.; Gan, Z.; He, X.; Gao, J.; and Deng, L. 2017. Stylenet: Generating attractive visual captions with styles. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 955–964. find
  8. Glorot, X., and Bengio, Y. 2010. Understanding the difficulty of training deep feedforward neural networks. In AIS-TATS. find
  9. He, R., and McAuley, J. 2016. Ups and downs: Modeling the visual evolution of fashion trends with one-class collaborative filtering. In WWW. ↗
  10. Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9 8:1735–80. ↗
  11. Hu, Z.; Yang, Z.; Liang, X.; Salakhutdinov, R.; and Xing, E. P. 2017. Toward controlled generation of text. In ICML. ↗ our card
  12. Kim, Y., and Rush, A. M. 2016. Sequence-level knowledge distillation. In EMNLP. find our card
  13. Lample, G.; Ott, M.; Conneau, A.; Denoyer, L.; and Ranzato, M. 2018. Phrase-based & neural unsupervised machine translation. arXiv preprint arXiv:1804.07755. ↗
  14. Lample, G.; Denoyer, L.; and Ranzato, M. 2018. Unsupervised machine translation using monolingual corpora only. In ICLR. ↗ our card
  15. Li, J.; Galley, M.; Brockett, C.; Spithourakis, G. P.; Gao, J.; and Dolan, W. B. 2016. A persona-based neural conversation model. In ACL. ↗ our card
  16. Li, J.; Jia, R.; Hé, H.; and Liang, P. 2018. Delete, retrieve, generate: A simple approach to sentiment and style transfer. In NAACL. ↗ our card
  17. Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G. S.; and Dean, J. 2013. Distributed representations of words and phrases and their compositionality. In NIPS. ↗
  18. Och, F. J. 2003. Minimum error rate training in statistical machine translation. In ACL. find
  19. Papineni, K.; Roukos, S.; Ward, T.; and Zhu, W.-J. 2002. Bleu: a method for automatic evaluation of machine translation. In ACL. find our card
  20. Prabhumoye, S.; Tsvetkov, Y.; Salakhutdinov, R.; and Black, A. W. 2018. Style transfer through back-translation. In ACL. find our card
  21. Sennrich, R.; Haddow, B.; and Birch, A. 2016a. Controlling politeness in neural machine translation via side constraints. In HLT-NAACL. find our card
  22. Sennrich, R.; Haddow, B.; and Birch, A. 2016b. Improving neural machine translation models with monolingual data. In ACL. find
  23. Shen, S.; Cheng, Y.; He, Z.; He, W.; Wu, H.; Sun, M.; and Liu, Y. 2016. Minimum risk training for neural machine translation. In ACL. find our card
  24. Shen, T.; Lei, T.; Barzilay, R.; and Jaakkola, T. S. 2017. Style transfer from non-parallel text by cross-alignment. In NIPS. ↗ our card
  25. Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Sequence to sequence learning with neural networks. In NIPS. Wen, T.-H.; Gasic, M.; Mrksic, N.; hao Su, P.; Vandyke, D.; and Young, S. J. 2015. Semantically conditioned lstm-based natural language generation for spoken dialogue systems. In EMNLP. ↗
  26. Wintner, S.; Mirkin, S.; Specia, L.; Rabinovich, E.; and Patel, R. N. 2017. Personalized machine translation: Preserving original author traits. In EACL. find
  27. Xu, J.; Sun, X.; Zeng, Q.; Ren, X.; Zhang, X.; Wang, H.; and Li, W. 2018. Unpaired sentiment-to-sentiment translation: A cycled reinforcement learning approach. In ACL. ↗ our card
  28. Zeiler, M. D. 2012. Adadelta: An adaptive learning rate method. CoRR abs/1212.5701. ↗ our card
  29. Zhang, Z.; Liu, S.; Li, M.; Zhou, M.; and Chen, E. 2018. Joint training for neural machine translation models with monolingual data. In AAAI. find

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/zhang-2018-style-transfer-unsupervised-machine-translation/