DeepAI
Log In Sign Up

RT-KGD: Relation Transition Aware Knowledge-Grounded Dialogue Generation

Grounding dialogue system with external knowledge is a promising way to improve the quality of responses. Most existing works adopt knowledge graphs (KGs) as the external resources, paying attention to the contribution of entities in the last utterance of the dialogue for context understanding and response generation. Nevertheless, the correlations between knowledge implied in the multi-turn context and the transition regularities between relations in KGs are under-explored. To this end, we propose a Relation Transition aware Knowledge-Grounded Dialogue Generation model (RT-KGD). Specifically, inspired by the latent logic of human conversation, our model integrates dialogue-level relation transition regularities with turn-level entity semantic information. In this manner, the interaction between knowledge is considered to produce abundant clues for predicting the appropriate knowledge and generating coherent responses. The experimental results on both automatic evaluation and manual evaluation indicate that our model outperforms state-of-the-art baselines.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

08/29/2020

Zero-Resource Knowledge-Grounded Dialogue Generation

While neural conversation models have shown great potentials towards gen...
02/18/2020

Sequential Latent Knowledge Selection for Knowledge-Grounded Dialogue

Knowledge-grounded dialogue is a task of generating an informative respo...
10/01/2020

A Compare Aggregate Transformer for Understanding Document-grounded Dialogue

Unstructured documents serving as external knowledge of the dialogues he...
10/01/2019

DyKgChat: Benchmarking Dialogue Generation Grounding on Dynamic Knowledge Graphs

Data-driven, knowledge-grounded neural conversation models are capable o...
10/05/2020

Regularizing Dialogue Generation by Imitating Implicit Scenarios

Human dialogues are scenario-based and appropriate responses generally r...
05/28/2020

On Incorporating Structural Information to improve Dialogue Response Generation

We consider the task of generating dialogue responses from background kn...
04/24/2022

Open-domain Dialogue Generation Grounded with Dynamic Multi-form Knowledge Fusion

Open-domain multi-turn conversations normally face the challenges of how...

1 Introduction

Knowledge-Grounded Dialogue Generation (KGD) aims at generating an informative response based on both dialogue context and external knowledge [6, 9]. Current works typically utilize structured knowledge graphs (KGs) [38, 16, 32] or unstructured texts [36, 9] as knowledge resources. Incorporating external knowledge related to the dialogue context has proven to alleviate generating meaningless and bland responses caused by traditional generative models, such as “I don’t know” and “You are right” [11].

Figure 1: An illustrative example from KdConv [39]. Based on the dialogue context (a) and the related KG (b), KGD is required to generate a response (c) guided by the MHKT-Path (d). The bold denotes the core entities in the dialogue, and the Italic denotes related knowledge values involved in the dialogue.

The existing works mainly focus on two aspects in KGD task: knowledge-enhanced context understanding [29, 2] and knowledge-fused response generation [14, 13]. Traditional efforts [6, 39, 2] simply treat the relevant external knowledge as the textual complementary to the dialogue context for both context understanding and response generation, neglecting considerable structural information in KGs. Some recent works [16, 32, 8] realize that the correlation between entities plays an important role in continuing dialogue, thus propose to excavate the valuable structural information between entities in the knowledge graph to predict the entities that might appear in the next response. The predicted entities are further used to guide the response generation. For example, DialKG Walker [16] treats the entities mentioned in the last utterance as the starting nodes and further retrieves relevant entities from KG within two hops. DuConv [30] pre-defines a topic goal including two entities for each dialogue, which guides the model to start with the first entity and gradually transition to the second one.

Despite their great contributions, there are two main drawbacks: on the one hand, the entity-guided KGD methods [16, 32] consider the entities in the dialogue as the only guidance knowledge for context understanding and response generation, which neglects the importance of relations between entities in the KG. However, the regularity behind human conversation can be summarized as a sequence of topics, where each topic may correspond to a relation between entities rather than a single entity in the KG. On the other hand, the existing KGD methods [16, 8] only care about the information in the last dialogue turn for predicting the subsequent knowledge, which is insufficient to learn how human transfer topics across a multi-turn dialogue. Taking Fig. 1 as an example, both badcase 1 and badcase 2 are flawed generated results based on the dialogue context. Badcase 1 demonstrates that the generated response might be redundant and incoherent without modeling multiple turns of knowledge, while badcase 2 reveals an abrupt transition in the topic since the latent relation transition path throughout the dialogue is ignored.

In this paper, we propose a novel KGD model: Relation Transition aware Knowledge-Grounded Dialogue Generation (RT-KGD), which models the knowledge transition across multi-turn dialogue by integrating dialogue-level relation transition regularities with turn-level entity semantic information. Specifically, we obtain all the relations and entities contained in the multi-turn dialogue context to construct a so-called Multi-turn Heterogeneous Knowledge Transition Path (MHKT-Path), which can be viewed as a subgraph of the external KG integrated with the sequential information of relations and entities in the multi-turn dialogue. Based on the constructed MHKT-Path, a knowledge prediction module is proposed to retrieve the triplets that might appear in the subsequent response from the external KG, and they are further fused for triplet prediction. Finally, the subsequent response is generated conditioned on both dialogue context and the predicted triplet. As the example shown in Fig. 1, the MHKT-Path grasps the latent conversation regularity of human beings, and the generated response based on the proposed RT-KGD is informative and coherent with the dialogue context.

