Semi-Supervised Formality Style Transfer with Consistency Training (2022)

Abstract: Formality style transfer (FST) is a task that involves paraphrasing an informal sentence into a formal one without altering its meaning. To address the data-scarcity problem of existing parallel datasets, previous studies tend to adopt a cycle-reconstruction scheme to utilize additional unlabeled data, where the FST model mainly benefits from target-side unlabeled sentences. In this work, we propose a simple yet effective semi-supervised framework to better utilize source-side unlabeled sentences based on consistency training. Specifically, our approach augments pseudo-parallel data obtained from a source-side informal sentence by enforcing the model to generate similar outputs for its perturbed version. Moreover, we empirically examined the effects of various data perturbation methods and propose effective data filtering strategies to improve our framework. Experimental results on the GYAFC benchmark demonstrate that our approach can achieve state-of-the-art results, even with less than 40% of the parallel data.

## introduction formality style transfer (fst) @xcite has garnered growing attention in the text style transfer community, which aims to transform an informal-style sentence into a formal one while preserving its meaning. the large amount of usergenerated data from online resources like tweets often contain informal expressions such as slang words (e.g., gonna), wrong capitalization or punctuations, and grammatical or spelling errors. fst can clean and formalize such noisy data, to benefit downstream nlp applications such as sentiment classification @xcite . some examples of fst data are presented in with the release of the fst benchmark grammarly yahoo answers corpus (gyafc) @xcite informal titanic i think it cost about 300 million formal i think that titanic cost around 300 million dollars. informal being condiderate of her feelings and needs formal i am being considerate of her personal needs and feelings. tetreault, 2018), previous studies on fst tend to employ neural networks such as sequence-tosequence (seq2seq) models to utilize parallel (informal and formal) sentence pairs. however, gyafc only contains 100k parallel examples, which limits the performance of neural network models. several approaches have been developed to address the data-scarcity problem by utilizing unlabeled sentences. in a previous study, @xcite proposed several effective data augmentations methods, such as back-translation, to augment parallel data. another line of research @xcite @xcite conducted semi-supervised learning (ssl) in a cycle-reconstruction manner, where both forward and backward transfer models were jointly trained while benefiting each other by generating pseudo-parallel data from unlabeled sentences. under this setting, both additional informal and formal sentences are utilized; however, the forward @xmath0, which are back-translated by the @xmath1. conversely, the @xmath2. because the main objective of fst is the @xmath3, the additional informal sentences were not well utilized in previous studies. in addition, these semi-supervised models incorporate many auxiliary modules such as style discriminators, to achieve state-of-the-art results, which result in rather complicated frameworks and more model parameters. as noisy informal sentences are easier to ac-quire from online resources, we attempt to take a different view from existing approaches, by adopting additional source-side (informal) sentences via ssl. we gain insights from the state-of-the-art approaches for semi-supervised image and text classification @xcite @xcite @xcite and propose a simple yet effective ssl framework for fst using purely informal sentences. our approach employs consistency training to generate pseudo-parallel data from additional informal sentences. specifically, we enforce the model to generate similar target sentences for an unlabeled source-side sentence and its perturbed version, making the model more robust against the noise in the unlabeled data. in addition, a supervised loss is trained simultaneously to transfer knowledge from the clean parallel data to the unsupervised consistency training. data perturbation is the key component of consistency training and significantly affects its performance. to obtain a successful ssl framework for fst, we first empirically study the effects of various data perturbation approaches. specifically, we explore easy data augmentation methods, such as random word deletion, and advanced data augmentation methods, such as back-translation. we also handcraft a line of rule-based data perturbation methods to simulate the features of informal sentences, such as spelling error injection. furthermore, we propose three data filtering approaches in connection with the three evaluation metrics of fst: style strength, content preservation, and fluency. specifically, we adopt style accuracy, source-bleu, and perplexity as three metrics to filter out low-quality pseudo-parallel data based on a threshold. we also propose a dynamic threshold algorithm to automatically select and update the thresholds of source-bleu and perplexity. we evaluate our framework on the two domains of the gyafc benchmark: entertainment & music (e&m) and family & relationships (f&r). we further collect 200k unpaired informal sentences for each domain to perform semi-supervised training. experimental results verify that our ssl framework can enhance the performance of the strong supervised baseline, a pretrained t5-large (raffel et al., 2020) model, by a substantial margin, and improve the state-of-the-art results by over 2.0 bleu scores on both gyafc domains. empirically, we also deduce that simple word-level data augmentation approaches are better than advanced data augmentation methods that excessively alter the sentences, and spelling error injection is especially effective. in addition, our evaluation-based data filtering approach can further improve the performance of the ssl framework. furthermore, we also conduct low-resource experiments by reducing the size of parallel data. surprisingly, our framework could achieve the state-of-the-art results with only less than 40% of parallel data, demonstrating the advantage of our method in low-resource situations. ## experiments we introduce the experimental settings in section 4.1. to obtain relevant findings on how to build an effective consistency training framework for fst, we first empirically study the effects of multiple data perturbation methods in section 4.2 and prove the effectiveness of consistency training via comparisons with the base model. then, we validate our consistency training model with different data filtering methods in section 4.3 and demonstrate their additional effects on the ssl framework. based on the findings in these two experiments, we further compare our best models with previous state-of-the-art models in section 4.4. we also include case studies in section 4.4 to present some qualitative examples. finally, we conduct low-resource experiments (section 4.5) to demonstrate our method's advantage when less parallel data are available. ## conclusion in this study, we proposed a simple yet effective consistency-based semi-supervised learning framework for formality style transfer. unlike previous studies that adopted cycle-reconstruction to utilize additional target-side sentences for backtranslation, our method offers a different view, to leverage source-side unlabeled sentences. without introducing additional model parameters, our method can easily outperform the strong supervised baseline and achieve the new state-of-the-art results on formality style transfer datasets. for future work, we will attempt to generalize our approach to other text generation scenarios.