Abstract
Text Style Transfer (TST) remains a challenging task due to the scarcity of parallel data. While large language models (LLMs) like GPT-4 provide a solution through in-context learning, they are computationally expensive and slow. We present TinyStyler, an 800M-parameter model that leverages pre-trained authorship embeddings to achieve state-of-the-art few-shot TST. TinyStyler outperforms GPT-4 in authorship transfer tasks while operating over 35x faster than traditional controllable generation baselines.
Introduction
The goal of Text Style Transfer is to modify the stylistic "fingerprint" of a sentence—such as its formality, sentiment, or specific authorial voice—without altering its underlying meaning. Historically, this has required either massive scale (LLMs) or complex, slow inference-time constraints. TinyStyler bridges this gap by using authorship embeddings as a compact, effective proxy for style, enabling a small model to perform high-fidelity transfers with minimal examples.
Methodology: The TinyStyler Pipeline
TinyStyler's training involves a three-stage process designed to distill stylistic knowledge into a compact T5-Large architecture.
- Style Reconstruction Training: The model is first trained to reconstruct original sentences from "neutralized" versions (created via a paraphraser), conditioned on a pre-trained authorship embedding.
- Synthetic Data Generation: The reconstruction model generates thousands of style-transferred pairs. These are filtered for semantic preservation and style accuracy to ensure high-quality training data.
- Self-Distillation: The final model is fine-tuned on these synthetic pairs. This removes the need for the external paraphraser during inference, significantly boosting speed.
A unique advantage of this approach is the ability to perform style interpolation. By treating styles as vectors, users can mathematically adjust the "strength" of the transfer, finding an optimal balance between stylistic flair and meaning preservation.
Experimental Results
TinyStyler was evaluated across several benchmarks, including the Reddit Million User Dataset (MUD) and the Grammarly Yahoo Answers Formality Corpus (GYAFC).
Performance and Efficiency
TinyStyler demonstrates remarkable efficiency, offering sub-second inference on a single A100 GPU. It is over 35x faster than previous controllable generation methods and 1.5x faster than commercial LLM APIs, despite using only 0.5% of the parameters of models like GPT-3.5.
Qualitative Analysis
The model's ability to capture specific authorial voices is particularly striking. In authorship transfer tasks, TinyStyler consistently outperformed GPT-4 on joint metrics of style and meaning.
Discussion and Conclusion
TinyStyler proves that specialized, smaller models can "punch above their weight" when conditioned on rich latent representations like authorship embeddings. By disentangling style from content through embedding-based conditioning, TinyStyler provides a scalable, controllable, and highly efficient solution for few-shot text style transfer. Future work will focus on expanding the diversity of these embeddings to capture even rarer stylistic nuances.
Summary updated