Incorporating Causal Analysis into Diversified and Logical Response Generation (2022)

Abstract: Although the Conditional Variational Auto-Encoder (CVAE) model can generate more diversified responses than the traditional Seq2Seq model, the responses often have low relevance with the input words or are illogical with the question. A causal analysis is carried out to study the reasons behind, and a methodology of searching for the mediators and mitigating the confounding bias in dialogues is provided. Specifically, we propose to predict the mediators to preserve relevant information and auto-regressively incorporate the mediators into generating process. Besides, a dynamic topic graph guided conditional variational auto-encoder (TGG-CVAE) model is utilized to complement the semantic space and reduce the confounding bias in responses. Extensive experiments demonstrate that the proposed model is able to generate both relevant and informative responses, and outperforms the state-of-the-art in terms of automatic metrics and human evaluations.

## introduction with recent advances in deep learning and readily available large-scale dialogue data, generationbased methods have become one of the most prevailing methods for building dialogue systems. based on the seq2seq framework @xcite , generation-based models learn to map the input post to its corresponding response through an encoding-decoding strategy and are trained in end-to-end manners @xcite @xcite . however, seq2seq model tends to produce generic and safe responses @xcite such as "so am i" or "i don't know". researchers conjecture that the cause of this phenomenon is that one certain post can be replied by multiple responses (i.e., oneto-many mapping), and the maximum likelihood estimation (mle) training would average out these to tackle this problem and model the one-tomany mapping relationships in dialogues, @xcite firstly leverages conditional variational auto-encoder (cvae) model to map the input post into a semantic distribution, instead of a fixed vector as used in the vanilla seq2seq model. the decoder then decodes the sampled points from the semantic distribution to generate corresponding responses. this model significantly increases the diversity of responses, but it is hard to train as the valid responses are too few to shape a clear semantic distribution for each post. as a result, the cvae model is inclined to learn some spurious statistical cues for predicting diversified words, which may have very low relevance with the input post. other studies focus on re-using the model's components to fit the multiplicity of dialogues, for instance, the multiple mechanisms used in @xcite and @xcite , the multi-head attention used in @xcite , and reinforced methods @xcite . the most-related work in this line is the multi-mapping and posterior mapping selection (mmpms) @xcite model, which directly builds multiple mapping modules to learn diversified semantics and generate responses. however, these studies haven't considered the intrinsic nature of this one-to-many phenomenon in dialogues. we always face the trade-off between the accuracy of response and diversity of semantics, and cannot directly generate relevant and diversified responses from the original input post. to solve this dilemma and examine the nature of dialogues, we introduce the causal inference analysis @xcite into the dialogue generation task. here, we assume between the input post and outcome response, there exists one mediator. the mediator can easily capture the relevant but simple response from the input post (input @xmath0. in addition, when generating the diversified responses, the sampling steps in prior and posterior distributions of cvae will act as the confounders between the input and outcome response. therefore, we establish one causal graph including the mediator, confounder, input post, and segmented responses, i.e, direct responding semantics and supplementary semantics, to facilitate the information transmission and enrichment, and preserve the relevance and logicality. based on the above causal analysis, this work presents a unified end-to-end sentence-level autoregressive model (slarm) to predict the mediator and mitigate the confounding bias in generating diverse responses. we concrete the mediator by predicting the direct responding semantics, and leverage this mediator in an auto-regressive manner for response generation. a dialogue topic graph enhanced cvae model with a larger semantic space is proposed to reduce the confounding bias in cvae model, and thus make sure the transition is smooth and natural. in conclusion, the contributions of this work are three-fold: ## causal analysis we assume there exists one mediator between corresponding to the above causal relationship, we split the complete response into two parts, i.e., direct responding semantics and supplementary semantics, as shown in figure 1 . the direct responding semantics represents the semantic part that can be directly leveraged to answer the input question. the direct responding semantics is the proxy variable of the mediator. the supplementary semantics represents the peripheral semantic part that is either an explanation, a supplement, or an extension of the direct responding semantics. the direct responding semantics is semantically homogeneous because it has to solve the issue directly, and the supplementary semantics is more diversified because it adds more information to explain or supplement the direct responding semantics, or even change the topics to make conversation continue. although the high-quality observations of the mediators can reduce the confounding bias hidden in the causal structure by reducing the possibility of counting on the confounders, it is not enough to attain one relevant and diversified response in the complex dialogue generation task. in addition, unlike the mediator that can be represented by direct responding semantics, it is very challenging to define and construct the exact confounders clearly. therefore, due to the complex causal graph and hidden confounders, the frontdoor and back-door adjustments @xcite for reducing the confounding bias cannot be easily applied. therefore, instead of the conventional causal intervention based on pearl's do-calculus @xcite , we propose to exploit the dialogue topic graph to complement the semantic space and assign more relevant information into cvae, which can enhance the diversity and keep the relevance of input post simultaneously. ## proposed model our response generation task is defined as follows. given an input post @xmath1, x 2 , • • • , x t }, the problem is to generate the corresponding response sequence @xmath2, y 2 , • • • , y t ′′ }, where t is the length of the post and t to address this problem, we propose to generate the response sequence in a sentence-level autoregressive manner. firstly, we predict the proxy variable of the mediator by maximizing the loglikelihood of the following formula: as mentioned above, this process produce general responses, but they are closely related to the input post and may help determine where the conversation should go. hence, we preserve the causal path (input @xmath3. then, an sentence level auto-regressive generating model (slarm) is proposed to produce diverse and informative responses based on the mediator and the dialogue topic graph. we first propose to utilize the predicted mediator in an autoregressive manner: and then build a topic graph enhanced cvae model to mitigate the confounding bias in traditional cvae models. the auto-regressive training manner serves like a prompt to naturally inject the mediator into generation process, and the topic graph provides dynamic guidance to prevent the cvae model from off-the-topic deviation and complement the semantic space. ## conclusion in this paper, we incorporate the causal analysis into the dialogue generation task by searching for the mediators and mitigating the confounding bias in dialogues. we thus propose a sentence level auto-regressive response generation model to first generate mediators to preserve relevance with the input post, and then generate the diversified semantics based on our proposed (slarm) model. extensive experimental results demonstrate the effectiveness of our approach. for future work, we are exploring more complicated and self-adaptive methods for locating mediators, and we are trying to leverage de-confounding methods to deal with the cvae problem.