Evaluating Style Transfer for Text

Remi Mir, Bjarke Felbo, Nick Obradovich, Iyad RahwanNAACL 2019

Abstract

Evaluating text style transfer (TST) is notoriously difficult due to the absence of parallel corpora and the inherent tension between style transformation and content preservation. This paper presents a comprehensive evaluation framework that decomposes TST into three distinct components: style transfer intensity, content preservation, and naturalness. We show that relative human assessments and specialized automated metrics—specifically Word Mover’s Distance (WMD) applied to style-masked text—outperform traditional metrics such as BLEU and perplexity. Our findings emphasize the necessity of evaluating models using trade-off plots to capture the Pareto frontier of performance.

1. Introduction

Text style transfer involves modifying specific attributes of a sentence, such as sentiment or formality, while maintaining its core semantic meaning. Despite significant algorithmic progress, evaluation remains a major bottleneck. Researchers frequently rely on a fragmented set of metrics, often selecting those that highlight their model's strengths.

Common metrics like BLEU, borrowed from machine translation, are fundamentally flawed for TST because they penalize the very lexical changes required for style transfer. Similarly, perplexity is an unreliable proxy for human-perceived naturalness, as a sentence can be statistically probable according to a language model while still sounding unnatural to a human reader. This work aims to standardize TST evaluation by identifying metrics that align with human intuition and providing a framework for visualizing model trade-offs.

2. Methodology

We propose a three-dimensional evaluation space to capture the nuances of style transfer:

  1. Style Transfer Intensity (STI): The degree to which the target attribute is successfully manifested in the output.
  2. Content Preservation (CP): The extent to which the original semantic meaning is retained.
  3. Naturalness (NT): The fluency and human-likeness of the generated text.

2.1 Style Masking and Lexicons

To improve both human and automated evaluation of content preservation, we introduce "style masking." By identifying attribute-heavy words using a style lexicon, we can mask these terms before evaluation. This allows evaluators (and metrics) to focus on the invariant content rather than being biased by the stylistic shift. For example, in sentiment transfer, words like "delicious" or "horrible" are masked, leaving the core subject (e.g., "pizza") for comparison.

Example of a sentiment-based style lexicon used for masking attribute-heavy words.

2.2 Human and Automated Metrics

We advocate for relative scoring in human evaluations. Instead of asking for absolute 1-5 ratings, we ask humans to compare two outputs. This approach significantly increases inter-rater reliability (Fleiss’ kappa), as humans are more consistent when making comparative judgments.

For automated metrics, we propose:

  • STI: A direction-corrected Earth Mover’s Distance (EMD) that measures the distributional shift toward the target style while penalizing moves in the wrong direction.
  • CP: Word Mover’s Distance (WMD) calculated on style-masked text. Unlike BLEU, WMD focuses on semantic distance rather than exact n-gram overlap.
  • NT: Adversarial classification, where a model is trained to distinguish machine-generated text from human-written benchmarks. This captures global fluency better than token-level perplexity.

3. Results and Analysis

Our experiments on the Yelp sentiment dataset demonstrate that style masking significantly improves human agreement on content preservation scores. Furthermore, our proposed automated metrics show a much stronger Pearson correlation with human judgment than legacy methods.

3.1 Visualizing the Trade-off Frontier

A key insight of this work is that TST models should not be evaluated as single points in performance space. Instead, they should be viewed as operating along a trade-off frontier. Increasing style transfer intensity typically comes at the cost of content preservation or naturalness.

Trade-off plots illustrating the performance frontiers for different TST models across style, content, and naturalness.

As seen in the trade-off plots, models like ARAE and DAR may appear to have different performance profiles, but they often sit on similar Pareto frontiers. Their perceived differences are frequently a result of specific hyperparameter settings that prioritize one axis over another.

4. Conclusion

This framework provides a more principled approach to TST evaluation by aligning metrics with human intuition and accounting for inherent trade-offs. While the style lexicon approach is highly effective for attributes like sentiment, future work must address more complex styles where style and content are deeply intertwined. Standardizing these evaluation practices is a crucial step toward developing more robust and controllable text generation models.

Summary updated

BibTeX
@inproceedings{mir2019evaluating,
  author = {Remi Mir and Bjarke Felbo and Nick Obradovich and Iyad Rahwan},
  title = {{Evaluating Style Transfer for Text}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1049},
}
Figure