The main contributions of this paper are concluded as follows:

  • To the best of our knowledge, we are the first to incorporate the relation transition across multi-turn dialogue into the KGD task. In this manner, the regularity behind human conversation can be portrayed by integrating relation transition paths and entity semantic information.

  • We propose to build a Multi-turn Heterogeneous Knowledge Transition Path (MHKT-Path) for each dialogue, which integrates the structure information of external KG and the sequential information of knowledge with the multi-turn dialogue. Based on MHKT-Path, our model then retrieves appropriate knowledge from the KG to guide the next response generation.

  • The experimental results on a multi-domain knowledge-driven dialogue dataset (i.e., KdConv [39]) indicate that our model outperforms strong baseline models in both automatic and manual evaluation.

2 Related Work

According to whether to introduce knowledge, we categorize previous dialogue generation works into Vanilla Dialogue Generation and Knowledge-grounded Dialogue Generation.

Vanilla Dialogue Generation. Early dialogue systems typically employ Sequ
ence-to-Sequence (Seq2Seq) models to generate responses [21, 20, 31], which is further improved with advanced context encoders [20, 31] or more efficient response generation methods [33, 2, 37]. Recently, pre-trained generative models with the backbone of Transformer [25]

, such as GPT-2 

[18] and BART [10], achieve promising performance in many text generation tasks. There is increasing work focusing on designing Transformer-based pre-trained dialogue models. Among them, Blender [19] enhances Transformer architecture and show their superiority in dialogue generation. DialoGPT [35] extends GPT-2 [18] for response generation. Besides, PLATO [3] pre-trains unified language models for both bi-directional encoding and uni-directional decoding. Nevertheless, they can only implicitly learn dialogue strategies and commonsense knowledge from dialogue corpora, resulting in limited transferability to other dialogue scenes.

Knowledge-Grounded Dialogue Generation. A promising way to generate meaningful and informative responses is to utilize external knowledge to guide the models. Generally, the external knowledge comes from textual corpora [9], commonsense knowledge graphs [38, 32, 29], and domain knowledge graphs [30, 39]. To utilize the knowledge,  [26, 6] adapt the memory network [23] to store the relevant knowledge and then generate responses conditioned on both dialogue context and stored knowledge. Besides,  [12, 29] employ the posterior distribution of knowledge to guide its prior distribution, leading to accurate knowledge selection and high-quality generated responses. Furthermore, some work [14, 29, 13] leverages copy mechanism to copy words from knowledge sources directly and generate more informative responses. Although great progress has been made, the structural information of KG is neglected, which might lead to suboptimal responses.

To effectively excavate the structural information, some researchers attempt to utilize graph neural networks on KG to obtain its structure-aware representation that is further incorporated into dialogue generation 

[38, 16, 32]. AttnIO [8] leverages bi-direction attention flows to propagate messages from the entities appearing in the last utterance to their neighbor entities in KG. ConceptFlow [32] applies a graph attention mechanism to attend to appropriate concepts conditioning on dialogue context for responses generation, where the concepts are extracted from ConceptNet [22], a large-scale commonsense knowledge graph. Unlike previous research, our RT-KGD (1) refines the dialogue-level knowledge transition from different granularity; (2) incorporates the related knowledge based on the whole dialogue context rather than only the last utterance.

3 Methodology

In this section, we formally define the knowledge-ground dialogue generation task (Sec. 3.1) and then elaborate on four principal components of our RT-KGD model. As illustrated in Fig. 2, our model first constructs the multi-turn heterogeneous knowledge transition path (MHKT-Path) for the given dialogue context (Sec. 3.2) and then encodes the MHKT-Path by a knowledge encoder (Sec. 3.3). Next, the predicted triplet from a knowledge prediction (Sec. 3.4) is finally incorporated into the subsequent response, which is generated by a knowledge-enhanced encoder-decoder (Sec. 3.5).

Figure 2: The architecture of the proposed RT-KGD model.

3.1 Task Formulation

Given a dialogue context , where represents the -th utterance. Each corresponds to a knowledge triplet set , where means that head entity and tail entity have a relation , and a descriptive text set . All knowledge triplets and descriptive texts are from domain knowledge graph and corpus . The goal of knowledge-grounded dialogue systems is to generate a proper response based on the dialogue context , knowledge graph , and knowledge corpus .

3.2 Multi-turn Heterogeneous Knowledge Transition Path

