Venue: NAACL 2022

# Commonsense and Named Entity Aware Knowledge Grounded Dialogue Generation

 Deeksha Varshney\({}^{\dagger}\),  Akshara Prabhakar\({}^{\ddagger}\)1 Asif Ekbal\({}^{\dagger}\)

\({}^{\dagger}\)Department of Computer Science and Engineering,

Indian Institute of Technology Patna, India

\({}^{\ddagger}\)Department of Information Technology,

National Institute of Technology Karnataka, Surathkal

{1821cs13,asif}@iitp.ac.in akshlr555@gmail.com

Work done during an internship at IIT Patna

###### Abstract

Grounding dialogue on external knowledge and interpreting linguistic patterns in dialogue history context, such as ellipsis, anaphora, and co-references is critical for dialogue comprehension and generation. In this paper, we present a novel open-domain dialogue generation model which effectively utilizes the large-scale commonsense and named entity based knowledge in addition to the unstructured topic-specific knowledge associated with each utterance. We enhance the commonsense knowledge with named entity-aware structures using co-references. Our proposed model utilizes a multi-hop attention layer to preserve the most accurate and critical parts of the dialogue history and the associated knowledge. In addition, we employ a Commonsense and Named Entity Enhanced Attention Module, which starts with the extracted triples from various sources and gradually finds the relevant supporting set of triples using multi-hop attention with the query vector obtained from the interactive dialogue-knowledge module. Empirical results on two benchmark dataset demonstrate that our model significantly outperforms the state-of-the-art methods in terms of both automatic evaluation metrics and human judgment. Our code is publicly available at [https://github.com/deekshaVarshney/CNTF](https://github.com/deekshaVarshney/CNTF); [https://www.iitp.ac.in/~ai-nlp-ml/resources/codes/CNTF.zip](https://www.iitp.ac.in/~ai-nlp-ml/resources/codes/CNTF.zip).

## 1 Introduction

Neural language models usually focus on fewer language components such as sentences, phrases, or words for text analysis. However, language acts on a much broader scale - there is frequently a central theme to a conversation, and the speakers share common information in order to comprehend one another. Information is frequently reused, however to avoid overuse, same things and persons are referred in the dialogue multiple times by using relevant expressions. A dialogue becomes coherent and speakers can understand each other when all of this information is delivered in a structured, logical, and consistent manner.

Semantic understanding of dialogues can be aided by commonsense knowledge or world facts. Additionally, as a key human language phenomena, co-reference simplifies human languages while being a significant barrier for machines to understand, particularly for pronouns, which are difficult to parse due to their weak semantic meanings Ehrlich (1981). Grounded response generation approaches Ghazvininejad et al. (2018); Dinan et al. (2018) can provide replication of facts in open-domain settings, whereas commonsense knowledge is critical for creating successful interactions since socially constructed commonsense knowledge is the collection of contextual details that humans are expected to understand and use during a conversation.

Despite demonstrating efficacy in empirical evaluation, past work has a few significant drawbacks. There is no explicit representation of entities, semantic relations, or conversation structures, in particular. To solve such restrictions, asking a conversation model to identify relevant structures in dialogue histories can be used to directly test the level of dialogue understanding. We focus on named entity level knowledge in this paper, and analyze references to entities in a dialogue history context.

To ensure the generalizability of our model, we directly incorporate entities in the form of triplets, which is the most common format of modern knowledge graphs, instead of encoding it with features or rules as in conventional approaches. Take, for example, Figure 1, where the dialogue consists of eight utterances. In the third utterance, to know if there exists any relation between the director "Micheal Mann" and the movie "The Last of the Mohicans", we need to resolve the co-reference

relationship between the pronoun [It] and the entity [The Last of the Mohicans]. Using co-reference resolution, we get an important triple for the movie "The Last of the Mohicans" _viz.__( The Last of the Mohicans, RelatedTo, Micheal Mann)_. Similarly, from the second last utterance, we obtain another triple as _(The Last of the Mohicans, RelatedTo, Morgan Creek Pictures)_. Thus, for instance, to generate the fourth utterance "I tried to read the book but gave up. I can't remember what other movies _Michael Mann_ has directed.", it is important for the model to know that there is a relation between the concept word _"movie"_ and the named entities _"Micheal Mann"_, _"The Last of the Mohicans"_, to get a correct understanding of the dialogue context.

We create a conversational model called CNTF, **C**ommonsense, Named Entity and **T**opical Knowledge **F**used neural network to generate successful responses by leveraging both topic-specific document information and using structured entity and commonsense knowledge. We first construct triples based on named entity after resolving co-references in the dialogues to enhance the already existing commonsense triples obtained from the ConceptNet Speer and Havasi (2012). We use multi-hop attention to iterate over the multi-source information. We obtain a weighted query vector from the interactive dialogue-knowledge module, which is used to query over the dialogue, topical knowledge and the corresponding triples. In each round, CNTF reasons on the dialogue history and knowledge sentences, using which we filter out relevant information from the dialogue context and topical knowledge. Similarly, to reason over the triples, we again iterate in multiple rounds, masking out irrelevant triples.

Our work makes the following contributions:

1. We propose CNTF, a novel knowledge grounded dialogue generation model that utilizes dialogue context, unstructured textual information, and structural knowledge to facilitate explicit reasoning.
2. We enhance the commonsense triples extracted from the ConceptNet database with named entity-aware structures using co-reference resolution.
3. We define an effective sliding window mechanism in order to remove irrelevant information from longer dialogue context and ensure efficient memory utilization. We use an interactive dialogue-knowledge module to generate a weighted query vector which captures the interactions between the conversation and the topical knowledge.
4. Through extensive qualitative and quantitative validation on publicly available datasets, we show that our model outperforms the strong baselines.

Figure 1: An example of named entity and concept based knowledge triples being used for grounding dialogues in addition to topic-specific knowledge sentences. In the conversation, various shades indicate the different co-reference clusters obtained. Blue nodes correspond to the concepts obtained from ConceptNet, red nodes correspond to the named entities obtained from the utterances in the dialogue. Named Entities other than the ones present in co-reference chains are highlighted in green in the conversation.

 

Related Work

Sequence-to-sequence models (Vinyals and Le, 2015; Sutskever et al., 2014) have long been used for natural language generation (NLG) tasks. Stemming off the vanilla encoder-decoder architecture - introduced initially for neural machine translation Shang et al. (2015), a variety of models have been developed to enhance the quality of the responses generated Li et al. (2016a); Zhao et al. (2017); Tao et al. (2018); to effectively select the conversational context in multi-turn dialogues Serban et al. (2016, 2017); Xing et al. (2017); Zhang et al. (2019); and to model persona while conversing Li et al. (2016b); Zhang et al. (2018). Recent advances on dialogue systems aim at enhancing dialogue generation by making it more humanized by means of incorporating knowledge based on the dialogue context or from external sources, such as unstructured documents Li et al. (2019); Qin et al. (2019) or knowledge graphs Moon et al. (2019); Tuan et al. (2019).

Numerous pre-trained language models Devlin et al. (2019); Radford et al. (2019) have been utilized for dialogue generation Edunov et al. (2019); Zhang et al. (2020). They have been extended to leverage the knowledge from the unstructured documents and other auxiliary sources via knowledge selection and various attention fusion techniques Zhao et al. (2020c); Cao et al. (2020). The task was explored in low-resource setting Zhao et al. (2020b) using a disentangled response decoder, and the usability of language models itself as a knowledge base has also been investigated in Zhao et al. (2020d). An issue with language models is the noise which these introduce during knowledge selection. In order to limit the noise by generative models, term-level weighting Zheng et al. (2021) for response generation after knowledge selection were studied. Zhao et al. (2020a) proposed a pre-training based multiple knowledge syncretic transformer that uses a single framework to integrate knowledge from multiple sources. Knowledge based end-to-end memory networks have been developed for task-oriented dialogue generation Raghu et al. (2019); Reddy et al. (2019); Chen et al. (2019); Wang et al. (2020); Varshney and Singh (2021) using multi-level, working, and dynamic types of memory. In Dual Dynamic Memory Network (DDMN) Wang et al. (2020), the flow of history information during conversations is dynamically tracked to retain the important parts from both dialogue and KB, using a memory manager for each.

Prior studies Young et al. (2018); Zhou et al. (2018a); Wu et al. (2020b) have demonstrated the feasibility of including commonsense knowledge into the dialogue systems. Further, in ConKADI Wu et al. (2020a), felicitous facts highly relevant to the context were selected and effectively integrated in the generated response by means of fusion mechanisms. Recently, co-reference resolution has been utilized for obtaining coref-informed pre-trained models Ye et al. (2020), task-oriented dialogue generation Quan et al. (2019), and dialogue understanding Zhang et al. (2021). Further, Huang et al. (2021) demonstrated the improvement upon explicitly incorporating co-reference information to enhance the attention mechanism for the reading comprehension task.

In this paper, we show how both structured and unstructured knowledge can be used to improve the task of document-grounded dialogue generation. We propose an effective knowledge-grounded dialogue model named CNTF, which is built with multi-source heterogeneous knowledge. Experiments on knowledge-based dialogue generation benchmark datasets, _viz_. Wizard of Wikipedia and CMU_DoG, have shown the efficacy of our proposed approach. Our method employs a large-scale named entity enhanced commonsense knowledge network as well as a domain-specific factual knowledge base to aid in the comprehension of an utterance as well as the generation of a response using a novel mutli-hop attention based model.

## 3 Methodology

### Problem Formulation

Formally, let \(D=\{d_{i}\}^{K}_{i=1}\) denote a conversation composed of \(K\) dialogue turns, where \(d_{i}=(a_{i}^{1},a_{i}^{2})\) is an exchange of dialogues between the two agents. Associated with each utterance \(a_{i}^{1}\) and \(a_{i}^{2}\) are the relevant documents \(S_{i}^{1}\) and \(S_{i}^{2}\) with topic-specific knowledge. We utilize common sense and named entity oriented knowledge by creating the set of triples \(\tau=\{\tau_{1},\tau_{2},...,\tau_{|\tau|}\}\), where \(\tau_{i}\) is of the form \((head,relation,tail)\), from the following sources:

* extracting relations from ConceptNet for every word in the utterances (if the word is a _concept-word_ from ConceptNet), and
* forming named entity based triples by using co-reference resolution method

For any arbitrary turn \(k\), given the dialogue history \(\{d_{j}\}^{k-1}_{j=1}\), the associated documents as well as 

the target document \(\{S_{j}^{1},S_{j}^{2}\}_{j=1}^{k}\), and the associated knowledge triples \(\tau\), the objective is to generate an appropriate response \(Y=\{y_{1},y_{2},...,y_{|Y|}\}\). The architecture of CNTF is shown in Figure 2.

### Encoder

#### 3.2.1 Dialogue Encoder

The Dialogue Encoder, that keeps track of the dialogue context in multi-turn conversations, encodes the utterances turn by turn. The input at each turn is a sequence of tokens \(x=(x_{1},x_{2},...,x_{n})\), where n is the number of tokens. For the first turn, \(a_{1}^{1}\) is fed as input, while for the subsequent turns (\(j>1\)), the input is the concatenation of the previous turn's second agent's response and current turn's first agent's utterance, \([a_{j-1}^{2};a_{j}^{1}]\). The encoder then exploits Bidirectional Encoder Representations from Transformers (BERT) Devlin et al. (2019) to obtain the representations \(H_{D}=\{h_{i}\}_{i=1}^{n}\).

Using the dialogue representations, we maintain two different states for the dialogue, \(D_{S}\) and \(D_{H}\), which are both initialized with the encoder hidden states \(H_{D}\), of the first turn. We then follow a sliding window mechanism to update both \(D_{S}\) and \(D_{H}\) for the succeeding turns. A window of size "\(l\)" means we concatenate hidden states of only the previous "\(l\)-\(l\)" turns. This helped in removing noise for longer dialogue contexts and saving memory. \(D_{H}\) remains fixed and stores the hidden states for the dialogue context, while \(D_{S}\) gets updated at each turn, with the goal of capturing proper history information for accurate response generation.

#### 3.2.2 Knowledge Encoder

Similarly, the Knowledge Encoder takes as input the document(s) associated with the utterances _viz._\([S_{j-1}^{2};S_{j}^{1}]\) for turn \(j>1\), else \(S_{1}^{1}\) for the first turn, truncated to a max token count of 400. We then again employ a BERT model and obtain the encoded features \(H_{Kb}=\{h_{i}\}_{i=1}^{m}\), where \(m\) is the number of tokens in the document(s). To incorporate the external topic-specific knowledge effectively, we have knowledge states \(Kb_{S}\) and \(Kb_{H}\). Similar to the dialogue states \(D_{S}\) and \(D_{H}\), these are initialized with the hidden states \(H_{Kb}\) of the relevant documents associated with each utterance. Unlike the sliding window mechanism used for the dialogue states for the upcoming turns, \(Kb_{S}\) and \(Kb_{H}\) store only the current turn's hidden states obtained from the BERT based knowledge encoder.

### Multi-hop Attention

We adopt the dual and dynamic graph attention mechanism Wang et al. (2020) to mimic human's step-by-step exploring and reasoning behavior. In each step, we assume that the dialogue and knowledge states have some information to disseminate. At each hop \(r\), we compute an attention vector \(\alpha_{t}^{(r)}\) using the query embedding \(q_{t}\) at the \(k\)-th turn us

Figure 2: Proposed CNTF architecture. The dialogue encoder encodes the dialogue context in multi-turn conversation. Similarly, the knowledge encoder takes as input the document(s) associated with the utterances in the conversation. The multi-hop attention modules are used to extract relevant information from dialogue and knowledge whereas the Commonsense and Named Entity Enhanced Attention module is used to effectively incorporate the knowledge triples.

 

ing \(D_{S}^{(r-1)}\) at time step \(t\). \(D_{H,k,l}\) and the attention scores are used to obtain the context representation \(c_{t}^{(r)}\).

\[\alpha_{k,t}^{(r)}=softmax(e_{k,t}) \tag{1}\] \[e_{k,t}=(v_{1}^{(r)})^{{}^{\prime}}\text{tanh}(W_{1}^{(r)}q_{k, t}+W_{2}^{(r)}D_{S,k,t}^{(r-1)})\] (2) \[c_{k,t}^{(r)}=\sum_{j=1}^{K}a_{k,t}^{(r)}D_{H,k,t} \tag{3}\]

where \(v_{1}^{(r)}\) , \(W_{1}^{(r)}\) and \(W_{2}^{(r)}\) are the learnable parameters.

\(D_{S}\) is updated using the _forget_ and _add_ operations. To find more details on updating \(D_{S}\) refer to Appendix A.

### Constructing Named Entity based Triples using Co-reference Resolution

To add more useful links to the already existing commonsense triples, we use the co-reference chains and named entities extracted from the dialogues. Firstly, we use AllenNLP co-reference resolution module to identify co-reference chains in the dialogue. For example, in the dialogue shown in Fig. 1, using the first co-reference chain: **[The Last of the Mohicans: it, that movie, It]** we rewrite the dialogue with resolved mentions in the utterances as: _"[The Last of the Mohicans] is a 1992 American epic historical drama [The Last of the Mohicans] is also one of my favorite movies. Me too. I love [The Last of the Mohicans] and the soundtrack in particular. [The Last of the Mohicans] was directed by Michael Mann, based on [James Fenimore Cooper's eponymous 1826] novel and so on"_. We then use Spacy Named Entity tagging module to recognize named entities from the augmented dialogue. Simultaneously, we also identify all the concept words using ConceptNet in the newly formed dialogue.

The new set of triples is obtained using the named entities and concepts as nodes, and the corresponding edges are built as follows:

* between every pair of named entities that appear in the same dialogue, and
* between a named entity node and other concepts within the same dialogue.

We may note that resolving the co-references first and then extracting named entities ensures that entities across multiple utterances are connected in a certain way. Also, we explicitly form a triplet having the _RelatedTo_ relation as it suits well for most of the cases because it indicates a relation between the two named entities and their different references or aliases across the conversation.

### Commonsense and Named Entity Enhanced Attention Module

For each dialogue, the final set of triples is composed of both commonsense and named entity based triples. We obtain triples' head and tail entity embedding from the trainable embedding layers i.e. \(E=\text{emb\_layer}(\tau)\). Formally, a query is used to loop over the triple embedding and compute the attention weights at each hop \(p\).

\[\alpha_{k,t}^{(p)}=softmax(q_{t}^{(p-1)}E^{(p-1)}) \tag{4}\]

Finally, the weighted context for knowledge triples, \({(c^{T})}^{(p)}\), is obtained by weighting the current set of triple embedding, \(E^{(p)}\) using the attention scores, \(\textbf{a}^{(p)}\). A query update mechanism is used, where the query embeddings are updated using the weighted triple embeddings of the current step.

\[{(c_{k,t}^{T})}^{p}=\sum_{j=1}^{n}\textbf{a}_{k,t}^{p}E^{p} \tag{5}\] \[q_{t}^{p}=q_{t}^{p-1}+{(c_{k,t}^{T})}^{p} \tag{6}\]

### Decoder

#### 3.6.1 Interactive Dialogue-Knowledge Module

As each utterance is linked to topic-specific unstructured knowledge, we employ an interactive mechanism to attend to both the dialogue and the knowledge sentences. We can improve information extraction from dialogue as well as knowledge hidden states for response generation by using the encoded weighted dialogue context as the initial query vector \(q_{t}\). To obtain the _weighted dialogue context_\(WH_{D}\), we apply the multi-hop attention as described in Section 3.3 between \(H_{D}\) and \(H_{K}\) which are the hidden states received from the dialogue and knowledge encoder, respectively.

We use a GRU based decoder to generate responses word by word, and initialize the initial hidden states of the decoder with \(WH_{D}\). Then at time step \(t\), the decoder state \(s_{t}\) can be updated as

\[s_{t}=\text{GRU}(e(y_{t-1}),s_{t-1}) \tag{7}\]

where \(e(y_{t-1})\) is the embedding of the previous word \(y_{t-1}\). Here, \(s_{t}\) is regarded as the updated 

query vector, which is used to attend to the dialogue, topic-specific knowledge and the structured knowledge triples, and obtain the weighted context, knowledge and triple representation as \(c_{t}^{D}\), \(c_{t}^{K}\) and \(c_{t}^{T}\), respectively.

#### 3.6.2 Fusion Block

The probability distribution over the vocabulary \(P_{g}(y_{t})\) words is obtained by fusing \(c_{t}^{D}\), \(c_{t}^{K}\), \(c_{t}^{T}\) and the decoder state, \(s_{t}\), and then passing them through a softmax layer.

\[P_{g}(y_{t})=\text{softmax}(W_{5}[s_{t};c_{t}^{D};c_{t}^{K};c_{t}^{ T}]) \tag{8}\]

where \(W_{5}\) is a trainable parameter.

#### 3.6.3 Copy Block

In particular, a word at time step \(t\) is either generated from the vocabulary or copied from either the dialogue history, knowledge history, or using entities from the triples. Following the copy mechanism Gulcehre et al. (2016), the attention scores are viewed as the probability to form the copy distribution. We use the attention score \(\alpha_{k,t}^{D}\) of the dialogue and \(\alpha_{k,t}^{Kb}\) of the unstructured knowledge at the last round viz. \(P_{D}(y_{t}=w)\) = \(\sum_{tj:w_{ij}=w}\alpha_{k,t}^{D}\); \(P_{Kb}(y_{t}=w)\) = \(\sum_{tj:w_{ij}=w}\alpha_{k,t}^{Kb}\). The copy distribution over the triples is given by \(P^{T}(y_{t}=w)\) = \(\sum_{tj:w_{i}^{\prime}=w}\alpha_{k,t}^{T}\). We use the soft gates \(g_{1}\), \(g_{2}\) and \(g_{3}\) to control whether a word is generated from the vocabulary or it is being copied by combining \(P_{g}(y_{t})\), \(P_{D}(y_{t})\), \(P_{Kb}(y_{t})\), and \(P_{T}(y_{t})\):

\[g_{1} =\text{Sigmoid}(W_{8}[s_{t};c_{t}^{D}]+b_{2}) \tag{9}\] \[P_{kn}(y_{t}) =g_{1}P_{g}(y_{t})+(1-g_{1})P_{D}(y_{t})\] (10) \[g_{2} =\text{Sigmoid}(W_{9}[s_{t};c_{t}^{K}]+b_{3})\] (11) \[P_{tp}(y_{t}) =g_{2}P_{Kb}(y_{t})+(1-g_{2})P_{kn}(y_{t})\] (12) \[g_{3} =\text{Sigmoid}(W_{10}[s_{t};c_{t}^{T}]+b_{4})\] (13) \[P(y_{t}) =g_{3}P_{T}(y_{t})+(1-g_{3})P_{tp}(y_{t}) \tag{14}\]

where, \(W_{8}\), \(W_{9}\), \(W_{10}\) are the parameters to be learned.

Therefore, the decoder loss is the cross-entropy between the predicted distribution \(P(y_{t})\) and the reference distribution, \(p_{t}\), denoted as \(Loss=-\)\(\sum p_{l}log(P(y_{t}))\).

## 4 Datasets and Experimental Setup

In this section, we present the details of the datasets and the other experimental setups. Implementation details can be found in Appendix C.

### Dataset Description

#### 4.1.1 Knowledge Grounded Dialogue Dataset

We test our proposed technique on two knowledgegrounded dialogue generation benchmark datasets, _viz._ Wizard of Wikipedia Dinan et al. (2018) and CMU Document Grounded Conversations Zhou et al. (2018). The WoZ and CMU_DoG datasets consist of approximately \(\approx\) 22K and \(\approx\) 4K dialogs, respectively, covering more than 1,365 and 90 topics. The datasets are summarized in Appendix B. The statistics of the datasets are shown in Table 4 of the Appendix.

#### 4.1.2 Commonsense Knowledge Base

We use ConceptNet, an open-domain repository of commonsense knowledge. It includes the relationships between concepts that are commonly used in everyday situations, such as "Mango is a fruit." This function is desirable in our experiments because it is critical to be able to identify the informal relationships between common concepts in an open-domain conversation setting. We remove triples containing multi-word entities when filtering words based on dataset vocabulary, and \(147,676\) triples were retained with \(27,468\) entities and \(44\) relations for Wizard of Wikipedia dataset. For CMU_DoG dataset, we have a total of \(14,689\) entities, \(74,485\) triples and \(42\) relations.

### Baselines

We use the following models as the baselines:

1. **Transformer Memory Network (TMN)**Dinan et al. (2018): To encode dialogue, a shared transformer-based encoder is used. After knowledge selection, memory networks are used to re-encode the dialogue information. Finally, a transformer decoder is used to decode the responses.

2. **Dialog GPTfinetune**Zhang et al. (2020): It utilises a DialoGPT (345M) model fine-tuned on training examples from the Topical Chat dataset to determine whether the pre-trained models can serve as knowledge bases for open-domain dialogue generation.

3. **Incremental Transformer with Deliberation Decoder (ITDD) Li et al. (2019): It uses an incremental transformer-based model to encode utterances and documents and a deliberation decoder to decode responses.**

4. **Disentangled Response Decoder (DRD) Zhao et al. (2019): It is made up of three modules: a language model, a context processor, and a 

knowledge processor for decoding responses. The response decoder is broken down into independent components in this case to investigate knowledge-based dialogue generation.
5. **ConKADI**Wu et al. (2020): It includes a Felicitous Fact mechanism to help the model focus on knowledge facts that are highly significant; additionally, two techniques, Context-Knowledge Fusion and Flexible Mode Fusion, are proposed to assist ConKADI in integrating the knowledge information.
6. **KnowledGPT**Zhao et al. (2020): This model implements response generation by combining a pre-trained language model with a knowledge selection module, and it intends to jointly optimize knowledge selection and response generation with unlabeled dialogues using an unsupervised approach.

### Evaluation Metrics

To evaluate the predicted responses, we choose BLEU Papineni et al. (2002), PPL, F1 and Embedding-based metrics Liu et al. (2016). For human evaluation, we use fluency, adequacy, knowledge existence, knowledge correctness and knowledge relevance. Appendix D provides more information on these metrics.

## 5 Results and Analysis

### Results of Automatic Evaluation

Table 1 shows the results on automatic evaluation metrics on Wizard of Wikipedia and CMU_DoG datasets. On WoZ, CNTF gives a significant rise of 48% on Test Seen and 53% on Unseen in F1 score and around two times more on both Seen and Unseen, in terms of BLEU-4, compared to the strongest baseline, KnowledGPT. On CMU_DoG too, where the average turn length is roughly 2.5 times that of WoZ, CNTF surpasses the previous best on F1 and BLEU-4 by 8% and 20% respectively. Hence, CNTF achieves new state-of-the-art on both datasets.

Existing models struggle to generate engaging responses for dialogues based on new topics that were not encountered during the training phase, which most likely explains the observed low performance on Test Unseen. On the contrary, CNTF is capable of capturing the dialogue context and effectively utilizing external commonsense knowledge and parse the implicit mentions made to various entities through the conversation to produce accurate responses, as evidenced by the magnitude

\begin{table}
\begin{tabular}{|c|c|c c|c c|c c|c c|c c|} \hline  & \multicolumn{7}{c|}{**Wiaard of Wikipedia**} & \multicolumn{7}{c|}{**CMU_DoG**} \\ \cline{3-13} \multirow{3}{*}{**Models**} & **PPL** & **F19** & **BLEV-4** & **Embedding** & **Vector** & **Greedy** & \multirow{3}{*}{**Stochastic**} & **Grall** & **Fil’s** & **BLEV-4** & **Embedding** & **Veiter** & **Gravely** \\  & _Sent/Unseen_ & _Sent/Unsure_ & _Sent/Unsure_ & _Average_ & _Extreme_ & _Maching_ & _PrL_ & **F19** & **BLEV-4** & **Embedding** & **Neur** & **Strong** & **Matching** \\ \hline TMN & 66.5 / 10.6 & 15.9 / 14.3 & 0.017 / 0.007 & 0.844 / 0.839 & 0.427 / 0.468 & 0.658 / 0.645 & 75.2 & 9.9 & 0.007 & 0.739 & 0.399 & 0.615 \\ ITD & 17.8 / 44.8 & 16.2 / 11.4 & 0.025 / 0.011 & 0.841 / 0.826 & 0.425 / 0.364 & 0.654 / 0.634 & 26.0 & 10.4 & 0.009 & 0.748 & 0.900 & 0.877 \\ DialogPT\_train & **16.2 / 20.4** & 19.7 / 17.6 & 0.023 / 0.017 & 0.851 / 0.669 & 0.461 / 0.583 / 0.674 & **15.9** & 13.7 & 0.015 & 0.012 & 0.430 & 0.641 \\ DRD & 19.4 / 23.0 & 19.3 / 19.7 & 0.044 / 0.057 & 0.864 / 0.265 & 0.454 / 0.679 / 0.671 & 54.4 & 10.7 & 0.012 & 0.890 & 0.413 & 0.633 \\ CrankADI & 89.4 / 9.3 / 13.9 & 13.5 / 19.5 & 0.016 / 0.017 & 0.726 / 0.662 & 0.355 / 0.324 & 0.679 / 0.681 & 84.4 & 8.7 & 0.006 & 0.758 & 0.326 & 0.640 \\ KounkoKDTT & 19.2 / 22.3 & 22.0 / 20.7 & 0.058 / 0.047 & 0.872 / 0.870 & 0.463 / 0.452 & 0.682 / 0.674 & 20.6 & 13.5 & – & 0.337 & 0.437 & 0.654 \\ \hline CNTF & 44.2 / 26.8 & 25.3 / 41.9 & 0.110 / 0.191 & 0.911 / 0.570 & 0.758 / 0.732 & 46.0 & **14.6** & **0.018** & **0.882** & **0.518** & **0.703** \\ CNTF-DRC & 24.3 / 28.5 & **37.3 / 21.9** & **0.117** & **0.913** & **0.852** / **0.861** & **0.746** / **0.758** & 44.5 & **15.1** & 0.018 & 0.882 & 0.518 & 0.708 \\ CNTF-DRJ & 26.8 / 31.8 & 32.4 / 31.5 & 0.114 / 0.110 & 0.911 / 0.912 & 0.576 / 0.758 & 0.758 / 0.734 & 45.3 & 14.2 & 0.015 & 0.881 & 0.554 & 0.707 \\ CNTF-OK & 25.9 / 31.1 & 30.9 / 29.8 & 0.105 / 0.101 & 0.909 / 0.909 & 0.567 / 0.564 & 0.752 / 0.736 & 45.9 & 14.1 & 0.014 & 0.880 & 0.505 & 0.700 \\ CNTF-DP & 47.5 / 96.3 & 15.3 / 15.1 & 0.022 / 0.005 & 0.884 / 0.835 & 0.466 / 0.440 & 0.689 / 0.679 & 47.9 & 11.8 & 0.013 & 0.880 & 0.692 & 0.693 \\ \hline \end{tabular}
\end{table}
Table 1: Automatic evaluation results marked in bold fonts indicate the best outcome for the measure and improvement over the best baseline, and is statistically significant (t-test with p-value at 0.05 significance level). The scores on the ablation models are shown in the last four rows. The values for baseline models are derived from Zhao et al. (2020) and Zhao et al. (2020). (-) indicates that the value was not reported.

\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{**Models**} & \multirow{2}{*}{\begin{tabular}{c} **Fluency** \\ _Seen/Unsure_ \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Accuracy** \\ _Sent/Unsure_ \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Knowledge** \\ _Existence_ \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Knowledge** \\ _Corrections_ \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Resource** \\ _Sent/Unsureness_ \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Kernel** \\ _(Seen/Unsure)_ \\ \end{tabular} } \\ \hline TMN & 1.314 / 1.197 & 1.262 / 0.934 & 1.046 / 0.811 & 1.005 / 0.691 & 0.867 / 0.487 & 0.931 / 0.888 \\ TTDD & 1.135 / 1.290 & 0.545 / 0.965 & 0.515 / 0.382 & 0.301 / 0.188 & 0.184 / 0.101 & 0.940 / 0.930 \\ KnowledgeGPT & **1.831 / 1.837** & 1.565 / **1.493** & 1.139 & 1.430 / 1.390 & 1.172 / 1.040 & 0.810 / 0.811 \\ \hline CNTF & 1.561 / 1.554 & 1.647 / 1.469 & **1.653** / **1.285** & **1.770** / **1.422** & **1.732** / **1.376** & 0.830 / 0.869 \\ \hline Gold Response & 1.865 / 1.883 & 1.891 / 1.883 & 1.825 / 1.864 & 1.908 / 1.916 & 1.903 / 1.904 & 0.890 / 0.854 \\ \hline \end{tabular}
\end{table}
Table 2: Human assessment results for the baseline and proposed model on WoZ dataset. Bolded results of the proposed model against the baselines are statistically significant using t-test at 0.05% significance level.

 

of improvement achieved. On embedding-based metrics, all three measures have significantly improved, demonstrating the efficacy of our methodology. Comparison to more baseline models can be found in Appendix E.1.

### Human Evaluation Results

Human evaluation results are shown in Table 2. We only compare our proposed model against KnowledGPT, ITDD and TMN on WoZ, as manual evaluation is expensive. It is clear that CNTF outperforms the baselines on both adequacy and knowledge-related criteria, demonstrating consistency with the results of automatic evaluation, and has comparable fluency performance. It is important to note that, despite providing contextually appropriate responses, KnowledgeGPT failed to capture the accurate knowledge associated with the input sequences, resulting in low scores. The strength of CNTF can be seen from the knowledge existence, correctness and relevance scores. This can be attributed to the fact that the multi-hop attention module and the interactive attention module incorporate the knowledge bases efficiently. The knowledge in the generated response is relevant with the contexts and is factually correct. Furthermore, the responses are more effective at exchanging information than at casual chat. The proposed model also makes good use of commonsense knowledge and named entities due to attention module as explained in Section 3.5. All of the kappa values are greater than 0.75, indicating that the annotators agree.

In Table 3, we present a few example conversations as predicted by the proposed (_CNTF_) and the strongest baseline (_KnowledGPT_) on Test Seen from Wizard of Wikipedia. In utterance 3, _CNTF_ is able to decipher that the context of the conversation is _dr. pepper_ using the triple _(drink, RelatedTo, pepper)_ obtained using the mechanism explained in Section 3.5 unlike KnowledGPT which starts talking about \(7up\). Additionally, _CNTF_ efficiently utilizes the commonsense knowledge triples by correctly copying the entities in the triples associated with the word _flavor_. As seen in the fourth utterance, the model correctly decodes the response using more detailed knowledge from the topic-specific knowledge base as opposed to KnowledGPT. Triples such as _(1904, RelatedTo, pepper), (sold, RelatedTo, Europe)_ which were created using Section 3.4 have aided it in understanding the context better.

### Ablation Study

To analyze the impact of the constituent modules in our model on performance (Table 1), we compare CNTF with the following variants:

(i) CNTF-D: This configuration only employs the dialogue encoder with multi-hop attention to demonstrate the significance of employing a knowledge encoder. This results in a 53% decrease in F1 score on Test Seen, demonstrating the effectiveness of our knowledge module with multi-hop attention. The score reduction in CMU_DoG is less severe because workers do not rely as heavily on external knowledge as the Wizard does, where it is highly correlated with available knowledge. (ii) CNTF-DK: Interactive attention is essential for generating insightful responses while decoding the answer. We remove the Interactive Dialogue-Knowledge module, as explained in Section 3.6.1, to demonstrate its utility. This results in a significant decrease in both BLEU and F1 scores. (iii) CNTF-DKI: We conduct experiments with only the dialogue and knowledge modules, as well as the interactive module, to demonstrate the benefit of using structured knowledge in the form of triples for gauging the implicit references made throughout the conversation. We see a significant drop in scores here as well. (iv) CNTF-DKIC: This model is used to show the effectiveness of co-reference based named entity triples. We see a drop in BLEU-4 scores for the seen testset, but we see an improvement on the unseen testset by using only commonsense knowledge. This could be attributed to the fact that for unseen data, the same entities are usually not present because they have conversations on topics that are rarely seen in the training set.

We may note that CNTF beats the SOTA models on every metric however due to the addition of new triples (more than 60% increment in triples on an average for both the datasets) which may have added to noise in the model, and hence it shows lower scores on some metrics than CNTF-DKIC.

### Error Analysis

Using the generated responses, we perform a thorough examination of our proposed model and categorize the errors it encounters as follows:

1. **Repetition**: There are some instances where certain words are repeated in the generated responses. For example, _Predicted response: "i' m not sure, but it is similar to violet, violet and violet." 

2. **Incomplete response:** As shown in the response for the last example in Table 3, incomplete responses result in lower fluency scores. We discovered that the ground truth responses in the dataset are generated by copying incomplete sentences from the document knowledge. Since our model augments knowledge, it learns to produce responses in the same manner. For example: _Document knowledge:_ "there is no scientifically precise definition of genius, and the question of whether the notion itself has any real meaning has long been a subject of debate, although psychologists are converging on a definition that emphasizes creativity and eminent achievement."_; _Gold Response:_ "_there is no scientifically precise definition of genius_". As can be seen, the response picked is incomplete and less fluent if it is compared to the knowledge sentence. We have evaluated our gold responses considering this in Table 2. We observed that the fluency score is 1.865 / 1.883 for both the test seen / unseen set. A few more error cases with examples are shown in the Appendix E.2.

## 6 Conclusion

We present a Commonsense, Named Entity, and Topical Knowledge Fused neural network (CNTF) to address reasoning over multiple knowledge bases in this paper. We propose, in particular, multi-hop attention over both structured and unstructured knowledge. Unlike previous approaches in Dialog, CNTF can find relevant supporting named entities in dialogs at each step of multi-hop attention in addition to already present commonsense knowledge. We test CNTF on WoZ and CMU_DoG and achieve excellent results. Furthermore, our analysis shows that CNTF can generate consistent results.

In the future, we hope to expand our work to build models which include emotions for knowledge grounded dialogues. Also, to tackle repetition and incomplete response, we aim to introduce rewards functions for these factors. Currently, our model does not consider the relation attribute in our proposed framework and hence the use of "RelatedTo" relation is not really affecting the performance of the proposed approach. We aim to incorporate relation attributes for triple representations.

\begin{table}
\begin{tabular}{|c|l|} \hline
** Utterance 1** & **Agent 1:**_i love do pepper_ \\
**Knowledge 1** & _dr pepper is a carbonated soft drink marketed as having a unique flavor._ \\
**Triples** & _(prepper, RelatedTo, sad), (soda, IgA, drink), (davor, RelatedTo, drink), (carbonated, Synonym, soda), (soft, RelatedTo, drink), (drink, RelateTo, k 



## 7 Ethical Declaration

Our work relies solely on publicly available data. We followed the policies for using the data and did not violate any copyright issues.

### Acknowledgement

Asif Ekbal acknowledges the Young Faculty Research Fellowship (YFRF), supported by Visvesvaraya Ph.D. scheme for Electronics and IT, Ministry of Electronics and Information Technology (MeitY), Government of India, being implemented by Digital India Corporation (formerly Media Lab Asia).

## References

* P. M. Abadi, A. Krizhevsky, S. Vedaldi, R. Khosla, L. Kaiser, D. Lee, J. Li, C. Liu, Y. Zhang, Z. Lin, X. Ma, H. Mao, B. Xu, T. Yu, and G. Wang (2019-06)A review of machine learning techniques for biomedical image segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3458-3462. Cited by: SS2.
* N. De Bruyn, E. Lotfi, J. Buhmann, and W. Daelemans (2020)BART for knowledge grounded conversations. In Converse@ KDD, External Links: Link Cited by: SS2.
* J. Devlin, M. Chang, K. Lee, and K. Toutanova (2019)BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, Minnesota, pp. 4171-4186. External Links: ISBN 978-1-4503-3213-1, Document, Link Cited by: SS2.
* E. Dinan, S. Roller, K. Shuster, A. Fan, M. Auli, and J. Weston (2018)Wizard of wikipedia: knowledge-powered conversational agents. In International Conference on Learning Representations, External Links: Link Cited by: SS2.
* S. Edunov, A. Baevski, and M. Auli (2019)Pre-trained language model representations for language generation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, Minnesota, pp. 4052-4059. External Links: Link Cited by: SS2.
* K. Ehrlich (1981)Search and inference strategies in pronoun resolution: an experimental study. In 19th Annual Meeting of the Association for Computational Linguistics, pp. 89-93. Cited by: SS2.
* J. L. Fleiss (1971)Measuring nominal scale agreement among many raters. Psychological bulletin76 (5), pp. 378. Cited by: SS2.
* M. Ghazvininejad, C. Brockett, M. Chang, B. Dolan, J. Gao, W. Yih, and M. Galley (2018)A knowledge-grounded neural conversation model. In Thirty-Second AAAI Conference on Artificial Intelligence, Cited by: SS2.
* K. Gopalakrishnan, B. Hedayatnia, Q. Chen, A. Gottardi, S. Kwatra, A. Venkatesh, R. Gabriel, D. Hakkani-Tur, and A. Alexa AI (2019)Topical-chat: towards knowledge-grounded open-domain conversations. External Links: Link Cited by: SS2.
* C. Gulcehre, S. Ahn, R. Nallapati, B. Zhou, and Y. Bengio (2016)Pointing the unknown words. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 140-149. Cited by: SS2.
* B. Huang, Z. Zhang, and H. Zhao (2021)Tracing origins: coref-aware machine reading comprehension. arXiv preprint arXiv:2110.07961. Cited by: SS2.
* D. P. Kingma and J. Ba (2014)Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980. Cited by: SS2.
* J. Li, M. Galley, C. Brockett, J. Gao, and B. Dolan (2016a)A diversity-promoting objective function for neural conversation models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Vol. 110-119, San Diego, California, pp. 110-119. External Links: Link Cited by: SS2.
* J. Li, M. Galley, C. Brockett, G. Spithourakis, J. Gao, and B. Dolan (2016b)A persona-based neural conversation model. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Berlin, Germany, pp. 994-1003. External Links: Link Cited by: SS2.
* Z. Li, C. Niu, F. Meng, Y. Feng, Q. Li, and J. Zhou (2019)Incremental transformer with deliberation decoder for document grounded conversations. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Online, pp. 12-21. Cited by: SS2.
* C. Liu, R. Lowe, I. Serban, M. Noseworthy, L. Charlin, and J. Pineau (2016)How NOT to evaluate your dialogue system: an empirical study of unsupervised evaluation metrics for dialogue response generation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, Austin, Texas, pp. 2122-2132. External Links: Link Cited by: SS2.



Seungwhan Moon, Pararth Shah, Anuj Kumar, and Rajen Subba. 2019. OpenDialKG: Explainable conversational reasoning with attention-based walks over knowledge graphs. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_, pages 845-854, Florence, Italy. Association for Computational Linguistics.
* Papineni et al. (2002) Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In _Proceedings of the 40th annual meeting on association for computational linguistics_, pages 311-318. Association for Computational Linguistics.
* Qin et al. (2019) Lianhui Qin, Michel Galley, Chris Brockett, Xiaodong Liu, Xiang Gao, Bill Dolan, Yejin Choi, and Jianfeng Gao. 2019. Conversing by reading: Contentful neural conversation with on-demand machine reading. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_, pages 5427-5436, Florence, Italy. Association for Computational Linguistics.
* Quan et al. (2019) Jun Quan, Deyi Xiong, Bonnie Webber, and Changjian Hu. 2019. GECOR: An end-to-end generative ellipsis and co-reference resolution model for task-oriented dialogue. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_, pages 4547-4557, Hong Kong, China. Association for Computational Linguistics.
* Radford et al. (2019) Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. _OpenAI blog_, 1(8):9.
* Raghu et al. (2019) Dinesh Raghu, Nikhil Gupta, and Mausam. 2019. Disentangling Language and Knowledge in Task-Oriented Dialogs. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_, pages 1239-1255, Minneapolis, Minnesota. Association for Computational Linguistics.
* Reddy et al. (2019) Revanth Gargi Reddy, Danish Contractor, Dinesh Raghu, and Sachindra Joshi. 2019. Multi-level memory for task oriented dialogs. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_, pages 3744-3754.
* Serban et al. (2016) Iulian V Serban, Alessandro Sordoni, Yoshua Bengio, Aaron Courville, and Joelle Pineau. 2016. Building end-to-end dialogue systems using generative hierarchical neural network models. In _Thirtieth AAAI Conference on Artificial Intelligence_.
* Serban et al. (2017) Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. 2017. A hierarchical latent variable encoder-decoder model for generating dialogues. In _Thirty-First AAAI Conference on Artificial Intelligence_.
* Shang et al. (2015) Lifeng Shang, Zhengdong Lu, and Hang Li. 2015. Neural responding machine for short-text conversation. In _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_, pages 1577-1586.
* Speer and Havasi (2012) Robyn Speer and Catherine Havasi. 2012. Representing general relational knowledge in ConceptNet 5. In _Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC'12)_, pages 3679-3686, Istanbul, Turkey. European Language Resources Association (ELRA).
* Sutskever et al. (2014) Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In _Advances in neural information processing systems_, pages 3104-3112.
* Tao et al. (2018) Chongyang Tao, Shen Gao, Mingyue Shang, Wei Wu, Dongyan Zhao, and Rui Yan. 2018. Get the point of my utterance! learning towards effective responses with multi-head attention mechanism. In _Proceedings of the 27th International Joint Conference on Artificial Intelligence_, pages 4418-4424.
* Tuan et al. (2019) Yi-Lin Tuan, Yun-Nung Chen, and Hung-yi Lee. 2019. DyKgChat: Benchmarking dialogue generation grounding on dynamic knowledge graphs. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_, pages 1855-1865, Hong Kong, China. Association for Computational Linguistics.
* Varshney and Singh (2021) Deeksha Varshney and Asif Ekbal Anushkha Singh. 2021. Knowledge grounded multimodal dialog generation in task-oriented settings. In _Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation_, pages 425-435.
* Vinyals and Le (2015) Oriol Vinyals and Quoc Le. 2015. A neural conversational model. _arXiv preprint arXiv:1506.05869_.
* Wang et al. (2020) Jian Wang, Junhao Liu, Wei Bi, Xiaojiang Liu, Kejing He, Ruifeng Xu, and Min Yang. 2020. Dual dynamic memory network for end-to-end multi-turn task-oriented dialog systems. In _Proceedings of the 28th International Conference on Computational Linguistics_, pages 4100-4110, Barcelona, Spain (Online). International Committee on Computational Linguistics.
* Wu et al. (2020a) Sixing Wu, Ying Li, Dawei Zhang, Yang Zhou, and Zhonghai Wu. 2020a. Diverse and informative dialogue generation with context-specific commonsense knowledge awareness. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_, pages 5811-5820, Online. Association for Computational Linguistics 

Sixing Wu, Ying Li, Dawei Zhang, Yang Zhou, and Zhonghai Wu. 2020b: Topicka: Generating commonsense knowledge-aware dialogue responses towards the recommended topic fact. In _Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI_, pages 3766-3772.
* Xing et al. (2017) Chen Xing, Wei Wu, Yu Wu, Jie Liu, Yalou Huang, Ming Zhou, and Wei-Ying Ma. 2017. Topic aware neural response generation. In _Proceedings of the AAAI Conference on Artificial Intelligence_, volume 31.
* Ye et al. (2020) Deming Ye, Yankai Lin, Jiaju Du, Zhenghao Liu, Peng Li, Maosong Sun, and Zhiyuan Liu. 2020. Coreferential Reasoning Learning for Language Representation. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_, pages 7170-7186, Online. Association for Computational Linguistics.
* Young et al. (2018) Tom Young, Erik Cambria, Iti Chaturvedi, Hao Zhou, Subham Biswas, and Minlie Huang. 2018. Augmenting end-to-end dialogue systems with commonsense knowledge. In _Proceedings of the AAAI Conference on Artificial Intelligence_, volume 32.
* Zhang et al. (2019) Hainan Zhang, Yunyan Lan, Liang Pang, Jiafeng Guo, and Xueqi Cheng. 2019. Recosa: Detecting the relevant contexts with self-attention for multi-turn dialogue generation. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_, pages 3721-3730.
* Zhang et al. (2018) Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 2204-2213.
* Zhang et al. (2021) Wei-Nan Zhang, Yue Zhang, Hanlin Tang, Zhengyu Zhao, Caihai Zhu, and Ting Liu. 2021. What did you refer to? Evaluating co-references in dialogue. In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_, pages 5075-5084, Online. Association for Computational Linguistics.
* Zhang et al. (2020) Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and Bill Dolan. 2020. DIALOGPT : Large-scale generative pre-training for conversational response generation. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations_, pages 270-278, Online. Association for Computational Linguistics.
* Zhao et al. (2017) Tiancheng Zhao, Ran Zhao, and Maxine Eskenazi. 2017. Learning discourse-level diversity for neural dialog models using conditional variational autoencoders. In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 654-664.
* Zhao et al. (2020a) Xiangyu Zhao, Longbaio Wang, Ruifang He, Ting Yang, Jinxin Chang, and Ruifang Wang. 2020a. Multiple knowledge syncret transformer for natural dialogue generation. In _Proceedings of The Web Conference 2020_, pages 752-762.
* Zhao et al. (2019) Xueliang Zhao, Wei Wu, Chongyang Tao, Can Xu, Dongyan Zhao, and Rui Yan. 2019. Low-resource knowledge-grounded dialogue generation. In _International Conference on Learning Representations_.
* Zhao et al. (2020b) Xueliang Zhao, Wei Wu, Chongyang Tao, Can Xu, Dongyan Zhao, and Rui Yan. 2020b. Low-resource knowledge-grounded dialogue generation. In _International Conference on Learning Representations_.
* Zhao et al. (2020c) Xueliang Zhao, Wei Wu, Can Xu, Chongyang Tao, Dongyan Zhao, and Rui Yan. 2020c. Knowledge-grounded dialogue generation with pre-trained language models. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_, pages 3377-3390, Online. Association for Computational Linguistics.
* Zhao et al. (2020d) Yufan Zhao, Wei Wu, and Can Xu. 2020d. Are pre-trained language models knowledgeable to ground open domain dialogues? _arXiv preprint arXiv:2011.09708_.
* Zheng et al. (2021) Wen Zheng, Natasa Milic-Frayling, and Ke Zhou. 2021. Knowledge-grounded dialogue generation with term-level de-noising. In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_, pages 2972-2983, Online. Association for Computational Linguistics.
* Zhou et al. (2018a) Hao Zhou, Tom Young, Minlie Huang, Haizhou Zhao, Jingfang Xu, and Xiaoyan Zhu. 2018a. Commonsense knowledge aware conversation generation with graph attention. In _Proceedings of the 27th International Joint Conference on Artificial Intelligence_, pages 4623-4629.
* Zhou et al. (2018b) Kangyan Zhou, Shrimai Prabhumoye, and Alan W Black. 2018b. A dataset for document grounded conversations. In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_, pages 708-713, Brussels, Belgium. Association for Computational Linguistics.

## Appendix A Methodology

To update \(D_{S}\), we use another Gated Recurrent Unit (GRU) network to emulate the decoder at round \(r\), obtaining the "intermediate" hidden states, \(\tilde{s}^{(r)}_{t}\).

\[\tilde{s}^{(r)}_{t}=\text{GRU}(c^{(r)}_{t},q_{t})\] (15) \[\tilde{u}^{(r)}_{t}=u^{(r-1)}_{t}(1-\tilde{a}^{(r)}_{t}F^{(r)}_{ t})\] (16) \[F^{(r)}_{t}=\text{Sigmoid}(W^{(3)}_{3},\tilde{s}^{(r)}_{t})\] (17) \[D^{(r)}_{S,t}=\tilde{u}^{(r)}_{t}+\tilde{a}^{(r)}_{t}A^{(r)}_{t}\] (18) \[A^{(r)}_{t}=\text{Sigmoid}(W^{(r)}_{4},\tilde{s}^{(r)}_{t})\] (19) 

\(W_{3}^{(r)}\) and \(W_{4}^{(r)}\) are the learnable parameters. \(\tilde{a}_{t}^{(r)}\) is computed similar to the manner defined in Eq 1.

## Appendix B Datasets

Experiments are carried out on two benchmark datasets, _viz._ Wizard of Wikipedia Dinan et al. (2018) and CMU_DoG Zhou et al. (2018b).

Wizard of Wikipedia (WoZ) is one of the most comprehensive knowledge-based conversation datasets, covering 1,365 open-domain topics. Each conversation takes place between a wizard who can retrieve knowledge about a specific topic and form a response based on it and an apprentice who is simply eager to speak with the wizard but lacks access to external knowledge. The test set is further divided into two parts: Test Seen and Test Unseen. The former contains conversations about topics that have previously been seen in the training set, whereas the latter contains conversations about topics that have never been seen in either the training or validation sets.

CMU_DoG focuses on the movie domain, and the conversations take place between two users who both have access to the relevant documents. Every document includes information, such as the title of the film, the cast, an introduction, ratings, and a few scenes. We consider subsequent utterances by the same person as a single one. ConceptNet database can be downloaded from [https://conceptnet.io](https://conceptnet.io).

## Appendix C Implementation Details

For our proposed CNTF model, we set the word embedding dimension as 300, and use GloVe word embeddings. The hidden size of GRU is sampled from \(\{128,256\}\). Both the number of rounds \(R\), the number of hops \(K\) are sampled from \(\{2,3\}\), and the sliding window size is sampled from \(\{1,2\}\). We use the ADAM optimizer Kingma and Ba (2014) whose learning rate is fixed to 0.0005 and set the beam size to 4, while decoding the responses. We truncate utterances to a max token count of 200 and knowledge base to 400. To handle the long-text knowledge base of CMU_DoG, for every utterance and knowledge sentence we compute a TF-IDF vector. We then compute the cosine similarity between an utterance and every sentence in the knowledge base and retain the top-2 knowledge sentences, similar to the procedure adopted in Enriched Topical Chat dataset Gopalakrishnan et al. (2019). The conversation and knowledge base vocabulary is shared and comprises of 30,004 words, while common sense vocabulary is maintained separately. We choose batch size as 2 and 8 for CMU_DoG and Wizard of Wikipedia, respectively, for training the models. There are roughly 83M parameters for our model when trained on Wizard of Wikipedia, and 38M on CMU_DoG, the difference in size is due to the vocabulary variation. These are much lesser than large pre-trained models which have much greater parameters (KnowledGPT which uses GPT-2). It is trained for 10-15 epochs. We choose the best model when the loss on the validation set does not decrease. The variances of the results are at most 1e-3 after three runs with random initialization for each method, and they have no effect on the trend. We have adapted the code framework from DDMN Wang et al. (2020). We have used GeForce GTX 1080 Ti as the computing infrastructure. We used the AllenNLP co-reference resolution module ([https://github.com/allenai/allennlp-models](https://github.com/allenai/allennlp-models)) for coreference resolution. We used the space toolkit ([https://github.com/huggingface/neuralcoref](https://github.com/huggingface/neuralcoref)) to identify named entities in the text.

## Appendix D Evaluation Metrics

### Automatic Evaluation:

For evaluating our baseline and proposed models, we used F11, BLEU Papineni et al. (2002), PPL and Embedding-based metrics2Liu et al. (2016) such as Vector Extrema, Greedy Matching and Embedding Average for evaluation. Perplexity (PPL) is a metric used to assess how well a probability model predicts a sentence. The term intersection between the gold response and output response by the model is calculated using BLEU (BLEU-4) and the unigram F1-score. Word-matching-based metrics are an alternative to embedding-based metrics. These metrics allocate a vector to each term in the sentence in order to truly understand the intended meaning of the predicted sentence, as described by

Footnote 1: [https://github.com/facebookresearch/ParlAI/blob/master/parlai/core/metrics.py](https://github.com/facebookresearch/ParlAI/blob/master/parlai/core/metrics.py)

\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline \multicolumn{7}{|c|}{Wizard of Wikipedia} & \multicolumn{7}{|c|}{CMU\_DoG} \\ \cline{2-7}  & **Train** & **Valid** & \begin{tabular}{c} **Test** \\ **Seen** \\ \end{tabular} & \begin{tabular}{c} **Test** \\ **Uses** \\ \end{tabular} & \begin{tabular}{c} **Train** \\ \end{tabular} & \begin{tabular}{c} **Valid** \\ \end{tabular} & 
\begin{tabular}{c} **Test** \\ **Tent** \\ \end{tabular} \\ \hline \multirow{2}{*}{**\#Conversation**} & 18,430 & 1,948 & 965 & 968 & 3,373 & 229 & 619 \\ \hline
**@Viterases** & 166,637 & 17,175 & 8,15 & 8,782 & 74,717 & 4,993 & 13,646 \\ \hline
**Avg. + 0 f Trans** & 9.0 & 9.1 & 9.0 & 9.1 & 22.2 & 11.8 & 22.0 \\ \hline
**\#DipoisDocuments** & 1,247 & 599 & 533 & 58 & 30 & 30 & 30 \\ \hline \end{tabular}
\end{table}
Table 4: Dataset Statistics 

word embedding. Using the above standard metrics, we evaluate our models on both the seen and unseen test sets of the Wizard of Wikipedia dataset, as well as the test set of the CMU_DoG dataset.

### Human Evaluation:

However apart from the automatic evaluation metrics, for evaluating samples from human perspective we randomly selected 100 samples from the Wizard of Wikipedia's Test Seen and Test Unseen sets. We hire four professionals, each with a postgraduate degree and experience, to serve as human judgment annotators. The annotators are regular employees (paid monthly in accordance with university policy) earning Rs 35,000 per month. The annotators are members of our research team and have been working on similar projects for the past three years. For each example, we provide our annotators with model responses and human ground-truth. We use the following metrics for evaluation:

(i) Fluency: It is a metric that measures whether or not a sentence is comprehensible. (ii) Adequacy: This metric assesses the cohesiveness of the generated response with respect to the conversation context. (iii) Knowledge Existence (KE): This metric determines whether the response contains knowledge or not. (iv) Knowledge Correctness (KC): This metric determines whether the knowledge in the predicted response is correct. (v) Knowledge Relevance (KR): This metric is used to determine whether the knowledge is correct and relevant to the topic of the conversation. The annotators assign a score of 0 to 2 to each response (representing "incorrect," "moderately correct," and "perfect"). Fleiss' kappa Fleiss (1971) is used to calculate the annotators' agreement.

## Appendix E Results

### Automatic Evaluation

We also compare our proposed CNTF model to Zhao et al. (2020) and Zheng et al. (2021). MKST Zhao et al. (2020) obtains a F1-score of 22.2 / 21.3 and BLEU-4 score of 0.077 / 0.072 on test seen / unseen of WoZ dataset. KTWM Zhao et al. (2020) obtains a BLEU-4 score of 0.033 / 0.022 with an embedding average, extrema and greedy score of 0.682 / 0.668, 0.394 / 0.379, 0.574 / 0.542 respectively. Our model clearly outperforms these baselines by obtaining a BLEU-4 score of 0.119 / 0.110, F1-score of 32.5 / 31.4 with an embedding average, extrema and greedy score of 0.911 / 0.910, 0.577 / 0.570, 0.758 / 0.752, respectively. In addition, our model clearly outperforms the BART based models for knowledge grounded generation De Bruyn et al. (2020) on F1-score (Test Seen - 12.2 / 20.1; Test Unseen 14.9 /19.3) by a huge margin on both the test set of WoZ dataset.

### Error Analysis

For a dialogue with no topic specific knowledge sentences usually our model fails to keep the conversation going by generating inadequate responses and also misses several entities. For example, _Input utterance_: that's not uncommon! there are rescue groups that specialize in finding homes for retired sled dogs. I bet they retire them at a certain age then they need a home huh; _Predicted Response (CNTF)_: that's cute! i'm sure they're cute!; _Gold Response_: yes. huskies got their name from the word referring to eslimos. As it can be clearly seen the model fails to capture the entity _huskies_ and instead generates a generic response.