Style Transfer for Texts: Retrain, Report Errors, Compare with Rewrites

Alexey Tikhonov, Viacheslav Shibaev, Aleksander Nagaev, Aigul Nugmanova, Ivan P. Yamshchikov

Abstract

Current evaluation protocols for text style transfer are often unstable and susceptible to manipulation. This paper demonstrates that standard metrics like style accuracy and BLEU scores can vary significantly across training runs, leading to misleading claims of state-of-the-art performance. We propose more rigorous evaluation standards, including reporting error margins and using human-written reformulations as ground truth. Furthermore, we introduce three architectural extensions—the Dedicated Discriminator, the Shifted Autoencoder (SAE), and a combined model—that improve the disentanglement of content and style, establishing new benchmarks for the field.

Introduction: The Evaluation Crisis in Style Transfer

Text style transfer aims to alter specific attributes of a sentence, such as sentiment or formality, while preserving its underlying semantic content. Despite its potential, the field faces a significant evaluation crisis. Researchers typically rely on two primary metrics: Style Accuracy, measured by a pre-trained classifier, and the BLEU score, which measures word overlap with the original input.

This paper identifies three critical flaws in this paradigm:

  1. Instability: Performance metrics exhibit high variance between identical training runs. A model may appear to achieve state-of-the-art results in one instance and fail in another.
  2. Metric Divergence: Optimizing solely for style accuracy often degrades text quality, creating a disconnect between automated scores and human judgment.
  3. Manipulability: Metrics can be artificially inflated through simple heuristics, such as replacing failed transfers with successful ones from the same batch, without any actual improvement in the generative model.

Methodology: Enhancing Disentanglement

To address these challenges, we build upon the encoder-decoder framework established by Hu et al. (2017), where style is controlled via a latent code. We propose three architectural enhancements to better separate content from style:

  • Dedicated Discriminator: An adversarial component is integrated to ensure the latent representation $z$ is devoid of style information, forcing the decoder to rely exclusively on the provided style code.
  • Shifted Autoencoder (SAE): Inspired by cycle-consistency, this introduces a loss function where a generated "soft" sentence is re-encoded. The model is penalized if the new latent representation deviates from the original, ensuring content preservation.
  • Combined Model: A hybrid architecture utilizing both the Dedicated Discriminator and the SAE loss to maximize disentanglement.

Key Insights: The Need for Rigor

Our findings suggest that the current "single-number" reporting standard is scientifically unsound. As shown in Figure 1, accuracy can fluctuate by 5% and BLEU by 8 points simply by retraining the same model. We advocate for the reporting of error margins across multiple runs to ensure reproducibility.

BLEU vs. Accuracy trade-off and instability across multiple training runs for the proposed architectures.

Furthermore, we demonstrate a clear Pareto trade-off between style accuracy and content preservation. A model's superiority should be judged by its position on the Pareto front rather than a single metric. To highlight the fragility of current metrics, we conducted a "Delete, Duplicate, and Conquer" experiment, where heuristic manipulation boosted accuracy to 100% and improved BLEU scores without any underlying model improvement.

Results and Comparison

When evaluated against human-written reformulations, our proposed SAE + Discriminator model outperforms the baseline and several contemporary approaches.

Comparison of the proposed model against existing text style transfer methods in the BLEU-Accuracy space.

As illustrated in Figure 2, the "full" version of the proposed model achieves a superior balance of style accuracy and BLEU score compared to previous work by Shen et al. (2017), Hu et al. (2017), and Li et al. (2018). The results also indicate that BLEU scores calculated against human rewrites are far more consistent and reliable than those calculated against the original input.

Conclusion and Future Directions

While the Shifted Autoencoder significantly improves meaning preservation, the field still faces limitations. Sentiment is a complex attribute often fused with content, and current datasets are limited in scope. Future work should focus on developing more diverse datasets with multiple human rewrites per sentence and exploring semantic preservation metrics that go beyond simple word-matching like BLEU.

Summary updated

BibTeX
@inproceedings{tikhonov2019style,
  author = {Alexey Tikhonov and Viacheslav Shibaev and Aleksander Nagaev and Aigul Nugmanova and Ivan P. Yamshchikov},
  title = {{Style Transfer for Texts: Retrain, Report Errors, Compare with Rewrites}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1406},
}
Figure