To integrate dialogue-level relation transition regularities with turn-level entity semantic information, we utilize the knowledge triples associated with the given dialogue context, i.e., , to construct the multi-turn heterogeneous knowledge transition path, which is called MHKT-path. As shown in Fig. 2, MHKT-path contains two types of vertices, i.e., triplet vertices and relation vertices. In detail, each triplet vertex represents a knowledge triplet belonging to , and corresponds with a relation vertex which is extracted from it. There are four types of edges in MHKT-Path: (1) the triplet-to-triplet edge links the triplet vertices associated in one utterance with others in the neighbor utterances; (2) the paired triplet-to-relation and (3) relation-to-triplet edges denote the bi-directional interaction between triplet vertices and their corresponding relation vertices; (4) the relation-to-relation edge links relation vertices with each other only if their corresponding triplet vertices are connected. In this manner, the knowledge transition of both turn-level triplets and dialogue-level relations is integrated into the MHKT-Path.

3.3 Knowledge Encoder

The knowledge encoder learns the representation of the vertices in MHKT-Path. Specifically, it contains vertex initializer and graph layers to initialize and update the vertex representations.

3.3.1 Vertex Initializer

Instead of directly using the average word embeddings of the flat texts in entities and relations, we employ a KG embedding algorithm (i.e., TransR [15]) to initialize the representation of vertices in our MHKT-Path111We also attempt to encode entities and relations based on word embedding, as suggested by [27, 28], the results underperform that of using TransR.:

(1)

where denotes a KG element (e.g., entity or relation), means the initialized representation of . TransR(·) represents the TransR KG embedding function, learned by projecting entities from entity space to different relation spaces and building translations between the projected entities. In this way, the learned representation of KG elements in contain the global KG structural information due to their interaction in KG [15, 4, 34].

For relation vertex in MHKT-Path, we directly use as its initial representation. For triplet vertex , we calculate its representation as:

(2)

where denotes concatenation.

3.3.2 Graph Layers

Graph layers are used to update the vertex representations with the local structural information in the established MHKT-Path. Here, we employ the Heterogeneous Graph Transformer (HGT) [7] as the graph layers since it is aware of different types of vertices and edges. Given the MHKT-Path, the representation of each vertex is updated by aggregating its neighbor information:

(3)

where is the neighbor vertices set of , the Aggregate(·), Attention(·), and Message(·) are three basic operators in HGT:

  • Attention(·) calculates the mutual attention of each vertex pair, where each type of vertex and edge has a unique linear projection.

  • Message(·) transfers information from different types of neighbor vertices of each vertex .

  • Aggregate(·) integrates messages from neighbor vertices with attention weights to the core vertex .

Finally, for vertex , we concatenate the final node representation and the corresponding initial node representation with a simple linear projection:

(4)

where is trainable parameters, L is the number of layers of HGT.

3.4 Knowledge Predictor

After obtaining the final representations of both triplet and relation vertices in MHKT-Path

, the knowledge predictor is used to predict the knowledge which might be implied in the response. There are three parts to knowledge prediction, i.e., relation prediction, relation-aware triplet prediction, and multi-label triplet classification. Since the knowledge encoder aggregates only local neighborhood information, we further employ the bi-directional gated recurrent unit (Bi-GRU) 

[5] to enrich the sequential representations of relations and triplets.

In detail, we first treat the average vertices representation in dialogue order as the input of Bi-GRU. Suppose there are relation vertices and triplet vertices in turn . The relation vertices in turn are denoted as , whose average representation is shown as follows:

(5)

Similarly, the triplet vertices in turn are denoted as , whose average representation is:

(6)

3.4.1 Relation Prediction

The relation prediction part is to obtain the -th relation hidden state based on the previous turns relation representation. At step of relation prediction, Bi-GRU generates the -th relation hidden state as follows:

(7)

3.4.2 Relation Transition Aware Triplet Prediction

Different from the relation, we utilize Bi-GRU to obtain triplet hidden states based on the input . For the -th triplet, its hidden state is calculated as follows:

(8)

After obtaining the predicted -th relation hidden state and triplet hidden states, we employ multi-head attention [25] to jointly attend to the information from both dialogue level and turn level. Thus the predicted triplet representation is calculated as follows:

(9)

where denotes the number of attention heads.

3.4.3 Multi-label Triplet Classification

Since there might be multiple knowledge in the next response, the multi-label classification is adapted to map the predicted triplet representation to a label vector, where the number of labels is the total number of triplets in the knowledge graph

.

Formally, let label , where is a trainable parameter and is the total triplet size. The target label is denoted as . Then we adapt the binary cross-entropy (BCE) loss to supervise the classification of triplets:

(10)

where

is sigmoid function.

3.5 Knowledge-Enhanced Encoder-Decoder

We employ pre-trained BART [10] as the backbone of our KGD model, which aims to generate the final response based on dialogue context , predicted triplet representation and corresponding descriptive texts . The input dialogue context is formed as “[CLS][SEP][SEP][SEP][SEP]”, where [CLS] and [SEP] are two special tokens to indicate the utterance boundaries. Then, the input is automatically tokenized by the BART’s tokenizer, followed by a stack of BART encoder layers. Next, the context-aware representation of each token is obtained from the output of the last encoder layer of BART:

