Utilizing Non-Parallel Text for Style Transfer by Making Partial Comparisons

Di Yin, Shujian Huang, Xin-Yu Dai, Jiajun Chen

Abstract

Unsupervised text style transfer often struggles with content preservation when using standard global discriminators in Generative Adversarial Networks (GANs). This paper proposes a novel framework that replaces global discriminators with "Partial Comparators." By decomposing the evaluation into separate content and style checks and leveraging pseudo-parallel data mined from non-parallel corpora, the model significantly improves content retention while maintaining high style transfer accuracy.

Introduction

Text style transfer aims to alter the stylistic attributes of a sentence (e.g., sentiment) while keeping its core meaning intact. A major hurdle is the lack of parallel corpora—pairs of sentences with identical content but different styles. Most existing methods rely on GANs to align the distributions of source and target styles. However, these global discriminators often prioritize stylistic "realness" over content fidelity, leading to "hallucinations" where the original meaning is lost (e.g., changing "The pizza was cold" to "The service was great").

Methodology: Partial Comparators

The core innovation of this work is the shift from distribution-level alignment to instance-level "partial" comparisons. The framework utilizes two specialized components:

  1. Content Comparator ($D_c$): Evaluates whether two sentences share the same underlying content by focusing on keyword interactions (primarily nouns).
  2. Style Comparator ($D_s$): Judges if two sentences share the same style, independent of their content.
Comparison of standard GAN-based style transfer (left) and the proposed Partial Comparator framework (right).

Pseudo-Parallel Mining and Data Augmentation

To train these comparators without parallel data, the authors employ two strategies:

  • Pseudo-Parallel Mining: Sentence pairs with similar nouns and low edit distance are extracted from non-parallel datasets to serve as ground-truth content matches.
  • Data Augmentation (DA): The generator's own outputs are used to further train the Content Comparator, reinforcing its ability to recognize preserved content.

The system uses a Gumbel-Softmax distribution to allow gradients to flow from the discrete text discriminators back to the generator during training.

Experimental Results

The model was evaluated on the Yelp and Amazon review datasets, focusing on sentiment transfer. The results demonstrate a significant improvement in content preservation, measured by BLEU scores, compared to previous state-of-the-art GAN models.

Performance comparison of the proposed model against various baselines on Yelp and Amazon datasets.

As shown in the table above, the proposed model achieved a BLEU score of 23.5 on the Yelp dataset, a massive leap over earlier GAN methods which often hovered between 5 and 15. Crucially, this gain in content preservation did not compromise style accuracy, which remained high at 92.7% on Yelp and 74.8% on Amazon. Human evaluations also rated the model higher in fluency and content retention.

Conclusion and Future Work

By modularizing the discriminator into content and style components, this research provides a more stable and effective way to handle unsupervised style transfer. The use of lexical anchors and instance-level comparisons addresses the long-standing issue of content loss in GAN-based text generation.

However, limitations remain: the keyword-mining process currently covers only about 30% of sentences, and the reliance on simple noun-matching may struggle with complex rephrasing. Future work aims to automate the instance-mining process to learn correspondences dynamically during training.

Summary updated

BibTeX
@inproceedings{yin2019utilizing,
  author = {Di Yin and Shujian Huang and Xin-Yu Dai and Jiajun Chen},
  title = {{Utilizing Non-Parallel Text for Style Transfer by Making Partial Comparisons}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/747},
}
Figure