Collaborative Learning of Bidirectional Decoders for Unsupervised Text Style Transfer

Yun Ma, Yangbin Chen, Xudong Mao, Qing Li

TL;DR

Unsupervised text style transfer often fails by either changing too much (over-transfer) or too little (under-transfer). This paper introduces a collaborative framework using a pair of bidirectional decoders—one reading left-to-right and the other right-to-left—that regularize each other through mutual knowledge distillation and a "distinguishability constraint" to achieve a superior balance between style conversion and content preservation.

What Problem Does This Paper Address?

The goal of unsupervised text style transfer is to change the stylistic attribute of a sentence (e.g., turning a negative review into a positive one) while keeping the core meaning intact, all without a parallel "Rosetta Stone" dataset.

Current models suffer from two main pathologies:

  1. Over-Transfer (OT): The model successfully changes the style but loses the original content (e.g., "The dish is fresh" becomes "The staff are rude").
  2. Under-Transfer (UT): The model preserves the content but fails to change the style (e.g., "The dish is fresh" stays "The dish is fresh").
Examples of Over-Transfer and Under-Transfer in style transfer tasks.

The authors argue these problems arise because the goals of style conversion and content preservation are inherently in conflict. Without ground-truth labels, models struggle to find a confident middle ground, leading to "lazy" copying or "hallucinated" style changes.

Methods

The authors propose a Collaborative Bidirectional Decoder (CBD) framework. Instead of a single decoder, they use two:

  • $D^l$ (Left-to-Right): Generates text in the standard order.
  • $D^r$ (Right-to-Left): Generates text in reverse order.

The "secret sauce" is how these decoders interact:

  • Mutual Knowledge Distillation (MKD): Since there is no ground truth, each decoder treats its peer's output as a pseudo-label. By encouraging the two decoders to reach a consensus, the model reinforces consistent patterns and filters out the "uncertainty" that leads to OT and UT.
  • Distinguishability Constraint: To prevent the two decoders from simply collapsing into the same bad local optimum, the authors add a discriminator. This discriminator tries to identify which decoder produced a given sequence. This forces the decoders to maintain their unique "knowledge acquisition" perspectives (derived from their opposite decoding directions) while still collaborating.

These novel components are integrated with standard unsupervised objectives like self-reconstruction, back-translation, and style classification.

Datasets

The researchers evaluated their model on two widely used benchmarks:

  • YELP: A sentiment transfer dataset (Positive $\leftrightarrow$ Negative business reviews).
  • GYAFC: A formality transfer dataset (Formal $\leftrightarrow$ Informal sentences from Yahoo Answers).
  • Uspecial & Urandom: The authors also created two specific subsets of YELP to specifically analyze the Under-Transfer problem, focusing on sentences with multiple style indicators.

Key Insights and Ideas

  • Decoding Direction as a Regularizer: The most striking idea is that the direction of generation matters. Because an L2R decoder and an R2L decoder "see" the sequence differently, their errors are likely to be different. Forcing them to agree acts as a powerful filter for noise.
  • Peer Supervision as a Tie-Breaker: In unsupervised learning, gradients from style classifiers and reconstruction losses often pull in opposite directions. Collaborative learning provides a "third opinion" that helps the model commit to a more reasonable prediction.
  • The Value of Difference: The distinguishability constraint is counter-intuitive—usually, we want ensemble models to be identical. Here, the authors show that keeping the decoders distinct prevents them from reinforcing each other's mistakes, a common pitfall in co-training.

Key Results

CBD demonstrates a superior ability to balance style and content compared to previous state-of-the-art models.

Quantitative comparison of CBD against baselines on YELP and GYAFC datasets.
  • Superior Balance: On the YELP dataset, CBD achieved an ACC (Style Accuracy) of 96.9% and a BLEU (Content Preservation) of 30.2. It outperformed all baselines on the "H2" score (the harmonic mean of accuracy and BLEU), which is the gold standard for measuring the trade-off between style and content.
  • Formality Mastery: On the GYAFC dataset, CBD significantly outperformed previous state-of-the-art models, achieving a BLEU score of 47.1 (compared to the next best at 46.0) and an H2 score of 60.6 (compared to 57.9).
  • Reduced Entropy: Ablation studies showed that the collaborative mechanism significantly reduced "per-word entropy." This means the model was much more confident in its word choices, directly addressing the root cause of the OT/UT problems.

Limitations and Future Work

While CBD shows great promise, the authors acknowledge several hurdles:

  • Ambiguous Style Indicators: The model still struggles when style is expressed through infrequent words or words that are context-dependent (e.g., "hot" can be positive for food but negative for a room).
  • Continuous Style Control: For styles like formality, which exist on a spectrum, the model currently lacks a "knob" to control exactly how much style information is transferred.
  • Common Sense: Some failures are due to a lack of world knowledge (e.g., changing "one star" to "great rating" while keeping the word "because" in a way that makes the sentence nonsensical).

The authors suggest that future work should focus on better utilizing the structural context of the source sentence and developing more granular control for continuous style types.

Summary updated

BibTeX
@inproceedings{ma2021collaborative,
  author = {Yun Ma and Yangbin Chen and Xudong Mao and Qing Li},
  title = {{Collaborative Learning of Bidirectional Decoders for Unsupervised Text Style Transfer}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.729},
}
Figure