(11)

where indicates the number of tokens in the input sequence, denotes the BART encoder, and is the context-aware representation of the -th token in the sequence.

Similarly, for the descriptive text set corresponding to the context , each is encoded by the BART encoder, where the input is formed as “[CLS][SEP][SEP][SEP]”. We take the context-aware final representation of [CLS] as the sentence representation, and the encoded sentence embedding of the -th turn is obtained as follows:

(12)

Finally, the response is generated by the BART decoder, conditioning on the BART-encoded dialogue context , descriptive sentences and predicted triplets :

(13)

where is the representation of generated response, denotes the BART decoder, denotes the token boundaries.

3.5.1 Cross Entropy Loss

We guide the decoder with the ground-truth response by computing the Cross-Entropy Loss:

(14)

where denotes the generated token at the decoding time step , while is the -th token of the ground-truth response. In summary, the final loss is defined by:

(15)

where denotes the coefficients of the BCE loss.

4 Experiments

4.1 Dataset

To verify our model, two requirements should be met in the datasets: (1) each utterance is annotated with related knowledge triples, and (2) containing abundant utterances in each dialogue. Therefore, we conduct our experiments on KdConv[39], a Chinese multi-domain knowledge-driven dialogue dataset, which contains 4.5K dialogues together with 86K utterances from three domains (i.e., film, music, and travel). In KdConv, each dialogue contains 19.0 turns as well as 10.1 triplets on average. For domain-specific knowledge, both structured triplets and unstructured texts are provided. Specifically, the film, music, and travel domain knowledge contain 89K, 56K, and 10K triplets, together with 7.3K, 4.1K, and 1.1K descriptive sentences, respectively.

4.2 Settings

4.2.1 Baselines:

We adopt both vanilla and knowledge-grounded (indicating by “+know”) dialogue generation models as our baselines:

  • Seq2Seq [24]: An encoder-decoder model augmented with attention mechanism [1].

  • Seq2Seq+know [39] fuses the last hidden state of the encoder with the knowledge vector via the attention mechanism and feeds both of them into the Seq2Seq decoder.

  • HRED [20]: A hierarchical recurrent encoder-decoder model which models utterances and context separately with different RNNs.

  • HRED+know [39] fuses the context vector with the knowledge vector and treats the fused vector as the initial state of the HRED decoder.

  • BART [10]: A pre-trained Transformer-based encoder-decoder model which achieves state-of-the-art performance on various text generation tasks.

  • BART+know incorporates both knowledge entities and relations represented by the average word embeddings of the corresponding flat texts.

  • BART+know(TransR) incorporates knowledge entities and relations represented by a knowledge graph embedding algorithm (i.e., TransR [15]).

4.2.2 Implementation:

We implement the above models with PyTorch and Huggingface Transformers

222https://github.com/huggingface/transformers libraries. In Seq2Seq and HRED baselines, we employ GRU architecture [5] as the encoder and the decoder with 200 hidden cells. In terms of word embeddings, we adapt Tencent AI Lab word embeddings of 200d333https://ai.tencent.com/ailab/nlp/en/embedding.html. When encoding context, all models treat the concatenation of the past

utterances as the input of the encoder, while the target output of the decoder is the

-th utterance. is set to 8 in our experiments suggested by KdConv [39]. All models are optimized with ADAM optimizer using an initial learning rate of 5e-5. The mini-batch size is set to 32.

For our RT-KGD, the embedding size of entities and relations is set to 200. The implementation of TransR is provided by OpenKE444https://github.com/thunlp/OpenKE. The knowledge encoder is Bi-GRU, the hidden size and the number of layers are set to 300 and 1, respectively. We choose the Chinese BART555https://huggingface.co/fnlp/bart-base-chinese as the baseline pre-training language model with the default hyper-parameter settings. When decoding the response, the beam search size of all models is set to 5. The is set to 1 in Eq. 15.

