Polite Chatbot: A Text Style Transfer Application (2023)

Abstract: Generating polite responses is essential to build intelligent and engaging dialogue systems. However, this task is far from well-explored due to the difficulties of rendering a particular style in coherent responses, especially when parallel datasets for regular-to-polite pairs are usually unavailable. This paper proposes a polite chatbot that can produce responses that are polite and coherent to the given context. In this study, a politeness transfer model is first used to generate polite synthetic dialogue pairs of contexts and polite utterances. Then, these synthetic pairs are employed to train a dialogue model. Automatic and human evaluations demonstrate that our method outperforms baselines in producing polite dialogue responses while staying competitive in terms of coherent to the given context.

## introduction building a chatbot agent that produces stylized and coherent responses can yield more engaging conversations @xcite . generating stylized dialogue responses has been investigated in various studies, with a broad understanding of style covering emotion @xcite , personality @xcite or politeness @xcite . in most cases, the stylistic features we want to capture are embedded in unpaired texts that cannot be directly utilized by supervised models @xcite . this typically leads stylized chatbot models to employ complex, multi-step setups, potentially involving reinforcement learning @xcite @xcite . in this paper, we propose a straightforward polite chatbot training procedure that uses a politeness transfer model to create synthetic training instances and results in an end-to-end model. we build upon the work of @xcite , who use a tagger and generator pipeline to generate polite sentences. however, we make their process more straightforward by merging these two sub-modules into a single step: we finetune the bart model @xcite to transfer neutral sentences into polite ones. using this model, we then prepare synthetic pairs of contexts and polite responses and train a dialogue model on this synthetic data. we evaluate our approach on the dailydialog dataset @xcite . automatic and human evaluations show that our method outperforms competitive baselines in response politeness while staying competitive in terms of coherence to the given context. ## method our method consists of three steps (figure 1 ). first, we train a politeness transfer model. our goal here is to train a model that takes as input a neutral sentence x and outputs a sentence x that retains the content while increasing politeness. second, we apply this politeness transfer model to generate synthetic polite chat data. finally, we use the corpus d to train a dialogue model. politeness transfer model although we do not have parallel corpora available for politeness transfer, our transfer model is trained in a supervised fashion on synthetic input-output pairs. these are obtained following @xcite phrases (politeness markers) are identified using tf-idf over polite and non-polite texts. 2 the markers are removed from polite texts on the input, and a sequence-to-sequence model is trained to increase sentence politeness by reconstructing the politeness markers on the output. unlike madaan et al. (2020), we do not use separate tagging and generation steps here and join the task into a single step. specifically, we finetune a pre-trained language model for this task using standard crossentropy loss (see section 4.2). ## conclusion we propose an innovative way of increasing dialogue models' politeness. our method is trained in two steps: the creation of synthetic training corpora with increased politeness and dialogue model training. the resulting dialogue response generation model is end-to-end and does not require postprocessing. compared against multiple baselines for both politeness transfer and dialogue modeling, our politeness transfer model and dialogue response generation achieve increased politeness while still preserving important content. in future work, we aim to extend our method to other stylized response generation tasks.