A Simple and Efficient Multi-Task Learning Approach for Conditioned Dialogue Generation (2021)

Abstract: Conditioned dialogue generation suffers from the scarcity of labeled responses. In this work, we exploit labeled non-dialogue text data related to the condition, which are much easier to collect. We propose a multi-task learning approach to leverage both labeled dialogue and text data. The 3 tasks jointly optimize the same pre-trained Transformer – conditioned dialogue generation task on the labeled dialogue data, conditioned language encoding task and conditioned language generation task on the labeled text data. Experimental results show that our approach outperforms the state-of-the-art models by leveraging the labeled texts, and it also obtains larger improvement in performance comparing to the previous methods to leverage text data.

## introduction general conversational models pre-trained on large text data @xcite or human-to-human conversation data @xcite have shown excellent performance in generating fluent and diverse responses. in addition to general conversation, we are more and more faced with the problem of conditioned conversation that tunes the dialogue toward a specific style or domain. for example, we might specify a condition as the vocabulary frequently used by a person and ask the system to mimic the speaking style of the person, or a topic-related vocabulary and ask the chatbot to discuss the given topic. conditioned response generation has been extensively explored using rnn-based sequence-tosequence models, under different conditions, e.g. persona @xcite , topic @xcite , emotion @xcite , situations @xcite , and so on. however, only a few existing studies considered using pre-training based models @xcite . the basic idea in these previous works is to utilize a parametric vector to represent a condition and then use it in the decoder for conditioned generation. however, the key issue in conditioned dialogue generation is the availability of labeled responses @xcite , and pre-training on unlabeled text or dialogue data does not help much. therefore, the motivation of this work is to leverage labeled text (non-dialogue) data that are much easier to collect than labeled dialogue data as supplement. these data can be, for example, texts written by the same person (for a persona condition), within the same topic domain (for a topic condition), etc. the idea is inspired by response style transfer @xcite , which uses a text corpus to learn a style and then transfer the style to dialogue. based on their success, we assume that the labeled text data can contribute to create better representations of conditions and better utilization of conditions in natural language generation. in this work, we propose a multi-task learning approach to leverage both labeled dialogue and text data. we use 3 tasks to jointly optimize the same pre-trained transformer -conditioned dialogue generation task on the labeled dialogue data, conditioned language encoding task and conditioned language generation task on the labeled text data. our assumption is that the two other tasks can help in our final goal of conditioned dialogue generation: conditioned language generation is the base of conditioned response generation, and conditioned language encoding using bi-directional attention can efficiently encode condition-related expressions and lead to better condition representations. we apply different input representations, self-attention masks, and random mask strategies to differentiate the 3 tasks. regardless of these differences, the training objectives of these tasks are essentially the same, i.e. masked language modeling, and thus we can mix up 2 types of data / 3 tasks in one training batch, which prevents us from having the catastrophic forgetting problem @xcite . to efficiently leverage labeled data, first, our approach incorporates all types of data within the same framework, avoiding introducing ad hoc model components which are usually needed in some response style transfer methods in order to leverage extra texts. second, we propose tf-idf based masking which selects more conditionrelated tokens to mask, so that the model can exploit the labeled text data more for conditionrelated expressions rather than the general language features already captured by the pre-trained models. third, for conditioned generation, we propose a non-parametric attention-based gating mechanism, which chooses between generating a general word (necessary for general function words) or a condition-related word at each position. we expect it to be more efficient than a parametric gating. experimental results show that these approaches all bring improvements. our approach is generalizable. in spite of many different labels, a condition essentially specifies some preferences on words, phrases, and sentence structures in the generated responses. thus, a general approach can be instantiated to a specific case as long as the corresponding labeled dialogue data are available. we will run experiments with two instantiated models for persona-and topic-related dialogue. additionally, we will empirically show that our approach is robust and can even work with condition labels predicted by a classification model, e.g. lda for topic labels. the contributions in this work are as follows foot_0 : ## method we assume that we have two types of training data: a labeled dialogue corpus containing (dialogue history, condition, response) samples, and a labeled text corpus consisting of (condition, text) samples. notice that the "condition" is any categorical label that indicates a type of responses or texts. our goal is to generate a response y that exhibits the desired characteristics of the type of responses given a dialogue history x and a condition c: the transformer in our work uses bi-directional attention on the source side to encode the dialogue history, and left-to-right attention on the target side to generate the response. such a transformer can be initialized from bert @xcite , roberta @xcite , unilm @xcite , or the models pre-trained on large-scale unlabeled dialogue data e.g. plato @xcite and blender @xcite . in this work, we focus on efficiently leveraging labeled data, i.e. dialogue and text. figure 1 (left) shows the overview of our approach.