Model PPL BLEU-1/2/3/4 Distinct-1/2/3/4
Film
Seq2Seq 23.88 26.97 14.31 8.53 5.30 2.32 6.13 10.88 16.14
Seq2Seq+know 25.56 27.45 14.51 8.66 5.32 2.85 7.98 15.09 23.17
HRED 24.74 27.03 14.07 8.30 5.07 2.55 7.35 14.12 21.86
HRED+know 26.27 27.94 14.69 8.73 5.40 2.86 8.08 15.81 24.93
BART 2.66 28.54 19.28 14.21 11.00 2.46 14.12 25.72 36.12
BART+know 2.85 29.38 20.18 15.02 11.74 2.55 15.26 28.01 39.45
BART+know(TransR) 2.82 29.68 20.43 15.26 11.97 2.50 15.12 27.96 39.56
RT-KGD(ours) 2.86 32.11 22.21 16.68 13.18 3.05 16.34 31.36 44.68
Music
Seq2Seq 16.17 28.89 16.56 10.63 7.13 2.52 7.02 12.69 18.78
Seq2Seq+know 17.12 29.6 17.26 11.36 7.84 3.93 12.35 23.01 34.23
HRED 16.82 29.92 17.31 11.17 7.52 2.71 7.71 14.07 20.97
HRED+know 17.69 29.73 17.51 11.59 8.04 3.80 11.70 22.00 33.37
BART 2.46 31.65 23.04 18.22 15.05 2.80 13.69 24.73 34.59
BART+know 2.40 32.20 23.24 18.20 14.89 2.74 13.54 24.96 35.41
BART+know(TransR) 2.44 32.27 23.40 18.44 15.22 2.80 13.68 25.19 35.61
RT-KGD(ours) 2.47 40.75 31.26 25.56 21.64 4.18 17.38 30.05 41.05
Travel
Seq2Seq 10.44 29.61 20.04 14.91 11.74 3.75 11.15 19.01 27.16
Seq2Seq+know 10.62 37.04 27.28 22.16 18.94 4.25 13.64 24.18 34.08
HRED 10.90 30.92 20.97 15.61 12.30 4.15 12.01 20.52 28.74
HRED+know 11.15 36.87 26.68 21.31 17.96 3.98 13.31 24.06 34.35
BART 1.83 34.77 29.11 25.69 23.33 2.70 13.39 21.92 29.53
BART+know 1.67 36.19 29.83 26.04 23.41 2.59 13.31 22.01 29.69
BART+know(TransR) 1.69 36.61 30.29 26.54 23.92 2.56 13.58 22.85 30.87
RT-KGD(ours) 1.61 47.56 41.46 37.40 34.31 3.58 15.50 26.10 35.72
Table 1: Automatic evaluation results on KdConv Corpus. The bold indicates the best performance. The “+know” means the models are enhanced by the knowledge base, and the knowledge words are encoded by word embeddings. indicates higher is better. indicates lower is better. denotes the results reported by KdConv [39].

4.3 Evaluation Metrics

4.3.1 Automatic Evaluation:

Following [39], we adopt perplexity (PPL), BLEU scores [17], and Distinct scores [11]

as automatic metrics. In detail, PPL is used to evaluate whether the generation result is grammatical and fluent. BLEU-n (n=1, 2, 3, or 4) estimates how many n-grams overlap between generated sentences and ground truth references. Distinct-n (n=1, 2, 3, or 4) evaluates the diversity of generated responses.

4.3.2 Human Evaluation:

Considering the complexity of the knowledge-grounded dialogue generation task and the limitation of automatic evaluation, it is necessary to further conduct the human evaluation. Following KdConv [39], The criteria of human evaluation include two aspects: (1) Fluency evaluates whether the generated responses are reasonable and relevant to the given dialogue context. (2) Coherence measures how relevant the knowledge contained in the generated responses and the counterpart in the ground truth responses. We randomly select 100 dialogue contexts from KdConv in three domains, respectively, and then ask five well-educated evaluators to judge the generated responses by different models. The scoring adopts a 3-point scale.

(a) Fluency scores on film, music and travel domains, respectively
(b) Coherence scores on film, music and travel domains, respectively
Figure 3:

Human evaluation in three domains, including means and variances of the Fluency (a) and Coherence (b).

is the Fleiss’ kappa value.

4.4 Experimental Results

Tab. 1 shows the automatic evaluation results. We analyze the results from the following perspectives:

(1) Comparison between models: Compared with all baseline models, RT-KGD achieves the best results on most of automatic metrics in three domains, which indicates that our knowledge-guided method is extremely effective in improving the coherence and diversity of generated responses. Specifically, compared with Seq2Seq-based and HRED-based models, our RT-KGD obtains not only lower PPL scores but also higher BLEU-n and Distinct-n scores in three domains. This is because we utilize the pre-trained language model to encode contexts and generate responses, which makes use of the implicitly learned knowledge from the pre-trained corpus. On the other hand, compared with BART-based models, our RT-KGD works better in terms of BLEU-n and Distinct-n scores, however worse on PPL scores. Based on our manual sampling analysis of the experimental results, the reason might be that our MHKT-Path takes the knowledge transition into consideration. At the same time, diverse knowledge information may result in responses that have never appeared in the corpus, thus reducing the PPL scores.

Moreover, it can be seen that all models with knowledge perform better than those without knowledge in terms of BLEU-n and Distinct-n, indicating the benefits of incorporating knowledge. However, the addition of knowledge works worse in PPL. The reason may be that the sentence with knowledge is less common and more difficult to understand for the model. We also observe that all models with “know(TransR)” obtain higher BLEU-n and Distinct-n scores than models with “know”, demonstrating that introducing of knowledge graph embedding algorithm has a positive influence on generating high-quality responses. It is worth noting that in the music domain, BART performs better than BART+know in terms of Distinct-1 and Distinct-2 but worse in Distinct-3 and Distinct-4, which is due to that BART prefers to use individual words with low frequency rather than common phrases. Furthermore, it is possible to get a high Distinct-1 for putting together a response with entirely random words. The same analysis comparing BART and BART+know also applies to the travel domain.

