Knowledge-Consistent Dialogue Generation with Knowledge Graphs
Abstract
We propose a framework for generating knowledge consistent and context-relevant dialogues with a knowledge graph (KG), named SU bgraph
R etrieval-augmented GE neration ( SURGE ).
First, our method retrieves the context-relevant subgraph from the KG, and then enforces consistency across the facts by perturbing their word embeddings conditioned on the retrieved subgraph.
Then, it learns the latent representation space using graph-text multi-modal contrastive learning which ensures that the generated texts have high similarity to the retrieved subgraphs.
We validate the performance of our SURGE framework on the OpendialKG dataset and show that our method generates high-quality dialogues that faithfully reflect the knowledge from the KG.
1. Introduction
Dialogue systems aim at generating human-like responses, considering the context and history of the dialogue.
Recently, with the development of pre-trained language models (PLMs) for text generation (Radford et al., 2019; Raffel et al., 2020), neural dialogue agents are able to generate fluent responses.
However, they often generate factually incorrect responses due to a lack of explicit knowledge.
The problem can become worse, when the conversation requires accurate knowledge about certain subjects.
While retrieving the documents from a large-scale text corpus (e g. Wikipedia) with information retrieval boosts the performance of dialogue agents (Karpukhin et al., 2020;
Lewis et al., 2020b)
the computational overhead of searching for the relevant documents and embedding them on the fly could be high.
Thus, we instead consider the pre- compiled Knowledge Graph (KG) (Bollacker et al., 2008;
Vrandecic & Kr¨otzsch, 2014) consisting of symbolic facts, which represent the entities as nodes and their relations as edges, in the form of a triplet, e.g., (Pride & Prejudice, written by, Jane Austen) .
Such KG-augmented dialogue generation models are highly efficient compared to retrieving from and augmenting with unstructured texts.
This is because we can directly retrieve entities from the context without searching for all candidate documents from a large text corpus, and the retrieved facts succinctly encode the required knowledge in the most compact and effective form.
Few recent works (Tuan et al., 2019; Galetzka et al., 2021;
Zhou et al., 2021) use the KG to provide facts associated with the entities in the dialogue context to the conversation agents.
However, they utilize all the triplets associated to the given entity, whose facts are mostly irrelevant to the dialogue context, which could mislead the model into generating factually incorrect responses.
Moreover, it is not straightforward to combine the representations from two heterogeneous modalities: the dialogue context is represented as a text, meanwhile, the knowledge is represented as a graph, i.e., handling two different modalities is non-trivial.
In this work, we tackle such challenging and fundamental issues of knowledge-consistent dialogue generation with
KG 1 .
In particular, we propose a context-relevant subgraph retrieval that retrieves only the relevant triplets from a large
KG.
Notably, our subgraph retrieval method is end-to-end trainable jointly with the generation objective (Lewis et al., 2020b).
Then, to encode the retrieved subgraph along with the text sequence, we propose a graph encoding that is permutation and relation-inversion invariant yet efficient.
Furthermore, to ensure that the model does make use of the encoded knowledge when generating responses, we propose a multi-modal contrastive learning objective to enforce the consistency across the retrieved facts and the generated texts.
We refer to our framework as SU bgraph R etrievalaugmented GE neration ( SURGE ).
We validate our SURGE on the OpendialKG (Moon et al., 2019) dataset against relevant baselines, with our proposed performance metric, named Knowledge-verifying Question
Answering (KQA) for accurate knowledge verification.
The experimental results show that SURGE generates responses that not only agree with the gold knowledge but are also consistent with the retrieved knowledge from the KG.
Our main contributions can be summarized as follows:
• We propose a context-relevant subgraph retrieval method to extract only the relevant piece of the knowledge for the given context from the entire knowledge graph, for generating appropriate responses to the ongoing conversation.
• We propose a permutation and relation-inversion invariant yet efficient graph encoder and a multi-modal graph-text contrastive learning objective to ensure that the generated responses faithfully reflect the retrieved knowledge.
• We validate our SURGE framework against relevant baselines, demonstrating its efficacy in generating responses that are more informative by retrieving and reflecting the relevant knowledge from the KG.
2. Related Work
Knowledge-Grounded Dialogue
The sources of external knowledge can be categorized into two types: documents from large unstructured corpora such as Wikipedia (Dinan et al., 2019) or Web (Nakano et al., 2021), and symbolic facts from knowledge graphs (Bollacker et al., 2008; Vrandecic & Kr ¨ otzsch, 2014).
Knowledge graph-augmented dialogue generation models, which use structured graphs, are more efficient than the previous methods utilizing unstructured texts (Li et al., 2020; Shuster et al., 2021), and consequently more preferable when responsiveness is important or a large unstructured text corpus is unavailable.
Regarding the dialogue generation with the knowledge graph (KG), Moon et al.
(2019) introduce a knowledge-grounded dialogue dataset where each dialogue comes with the largescale KG.
Tuan et al.
and
Zhou et al.
(2021) are sequence-to-sequence models that condition the output distribution for word generation with the entities from the KG.
Further, Galetzka et al.
(2021) propose an efficient way to encode all of the facts in the 1-hop neighbors of the entities that appear in the dialogue history in the given KG.
However, all of above methods simply match and retrieve all the facts for entities including irrelevant ones that appear in the dialogue history.
Our work differs from them, since we aim at retrieving only the context-relevant subgraph among the 1-hop facts with an end-to-end trainable graph retriever.
3. Method
We first formalize the problem, and describe the key components for our SU bgraph R etrieval-augmented GE neration ( SURGE ) framework: context-relevant subgraph retrieval, invariant graph encoding, and graph-text contrastive learning.
For preliminaries, please refer to Appendix C.1.
3.1. Problem Statement
Given a dialogue history x
= [ x 1 , . . .
, x N ] ,
a generative
PLM first encodes the input tokens, and then models a probabilistic distribution p ( y | x ) to generate an output response
y
=
[ y 1 , . . .
, y T ] .
This problem requires a piece of specific knowledge graph for continuing the conversation.
To this end, given a dialogue history x , we first aim at retrieving a subgraph Z ⊆ G consisting of a set of triplets z ∈ Z where z = ( e h , r , e t ) , which encodes relevant knowledge of the ongoing conversation.
Therefore, the distribution of the context-relevant facts Z is denoted as p ( Z| x ) , and the likelihood of knowledge-consistent response generation then becomes p ( y | x , Z ) .
To maximize this likelihood, we treat
Z as a latent variable and then marginalize the likelihood over all possible latent variables for Z , as follows:
[Equation]
where, in other words, p ϕ ( Z| x ) is an output distribution of the context-relevant subgraph retriever, and p θ ( y | x , Z ) is the target distribution of a knowledge-augmented generator, which are parameterized by ϕ and θ , respectively.
3.2. Context-Relevant Subgraph Retriever
We assume that a retrieval probability of each triplet in
Z = { z 1 , . .
, z n } is independent.
Then, we decompose p ( Z| x ) into p ( z 1 | x ) p ( z 2 | x ) . . .
p ( z n | x ) .
We can now focus on retrieving the only one triplet.
Therefore, we define the retrieval of one triplet with an inner product of dense vectors between the dialogue history x
and the candidate triplet z as follows:
[Equation]
where d is a triplet embedding function and q is a dialogue context embedding function.
We use a PLM for implementing q , but we need another method for d that can reflect the property of the graph.
Therefore, we propose the GNNbased triplet embedding method for realizing d .
We include details on the triplet embedding d in Appendix C.2.
3.3. Invariant Graph Encoding
In this subsection, we specify p θ ( y | x , Z ) which generates y conditioned on a text x and a retrieved subgraph Z .
For multi-relational graph Z , it is important to obtain the permutation invariance and relation-inversion invariance when we encode it into the text sequence.
For definitions of both invariance properties, please refer to Appendix C.3.
Negative Subgraph (𝒵′)
Could you recommend any book by Jane Austen ?
User b
KnowledgeGraph ( 𝒢 )
Dialogue
History ( 𝒙 )
Subgraph (𝒵)
Context-Relevant Subgraph Retriever 𝑝 !
(𝒵|𝒙)
Encoder
Decoder
Generator (PLM)
Generate 𝑝 " (𝒚|𝒙,𝒵)
Sure, she wrote Pride & Prejudice and Lady
Susan.
Graph-Text
Contrastive Learning
Decoder Hidden States ℎ a d e f
Place_of_birth written_by
Jane Austen; a
Lady Susan; d written_by
Iron man
Stan Lee
Iron Mansequel c
Pride & Prejudice; e written_by written_by is_a written_by has_person
b a is_a a c has_person a d written
[Figure]
by f
[Figure]
a e
[Figure]
Graph Encoding
[Figure]
Sampling
Specifically, we measure the similarity of a context and triplet embedding to compose the retrieval distribution p ϕ
( z | x ) (§ 3.2).
Then, we encode the retrieved subgraph Z into the input of the generator, using the graph encoding function ψ ( x , Z ) (§ 3.3).
Finally, we use a contrastive learning to enforce the model to generate a consistent response with the retrieved subgraph (§ 3.4).
For instance, given a sequence x = [ x 1 , . . .
, x N ] and a subgraph Z
= { ( a , d , b ) , ( b , e , a ) , ( a , d , c ) } from the retriever, ψ ( x , Z ) =
f
([ a, d, b, b, e, a, a, d, c, x 1 , ..., x N ]) with a = q e ( a ) , b = q e ( b ) , c = q e ( c ) , d = q r ( d ) , e = q r ( e ) , which we term as the na ¨ ıve encoding.
Due to its simplicity, it is widely used for a text-conditioned generation (Lewis et al., 2020b).
However, it violates two important invariance properties for graph encoding mentioned above.
To build the graph encoding method that efficiently satisfies both properties, we first only encode unique entities in front of the text sequence as follows:
[Equation]
where ENT operator to obtain only entities from triplets, and
SORT operator to sort entities in alphabetical order.
However, above encoding does not consider the relational information in Z .
Therefore, we further utilize the function β which perturbs the entities’ token embeddings with respect to their relational representations in Z .
To sum up, our invariant and efficient graph encoding is formalized as follows:
[Equation]
For more details, please refer to Appendix C.3 and D.
3.4. Consistent Generation with Graph-Text Contrastive Learning
We further introduce a graph-text contrastive learning method to make model generate knowledge-consistent responses.
For a single pair of a graph and text,
[Equation]
cont
[Equation]
where z = 1 m (cid:80) mi =1 z
i is the mean of graph representations, h = 1 T (cid:80)
Tt
=
h t is the mean of decoder representations, sim is the cosine similarity, ζ and ξ are linear projection layers, and τ is a temperature parameter.
Furthermore, (cid:80) h ′ and (cid:80) z
′ indicate the summation over negative samples in the batch (Radford et al., 2021).
With Eq. 3, the model can embed the correlated pairs closer together in order to generate a consistent response to a given graph.
3.5. Training
Our whole end-to-end training objective for retrievalaugmented generation is defined as follows:
[Equation]
where we simplify the sampling over n triplets as the sampling over the subgraph distribution p ϕ
( Z| x ) .
We assume that we can access the gold subgraph for some data in training.
Thus, we further add the supervised retrieval loss to introduce a semi-supervised retriever learning as follows:
[Equation]
where Z ∗ is the available ground-truth subgraph.
Combining all objectives in Eq.
3, 4, and 5, our final training objective is then defined as follows:
L =
L ret + L
[Equation]
[Table]
25.91 SURGE (contrastive) 39.
Oracle
Gold Knowledge † 49.
28.82 Gold Response 83.
[Table]
[Figure]
We note that T5 + Gold Knowledge exactly uses the knowledge for generating
[Figure]
[Table]
4. Experiment
We conduct experiments on the OpendialKG dataset (Moon et al., 2019), which is a dialogue corpus associated with a large-scale Knowledge Graph (KG), namely Freebase (Bollacker et al., 2008).
We use T5-small (Raffel et al., 2020) for all experiments.
For details, see Appendix E.
4.1. Baselines
We compare different variants of our SURGE framework against various KG-augmented dialogue generation models.
No Knowledge.
This model is only provided with the dialog history, thus no external knowledge is used.
All
Knowledge.
This model is provided with entire facts within a 1-hop subgraph of entities associated with the dialog history.
Gold Knowledge.
This model is provided with the exact gold knowledge, even in the test time if the gold knowledge exists.
Space Efficient Encoding.
This model takes all facts from the 1-hop subgraph of the entities as input.
We use two different encoding methods introduced in (Galetzka et al., 2021), namely Space Efficient (series) and Space Efficient (parallel).
EARL.
This is an RNNbased model, where the entities are conditioned in response generation (Zhou et al., 2021).
Random/Sparse Retrieval.
These models are provided with selected facts from a 1-hop subgraph, via the random sampling or the sparse retrieval – BM25 (Robertson & Zaragoza, 2009).
Text-based Retrieval.
This model uses a pre-trained language model as the triplet embedding function of the retriever similar to (Humeau et al., 2020), instead of using GNN.
SURGE (unsupervised).
Ours with retrieved context-relevant facts from 1-hop subgraph, where the retrieval is trained without any supervision.
SURGE (semi-supervised).
Ours but the retriever is trained with supervision if the data has a gold fact.
SURGE (contrastive).
Our full model jointly trains the retriever in a semi-supervised manner with the contrastive learning term.
By default, all our models are trained with an invariant and efficient graph encoding.
A
Novel
Metric: Knowledge-verifying QA
Existing automatic evaluation metrics, namely BLEU and
ROUGE (Papineni et al., 2002; Lin, 2004), are limited in that they only consider the lexical overlaps.
To solve this issue, we propose K nowledge-verifying Q uestion A nswering ( KQA ) which measures whether generated responses contain factually correct knowledge given the dialogue history.
Compared to the existing metrics using question generation methods (Honovich et al., 2021; Wang et al., 2020), we automatically derive QA pairs for evaluation from the dialogue and the large-scale KG (Bollacker et al., 2008).
For more details on KQA, please refer to Appendix E.1.
4.3. Experimental Results and Analyses
In Table 1, we report the knowledge-grounded response generation performances of baselines and our SURGE.
Our models significantly outperform all the baselines on all metrics.
The high BLEU, ROUGE, and F1 refer that ours suf-
[Table] [Table]
[Table] [Table]
ficiently learns the syntactic and semantic structure of the responses.
On the other hand, high KQA scores indicate that the generated responses are formed with the correct facts, which are relevant to the dialog context.
Even baselines like All Knowledge , Space Efficient Encoding (Galetzka et al., 2021), and EARL (Zhou et al., 2021), which are provided with all of 1-hop facts, underperform ours.
The result demonstrates that retrieving relevant knowledge is critical for successful response generation.
Among retrieval variants, our models achieve the best performance on all of metrics.
The results indicate the use of the graph-structured information is important to retrieve the relevant facts.
In Figure 2, we further examine the generation performance by categorizing the data into two groups: ones with and without the gold knowledge.
Our method notably shows notable performance even with the retrieved knowledge when there is no exact gold knowledge provided.
Knowledge Retrieval Figure 3 shows the performances of retrieval methods, where we only measure the retrieval performance on data that contain the gold knowledge.
Our
SURGE has a differentiable retriever, whereas Random and
BM25 (Robertson & Zaragoza, 2009) retrieve the fact without learning.
Therefore, our models outperform both approaches by a large margin.
We provide the retrieval examples for baselines and our model in Figure 9 of Appendix H.
Knowledge-Consistent Generation
We conduct an ablation study on our models to validate the knowledge consistency performance of the response generation by computing the Knowledge F1 (KF1) score (Shuster et al., 2021).
The
KQA scores capture the overall performance of both retrieval and generation and implicitly quantify the knowledge consistency between the retrieved knowledge and generated responses.
They concentrate more on evaluating the factual correctness of the generated responses.
To solely focus on the response generation performance where a given knowledge is consistently reflected in the generated responses, we use the gold knowledge instead of the retrieved knowledge and randomly replace them with unseen combinations of triplets in dialogues.
The newly formed knowledge ensures our models to generate genuinely from the given knowledge while not depending on the information learned from the training dataset.
As shown in Table 2, our model with graph-text contrastive learning loss performs the best in the
KF1 and comparable F1 to our semi-supervised model.
The high KF1 score infers that the generated responses faithfully reflect the encoded knowledge.
Sensitive Analysis on Graph Encoding We further conduct an analysis on graph encoding variants introduced in
Section 3.3.
The knowledge length in Table 3 indicates the average token length used for graph encoding.
Our Invariant & Efficient ψ ∗ performs the best against other variants, while using the lesser space at the graph encoding phase.
Notably, Invariant achieves a comparable performance against
Invariant & Efficient , but yields a longer sequence.
Human Evaluation We sample 30 responses of SURGE,
All Knowledge , and Space Efficient on the OpendialKG test dataset (Moon et al., 2019), then conduct a human study.
We recruit 46 annotators, and ask them to evaluate the quality of the generated responses by each model given in a random order, with 3 criteria – consistency, informativeness, and fluency – using a 3 point Likert-like scale.
As shown in
Table 4, ours obtains significantly ( p-value < 0 .
higher scores than others in all criteria, which is another evidence that our framework generates consistent, informative, and fluent responses.
Embedding Space Visualization We further visualize the multi-modal graph-text latent space in Figure 4.
The visualization shows that, for the same dialogue with different subgraphs, our SURGE with graph-text contrastive learning (right) generates distinct response embeddings pertraining to different subgraphs, unlike the one without graph-text contrastive learning which shows less variety over responses for the same dialogue (left).
5. Conclusion
We proposed a novel end-to-end framework for knowledge graph-augmented dialogue generation which retrieves context-relevant subgraph, encodes a subgraph with the text, and generates knowledge-consistent responses, called as
SU bgraph R etrieval-augmented GE neration ( SURGE ).
Our results demonstrate the effectiveness of our framework in both quantitative and qualitative experiments in knowledge retrieval and response generation tasks.
Our work suggests a new direction to generate informative responses for knowledge graph-based dialogue task by empirically showing the importance of retrieving the more relevant subgraph knowledge rather than using all the relevant knowledge graphs when generating knowledge-grounded responses.
A. Discussion
Limitation As briefly discussed in Section H, our work is limited in multiple dimensions primarily in terms of dataset, retrieval, and generation.
First, the benchmark dataset is limited.
Despite the fact that there are several public Knowledge
Graph (KG) available (Vrandecic & Kr¨otzsch, 2014; Bollacker et al., 2008), only one dataset (Moon et al., 2019) provides both the diverse set of dialogue and the corresponding large-scale KG.
This circumstance may limit the rigorous evaluation of our framework’s adaptability in various settings.
Future work may study applying our approach for a wider range of dialogue datasets based on Wikipedia (Dinan et al., 2019) by leveraging existing public large-scale KG such as Wikidata (Vrandecic & Kr¨otzsch, 2014).
Second, the search space for retrieving context-relevant subgraphs can be expanded.
Our SURGE framework now runs on a 1-hop KG that is rooted to entities in the given dialogue history.
Finding the entity within the text, on the other hand, necessitates precise named entity extraction and entity linking.
Therefore, future work may investigate extending our approach to a framework that can retrieve the context-relevant subgraph among entire KG instead of 1-hop
KG.
Third, there is still room for improvement in generation quality since we generate knowledge-enhanced responses with a small-scale Pre-trained Language Model (PLM) for efficiency.
Such PLMs occasionally fail to generate natural sentences with a high quality (Raffel et al., 2020).
Future work could aim to improve generation quality using a small-scale PLM.
Broader Impact Our proposed knowledge-grounded dialogue generation model is essential for designing user-friendly real-world AI systems.
Among various types of dialogue generation models, knowledge-grounded dialogue models are trained to interact with users and convey factual information to users in natural languages.
Their conversational features can be adapted to any user interfaces that connect the bilateral interaction between human and computer.
We believe that the conversational interfaces can enhance the users’ experiences and reduce the users’ efforts in learning how to use the systems.
However, knowledge-grounded dialogue models can become vulnerable to generating offensive, harmful, or misinformation responses depending on the users or data.
When deploying the models in the real world, in addition to generating realistic responses, they also need to be robust to adversarial feedback from malicious users and biases inherited in pre-training or training corpus, or else they could malfunction.
Along with the quantitative and qualitative evaluations on generated responses, it is worthwhile to examine robustness of the dialogue models.
B. Notations
We organize the notations we used in Table 5.
C. Method Details
In this section, we supplement details on our method in Section 3.
C.1. Preliminaries
As we use two different modalities, namely text and graph, we first define them, and then describe the neural networks to encode them.
In particular, a text is defined as a sequence of tokens x = [ x 1 , ..., x N ] , ∀ x i ∈ V , where x i is a token and
V is a pre-defined vocabulary formed with specific tokenization algorithms (Sennrich et al., 2016).
On the other hand, a knowledge graph (KG) is a type of multi-relational graphs G = { ( e h , r , e t ) } ∈ E × R × E , where e h and e t are head and tail entities along with their relation r , and E and R are sets of entities and relations, respectively, i.e., e h , e t ∈ E and r ∈ R .
To easily access different modalities in the same framework, we define the mapping function that maps entities and relations in the KG to the tokens in the text as follows: q e : E → V l and q r : R → V l .
In other words, any entity e ∈ E and relation r ∈ R can be mapped to a sequence of l tokens x ∈ V l : q e ( e ) =
x e and q r ( r ) =
x r .
Transformer A Transformer (Vaswani et al., 2017) is a neural architecture that embeds a sequence of tokens by considering their relationships.
It is a basic building block of recent PLMs (Devlin et al., 2019; Radford et al., 2019).
Formally, assume that we have a sequence of tokens x = [ x 1 , ..., x N ] , ∀ x i ∈ V , then a goal of generative transformers is to generate a sequence of tokens y <t =
[ y 1 , ..., y t − 1 ] , ∀ y i ∈ V , with encoder Enc , decoder Dec and tokens’ embedding function f .
Thus, a hidden state at time t for generating y t is h t =
Dec ( Enc ( X ) , Y <t ) , where X = f ( x ) =
[ f ( x 1 ) , ..., f ( x N )] and
Y <t = f
( y <t ) =
[ f ( y 1 ) , ..., f ( y t − 1 )] .
We note that both Enc and Dec functions are permutation sensitive .
[Table]
Graph Neural Network A Graph Neural Network (GNN) represents a node with its neighboring nodes over the graph structure (Hamilton, 2020), which is formalized as follows:
[Equation]
where e t and e h are embeddings of entities (nodes) e t and e h , respectively, N ( e t ; G )
= { e h | ( e h , r , e t )
∈ G} is a set of neighboring entities of e t , AGG is a function that aggregates embeddings of e t ’s neighboring entities, and UPD is a function that updates a representation of e t with the aggregated messages from AGG , at each iteration k .
C.2. Context-Relevant Subgraph Retriever
We briefly introduced the outline of our context-relevant subgraph retriever in Section 3.2.
In this section, we supplement the details of the context-relevant subgraph retriever majorly on the details of the triplet embedding function d .
Let consider a set of triplets associated to the entities that appear in the given dialogue context { ( e , r , e t ) or ( e h , r , e ) | q e ( e ) ⊆
x } , as the retrieval candidates.
To effectively represent the triplets consisting of entities and their relations as items, we use GNNs described in Section C.1 for the triplet embedding function d .
In our triplet retrieval, representing both nodes and edges, which are equally essential components for the multi-relational graph, is worthwhile to represent an entire triplet.
To do so, we adopt the existing edge message passing framework (Jo et al., 2021) that transforms edges of the original graph to nodes of the dual hypergraph (Scheinerman & Ullman, 2011)
(i.e., transforming G to G ∗ ), which allows us to use existing node-level GNNs for representing edges of the original graph (See Section E.1 for more implementation details).
Formally, our triplet embedding function is denoted as follows:
[Equation]
where z = ( e h , r, e t ) , and ∥ is the concatenation operator.
C.3. Invariant Graph Encoding
In this subsection, we illustrate more details on the invariant graph encoding described in Section 3.3, including the formal definition of the graph encoding, permutation invariance, and the relation inversion invariance.
We first define the notion of graph encoding, whose goal is to leverage the retrieved subgraph information along with the dialogue history for response generation, which is formalized in Definition C.1.
Definition C.1.
(Graph Encoding) Let ψ ( x , Z ) be a graph encoding function.
Then, given a sequence of tokens x = [ x 1 , ..., x N ] and a subgraph Z , it first yields a new sequence x ′ =
[ x ′ 1 , ..., x ′ m , x 1 , ..., x N ] where [ x ′ 1 , ..., x ′ m ] comes from q e ( e ) = x
′ e and q r ( r ) = x ′ r ∀ ( e , r , ∗ )
∈ Z .
Then, it embeds a sequence X ′ =
[ f ( x ′ 1 ) , ..., f ( x ′ m ) , f ( x 1 ) , ..., f ( x N )]
= f
([ x ′ 1 , ..., x ′ m , x 1 , ..., x N ]) , where f is the token embedding function.
Consequently, X ′ =
ψ ( x , Z ) .
For instance, given a sequence x = [ x 1 , . . .
, x N ] and a subgraph Z
= { ( a , d , b ) , ( b , e , a ) , ( a , d , c ) } from the retriever, ψ ( x , Z ) =
f
([ a, d, b, b, e, a, a, d, c, x 1 , ..., x N ]) with a = q e ( a ) , b = q e ( b ) , c = q e ( c ) , d = q r ( d ) , e = q r ( e ) , which we term as the na ¨ ıve encoding.
Due to its simplicity, it is widely used for a text-conditioned generation (Lewis et al., 2020b).
However, for graph encoding, it violates two important invariance properties: permutation invariance (Zaheer et al., 2017) and relation-inversion invariance, which are formalized in Definition C.2, C.3.
Definition C.2.
(Permutation Invariance)
For any set permutation π , ψ ( x , Z ) = ψ ( x , π · Z ) , i.e., an order of elements in a subgraph does not affect a representation.
Definition C.3.
(Relation Inversion Invariance)
Let a relation ¬ d be an inverse relation to d , if ( a , d , b )
=
( b , ¬ d , a ) ∀ a , b ∈ E .
Then, ψ ( x , Z ∪ { ( a , d , b ) } ) =
ψ ( x , Z ∪ { ( b , ¬ d , a ) } ) for any subgraph Z .
Invariant Graph Encoding To meet both properties, we consider two additional operations on a set of triplets up to the na¨ıve encoding.
We first define a SORT operator that returns the same output regardless of the order of input set elements, as follows:
[Equation]
where S n is a set of all possible permutations for n elements.
Moreover, we define a INV operator that adds the inverse triplet of each triplet in the subgraph Z , as follows:
[Equation]
With above operations, we now define a more solid graph encoding function: ψ ( x , SORT ( INV ( Z ))) , which satisfies both permutation and relation inversion invariance.
However, above encoding is not efficient since it requires the O ( n ) space complexity for encoding a graph with n triplets.
To be more efficient, we newly define ˜ ψ that only encodes the unique nodes (entities) along the sequence, formalized as follows:
[Equation]
where ENT ( Z ) returns the set of unique nodes in Z and SORT is used to preserve the permutation invariance.
This encoding is thus invariant but efficient since it only costs O ( k ) , for a k -entity sequence where k < n .
However, as it does not consider the relational information in Z , we further perturb the entities’ token embeddings with respect to their representations in Z .
Specifically, for each entity a ∈ ENT ( Z ) , we apply affine transformations from learnable Multi-Layer Perceptrons ( MLP ) on the token embedding of a as follows:
[Equation]
where β : R d → R d perturbs the embedding according to Z , AGGR is the relation-aware aggregation function for triplet ( b , r ,
a ) ∈
Z with a = q e ( a ) and b = q e ( b ) .
In sum, we denote a relation-aware invariant and efficient encoder ψ ∗ , formally represented as follows:
[Equation]
where β can be applied to the sequence of representations, β : R n × d → R n × d .
We conclude that our graph encoding satisfies both properties.
For proofs, please see Section D.
D. Proofs
In this section, we first show that a na ¨ ıve encoding function ψ in Section C.3 is neither permutation invariant nor relation inversion invariant, formalized in Proposition D.1.
After that, we prove that our invariant and efficient encoding function ψ ∗ with graph-conditioned token embedding perturbation β is both permutation invariant and relation inversion invariant, formalized in Proposition D.2.
Proposition D.1.
A na¨ıve encoding function ψ is neither permutation invariant nor relation inversion invariant.
Proof.
We prove this by contradiction.
Suppose x = [ x 1 , . . .
, x n ] and Z = { ( a , d , b ) , ( b , e , a ) , ( a , d , c ) } .
Moreover, let Z ′ =
{ ( b , e , a ) , ( a , d , b ) , ( a , d , c ) } be one of permutations of Z with the permutation order
π = (2 , 1 , 3) .
From the definition of na¨ıve encoding, ψ ( x , Z ) =
[ a , d , b , b , e , a , a , d , c , x 1 , . . .
, x n ] and ψ ( x , Z ′ )
=
[ b , e , a , a , d , b , a , d , c , x 1 , ..., x n ] .
Therefore, it is easy to notice that ψ ( x , Z ) ̸
= ψ ( x , Z ′ ) , thus the na ¨ ıve encoding is not permutation invariant.
We then show na¨ıve encoding is not relation inversion invariant.
Suppose Z ′′ = { ( a , d , b ) , ( b , e , a ) , ( c , ¬ d , a ) } , where ( a , d , c ) ∈ Z is changed to its inverse relation ( c , ¬ d , a ) .
Then, ψ ( x , Z ′′ ) =
[ a , d , b , b , e , a , c , ¬ d , a , x 1 , . . .
, x n ] that is different against ψ ( x , Z ) : ψ ( x , Z ) ̸
= ψ ( x , Z ′′ ) .
Therefore, the na¨ıve encoding function is not relation inversion invariant.
In conclusion, from the above two counterexamples, we prove that a na¨ıve encoding function ψ is neither permutation invariant nor relation inversion invariant.
We now provide proof of the permutation invariance and the relation inversion invariance of our invariant and effective graph encoding ψ ∗ , described in Section 3.4.
Before starting the proof, we first revisit the permutation invariant property of graph neural networks that sum, mean and max operators are permutation invariant for the input set of AGGR .
Thus, if we use sum, mean, or max for AGGR , then the token embedding perturbation function β naturally satisfies the permutation invariance property.
In other words, β ( X , Z ) =
β ( X , π · Z ) ,
where X = ˜ ψ ( x , SORT ( ENT ( Z )))
for any permutation π .
Proposition D.2.
Invariant and efficient encoding ψ ∗ is both permutation invariant and relation inversion invariant.
Proof.
Suppose x = [ x 1 , . . .
, x n ] and Z = { ( a , d , b ) , ( b , e , a ) , ( a , d , c ) } .
We first consider the permutation invariance for any permuted set Z ′ =
π · Z .
While Z and Z ′ can have different orders of elements thus the outputs of ENT ( Z ) and ENT ( Z ′ ) could be different, we always obtain the same output with the usage of the SORT operator for encoding.
In other words,
SORT ( ENT ( Z )) =
SORT ( ENT ( Z ′ )) holds due to the definition of the SORT operation in Eq.
5 of the main paper.
Therefore, ˜ ψ ( x , SORT ( ENT ( Z ))) =
˜ ψ ( x , SORT ( ENT ( Z ′ ))) holds.
Further, since the token embedding perturbation function β ( · , Z ) along with sum, max, or mean in AGGR is also permutation invariant with regards to any permutation on Z , we conclude our invariant and efficient encoding ψ ∗ is permutation invariant.
We finally prove the relation inversion invariance property of ψ ∗ .
Suppose Z ′′ =
( Z ∪ t ′ )
\ t where t ∈ Z is any triplet in a set and t ′ is inverse of t .
Then, ENT ( Z ) = ENT ( Z ′′ ) that is trivial as ENT ( Z ) returns the set of only unique nodes in Z .
Therefore, ˜ ψ ( x , SORT ( ENT ( Z ))) =
˜ ψ ( x , SORT ( ENT ( Z ′′ ))) correspondingly holds.
The remaining step to conclude the proof is to show the following equality: β ( · , INV ( Z ))
=
β ( · , INV ( Z ′′ )) , to conclude that ψ ∗ ( x , Z ) =
ψ ∗ ( x , Z ′′ ) from β ( ˜ ψ ( x , SORT ( ENT ( Z ))) , INV ( Z ))
=
β ( ˜ ψ ( x , SORT ( ENT ( Z ′′ ))) , INV ( Z ′′ )) .
We note that
INV ( Z ) =
INV ( Z ′′ ) , as INV makes any graph as bidirectional one by the definition in Eq.
6 of the main paper.
Therefore, β ( · , INV ( Z )) =
β ( · , INV ( Z ′′ )) holds, and the relation inversion invariance property of ψ ∗ holds.
E. Experimental Setup
In this section, we introduce the detailed experimental setups for our models and baselines.
Specifically, we describe the details on implementation, dataset, training and model in the following subsections of E.1, E.2, E.3 and E.4, one by one.
E.1. Implementation Details
We use the T5-small (Raffel et al., 2020) as the base Pre-trained Language Model (PLM) for all experiments.
For the pre-trained checkpoint, we use the version that the authors released.
For all implementations, we use Pytorch (Paszke et al., 2019).
To easily implement the language model, we use the huggingface transformers library (Wolf et al., 2020).
Retriever Details In this paragraph, we describe the implementation details of our context-relevant subgraph retriever, including the triplet embedding and dialogue context embedding for the retriever.
For the dialogue history embedding function q , we use the existing pre-trained language model (PLM).
Specifically, we use the encoder part of the T5-small model (Raffel et al., 2020) and freeze the parameters of it not to be trained.
We then instead add a Multi-Layer Perceptron (MLP) on top of it, to give a point-wise attention (Bahdanau et al., 2015) to each token, whereby all tokens are not equally considered in the sentence encoding.
Formally,
[Equation]
where α i is a scalar, and MLP is a Multi-Layer Perceptron consisting of two linear layers and ReLU nonlinearity.
For obtaining triplet representations, we need to embed the entity (node) and relation (edge) into the latent space.
Similar to the token embedding matrix used in PLMs, we can introduce the entity and relation embedding matrices.
However, since the number of entities used in Freebase of OpendialKG (Moon et al., 2019) is too large compared to the number of tokens in T (100,814 vs 32,000) (Raffel et al., 2020), it is inefficient to introduce the trainable entity embedding matrix for the retriever.
Thus, we instead reuse the contextualized representation from the PLM encoder, to embed each node if the corresponding entity exists in the dialogue context.
Formally, suppose that there is a triplet { ( e h , r , e t ) } in the 1-hop subgraph G , which satisfies the following condition: q e ( e h ) ⊆
x or q e ( e t ) ⊆
x .
If so, we can know the position of the mapped entity within the dialogue history:
[ x start , ..., x end ] =
q e ( e h ) from q e ( e h ) ⊆
x .
Therefore, the node embedding for the entity e h is obtained by EntEmb ( e h )
= 1 | q e ( e h ) | (cid:80) endi
= start Enc
( X ) i iff q e ( e h ) ⊆
x .
For edge embedding, we use the trainable relation embedding matrix R ∈ R |R|× 128 to represent the edge, since the number of relations is relatively small (1,357).
With our node and edge representations, we now focus on representing the triplet in Eq.
4 of the main paper for its retrieval.
In particular, we use the Graph Neural Networks (GNNs) for encoding triplets, where we obtain the node representations
Pride & Prejudice
Sense and
Sensibility
Emma
Lady Susan is_a
Jane Austen writer
Steventon book
Romance novel written_by
Place_of_birth written_by is_a genre (
[Figure]
Message Passing written_by written_by genre is_a written_by written_by written_by is_a written_by
Place_of_birth
[Figure]
Hypergraph
[Figure]
Could you recommend a book written by Jane Austen ?
User (a
[Figure]
History
Sure, Lady Susan.
Jane Austen
Lady Susan
Jane Austen
Lady Susan write (
[Figure]
Corresponding Fact (c) Candidates in KG
Jane Austen write
Emma
Sense & Sensibility
QA Context: Could you recommend a book written by Jane Austen?
<
Generated Response>
Question: (Jane Austen , write , ? )
Jane Austen
Answer Candidates: (d) KQA example
Lady Susan
Sense & Sensibility Emma
[Figure]
from the Graph Convolutional Network (GCN) (Kipf & Welling, 2017) that is a widely used architecture for representing the nodes with respect to their graph structures.
However, for representing the edges, we use the Edge Hypergraph Graph
Neural Network (EHGNN) used in Jo et al. (2021), due to its simplicity but effectiveness for edge representations.
We summarize our triplet representation in Figure 5.
Graph Encoder Details In this paragraph, we describe the implementation details of the token embedding perturbation function β used in our Invariant and Efficient graph encoding introduced in Section 3.4.
To be aware of the relation of the graph over GNNs, we use the simplified version of CompGCN (Vashishth et al., 2020).
For architectural details, instead of using the different linear layers to distinguish the inverse relation from its opposite relation, we use the same linear layer.
Also, we use subtraction as the specific composition operator for reflecting relations in CompGCN.
Then, we form the learnable affine transformation based on the aggregated representation from GNN layers, to perturb the token embeddings with respect to their graph information as in Eq.
7 of the main paper.
In particular,
[Equation]
where MLP 1 and MLP 2 are learnable MLPs consisting of two linear layers with ReLU nonlinearity.
KQA Details
In this paragraph, we describe the implementation details for our Knowledge-verifying Question Answering (KQA).
For building the QA dataset, we first gather the dialogue sessions where the gold response contains the entity from the whole OpendialKG dataset (Figure 6 (a)).
Then, we extract the triplet from the given whole KG where the head entity is placed within the dialogue history and the tail entity is placed within the gold response (Figure 6 (b)).
We build a
QA training dataset based on the extracted triplets and a corresponding dialogue session.
To diversify the training data, we replace the tail entity of each triplet with plausible candidate entities within KG and change the entity in the response following the changed entity on the triplet (Figure 6 (c,d)).
As a result, we obtain the QA dataset size of 200k.
We train the
BERT-base (Devlin et al., 2019) with the constructed QA dataset.
We hold out 10% of data for validation and obtain the fine-tuned BERT model with 88.89 F1 score on the hold-out validation set.
When we apply the fine-tuned QA model on the evaluation of the generated responses, we rebuild the QA evaluation set with the generated response instead of a gold response as illustrated in Figure 3 of the main paper.
E.2. Dataset Details
We mainly conduct experiments on OpendialKG (Moon et al., 2019), which provides the parallel dialogue corpus corresponding to the existing large-scale Knowledge Graph (KG) named Freebase (Bollacker et al., 2008).
The provided large-scale KG consists of total 1,190,658 fact triplets over 100,813 entities and 1,358 relations.
This dataset is collected from 15K human-to-human role-playing dialogues, having multi-turns, from which we pre-process that each assistance response is the label and its corresponding dialogue history is the input.
Although some of the data contain the gold knowledge that is useful for generating the response on the ongoing conversation, we found that 51% of data has no gold knowledge.
To overcome this limitation, we additionally find entities from the dialogue history using the Named Entity
Recognition module in spaCy 2 , and then include the extracted entities’ corresponding triplets in the KG to the dataset.
Since the dataset does not provide the pre-defined data split, we randomly split sessions into train (70%), validation (15%), and test sets (15%).
E.3. Training Details
All experiments are constrained to be done with a single 48GB Quadro 8000 GPU.
SURGE training needs 12 GPU hours.
For all experiments, we select the best checkpoint on the validation set.
We fine-tune the SURGE for 10 epochs on the training set, where we set the learning rate as 1e-4, weight decay as 0.01, learning rate decay warmup rate as 0.06, maximum sequence length for dialogue history as 256, maximum sequence length for knowledge as 128, and batch size as 24.
For retrieval, we use the subgraph size n as 3, and sample size k for marginalization as 4.
We use the AdamW (Loshchilov &
Hutter, 2019) optimizer for training.
For fairness, we apply the same training setting to all baselines if applicable.
E.4. Model Details
In this subsection, we describe the details of baselines and our models used in our experiments, as follows:
No Knowledge : This model is provided with only the dialog history.
No knowledge is used to generate responses.
Gold Knowledge : This model is provided with the dialogue history along with its exact gold knowledge for the gold response.
Thus, since this model uses such gold knowledge, we expect the results of it as the upper bound of the task.
Space Efficient (series) :
This model is provided with all the knowledge which are related to the entities that appeared in the dialogue history (Galetzka et al., 2021), by matching the entities in the dialogue history and the entities in the KG.
In particular, this model encodes the entities and their relations explicitly in the words in the encoder part.
Space Efficient (parallel) :
This model is mostly the same as the above model – space Efficient (series) – except the knowledge encoding part.
Specifically, it encodes the entities in the words like the above, whereas, encoding the relation between entities in the segmentation block of the entities (Galetzka et al., 2021).
EARL :
This model uses the RNN-based encoder-decoder architecture with the entity-agnostic representation learning (Zhou et al., 2021), with all the provided knowledge associated with the entities in the dialogue history.
Specifically, this model first calculates the probability of words obtained by encoding the entities in the KG, and then uses such probabilities to generate a word in the decoding phase.
Random Retrieval : This model is provided with entire facts from 1-hop subgraphs of entities that appeared in the dialogue history.
However, instead of encoding all the knowledge in one-hop subgraph as in Space Efficient, this model randomly samples them, which are then used for generating responses.
Sparse Retrieval (BM25): This model is also provided with entire facts from 1-hop subgraphs of entities.
To sample
[Figure]
E x a c t
M a t c h ( E M )
F 1 S c
o r e
Method
MRR Hits@1 Hits@3 Hits@5 Hits@10 Hits@
Random Retrieval 7.
Sparse Retrieval (
[Table] [Table]
[Table] [Table]
[Table] [Table]
SURGE
[Table]
[Table] [Table]
[Table] [Table]
[Table] [Table] [Table]
[Table]
relevant facts to the dialogue history among the entire facts, this model uses BM25 (Robertson & Zaragoza, 2009) that is a sparse retrieval model.
To be specific, let assume we have a dialogue history and its corresponding facts from 1-hop subgraphs of matched entities.
Then, to run the BM25 algorithm, we first concatenate components of each fact consisting of two entities and one relation, and tokenize the dialogue history and the facts for obtaining corpus and queries, respectively, for BM25.
After that, BM25 calculates the lexical overlapping score between the dialogue context (corpus) and the one-hop fact (query), from which we use the relevant facts having top- k scores by BM25.
SURGE (unsupervised) :
Our basic subgraph retrieval-augmented generation framework that is provided with entire facts from 1-hop subgraphs of entities.
In particular, this model trains the structure-aware subgraph retriever without any guidance of the gold knowledge (i.e., ground truth knowledge for the dialogue history is not given).
In other words, for the given dialogue context, this model implicitly learns to retrieve the context-relevant knowledge, and then generates the response with the retrieved knowledge.
SURGE (semi-supervised) :
Our subgraph retrieval-augmented generation framework with semi-supervised learning of graph retrieval, with provided entire facts from 1-hop subgraphs of entities.
Unlike the unsupervised version of SURGE, this model trains the retriever to select the gold knowledge if the dialogue context has such
knowledge during training.
SURGE (contrastive) :
Our full subgraph retrieval-augmented generation framework with the contrastive learning of graph-text modalities as well as the semi-supervised learning of graph retrieval, with provided entire facts from 1-hop subgraphs of entities.
Unlike aforementioned frameworks of ours, this additionally enforces the model to faithfully reflect the retrieved knowledge in the input, to the generated response with contrastive learning.
F. Additional Experiments F.1. Varying the Number of Facts in Subgraphs
We experiment our SURGE framework with varying the number of facts in retrieval, which are then used in our graph encoding function to condition the encoded graph information for response generation.
Specifically, in Figure 7, we report the EM and F1 scores measured by our KQA for our SURGE framework, with different numbers of facts within a retrieved subgraph: n = [3 , 5 , 10] .
Note that, in this experiment, we only use the semi-supervised model without the contrastive loss.
We expect that the performance of our SURGE will increase as we increase the number of facts within the retrieved subgraph, [Table] since the model can leverage more numbers of knowledge for response generation.
As shown in Figure 7, we observe the significant performance improvements on using ten facts against using three and five facts, while the performance difference between the three and five is marginal.
We suggest that this result should be interpreted with the retrieval results on the right side of Figure 7, where about 40% of retrieved subgraphs including the ten different facts contain at least one necessary knowledge, thus the generation performance is boosted according to the improvement in retrieval.
F.2. Discussions on Using Larger PLMs
Notably, we observe that the use of larger Pre-trained Language Models (PLMs) – three times more number of parameters compared to T5-small that we use – does not result in better performance for the knowledge-grounded dialogue task.
Specifically, in Table 6, we report the experimental results of selected baselines and our SURGE semi-supervised model with BART-base (Lewis et al., 2020a) as the base PLM.
We want to clarify that the BART-base model has 220M parameters, which is about three times larger than the number of parameters of the T5-small model (60M).
We first observe that BART-base shows decent performance without any knowledge (No Knowledge) compared to the no-knowledge case of T5-small, verifying that the larger PLM generally contains more factual knowledge within its pre-trained parameters.
Moreover, BART-base obtains higher scores in the simple word overlap metrics such as BLEU (Papineni et al., 2002) and ROUGE (Lin, 2004), whose results further confirm that a larger PLM can generate more natural or syntactically better sentences than the smaller one, thanks to its parameter size.
On the other hand, we find that BART-base is less suffered from the irrelevant knowledge issue (i.e., conditioning irrelevant knowledge for the given context when generating responses) than T5-small, therefore, the performance of Space Efficient
Encoding on KQA is quite high.
However, the use of BART-base does not result in significant improvement on the KQA metric for our SURGE framework.
Moreover, ours with T5-small shows better performance than ours with BART-base, when the number of facts within the retrieved subgraph is 10: n = 10 .
This result suggests that the quality of the generated response – having relevant knowledge to the given context – might depend on the performance of the subgraph retriever whose goal is to retrieve the context-relevant knowledge, rather than the inherent performance of PLMs.
F.3. Experimental Results on Another Dataset
In the main paper, we only experiment on OpendialKG dataset (Moon et al., 2019), since it is the largest and most realistic public datasets that provides both dialogues across diverse domains and corresponding large-scale Knowledge Graph (KG) (Bollacker et al., 2008).
To verify the effectiveness of our SURGE framework, the existence of the large-scale KG and the importance of relevant fact searching is important since we focus on the real-world scenario where the response generation requires the relevant fact acquirement from the large-scale KG.
However, one can raise the question regarding the versatility of our method on other datasets.
To alleviate the issue, we conduct additional experiments on another dataset named KOMODIS (Galetzka et al., 2020), which is also KG-based dialogue dataset.
Compared to OpendialKG, KOMODIS does not provide the corresponding large-scale KG and most of responses do not require the knowledge.
Therefore, we only measure the automatic evaluation to evaluate the performance of each method on KOMODIS dataset.
In Table 7, we present the experimental results on the KOMODIS dataset.
Results obviously show that our SURGE framework shows superior performance against baselines on the additional dataset.
Therefore, we can conclude that our method can generalize to other datasets beyond the opendialKG dataset.
G. Human Evaluation
In this section, we describe the details of human evaluation used in Section 5 of the main paper.
We request the annotators to evaluate the responses generated from two baselines (i.e., ALL Knowledge and Space Efficient) and our SURGE framework in response to the given dialogue context, according to three criteria – consistency, informativeness, and fluency.
Figureis the instructions provided to each annotator.
Specifically, regarding the consistency metric, we ask annotators to check whether the generated response makes sense in the context of the conversation.
For informativeness, we ask annotators to check whether the response contains correct and enough information, whereby experiment participants are recommended to use the internet search, to check whether the response contains correct facts.
In addition to this, we also provide the dialogue-related facts from Freebase as a reference for fact checking for annotators.
For fluency, we ask annotators to check whether the response is grammatically correct and naturally sound.
H. Retrieval and Generation Examples
In this section, we provide the examples for knowledge retrieval and response generation, for the given dialogue history.
Retrieval Examples We provide the retrieval examples of various models, such as random retrieval, sparse retrieval and our SURGE models.
In particular, in the first (top) example of Figure 9, we are given a dialogue context in regard to books for Richard Maxwell, and baselines including random and BM25 retrievers select the facts associated to the entity Richard
Maxwell, which are but irrelevant to the ongoing conversion, for example, (Richard maxwell, is-a Theatre director).
Also, as shown in the second (bottom) example of Figure 9, we observe that the simple term-based matching model (i.e., BM25) cannot contextualize the current and previous dialogues, but retrieves the facts associated to frequent words, for example, song, which are less meaningful for the user’s question.
In contrast to baselines, as our SURGE framework trains a retriever in an end-to-end fashion, it first contextualizes the given dialogue context, and then accurately retrieves relevant knowledge.
Generation Examples
In this paragraph, we provide the generation examples from our model.
To be specific, we provide the dialogue context along with its corresponding retrieved subgraph and generated response obtained from our SURGE framework.
In Figure 10 and Figure 11, we provide the correct examples: our model retrieves a context-relevant subgraph, but also generates a factual response from retrieved knowledge.
On the other hand, in Figure 12, we provide the failure cases.
In particular, as shown in the first row of Figure 12, the fact in the knowledge graph could be ambiguous or inaccurate, as it defines the release year of the book – Wicked – as both 2008 and 2014.
Moreover, we further provide the failure example on retrieval in the second row of Figure 12, where the user asks about the Bourne Legacy, while the dialogue agents retrieve the irrelevant knowledge to the question.
Finally, we show the common problem in PLMs in the last row of Figure 12, where the generative model repeats the meaningless words at the end, while the retriever correctly selects the relevant knowledge.
Dialogue Context
A: Could you recommend any books written by Richard Maxwell?
Gold Knowledge
Richard maxwell, ~written_by, a tale of two cities
Random Knowledge
Richard maxwell, sibling, jan maxwell
Screenwriter, ~is-a, Richard maxwell
Theatre director, ~is-a, Richard maxwell
BM25 Knowledge
Richard maxwell, is-a, Theatre director
Screenwriter, ~is-a, Richard maxwell
Richard maxwell, organization founded, new york city players
Our Knowledge
Richard maxwell, ~written_by, a tale of two cities
Richard maxwell, sibling, Jan maxwell
Dialogue Context
A
I
like Adam Levine.
B: OMG me too!
I love that song Moves Like Jagger
A
Yes, Love that too.
It is really fun.
Can you tell me more
B
Did you know it's considered a power pop song?
A
No, I did'n.
Do you know Love the way you Lie
Gold Knowledge
Song, ~kind of composition, Love the way you lie
Random Knowledge
Blue monday, kind of composition, Song
The look of love, kind of composition, Song
Bad romance, kind of composition, Song
BM25 Knowledge
Song, ~kind of composition, This charming man
Behati prinsloo, ~spouse (or domestic partner), Adam levine
Song, ~kind of composition, safe & sound
Our Knowledge g minor, ~key, Love the way you lie
Eminem, ~composer, Love the way you lie
Love the way you lie, composer, Eminem
Skylar grey, ~composer, Love the way you lie
Dialogue Context
Generated Response
B: Yes, he wrote Pirates of the Caribbean: On Stranger Tides, Memoirs of a Geisha Nine and many others.
Have you seen either of those?
A
: Do you like Rob Marshall?
My friends have recommend his films.
Retrieved Knowledge
Nine, has_genre, Drama
Pirates of the Caribbean: On Stranger Tides, directed_by, Rob Marshall
Memoirs of a Geisha, directed_by, Rob Marshall
Dialogue Context
Generated Response
B: It's Literary fiction, and
was
released in
A: Are there any works by Chris Cleave, which you can recommend me?
B: Certainly, wrote The Other Hand, Incendiary, and Old.
Have you read them?
A:
No, I haven't read The Other Hand out of the ones you mentioned.
What genre is it
Retrieved Knowledge
The Other Hand, release_year,2008, ~release_year, The Other Hand
The Other Hand, has_genre, Literary fiction
Dialogue Context
Generated Response
B:
Yes he also
wrote Tortilla
Flat A: Who wrote Of Mice and Men?
B: It was written by John Steinbeck A:
Didn't he also write The Red Pony?
B: Yes He also wrote The Red Pony A:
Can you suggest other titles by him to read?
Retrieved Knowledge
Cannery Row, written_by, John Steinbeck
The Grapes of Wrath, written_by, John Steinbeck
Tortilla Flat, written_by, John Steinbeck
Dialogue Context
Generated Response
B: Simon Wood directed The One That Got Away.
Have you seen that?
A: Could you recommend some movies by director Simon Wood?
Retrieved Knowledge
The One That Got Away, written_by, Simon Wood
Simon Wood, ~written_by, The One That Got Away
Author, ~is-a, Simon Wood
Dialogue Context
Generated Response
B: It was released in 2011.
It's a great book.
A: I like David McCullough.
Could you recommend any books of him?
B: Sure.
He wrote The Greater Journey: Americans In Paris.
Also, he wrote some documentary and Indie films.
A: Thank you for the information.
When was The Greater Journey: Americans In Paris released?
Retrieved Knowledge
The Greater Journey: Americans In Paris, release_year,2011, ~release_year, The Greater Journey: Americans In Paris
Paris, written_by, Edward Rutherfurd
Dialogue Context
Generated Response
B: I think he is a great actor.
He starred in Sense and Sensibility and Mansfield Park.
A: I like Tony Tanner, what do you think?
Retrieved Knowledge
Sense and Sensibility, written_by, Tony Tanner
Tony Tanner, ~written_by, Mansfield Park
Mansfield Park, written_by, Tony Tanner
Dialogue Context
Generated Response
B: It is a play written by Jennifer L. Armentrout and released in 2008.
A: Do you know what books Jennifer L. Armentrout has written?
B: She wrote Wicked, White House Kiss and Wait For You.
Are you interested in her other books as well?
A: No thanks.
What genre is Wicked?
B: Wicked is a Play that won the Pulitzer Prize for Drama.
Would you like more information about it?
A: Sure, sounds interesting
Retrieved Knowledge
Wicked, release_year,2008, ~release_year, Wicked
Wicked, release_year,
Dialogue Context
Generated Response
B: Yes, he did.
He also wrote Michael Clayton.
A: I like the movie Armageddon.
B: Did you know Armageddon is written by Tony Gilroy?
A: Oh, didn't he also write The Bourne Legacy?
Retrieved Knowledge
Michael Clayton, starred_actors, Tony Gilroy
Michael Clayton, written_by, Tony Gilroy
Proof of Life, written_by, Tony Gilroy
Dialogue Context
Generated Response
B: Deadpool is a great movie.
Stefan Kapicic starred in it.
Stefan Kapicic also starred in
The
Last Man and The Last Man.
A: I like Deadpool or any movies like Deadpool.
Retrieved Knowledge
Deadpool, starred_actors, Ryan Reynolds
Deadpool, starred_actors, Stefan Kapicic
Deadpool, starred_actors, Ed Skrein