Abstract
Text style transfer is an important task in controllable language generation. Supervised approaches have pushed performance improvement on style-oriented rewriting such as formality conversion. However, challenges remain due to the scarcity of large-scale parallel data in many domains. While unsupervised approaches do not rely on annotated sentence pairs for each style, they are often plagued with instability issues such as mode collapse or quality degradation. To take advantage of both supervised and unsupervised paradigms and tackle the challenges, in this work, we propose a semi-supervised framework for text style transfer. First, the learning process is bootstrapped with supervision guided by automatically constructed pseudo-parallel pairs using lexical and semantic-based methods. Then the model learns from unlabeled data via reinforcement rewards. Specifically, we propose to improve the sequence-to-sequence policy gradient via stepwise reward optimization, providing fine-grained learning signals and stabilizing the reinforced learning process. Experimental results show that the proposed approach achieves state-of-the-art performance on multiple datasets, and produces effective generation with as minimal as 10% of training data.
Introduction
Text Style Transfer (TST) involves modifying specific attributes of a sentence—such as sentiment or formality—while maintaining its underlying meaning. A common example is transforming a blunt review like "This food was gross" into a more formal or nuanced "This meal was disappointing."
The field currently struggles with a data bottleneck. Supervised learning yields high-quality outputs but is constrained by the extreme rarity of large-scale, human-annotated parallel datasets. Conversely, unsupervised learning avoids this requirement but typically relies on Reinforcement Learning (RL), which is notoriously unstable. In standard RL-based TST, models receive a single "coarse" reward for an entire sentence. This lack of granularity makes it difficult for the model to identify which specific tokens contributed to a successful transfer, often leading to "mode collapse" where the model generates a limited set of safe, repetitive phrases.
Proposed Framework
To address these issues, we introduce a semi-supervised framework that combines the strengths of both paradigms through a two-stage process.
1. Bootstrapping with Pseudo-Parallel Data
The first stage involves "warming up" a pre-trained BART model using automatically constructed pseudo-parallel data. We employ two primary strategies for sentence matching:
- Lexical Match: Sentences are matched based on the lowest edit distance after removing style-specific "content spans."
- Semantic Match: We use contrastive sentence embeddings (SimCSE) to identify pairs that are mathematically similar in meaning despite differing styles.
2. Stepwise Reinforcement Reward
The core innovation of this framework is the stepwise reward mechanism. Instead of a global sentence-level reward, we leverage a pre-trained RoBERTa style classifier to provide fine-grained feedback.
By extracting the classifier's internal attention weights, the model can pinpoint which specific tokens most strongly signal the target style. These weights are used to re-weight the reward at each generation step, providing a token-level learning signal that significantly stabilizes the policy gradient training.
Experimental Results
The framework was evaluated on three major benchmarks: Yelp (Sentiment), Amazon (Sentiment), and GYAFC (Formality).
- State-of-the-Art Performance: The model consistently outperformed existing unsupervised and semi-supervised baselines in style accuracy and content preservation (measured via BLEU and BERTScore).
- Data Efficiency: Remarkably, the model achieved effective results on Yelp and Amazon using only 10% of the available training data, highlighting its utility in low-resource scenarios.
- Human Evaluation: Human raters judged the model's outputs as superior in fluency and content preservation compared to previous state-of-the-art models like Direct Rewards and Delete+Retrieve.
- Ablation Study: Removing the stepwise reward led to a significant decline in BLEU scores, confirming that token-level granularity is vital for preserving original meaning during style transfer.
Conclusion
This work demonstrates that combining automated bootstrapping with fine-grained, stepwise reinforcement rewards effectively bridges the gap between supervised and unsupervised text style transfer. By using classifier attention as a "reward map," we provide the model with the precise feedback necessary to avoid mode collapse and maintain semantic integrity. Future work may explore applying this stepwise reward approach to other text generation tasks, such as summarization or simplification, where detailed feedback is equally critical.
Summary updated