Transductive Learning for Unsupervised Text Style Transfer (2021)

Abstract: Unsupervised style transfer models are mainly based on an inductive learning approach, which represents the style as embeddings, decoder parameters, or discriminator parameters and directly applies these general rules to the test cases. However, the lacking of parallel corpus hinders the ability of these inductive learning methods on this task. As a result, it is likely to cause severe inconsistent style expressions, like ‘the salad is rude’. To tackle this problem, we propose a novel transductive learning approach in this paper, based on a retrieval-based context-aware style representation. Specifically, an attentional encoder-decoder with a retriever framework is utilized. It involves top-K relevant sentences in the target style in the transfer process. In this way, we can learn a context-aware style embedding to alleviate the above inconsistency problem. In this paper, both sparse (BM25) and dense retrieval functions (MIPS) are used, and two objective functions are designed to facilitate joint learning. Experimental results show that our method outperforms several strong baselines. The proposed transductive learning approach is general and effective to the task of unsupervised style transfer, and we will apply it to the other two typical methods in the future.

## introduction text style transfer is an essential topic of natural language generation, which is widely used in many tasks such as sentiment transfer @xcite , dialogue generation @xcite @xcite , and text formalization @xcite . the target is to change the style of the text while retaining style-independent content. as it is usually hard to obtain large parallel corpora with the same content *corresponding author the salad is delicious. the salad is rude. ## related work previous unsupervised text style transfer methods can be divided into three categories according to the way they control the text style, e.g. embedding based method, decoder based method, and classifier based method. the embedding based methods assign a separated embedding for each style to control the style of generated text. early work tries to disentangle the content and style in the text. they first implicitly eliminate the original style information from the text representation using adversarial training @xcite @xcite or explicitly delete style-related words @xcite @xcite . then, decode or rewrite the style-independent content with the target style embedding. as a complete disentanglement is unreachable and damaged the fluency of the text, recent approaches @xcite @xcite @xcite directly feed original text representation and a separated learned style embedding to a stronger generator, e.g., the attention-based sequence-tosequence model or transformer to obtain the style transferred text. the decoder based methods build a decoder for each style or transfer direction, where the style is implicitly represented as the parameters in the corresponding decoder. the former schema built an independent decoder for each style, which first disentangled the style-irrelevant content from the text and then applied the corresponding decoder to generate sentences with the target style @xcite @xcite . the latter built for each transfer direction, which often regarded style transfer as a translation task @xcite @xcite @xcite . this paradigm reduced the complexity of the learning of style to a certain extent but consumed more resources. it is worth mentioning that the boundaries of embedding controlled and decoder controlled methods are sometimes not very clear, and many studies @xcite ) consider that they are alternative. the classifier based methods convert the style by manipulating the latent representation of the text according to a pre-trained classifier. wang et al. (2019) and liu et al. (2020 ) mapped the input sentence into a latent representation, and trained classifiers on this latent space. the latent representation would be edited based on the gradients of the classifier until the predicted style changed; after that, the decoder took the modified representation to generate the desired style sentence. @xcite further expanded this framework to a plug and play scene. although it has remarkable style accuracy, this method can hardly guarantee content preservation due to the concrete output sharply changes with the latent representation. we can see that all of these existing methods belong to the inductive learning approach, because they aim to learn a general style transfer rule from the training data, and then apply the rule to the test cases. due to the lack of parallel corpus for supervision, this inductive learning approach fails to learn an accurate style representation application for various contexts, and may cause some severe inconsistency problems as illustrated before. ## transductive style transfer firstly, we introduce some notations. consider the unsupervised text style transfer task with m styles, its training set is composed of m singlestyle subsets {d i } m @xmath0. for an arbitrary input text x in a subset and the target style s j , the goal of text style transfer is to generate a new sentence y which represents the style s j while keeping the style-independent content of x as much as possible. to tackle the aforementioned inconsistency problem, we propose to utilize transductive learning to obtain a context-aware style representation for the style transfer process. specifically, our proposed transductive style transfer(tsst) model consists of three modules, encoder, retriever, and decoder, as described in figure 2 . ## experiment in this section, we conduct experiments to study how well and why the proposed tsst model alleviates the inconsistency problem. furthermore, a detailed ablation study is demonstrated to show each objective function's contribution to the overall performance. ## conclusions and future work previous style transfer models are mainly based on inductive learning approach, thus suffer from the inconsistent style expression problem with lack of the parallel corpus as supervisions. to tackle this problem, we propose a novel transductive learning approach for unsupervised text style transfer. the key idea of our tsst model is to learn contextaware style expressions via retrieved samples from the target style datasets. experimental results on two typical style transfer tasks show that tsst significantly improves the performances in terms of both automatic and human evaluation. our proposed transductive learning approach is very general, and this work mainly focus on the embedding-based methods. in future, we plan to extend our approach to other methods, such as decoder-based and discriminator-based methods. moreover, we will try more powerful retrieval methods, such as dpr @xcite .