# An Adaptive Contextual Relation Model for Improving Response Generation
## 1 Introduction  
Open-domain dialogue has been a long-standing issue in natural language processing, and the end-to-end response generation methods have attracted increasing attention recently [1; 2; 3; 4; 5]. The relationship between dialogue sentences in open-domain dialogues is loosely coupled; a dialogue history can lead to multiple different responses (i.e., one-to-many phenomenon), and the dialogue history often contains irrelevant noise. Therefore, the correlation between history and response is not always closely related, so predicting response based on history alone is insufficient. The research on enhancing context relations is mainly divided into two categories: (1) reducing history noise or increasing future information, such as improving the importance of key semantic information by filtering dialogue history [6; 7; 8], or introducing the dialogue future to provide more context information [9; 10; 11]; and (2) exploring the internal text features of the context and using these features to assist context modeling, such as using keywords [12], topic words [13; 14], and hierarchical information [15] to achieve better contextual modeling. Among them, text features are closely related to the dialogue context relations, so analyzing and utilizing the context is the focus of these works. However, especially in work that introduces the dialogue future, they simply assume that the historyand future of dialogue have the same impact on response generation, but we find that they have different effects in different dialogue contexts. For example, in some inquiry scenarios, it is often in the form of question-answer, and the next question (future) is often not very relevant to the previous answer. Therefore, we propose that when using history and the future to simultaneously predict responses, the relevance between history-response and response-future should be given, which we call the response's context relation. Otherwise, introducing less relevant information into the response prediction process will affect the prediction results. Therefore, to address the aforementioned problems and better utilize the dialogue context, we first research the dialogue context relations and then propose a response generation method to utilize these relations. Our work encompasses two key aspects: (1) Context relations analysis and annotation: We employ three consecutive sentences as the basic unit. Based on the binary correlation between history-response and response-future, we obtain three context relations of response. For example, the above-mentioned history-response relevance but response-future irrelevance in the question-answer scenarios is one of our three context relations. We then annotate the context relation labels on a popular dialogue dataset DailyDialog [16]. (2) Context relations utilization: Building upon the annotated context relations, we propose a dialogue generation model that adaptively integrates the information of dialogue contexts, enhancing contextual modeling and enriching response prediction. Specifically, our model first generates two responses based on dialogue history and simulated future and learns to adaptively fuse these two generated responses through annotated relation labels to produce the final response. The primary contributions of this paper encompass the following:  
* Propose three dialogue context relations based on three consecutive dialogue sentences (history, response, and future) and annotate them on a large amount of data. * Propose a response generation model that adaptively integrates the information from dialogue contexts guided by the dialogue context relation labels. To the best of our knowledge, we are the first to introduce dialogue context relations to assist context modeling for dialogue generation. * The experimental results demonstrate that our model outperforms previous strong baseline results on the DD dataset, achieving better context modeling ability by introducing the dialogue context relations.