NAST: A Non-Autoregressive Generator with Word Alignment for Unsupervised Text Style Transfer

Fei Huang, Zikai Chen, Chen Henry Wu, Qihan Guo, Xiaoyan Zhu +1 more
6/4/2021
cs.CL

Official code: thu-coai/NAST (15 stars, Python, MIT, last commit 2021-11-03).

Abstract

Autoregressive models have been widely used in unsupervised text style transfer. Despite their success, these models still suffer from the content preservation problem that they usually ignore part of the source sentence and generate some irrelevant words with strong styles.

Show full abstract

In this paper, we propose a Non-Autoregressive generator for unsupervised text Style Transfer (NAST), which alleviates the problem from two aspects. First, we observe that most words in the transferred sentence can be aligned with related words in the source sentence, so we explicitly model word alignments to suppress irrelevant words. Second, existing models trained with the cycle loss align sentences in two stylistic text spaces, which lacks fine-grained control at the word level. The proposed non-autoregressive generator focuses on the connections between aligned words, which learns the word-level transfer between styles. For experiments, we integrate the proposed generator into two base models and evaluate them on two style transfer tasks. The results show that NAST can significantly improve the overall performance and provide explainable word alignments. Moreover, the non-autoregressive generator achieves over 10x speedups at inference. Our codes are available at https://github.com/thu-coai/NAST.

View on arXivView PDF

Code Implementations(1)

thu-coai/NASTOfficial100%
MIT

Codes for "NAST: A Non-Autoregressive Generator with Word Alignment for Unsupervised Text Style Transfer" (ACL 2021 findings)

151PythonMay 24, 20215 years agoMIT
styletransfertextgeneration

Similar Papers

Cite this paper

@article{huang2021nast,
  title  = {NAST: A Non-Autoregressive Generator with Word Alignment for Unsupervised Text Style Transfer},
  author = {Fei Huang and Zikai Chen and Chen Henry Wu and Qihan Guo and Xiaoyan Zhu and Minlie Huang},
  year   = {2021},
  eprint = {2106.02210},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.02210}
}

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/2106.02210.svg)](https://codeofpaper.com/paper/2106.02210)

Discussion