Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization
About
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. 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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Text Style Transfer | Yelp (test) | Style Accuracy91.3 | 18 | |
| Text Style Transfer | IMDB (test) | S-ACC83.1 | 18 | |
| Text Style Transfer | Chinese style transfer FT to LX (test) | Style Polarity61.4 | 10 | |
| Text Style Transfer | Chinese style transfer FT to JY (test) | Style Polarity59.1 | 10 | |
| Text Style Transfer | English Novel Corpus ER → SP | Accd43.8 | 6 | |
| Text Style Transfer | Yelp | Style Score4 | 5 | |
| Text Style Transfer | IMDB | Style Score3.6 | 5 |