A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfer

Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Xu Sun, Zhifang Sui

Text style transfer involves modifying the stylistic attributes of a sentence—such as sentiment or formality—while preserving its underlying semantic content. A significant challenge in this field is the lack of parallel corpora, where the same content is available in multiple styles. Traditional unsupervised approaches typically rely on a "separate-and-fuse" strategy: first stripping style-specific features to create a style-independent representation, then combining this with the target style. However, this often leads to information loss or failure to fully transform the style because content and style are frequently intertwined.

The DualRL Framework

To address these limitations, researchers from Peking University and Tencent AI Lab proposed DualRL, a framework that bypasses explicit separation in favor of direct mapping between styles. DualRL treats style transfer as a dual task involving two models: $f_\theta$ (mapping from source style $X$ to target style $Y$) and $g_\phi$ (mapping from $Y$ back to $X$).

Figure 1: Overview of the DualRL framework showing the direct mapping between styles and the dual feedback loop for content preservation.

Methods and Rewards

The models are trained using reinforcement learning (RL) guided by two primary reward signals:

  1. Style Reward ($R_s$): A pre-trained style classifier evaluates the generated sentence to ensure it aligns with the target style.
  2. Content Reward ($R_c$): Leveraging the dual nature of the task, the content reward is based on the probability of reconstructing the original sentence $x$ from the generated sentence $y'$ using the dual model $g_\phi$.

The final reward is the harmonic mean of $R_s$ and $R_c$, forcing the model to balance style accuracy with content preservation. To stabilize training and ensure fluency, the authors introduced Annealing Pseudo Teacher-Forcing. This technique uses "pseudo-parallel" data for initial supervised pre-training and gradually transitions to pure RL, preventing the generation of ungrammatical text that might otherwise exploit the style classifier.

Key Results

DualRL was evaluated on the YELP (sentiment) and GYAFC (formality) datasets. It demonstrated substantial improvements over state-of-the-art baselines. On the YELP dataset, DualRL achieved a BLEU score of 55.2, a significant jump from the previous best of 45.5.

Figure 5: Training dynamics showing Accuracy (ACC) and BLEU scores across epochs. The RL+MLE approach (DualRL) provides the best balance of style transfer and content preservation.

As shown in the training curves, the combined RL+MLE approach consistently outperforms pure RL or pure MLE (Maximum Likelihood Estimation) baselines. While pure RL can achieve high style accuracy, it often suffers in terms of content preservation (BLEU). DualRL's annealing strategy successfully maintains high fluency and content retention while achieving superior style transfer accuracy. Human evaluations further confirmed these findings, with DualRL being rated as successful in over 50% of cases on the YELP dataset, nearly doubling the performance of several baseline models.

Conclusion

By moving away from the "separate-and-fuse" paradigm, DualRL provides a more robust and effective method for unsupervised text style transfer. The dual reinforcement learning loop provides a natural supervision signal for content preservation in the absence of parallel data. Future work may explore integrating large-scale pre-trained language models to further enhance the nuance and linguistic complexity of the transferred text.

Summary updated

BibTeX
@inproceedings{luo2019dual,
  author = {Fuli Luo and Peng Li and Jie Zhou and Pengcheng Yang and Baobao Chang and Xu Sun and Zhifang Sui},
  title = {{A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfer}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/711},
}
Figure