Learning a Simple and Effective Model for Multi-turn Response Generation with Auxiliary Tasks (2020)

Abstract: We study multi-turn response generation for open-domain dialogues. The existing state-of-the-art addresses the problem with deep neural architectures. While these models improved response quality, their complexity also hinders the application of the models in real systems. In this work, we pursue a model that has a simple structure yet can effectively leverage conversation contexts for response generation. To this end, we propose four auxiliary tasks including word order recovery, utterance order recovery, masked word recovery, and masked utterance recovery, and optimize the objectives of these tasks together with maximizing the likelihood of generation. By this means, the auxiliary tasks that relate to context understanding can guide the learning of the generation model to achieve a better local optimum. Empirical studies with three benchmarks indicate that our model can significantly outperform state-of-the-art generation models in terms of response quality on both automatic evaluation and human judgment, and at the same time enjoys a much faster decoding process.

## introduction as an important topic in conversational ai, opendomain human-machine conversation is gaining increasing attention from both academia and industry. a common approach to building such a system is to learn a response generation model within an encoder-decoder framework using neural sequence architectures @xcite . while the encoder-decoder framework has been successfully applied in various text generation tasks such as machine translation @xcite , summarization @xcite , paraphrase generation @xcite , etc., it has to deal with a unique challenge * corresponding author: can xu (caxu@microsoft.com). in the task of response generation: modeling conversation contexts. a conversation context often exhibits a hierarchical structure with dependency existing on both a word-level and an utterancelevel. moreover, as indicated in @xcite , information in a context is rather redundant for responding: commonly only a few words and utterances are useful for response generation, and the positions of the relevant words and utterances vary from case to case. to model the hierarchy of conversation contexts, hierarchical recurrent encoder-decoder (hred) @xcite extends the vanilla sequence-to-sequence model by a word-level encoder and an utterancelevel encoder. later on, a hierarchical recurrent attention network (hran) @xcite harnesses the decoder of the hred model with wordlevel attention and utterance-level attention to dynamically highlight the effect of relevant words and utterances in response synthesis. very recently, recosa @xcite further exploits multilayer multi-head self-attention foot_0 to model long-term dependency among utterances and responses. from hred to hran, and then to recosa, the performance of the models in terms of response quality becomes better and better @xcite , but the models also grow to be more and more complicated. for example, the number of parameters in recosa is more than twice as that in hred. thus, when we enjoy the improved performance from the increased complexity, the complexity may also impede the application of the models in some scenarios (e.g., in a mobile scenario). in this work, we study multi-turn response generation and target on a model that has a simple structure yet can make use of conversation contexts as well as the existing deep models. the key idea is to transfer the burden of context understanding from modeling to learning by designing several auxiliary tasks, and leverage the auxiliary tasks as regularization in model estimation. specifically, the model we use for response generation concatenates utterances in a conversation context as a long sequence, and only exploits one-layer self-attention in encoding and one-layer context attention in decoding. in such a frugal setting, the representation capability of the model shrinks a lot compared with deep transformers. as a remedy, we augment the maximum likelihood estimation (mle) in learning with objectives from four auxiliary tasks including word order recovery, utterance order recovery, masked word recovery, and masked utterance recovery. in the first two tasks, we predict the correct order of words and utterances from a random shuffle of words in an utterance and a random shuffle of utterances in a context respectively. the goal of the two tasks is to enhance understanding of the sequential dependency among words and utterances within a context. the other two tasks are inspired by the recent breakthrough from bert @xcite , in which we randomly mask a word in an utterance and an utterance in a context respectively, and predict the masked word and the masked utterance using the remaining words and utterances. the two tasks may encourage the learning process to pay more attention to semantics of words and utterances in their contexts, and help the learning process find better representations of words and utterances for the generation model. the auxiliary tasks and the mle task share the encoder of the generation model. through learning with multiple tasks, optimization for response generation and optimization for context understanding are performed in a joint form. the context understanding related tasks can guide the mle to achieve a better local optimum, and thus realize superior performance in response generation with a simple neural structure. we test the proposed approach with three benchmarks including the ubuntu dialogue corpus @xcite , dailydialog @xcite , and persona-chat @xcite . evaluation results on all three datasets indicate that our model can significantly outperform state-of-the-art generation models in terms of both automatic evaluation and human judgment. moreover, with a parameter set even smaller than hred, our model is 2x faster than recosa in response decoding. our contributions in the paper are three-fold: ## related work end-to-end open-domain dialogue generation is built upon the encoder-decoder architecture @xcite , and the vanilla sequence-to-sequence structure has been widely extended to address challenges such as generic responses @xcite , context modeling @xcite @xcite , and grounding by persona/emotion/knowledge @xcite @xcite . in this work, we study how to leverage conversation context for multi-turn response generation, which represents a fundamental problem in dialogue generation. different from the existing work that enhances the representation capability of models through neural architecture engineering, we turn to an orthogonal direction that we keep the generation model simple, and optimize the simple structure by learning with auxiliary tasks that encode context understanding. as a result, our model can provide high-quality responses at a low cost. before us, there have been a few studies on learning a primary task with auxiliary ones @xcite @xcite @xcite . the work is unique in that through extensive empirical studies, we verified that a simple structure learned with auxiliary tasks can work as well as deep architectures in dialogue generation. ## approach we first formalize the problem in question, and then detail the model and the learning tasks. ## experiments we conduct experiments on dailydialog @xcite , persona-chat @xcite , and the ubuntu dialogue corpus (udc) @xcite , and compare our model with state-of-the-art baselines in terms of response quality, parameter size, and decoding speed. randomly sample a mini-batch k from d. while persona-chat contains multi-turn chitchat conversations between turkers according to their assigned profiles. since the focus of the work is how to leverage conversation history for response generation, we just append the profiles (the original ones) to the corresponding dialogues as an extension of contexts. to control the length of the dialogues and increase the number of instances, we slide a window on the training/validation/test dialogues in both datasets, and split a dialogue longer than 11 utterances to multiple instances (i.e., the window size is 11). moreover, we also truncate long utterances with the first 25 words kept. vocabularies are formed with all words appearing in the entire data and are shared by contexts and responses. the vocabulary size of dailydialog is 25, 000 and the vocabulary size of persona-chat is 18, 750. the udc data are collected from ubuntu chat logs with two-person multi-turn conversations about ubuntu-related problems. here we use the same data as in @xcite . ## conclusions we propose a simple generation model with order recovery and masked content recovery as auxiliary tasks. evaluation results on three benchmarks indicate that our model can significantly outperform state-of-the-art deep generation models in terms of both response quality and decoding speed.