KG - CR u SE : Recurrent Walks over Knowledge Graph for Explainable Conversation Reasoning using Semantic Embeddings (2022)

Abstract: Knowledge-grounded dialogue systems utilise external knowledge such as knowledge graphs to generate informative and appropriate responses. A crucial challenge of such systems is to select facts from a knowledge graph pertinent to the dialogue context for response generation. This fact selection can be formulated as path traversal over a knowledge graph conditioned on the dialogue context. Such paths can originate from facts mentioned in the dialogue history and terminate at the facts to be mentioned in the response. These walks, in turn, provide an explanation of the flow of the conversation. This work proposes KG-CRuSE, a simple, yet effective LSTM based decoder that utilises the semantic information in the dialogue history and the knowledge graph elements to generate such paths for effective conversation explanation. Extensive evaluations showed that our model outperforms the state-of-the-art models on the OpenDialKG dataset on multiple metrics.

## introduction inducing factual information during response generation has garnered a lot of attention in dialogue systems research. while language models @xcite have been shown to generate responses akin to the dialogue history, they seldom contain factual information, leading to a bland conversation with the agent. knowledgegrounded dialogue systems focus on leveraging external knowledge to generate coherent responses. knowledge graphs (kgs) are a rich source of factual information and can be combined with an utterance generator for a natural and informative conversational flow. @xcite showed that utilising kgs in dialogue systems improves the appropriateness and informativeness of the conversation. augmenting utterances in a dialogue with the kg information could you recommend me movies similar to the dark knight? the sequel to batman begins is the dark knight. okay. who is the director of the dark knight and any other movies from him not related to batman? christopher nolan was the director. he also directed insomnia and inception. guides the conversational agent to include relevant entities and facts in the response. for example, figure 1 shows an example conversation where a user is interacting with a dialogue agent about movies. the agent has access to a kg that aids in suggesting relevant facts during the dialogue flow. when responding to utterance 3, the agent can utilise information from the kg and produce relevant facts about "christopher nolan". this information would be more engaging than responding with information about "batman" or "batman begins". ## related work the use of external knowledge in dialogue agents has become commonplace, owing to the rich heterogeneous information contained in them. @xcite addressed the knowledge-grounded conversation task by iteratively updating the knowledge base embeddings to generate informative responses. following this, knowledge-based dialogue systems have been studied extensively including the collection of new knowledge-grounded datasets @xcite @xcite and developing knowledge-centric dialogue systems @xcite @xcite . @xcite attempted to integrate a large scale kg into an end-to-end dialogue system. other similar works @xcite @xcite ) leveraged graph neural networks and kg embeddings to recommend relevant products in conversational recommender systems. though successful in retrieving suitable entities or facts from the kg, these systems fail to provide explainability to the recommendations. such limitations encouraged explainable conversation reasoning using external knowledge. @xcite develop the problem as a partially sentence bert encoder l s t m h 1 . sentence bert encoder r 11 ;e 11 r 1m ;e 1m r 12 ;e 12 [r 11 ; e 11 ] [r 12 ; e 12 ] [r 11 ; e 1m ] p path h 2 w 1 w 2 w 3 . . . w n dialogue history available actions action scores figure 2: modular overview of kg-cruse architecture. kg-cruse utilises the sbert architecture to encode the dialogue history and the kg elements. to generate walk paths over the kg, kg-cruse leverages an lstm network to model the temporal information. to generate the path at timestep t, the lstm takes as input (d, (r 1 ; e 1 ), ..., (r t-1 ; e t-1 )) and outputs the hidden state representation h t of the step t. kg-cruse then computes dot-product of h t with the embeddings of the actions available at timestep t ([r t,1 ; e t,1 ], [r t,2 ; e t,2 ], ...,[r t,m ; e t,m ]) followed by a softmax layer to compute the probability of each available action. observable markov decision process and use policy gradient for training the agent to generate kg paths. moon et al. (2019) posited a kg pathparallel-dialogue corpus along with dialkg walker (dkgw) model, a recurrent decoder model to generate the kg path for a response entity selection. jung et al. ( 2020 ) suggested the use of graph neural networks using attention flow to generate kg entity paths. while novel, dkgw does not explicitly utilise the graph structure during model training. on the other hand, the performance of at-tnio @xcite relies on the node sampler during training. attnio becomes computationally expensive due to dialogue specific graph neural network (both during training and inference) as the model concatenates the dialogue embedding to the node embeddings while propagating attention scores. to counter these issues, we design a very simple, lightweight, yet efficient lstm network leveraging the dialogue and path history to extend the path over the kg. while, dkgw uses transe @xcite ) for encoding the elements of the kg, such translation embeddings have weak representation capacity. on the other hand, @xcite utilise the albert @xcite representation of sentence to encode the dialogue history and the kg elements. they use the [cls] token representation of the text sequence as the sentence representation. @xcite suggested sentence-transformers for encoding sentences. we encode the dialogue history and the kg elements using sentence-transformers to capture rich semantic similarities between the dialogue history and the kg elements. the processing of semantically rich sequential information using a lightweight lstm model makes kg-cruse ideal for generating walks over a kg for explainable conversation. ## methodology in the following sections, we begin with formally introducing the problem statement. we then outline the embeddings used in kg-cruse. following this, we discuss the architecture of kg-cruse as illustrated in figure 2 . finally, we describe decoding process used by kg-cruse during the inference step. ## experimental setup this section presents the dataset used, the baselines compared with and the description of the model settings of kg-cruse along with the metrics the models have been evaluated on. ## results and discussion we begin with performing a quantitative evaluation of the models. following this, we study the impact of our choice of sentence embeddings on the model performance. then we analyse the impact of beam-width at each decoding step during inference. finally, we provide insights of examples where the results of kg-cruse are not consistent with the ground truth paths. ## conclusion in this work, we propose kg-cruse, an lstm based lightweight framework for explainable conversational reasoning. we utilise sbert embeddings to capture the rich semantic information in the dialogue history and the kg elements. we conduct an extensive evaluation to demonstrate that our framework outperforms several baseline models on both explainability and response entity retrieval. as annotating ground truth paths is expensive, we plan on extending this model to scenarios when ground truth paths are not available involving the generation of knowledge-conditioned dialogue.