(2) Comparison between domains: As we can see, models in the travel domain perform better than that in film and music domains on PPL and BLEU-k, while models in the film domain obtain higher Distinct-n scores than the same model in music and travel domains. The reason might be that there are more entities and relations in the film domain, which leads to more diverse knowledge tokens but a lower similarity with the ground-truth.

4.5 Human Study

Here, we estimate three knowledge-grounded dialogue generation models which perform better than other baselines. The experiment results are shown in Fig. 3. As can be seen, RT-KGD outperforms other models significantly on both metrics in all three domains, which indicates that our model can generate more human-like responses. Moreover, the performance gap between models behaves differently on different metrics. The fluency scores in the music domain (the middle one in Fig. 3(a)) are increased from 1.36 (HRED+know) to 1.93 (RT-KGD), while the coherence scores in the music domain (the middle one in Fig. 3(b)) are increased from 1.00 (HRED+know) to 1.77 (RT-KGD). We also show Fleiss’ Kappa values of our human study. A higher score indicates higher agreements among evaluators. The kappa scores demonstrate a good inter-agreement among our evaluators.

4.6 Ablation Study

Model PPL BLEU-1/2/3/4 Distinct-1/2/3/4
Film
RT-KGD(ours) 2.86 32.11 22.21 16.68 13.18 3.05 16.34 31.36 44.68
- w/o tri 2.85 30.17 20.82 15.58 12.22 2.61 15.79 29.28 41.16
- w/o rel 3.37 30.10 20.64 15.42 12.10 2.56 15.76 29.31 41.44
- w/o edge 3.35 30.13 20.76 15.52 12.22 2.53 15.79 29.42 41.68
Music
RT-KGD(ours) 2.47 40.75 31.26 25.56 21.64 4.18 17.38 30.05 41.05
- w/o tri 2.43 32.22 23.24 18.22 14.94 2.74 13.17 24.26 34.42
- w/o rel 2.49 32.53 23.66 18.67 15.44 2.85 14.12 26.28 37.22
- w/o edge 2.42 32.28 23.44 18.50 15.26 2.83 13.92 25.36 35.55
Travel
RT-KGD(ours) 1.61 47.56 41.46 37.40 34.31 3.58 15.50 26.10 35.72
- w/o tri 1.70 36.92 30.69 26.95 24.33 2.71 13.89 23.32 31.76
- w/o rel 1.84 36.98 30.59 26.74 24.06 2.64 13.63 23.01 31.17
- w/o edge 1.82 37.39 31.02 27.21 24.55 2.58 13.43 22.14 29.79
Table 2: Ablation study on KdConv. The bold and underline denote the best and the worst performances, respectively.

To analyze which components are driving the improvements, we further design three graph variants for detailed comparison and ablation study: (1) “w/o tri” removes the triplet vertices in MHKT-Path; (2) “w/o rel” removes the relation vertices in MHKT-Path; (3) “w/o edge” removes the edges between the triplet and the relation vertices in MHKT-Path.

Tab. 2 shows the results of ablation studies. First, we observed that models suffer the performance drop when removing any of the components, demonstrating the effectiveness of integrating triplets and relations. Second, the degree of impact increases from the film domain to the travel domain after removing components. For example, the BLEU-n scores decrease by 1.4, 7.4, and 10.4 on average in film, music, and travel, respectively, which shows that our MHKT-Path plays a more significant role in the travel domain in improving the quality of generated response. Third, the contribution of each component is not equal in different domains. Specifically, if the triplet vertices are removed, BLEU-n and Distinct-n scores are dramatically dropped in the music domain, indicating that turn-level entity information is capable of enhancing knowledge comprehension. While removing the relation vertices, BLEU-n scores declined most significantly in film and travel domains, demonstrating the advantage of explicitly modeling dialogue-level relation transition regularities. Lastly, without the edges between the triplet and relation vertices, the performance of RT-KGD in all three domains is reduced to varying degrees. This is because the edge between triplet vertices and relation vertices effectively propagates the information between these two vertices.

4.7 Case study

Figure 4: Example dialogue cases. The bold is the core entity under discussion. Underline is the appropriate knowledge used in the dialogue. Italic is inconsistent with the context.

As shown in Fig. 4, we show the responses generated by HRED+know, BART
+know(TransR) and RT-KGD. We can observe that given the context and corresponding knowledge triplets, HRED+know tends to generate generic or irrelevant responses, and BART+know(TransR) can generate coherent and informative responses but utilizes the inconsistent knowledge. While our RT-KGD is superior to generating high-quality responses with appropriate knowledge.

5 Conclusion

