Abstract
Text Style Transfer (TST) aims to modify the stylistic attributes of a sentence while preserving its underlying semantic content. While significant progress has been made in single-attribute transfer, multiple-attribute TST remains a significant challenge due to the computational costs of fine-tuning large-scale pre-trained language models (PLMs) and the scarcity of multi-attribute labeled data. We introduce Adapter-TST, a parameter-efficient framework that utilizes small, modular adapter layers within a frozen BART-large backbone. By updating only 0.78% of the model's parameters, Adapter-TST achieves state-of-the-art performance across multiple benchmarks, demonstrating superior fluency and content preservation compared to traditional fine-tuning methods.
1. Introduction
Text Style Transfer serves as a linguistic "filter," enabling the transformation of properties such as sentiment, formality, or tense without altering the core meaning of the text. However, the transition from single-attribute to multiple-attribute TST (e.g., simultaneously changing a sentence from present-active-informal to past-passive-formal) introduces a "computational nightmare." Traditional approaches typically involve fine-tuning massive PLMs like BART or GPT for every specific combination of styles, which is both resource-intensive and limited by the availability of specialized datasets. Adapter-TST addresses these challenges by providing a modular, fine-grained control mechanism that is both computationally efficient and highly effective.
2. Methodology
2.1 The Adapter-TST Framework
The core of the proposed method is the use of BART-large as a frozen backbone. Rather than updating the billions of parameters within the PLM, the researchers insert small, trainable "Adapter Layers" into each transformer block. Each specific attribute (e.g., "Past Tense" or "Passive Voice") is assigned its own dedicated adapter.
2.2 Architecture and Connections
The adapters utilize a bottleneck architecture consisting of a down-projection, a nonlinearity, and an up-projection. This structure is designed to capture style-specific information efficiently. The framework employs two primary connection strategies:
- Parallel Connection: During the training phase, adapters for different values of the same attribute (e.g., Past, Present, and Future) are placed in parallel. This allows the model to learn to reconstruct or transform styles simultaneously.
- Stacking Connection: During inference, these adapters can be "stacked" like modular components. To perform a multi-attribute transfer, data is routed sequentially through the relevant adapters (e.g., Tense then Voice), allowing for compositional editing of styles that may not have been seen together during training.
2.3 Training Objectives
To ensure high-quality outputs, Adapter-TST is optimized using a dual-loss system:
- Reconstruction Loss: Ensures that the semantic meaning of the original sentence is preserved.
- Classification Loss: Optimized via policy gradients, this ensures the generated output accurately reflects the target stylistic attributes.
3. Experimental Evaluation
3.1 Datasets and Benchmarks
The model was evaluated on two primary benchmarks:
- Yelp: The standard dataset for sentiment transfer (Positive $\leftrightarrow$ Negative).
- StylePTB: A large-scale benchmark for fine-grained, multiple-attribute TST. Evaluation focused on complex subsets including Tense-Voice, Tense-PP (Prepositional Phrase) manipulation, and attribute removal (ADJ/ADV).
3.2 Key Results
Adapter-TST demonstrated significant improvements over existing baselines:
- Sentiment Transfer: On the Yelp dataset, the model achieved a G-score of 2.15, outperforming the previous state-of-the-art (Style Transformer at 2.00) while maintaining a high BERTscore of 0.91 for content preservation.
- Multi-Attribute Performance: On StylePTB, Adapter-TST consistently outperformed baselines in G-score (the geometric mean of accuracy, fluency, and content preservation).
- Parameter Efficiency: Each style-specific adapter adds approximately 3.17M parameters, representing only 0.78% of the original BART-large model. This allows for the addition of numerous styles without a significant increase in storage or memory requirements.
4. Discussion
4.1 Modularity and Fluency
A key insight from this research is that freezing the backbone PLM weights prevents "catastrophic forgetting," a common issue in fine-tuning where a model loses its general linguistic capabilities. By keeping the backbone frozen, Adapter-TST retains the natural fluency of the original model. Furthermore, the modular nature of the adapters allows for Compositional Editing, where styles can be combined at test time in novel ways.
4.2 Limitations
Despite its success, the authors noted certain limitations. There is a slight drop in accuracy when modeling many attributes simultaneously—particularly regarding "Voice"—suggesting that stylistic attributes are not always perfectly independent. Additionally, while training is parameter-efficient, inference still requires running the full BART-large model, necessitating significant GPU resources.
5. Conclusion
Adapter-TST provides a robust and efficient solution for complex text style transfer tasks. By leveraging modular adapters and a frozen PLM backbone, the framework achieves high-quality, multi-attribute transformations with minimal parameter updates. Future work will focus on handling dependencies between attributes and scaling the framework to even larger models such as Llama or GPT-3.
Reference: Hu, Z., Lee, R. K.-W., & Chen, N. F. (2023). Adapter-TST: A Parameter Efficient Method for Multiple-Attribute Text Style Transfer. arXiv:2305.05945v1 [cs.CL].
Summary updated