Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization

Dongkyu Lee, Zhiliang Tian, Lanqing Xue, Nevin L. Zhang
8/1/2021
cs.CLcs.AI

Official code: MovingKyu/RACoLN (9 stars, Python, last commit 2022-02-05).

Abstract

Text style transfer aims to alter the style (e.g., sentiment) of a sentence while preserving its content. A common approach is to map a given sentence to content representation that is free of style, and the content representation is fed to a decoder with a target style.

Show full abstract

Previous methods in filtering style completely remove tokens with style at the token level, which incurs the loss of content information. In this paper, we propose to enhance content preservation by implicitly removing the style information of each token with reverse attention, and thereby retain the content. Furthermore, we fuse content information when building the target style representation, making it dynamic with respect to the content. Our method creates not only style-independent content representation, but also content-dependent style representation in transferring style. Empirical results show that our method outperforms the state-of-the-art baselines by a large margin in terms of content preservation. In addition, it is also competitive in terms of style transfer accuracy and fluency.

View on arXivView PDF

Code Implementations(1)

MovingKyu/RACoLNOfficial100%

Official Implementation of "Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization"

91PythonFeb 5, 20224 years ago

Similar Papers

Cite this paper

@article{lee2021enhancing,
  title  = {Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization},
  author = {Dongkyu Lee and Zhiliang Tian and Lanqing Xue and Nevin L. Zhang},
  year   = {2021},
  eprint = {2108.00449},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.00449}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.00449.svg)](https://codeofpaper.com/paper/2108.00449)

Discussion