In this paper, we proposed a novel KGD model: Relation Transition aware Knowledge-Grounded Dialogue Generation (RT-KGD), which models the knowledge transition across multi-turn dialogue by integrating dialogue-level relation transition regularities with turn-level entity semantic information. Furthermore, our RT-KGD model utilizes the predicted knowledge to generate a response given the dialogue context. According to automatic and manual evaluation, our model generates high-quality responses which utilize more appropriate knowledge and are closer to the responses given by humans.

Acknowledgments:

Zhixu Li and Jianfeng Qu are the corresponding authors. This research is supported by the National Natural Science Foundation of China (Grant No. 62072323, 62102276), the Natural Science Foundation of Jiangsu Province (Grant No. BK20191420, BK20210705, BK20211307), the Natural Science Foundation of Educational Commission of Jiangsu Province, China (Grant No. 21KJD520005), the Major Program of the Natural Science Foundation of Jiangsu Higher Education Institutions of China (Grant No. 19KJA610002),

NH33714722 Youth Team on Interdisciplinary Research Soochow University - Research on Subjectivity and Reasoning Theory in Artificial Intelligence, the Priority Academic Program Development of Jiangsu Higher Education Institutions, Suda-Toycloud Data Intelligence Joint Laboratory, and the Collaborative Innovation Center of Novel Software Technology and Industrialization.

Supplemental Material Statement:

The KdConv dataset and part of the baselines in Sec. 4 are publicly available from Github666https://github.com/thu-coai/KdConv. Source codes for RT-KGD model are available at https://github.com/tigerwww-git/RT-KGD.

