Preserving Content in Text Style Transfer via Normalizing Flow and Adversarial Learning
摘要
An appropriate style can enhance the impact of social posts and comments. Although existing research is effective in accurately transferring text styles, it often results in some content loss, which disrupts the original semantic information. To address the issue of content preservation in style transfer, we extend the existing normalizing flow model and proposed a style editing module. By leveraging the transformation process of latent states in the flow model, we model the sentence content and style representations. On this basis, we accomplish style editing by replacing the original style representation with the target style. Additionally, to mitigate the impact of style editing on content representation, we introduce adversarial learning on the latent states before and after style editing, further optimizing the flow model to enhance content preservation. Extensive experiments on various datasets demonstrate that our method achieved an improvement of 3.9% in content preservation compared to the latest research. Additionally, our method attained an average style accuracy of 90.1%, proving its capability to enhance content preservation while ensuring accurate style transfer \(^1\) ( \(^1\) The code is available at https://github.com/djqqiao/FST ).