References

  • [1] D. Bahdanau, K. Cho, and Y. Bengio (2015) Neural machine translation by jointly learning to align and translate. In ICLR, Cited by: 1st item.
  • [2] J. Bai, Z. Yang, X. Liang, W. Wang, and Z. Li (2021) Learning to copy coherent knowledge for response generation. In AAAI, Cited by: §1, §2.
  • [3] S. Bao, H. He, F. Wang, and H. Wu (2020) PLATO: pre-trained dialogue generation model with discrete latent variable. In ACL, Cited by: §2.
  • [4] A. Bordes, N. Usunier, A. García-Durán, J. Weston, and O. Yakhnenko (2013) Translating embeddings for modeling multi-relational data. In NIPS, Cited by: §3.3.1.
  • [5] K. Cho, B. van Merrienboer, Ç. Gülçehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio (2014) Learning phrase representations using rnn encoder–decoder for statistical machine translation. In EMNLP, Cited by: §3.4, §4.2.2.
  • [6] M. Ghazvininejad, C. Brockett, M. Chang, W. B. Dolan, J. Gao, W. Yih, and M. Galley (2018) A knowledge-grounded neural conversation model. In AAAI, Cited by: §1, §1, §2.
  • [7] Z. Hu, Y. Dong, K. Wang, and Y. Sun (2020) Heterogeneous graph transformer. Proceedings of The Web Conference 2020. Cited by: §3.3.2.
  • [8] J. Jung, B. Son, and S. Lyu (2020) AttnIO: knowledge graph exploration with in-and-out attention flow for knowledge-grounded dialogue. In EMNLP, Cited by: §1, §1, §2.
  • [9] B. Kim, J. H. Ahn, and G. Kim (2020) Sequential latent knowledge selection for knowledge-grounded dialogue. In ICLR, Cited by: §1, §2.
  • [10] M. Lewis, Y. Liu, N. Goyal, M. Ghazvininejad, A. Mohamed, O. Levy, V. Stoyanov, and L. Zettlemoyer (2020) BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In ACL, Cited by: §2, §3.5, 5th item.
  • [11] J. Li, M. Galley, C. Brockett, J. Gao, and W. B. Dolan (2016) A diversity-promoting objective function for neural conversation models. In NAACL, Cited by: §1, §4.3.1.
  • [12] R. Lian, M. Xie, F. Wang, J. Peng, and H. Wu (2019) Learning to select knowledge for response generation in dialog systems. In IJCAI, Cited by: §2.
  • [13] Y. Liang, F. Meng, Y. Zhang, Y. Chen, J. Xu, and J. Zhou (2021) Infusing multi-source knowledge with heterogeneous graph neural network for emotional conversation generation. AAAI (15). Cited by: §1, §2.
  • [14] X. V. Lin, W. Jian, J. He, T. Wang, and W. Chu (2020) Generating informative conversational response using recurrent knowledge-interaction and knowledge-copy. In ACL, Cited by: §1, §2.
  • [15] Y. Lin, Z. Liu, M. Sun, Y. Liu, and X. Zhu (2015) Learning entity and relation embeddings for knowledge graph completion. In AAAI, Cited by: §3.3.1, 7th item.
  • [16] S. Moon, P. Shah, A. Kumar, and R. Subba (2019) OpenDialKG: explainable conversational reasoning with attention-based walks over knowledge graphs. In ACL, Cited by: §1, §1, §1, §2.
  • [17] K. Papineni, S. Roukos, T. Ward, and W. Zhu (2002) Bleu: a method for automatic evaluation of machine translation. In ACL, Cited by: §4.3.1.
  • [18] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al. (2019) Language models are unsupervised multitask learners. OpenAI blog. Cited by: §2.
  • [19] S. Roller, E. Dinan, N. Goyal, D. Ju, M. Williamson, Y. Liu, J. Xu, M. Ott, K. Shuster, E. M. Smith, Y. Boureau, and J. Weston (2021) Recipes for building an open-domain chatbot. In EACL, Cited by: §2.
  • [20] I. Serban, A. Sordoni, Y. Bengio, A. C. Courville, and J. Pineau (2016) Building end-to-end dialogue systems using generative hierarchical neural network models. In AAAI, Cited by: §2, 3rd item.
  • [21] A. Sordoni, M. Galley, M. Auli, C. Brockett, Y. Ji, M. Mitchell, J. Nie, J. Gao, and W. B. Dolan (2015) A neural network approach to context-sensitive generation of conversational responses. In NAACL, Cited by: §2.
  • [22] R. Speer, J. Chin, and C. Havasi (2017) ConceptNet 5.5: an open multilingual graph of general knowledge. AAAI. Cited by: §2.
  • [23] S. Sukhbaatar, A. D. Szlam, J. Weston, and R. Fergus (2015) End-to-end memory networks. In NIPS, Cited by: §2.
  • [24] I. Sutskever, O. Vinyals, and Q. V. Le (2014) Sequence to sequence learning with neural networks. In NIPS, Cited by: 1st item.
  • [25] A. Vaswani, N. M. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin (2017) Attention is all you need. In NIPS, Cited by: §2, §3.4.2.
  • [26] P. Vougiouklis, J. S. Hare, and E. P. B. Simperl (2016) A neural network approach for knowledge-driven response generation. In COLING, Cited by: §2.
  • [27] J. Wang, Z. Li, T. Zhang, D. Zheng, J. Qu, A. Liu, L. Zhao, and Z. Chen (2022) Knowledge enhanced sports game summarization. In WSDM, Cited by: footnote 1.
  • [28] J. Wang, B. Zou, Z. Li, J. Qu, P. Zhao, A. Liu, and L. Zhao (2022) Incorporating commonsense knowledge into story ending generation via heterogeneous graph networks. In Database Systems for Advanced Applications, Cited by: footnote 1.
  • [29] S. Wu, Y. Li, D. Zhang, Y. Zhou, and Z. Wu (2020) Diverse and informative dialogue generation with context-specific commonsense knowledge awareness. In ACL, Cited by: §1, §2.
  • [30] W. Wu, Z. Guo, X. Zhou, H. Wu, X. Zhang, R. Lian, and H. Wang (2019) Proactive human-machine conversation with explicit conversation goal. In ACL, Cited by: §1, §2.
  • [31] C. Xing, W. Y. Wu, Y. Wu, M. Zhou, Y. Huang, and W. Ma (2018) Hierarchical recurrent attention network for response generation. In AAAI, Cited by: §2.
  • [32] H. Zhang, Z. Liu, C. Xiong, and Z. Liu (2020) Grounded conversation generation as guided traverses in commonsense knowledge graphs. In ACL, Cited by: §1, §1, §1, §2, §2.
  • [33] R. Zhang, J. Guo, Y. Fan, Y. Lan, J. Xu, and X. Cheng (2018) Learning to control the specificity in neural response generation. In ACL, Cited by: §2.
  • [34] T. Zhang, Z. Li, J. Wang, J. Qu, L. Yuan, A. Liu, L. Zhao, and Z. Chen (2022) Aligning internal regularity and external influence of multi-granularity for temporal knowledge graph embedding. In Database Systems for Advanced Applications, Cited by: §3.3.1.
  • [35] Y. Zhang, S. Sun, M. Galley, Y. Chen, C. Brockett, X. Gao, J. Gao, J. Liu, and W. B. Dolan (2020) DIALOGPT : large-scale generative pre-training for conversational response generation. In ACL, Cited by: §2.
  • [36] X. Zhao, W. Wu, C. Xu, C. Tao, D. Zhao, and R. Yan (2020) Knowledge-grounded dialogue generation with pre-trained language models. In EMNLP, Cited by: §1.
  • [37] D. Zheng, Z. Xu, F. Meng, X. Wang, J. Wang, and J. Zhou (2021) Enhancing visual dialog questioner with entity-based strategy learning and augmented guesser. In Findings of EMNLP 2021, Cited by: §2.
  • [38] H. Zhou, T. Young, M. Huang, H. Zhao, J. Xu, and X. Zhu (2018) Commonsense knowledge aware conversation generation with graph attention. In IJCAI, Cited by: §1, §2, §2.
  • [39] H. Zhou, C. Zheng, K. Huang, M. Huang, and X. Zhu (2020) KdConv: a Chinese multi-domain dialogue dataset towards multi-turn knowledge-driven conversation. In ACL, Cited by: Figure 1, 3rd item, §1, §2, 2nd item, 4th item, §4.1, §4.2.2, §4.3.1, §4.3.2, Table 1.