Log In Sign Up

Formal Query Building with Query Structure Prediction for Complex Question Answering over Knowledge Base

by   Yongrui Chen, et al.

Formal query building is an important part of complex question answering over knowledge bases. It aims to build correct executable queries for questions. Recent methods try to rank candidate queries generated by a state-transition strategy. However, this candidate generation strategy ignores the structure of queries, resulting in a considerable number of noisy queries. In this paper, we propose a new formal query building approach that consists of two stages. In the first stage, we predict the query structure of the question and leverage the structure to constrain the generation of the candidate queries. We propose a novel graph generation framework to handle the structure prediction task and design an encoder-decoder model to predict the argument of the predetermined operation in each generative step. In the second stage, we follow the previous methods to rank the candidate queries. The experimental results show that our formal query building approach outperforms existing methods on complex questions while staying competitive on simple questions.


page 1

page 2

page 3

page 4


Leveraging Frequent Query Substructures to Generate Formal Queries for Complex Question Answering

Formal query generation aims to generate correct executable queries for ...

Semantic Structure based Query Graph Prediction for Question Answering over Knowledge Graph

Building query graphs from natural language questions is an important st...

Knowledge-Driven Distractor Generation for Cloze-style Multiple Choice Questions

In this paper, we propose a novel configurable framework to automaticall...

Outlining and Filling: Hierarchical Query Graph Generation for Answering Complex Questions over Knowledge Graph

Query graph building aims to build correct executable SPARQL over the kn...

MK-SQuIT: Synthesizing Questions using Iterative Template-filling

The aim of this work is to create a framework for synthetically generati...

Incorporating Behavioral Hypotheses for Query Generation

Generative neural networks have been shown effective on query suggestion...

Discriminative Learning via Adaptive Questioning

We consider the problem of designing an adaptive sequence of questions t...

1 Introduction

Knowledge Base Question Answering (KBQA) is an active research area where the goal is to provide crisp answers to natural language questions. An important direction in KBQA is answering via semantic parsing  [2, 11, 19] to natural language questions, transforming the corresponding semantic components, including entities, relations and various constraints, into formal queries (e.g., SPARQL) and then executing queries over the knowledge base (KB) to retrieve answers. In general, a question can be regarded as correctly answered if its correct query has been built. For a complex question, whose query consists of multiple entities, relations, and constraints, how to select the correct semantic components of the query and combine them in an appropriate way is still a problem to be solved.

Figure 1: One example to prove the importance of query structures. For each query graph, ?v0 is the placeholder of the answer and ?v1 (if any) is the hidden variable.

In recent research, most query building approaches [11, 12] are based on query ranking, i.e., scoring candidate queries by similarities with the question and outputting the top-scored one. Such ranking-based approaches leverage a query graph to represent formal queries and generate candidate query graphs by a state-transition strategy [19, 11, 12]. This strategy first assumes that the length of the path between the topic entity222“topic entity” is proposed in [19], which refers to the root of the query graph(tree). and the answer does not exceed two hops, and then generates the candidate queries by enumerating all possible structures meeting this assumption. Although the strategy can cover almost all correct query graphs in existing KBQA datasets, it has a significant drawback: a considerable number of noisy query graphs are produced. These noisy queries have incorrect structures but their components have high similarity to the question. In fact, existing query ranking models often make erroneous judgments when dealing with them. For example, Figure 1 shows one question that was answered incorrectly by the states-of-the-arts ranking-based approach333We reimplement the approach proposed in [11].. Below the question are two candidate query graphs generated by the above strategy. The model does not identify the structure (dotted box) of the correct query (blue box) so that it selects the noisy query (red box).

To avoid producing noisy queries, we propose abstract query graphs (AQG) to describe query structures and propose a new formal query building approach with query structure prediction. Specifically, our approach consists of two stages. In the first stage, we first leverage a neural network-based generative model to generate an AQG according to the question. The AQG is regarded as a predicted structure of the query graph. Then, we utilize the AQG as a constraint to generate the candidate query graphs whose structures match it. In the second stage, we perform candidate query ranking by an existing model, in order to evaluate the improvement brought by the AQG constraint. Following the previous approaches, our work focuses on handling the query graph of the tree structure. We perform comprehensive experiments on multiple QA datasets, and our proposed method consistently outperforms previous approaches on complex questions and produces competitive results on the dataset mainly made up of simple questions.

2 Preliminaries

2.1 Query Graph

The knowledge base (KB) can be regarded as a collection of subject-predicate-object triples , where is an entity, is a relation and can be either a literal or an entity.

The query graph is defined in [19], which is a structured representation of natural language questions. In theory, it is a directed graph. However, in the existing datasets, it is often a tree structure with vertices and edges. Therefore, we focus on dealing with the queries of the tree structure in this paper, and the process to general graph structures is left for future work. The vertices of query graphs include KB entities, KB types, etc., and the edges consist of KB relations and some built-in properties. Table 1 shows a detail classification of the vertices (middle) and edges (bottom).

Class Instances Symbol
Entity Y.S._Rajasekhara._Redy, rectangle
Type Election, Actor, President, rounded rectangle
Number 1, 2008, diamond
Variable ?v0, ?v1, circle
Relation party, winner, -
Order min_at_n, max_at_n -
Comparison , , -
Count count -
Isa rdf:type -
Table 1: Classes of vertices and edges in query graphs

2.2 Abstract Query Graph

Following the work given in [9, 6], we propose an abstract query graph to describe the query structure. An abstract query graph (AQG) is a tree, which consists of a combination of labeled vertices {“Ent”, “Type”, “Num”, “Var”}, connected with labeled, undirected edges {“Rel”, “Ord”, “Cmp”, “Cnt”, “Isa”}. Here, all the labels in AQG correspond to the vertex classes and edge classes in query graphs (see Table 1). Intuitively, AQG reflects the topology and the component classes of query graphs and each query graph corresponds to a unique AQG (Figure 1). Therefore, if the correct AQG is predicted, it can be used as a constraint to avoid generating the noisy queries with wrong structures.

2.3 Grounding

The operation of utilizing AQG to generate candidate queries is called grounding. In our work, we perform grounding on an AQG by a two-step method: first, we obtain an intermediate graph by replacing all the vertices (not variables) and built-in property edges of with the candidate instances. The intermediate graph is denoted by . Then, we execute the queries444The queries are generated from and all the possible directions of “Rel” edges are taken into account. That is, if there are two “Rel” edges in the AQG, the number of the direction combinations is 4. (SPARQL) corresponding to against the KB to retrieve all instance relations corresponding to each ”Rel” edges of . After replacing the “Rel” edges of with the retrieved instance relations, the query graph is generated. Concretely, for each invariable vertex, its candidate instances are obtained from the existing linking results, including entities, type, number (time and ordinal). For each edge, if its class label is “Rel”, its candidate instances retrieved by executing . Otherwise, it is a built-in property and its candidate instances are obtained by referring to Table 1. After all the combinations of the candidate instances are tried to replace vertices and edges, and their legitimacy is verified by the KB, grounding is over and the candidate query graphs corresponding to are finally generated.

2.4 Graph Transformer

Since query structure is a tree or even a graph, traditional neural networks cannot effectively capture its structural information. In this paper, we introduce graph transformer [10]

, which is a graph neural network, to learn the vector representation of AQG. Its input is a multi-labeled graph (e.g., AQG), which consists of three components: a sequence of vertices, a sequence of edges, and an adjacency matrix. Here, both sequences are unordered and each vertex or edge is represented by its corresponding class label vector, which is randomly initialized. For each vertex or edge in the graph, graph transformer exploits the multi-head attention mechanism

[16] to aggregate the information of its neighbors (within several hops) to update its vector representation. Finally, the output includes three parts: a sequence of vertex vectors, a sequence of edge vectors, and a global vector of the entire graph, which is obtained by the weighted sum of all the vertices and edges.

3 Approach

3.1 Process Overview

For an input question , we first assume that the linking results of entities, type, and number in have been obtained by preprocessing, denoted by . Then, the query graph corresponding to is built by the following two stages:

  • Generating candidate query graphs. First, an AQG generator translates into an AQG, denoted by . Then, according to , a query graph candidate set is generated by performing grounding on .

  • Ranking candidate query graphs. An existing query ranking model is employed as a black box to score each query graph in and the top-scored one is selected as .

Our approach aims to explore how to predict query structures (AQG generation) and whether they can improve existing query ranking approaches. Consequently, in order for the experimental comparison, we keep the query ranking model consistent with [11]. To more intuitively show the value of AQG and shorten the training time of the ranking model, we only employ their basic version model which removes the dependency representation of the question and id representation of the path (refer to [11] for details). In the rest of this section, we will detail the process of AQG generation.

3.2 Abstract Query Graph Generation

We first introduce the proposed generative framework, and then detail the neural network-based AQG generator which follows this framework.

3.2.1 Generative Framework

An AQG is a tree, which can be regarded as a specific case of undirected graphs, denoted by . Here, and are the sets of labeled vertices and labeled edges, respectively. In our framework, the generative process of AQG can be described by a sequence of graphs , where is an empty graph and is the completed AQG. For each time step , , where denotes the operator and denotes several arguments according to . In this paper, we define the following three types of graph-level operators:

  • addVertex. For a graph , addVertex(, ) represents adding a fresh vertex of label into . The result is a graph , where denotes the added vertex.

  • selectVertex. For the graph after addVertex, selectVertex(, , ) means selecting a vertex that will be connected to the fresh vertex . The results is a graph 555Note that the structures of and are identical. Here, utilizing the two different identifiers aims to distinguish the time steps they belong to..

  • addEdge. For the graph after selectVertex, addEdge(, , , ) means adding a fresh edge of label into to connect with . The result is a graph , where is the added edge.

Successively performing the operations addVertex, selectVertex, and addEdge on a graph is called an iteration, which adds a new triple into the graph. In the proposed framework, we stipulate that the first operation is always addVertex, which converts the initial empty graph to a graph containing only one isolated vertex. Then, the AQG is generated by multiple iterations. Although the operator is predetermined in each time step, different arguments result in generating different AQG. Here, the arguments in selectVertex, and in addEdge can be obtained by the previous step, consequently, only the last argument of each operation need be determined, i.e., in addVertex, in selectVertex and in addEdge.

There are two reasons for predicting query structures by a grammar (graph-level operations) -based generation process rather than predefined structure templates: (1) First, compared to the templates, the graph-level operations are more underlying and therefore more flexible. (2) Second, and more importantly, the test query structure may not be visible during training. The generation process can help deal with this situation by learning the visible steps of the invisible complex query structures.

3.2.2 NN-based AQG Generator

The architecture of the proposed AQG generator is shown in Figure 2. It takes a question and an empty graph as the inputs and then outputs a sequence of graphs , where is the completed AQG. At each time step, the generator first predicts the argument for the operation and then generates a new graph by performing the operation on the previous graph. Intuitively, for each prediction, the generator needs to integrate the information of both the question and the previous graph. Therefore, the model consists of four components: a question encoder, a graph encoder, a decoder, and an executor.

Figure 2: Architecture of the AQG generator. Red indicates the object being operated at each step.
Question Encoder.

To capture the semantic information of the question, we apply a Bi-LSTM as the question encoder to get the vector representations of the question. First, we replace all entity (number) mentions (from linking results) used in the question by tokens (), to enhance the generalization ability. Then, the question encoder works on the word embeddings of and outputs its vector representations , where denotes the number of the words in .

Graph Encoder.

To capture the semantic information of the graph generated at the previous time step, we leverage a graph transformer as the graph encoder. At time step , the graph encoder embeds the graph and outputs a list of vertex vectors , a list of edge vectors and a vector , where and respectively denote the numbers of the vertices and edges in , and is the representation of .


We employ a Bi-LSTM as the decoder to translate the information from the question and the previous graph into a vector at each time step. This vector carries the semantic information of the predicted argument. Specifically, at time step , is the context vector from the question , which is computed by


where denotes the dot product operation, is the trainable parameter matrix, is the output from the graph encoder for , and is the weight of attention from for the -th word of the question. This attention mechanism is based on the following intuition: At time step , the model should focus on some parts of which do not carry the redundant information of . i.e., avoid repeatedly adding the triple that has been added. Thereafter, the input to the decoder, denoted by , is calculated by a skip connection: . Here, denotes the element-wise addition. Although is already involved in calculating , the decoder still needs the direct information of when making decisions, such as selectVertex. Therefore, we adopt the idea from Residual Networks [8], enhancing the propagation of by this skip connection. Finally, the decoder takes as the input and outputs the semantic vector of the predicted argument, denoted by .


At each time step , the executor first transforms the decoder’s output into the argument . Then, it performs the operation to output a new graph . Corresponding to the types of the operator , the executor contains three modules. For each module, we design a pointer network [17] for predicting the argument:

  • Add Vertex Module. The argument denotes the label of the added vertex, which is determined by


    where is the parameter vector of label and {“Ent”, “Type”, “Num”,“Var”, “End”}. Comparing to the AQG vertex classes, has one more class label “End”, which is used to terminate the process. Specifically, if “End” is selected at time step , the generation process ends and the generator outputs .

  • Select Vertex Module. denotes the index of the selected vertex of , which is determined by


    where denotes the vertex set of , and is the vector representation of the vertex in from the graph encoder.

  • Add Edge Module. denotes the label of the added edge, which is determined by


    where is the parameter vector of label and {“Rel”, “Ord”, “Cmp”, “Cnt”, “Isa”}.

KB Constraint.

AQG aims to be grounded to the KB to generate query graphs. Therefore, whether the AQG can be grounded in the knowledge base is also an important indicator to evaluate its correctness. To prevent the excessive expansion of the AQG, we utilize the KB to constrain its generation. Concretely, whenever the AQG completes an iteration, we ground it against the KB to check if there is at least one query graph that matches the AQG. If it exists, the generation process will continue, otherwise, the triple added by the latest iteration will be removed and the current graph is returned as the result. In addition, we employ a strategy to enhance the recognition of the type constraint: if there is no “Type” vertex in the generated AQG but the type linking result set of the question is not empty, we attach a type vertex to a variable vertex and obtain a new AQG. Then, the KB constraint is required to verify the legality of this new AQG.

3.3 Training

In the experiments, each training sample consists of a question and its gold query graph . The AQG corresponding to is regarded as the gold AQG, denoted by .

To get the ground-truth for training the AQG generator, we traverse to restore its generation process. In fact, for the same AQG, different traversal strategies and starting vertices result in different ground-truth. By experimental comparison, we adopt depth-first traversal. In addition, in a query graph, there is at least one variable vertex representing the answer666Other variables are hidden variables, like ?v1 in Figure 1., denoted by ?v0. Therefore, we select the vertex in , which corresponds to ?v0, as the starting vertex of the traversal. Specifically, the ground-truth is obtained by the following steps: Initially, is an empty sequence. At the beginning of the traversal, the starting vertex is first visited and its label is added to . Thereafter, whenever a fresh vertex is visited from the vertex along the edge , the class label of , the index of , and the class label of will be added to in turn. When all vertices in are visited, the last label “End” is added to and the ground-truth is obtained. Here, is the step number of the generation process, and is the ground true argument (last argument) of each operation. During training time, our model is optimized by maximizing the log-likelihood of the ground true argument sequences:


Here, is the set of the questions, and

is the predicted probability of the ground true argument

, including , and .

4 Experiments

4.1 Experimental Setup

Our models are trained and evaluated over the following three KBQA datasets:

LC-QuAD [15]

is a gold standard complex question answering dataset over the DBpedia 04-2016 release, having 5,000 NLQ and SPARQL pairs. The dataset is split into 4,000 training and 1,000 testing questions


ComplexQuestions (CompQ) [2] is a question answering dataset over Freebase, which contains 2,100 complex questions collected from Bing search query log. The dataset is split into 1,300 training and 800 testing questions888

WebQuestions (WebQ) [3] is a question answering dataset over Freebase, which contains 5,810 questions collected from Google Suggest API. It is split into 3,778 training and 2,032 testing QA pairs999 Since more than 80% of the questions in this dataset are simple questions that contain only one fact, we use it as a benchmark for simple questions.

For LC-QuAD, we directly use its provided standard SPARQL as the gold query. However, ComplexQuestions and WebQuestions only contain question-answer pairs, so we search the candidate queries released by [11] and take the query with the highest F1-score as the gold query. To compare with previous methods[11, 12], we follow them to use the results of the state-of-the-art entity-linking tool S-MART [18] on CompQ and WebQ, and use the gold entities on LC-QuAD. For each dataset, we randomly select the % of the training set as the development set.

Implementation details.

In our experiments, all word vectors are initialized with 300-d pretrained word embeddings using GloVe[13]. The following hyper-parameters are tuned on development sets: (1) Both the sizes of the hidden states are set to 256; (2) The layer number of Bi-LSTM is set to 1 and the layer number of graph Transformer is set to 3; (3) The learning rate is set to

; (4) The number of the training epochs is set to

. Our code are publicly available101010

4.2 End-to-End Results

We compared our approach with several existing KBQA methods. [1] performs query building by existing templates. [19, 2, 20] construct pipelines to generate query graphs. [11, 12] obtain state-of-the-art performance on CompQ and LC-QuAD by query ranking, respectively. [9] achieves a state-of-the-art result on WebQ by state-transition over dependency parsing. The main difference between our method and theirs is that they perform state transition by enumerating pre-defined transition conditions, but we let our model learn to how to expand the AQG automatically at each step.

Method LC-QuAD CompQ WebQ
[19] - 36.9 52.5
[2] - 40.9 52.4
[1] - - 51.0
[5] - - 34.0
[11] - 42.8 52.7
[9] - - 53.6
[20] 70.0 - -
[12] 71.0 - -
 Our approach 74.8 43.1 53.4
Table 2: Average F1-scores on LC-QuAD, CompQ and WebQ.
LC-QuAD CompQ WebQ
P R F1 P R F1 P R F1
 our approach 204.4 75.63 75.01 74.75 88.3 42.11 54.59 43.06 76.1 53.77 61.81 53.43
 replacing AQG with ST 1379.9 65.89 75.30 69.53 204.4 40.76 54.98 42.47 147.5 52.16 61.25 52.73
Table 3: Average candidate number(), precision (P), recall (R) and F1-scores (F1) for different candidate query generation methods.

The experimental results are reported in Table 2. Our approach achieves state-of-the-art results on both LC-QuAD and CompQ, and ranks second only to [9] on WebQ. Although the performance on WebQ did not exceed [9], our approach achieves a result that closes to theirs on WebQ without any predefined transition conditions. From another perspective, our approach outperforms all the existing ranking-based approaches [11, 12] on the three datasets.

The performance of [1, 2, 20] is limited by the error propagation of the pipeline for ranking components. [11, 12] rank entire queries to joint the information of components, thus achieve better results. However, enumeration on query structures makes their performance suffer from noisy queries. Existing models lack sufficient representation capacity to balance structure and components. Our approach decouples the query ranking task and exploits a specific generative model to handle the information of structures, achieving better results.

4.3 Detailed Analysis

4.3.1 Contribution of AQG Constraint

In order to evaluate the improvement by AQG constraint, we kept our baseline ranking model unchanged but generated candidate queries by the staged-transition strategy (ST).

Table 3 shows the average numbers of candidate queries, precision, recall, and F1-score of the entire systems based on different candidate generation strategies. Intuitively, the size of the candidate set generated by AQG is much smaller than that generated by ST, especially on LC-QuAD. In addition, comparing to the ST-based strategy, the AQG-based strategy improves the performance of the entire system on all the datasets by increasing the average precision of answering.

To further analyze the impact of question complexity on the performance, we divided the questions in each dataset into four complexity levels according to the number of edges in the correct query graph. Here, level indicates that the query graph contains edges. We tested the average F1-scores when answering the questions of different levels. Figure 3(a),3(b) and 3(c) show the results. The improvements of the AQG-based strategy over the ST-based strategy increase with the complexity of questions. Furthermore, we found that the performance of both methods on CombQ and WebQ (using entity linking results) increases as the question is more complex, but it is not reflected in LC-QuAD (using gold entities). It hints to the fact that constraints in complex questions can provide more comprehensive information for entity linking.

4.3.2 Ablation Study on AQG Generator

To explore the contributions of various components of our AQG generator, we compared the following settings:

w/o attention.

We replaced the attention mechanism with an average-pooling to get .

w/o skip connection.

We removed the skip connection of and and only used as the input to the decoder.

w/o graph encoder.

We removed the graph encoder, that is, at decoding time step , we use to calculate and obtain by the element-wise addition of and .

w/o KB constraint.

We removed the KB constraint that prevents the excessive expansion of AQG.

LC-QuAD CompQ WebQ
AQG generator 83.00 88.88 91.88
w/o attention 80.20 87.75 90.50
w/o skip connection 78.40 85.45 91.29
w/o graph encoder 38.60 39.13 89.90
w/o KB constraint 72.90 80.52 90.36
breadth-first 81.80 84.12 91.95
random 79.80 83.78 91.55
Table 4: Accuracy of AQG generation.

The middle of Table 4 shows the accuracy of AQG generation of different settings. By removing the attention mechanism, the accuracy declined approximately 2% on the three datasets. Removing the graph encoder results in a significant drop in performance, especially on LC-QuAD and CombQ. It demonstrates that the structural information of the previous graph is essential. The performance drop by removing skip connection also illustrates this fact. The main reason for the smaller drop on WebQ can be that most questions in WebQ are simple questions whose true query only contains one edge. In this case, the model can also achieve good results only by the memory of the previous operation. Rmoving the KB constraint makes the performance approximately drop 10% over both the complex datasets, which reveals that KB is an effective tool for the query structure disambiguation.

4.3.3 Impact of the Ground-truth Construction Strategy

We also evaluate the accuracy of the AQG generator supervised by different ground-truth, which are constructed by following traversal strategies.

Figure 3: F1-score with varied complexity levels of questions and proportions of training data
Breadth-first traversal.

We replaced the depth-first traversal with the breadth-first traversal.

Random traversal.

We adopted the random traversal. Specifically, once visiting a vertex , randomly select an unvisited vertex connected to as the next vertex to visit.

The bottom of Table 4 shows the results. The performance is worst when the ground-truth is constructed by random traversal. Depth-first traversal achieves better performance than breadth-first traversal on LC-QuAD and CompQ. By observation, we speculate it is because the facts of complex questions are typically reflected in the form of chains. Depth-first traversal can effectively preserve this chain structure so that it achieved better results. Three traversal strategies achieve close results on WebQ because three traversal strategies have the same results for simple query graphs.

4.3.4 Results on Varied Sizes of Training Data

We tested the performance of our approach with different sizes of training data. The results are shown in Figure 3(d),3(e) and 3(f). The model equipped with the attention mechanism, the graph encoder, the skip connection, and the KB constraint always maintains optimal performance with different sizes of training data. Furthermore, with less training data, the performance of our approach can still maintain certain stability. It is due to the fact that our model learns fine-grained generative steps instead of entire structures. In this way, even if there are some invisible test query structures, which do not appear in the training data, our model can still handle them by visible generative steps.

5 Related Work

Traditional semantic parsing based KBQA approaches [4, 7, 14] aim to learn semantic parsers that translate natural language questions into a logical form expression. Recent researches proposed an alternate approach to semantic parsing by treating KBQA as a problem of semantic graph generation. [19] defines a sequence of stages for generating query graphs, each relying on a set of manually defined rules for how query conditions are added. [20] proposes a hierarchical representation model for the matching of question and KB relations. Current KBQA methods simplify the pipeline into query ranking. [11] apply a staged candidate generation strategy to generate candidate query graphs and then rank them by utilizing a semantic matching model. [12] follows the candidate generation methods proposed in [19] and propose a novel self-attention based slot matching model. These approaches try to capture the structural information and the semantic information by a single model. The main difference between our approach and previous approaches is that we explicitly leverage the structural constraint (AQG) to narrow the search space of candidate queries, in order to release the burden of query ranking. In addition, to avoid using any predefined structured templates which limit the generalization ability of our approach, we propose a generative framework to generate AQG based on basic graph-level operations. To the best of our knowledge, this is the first attempt to predict the query structures without any pre-defined templates. Last but not least, to utilize the structural information of the graph to help the model make decision in the AQG generation process, we apply graph transformer[10], which is an existing graph neural network model, to learn the representation of the AQG. The most related work to ours is [9] and [6]. [9] proposes a semantic query graph to constrain candidate query generation. They perform state transition on the dependency tree by predefined conditions. In contrast, we make the model learn to perform the state transition without any conditions. [6] proposes to leverage the query substructure templates in the training data to construct complex queries. Different from [6], we try to predict the query structure from the perspective of graph generation without using templates.

6 Conclusion

In this paper, we presented our two-stage formal query building approach. Our approach can automatically predict the query structure and use it as a constraint to avoid generating noisy candidate queries, thereby improving the performance of the following query ranking. The experimental results showed that our approach achieved superior results than the existing methods on complex questions, and produced competitive results on other simple question based datasets. In future work, We will try to extend the AQG generation framework in order to deal with the query of general graph structures. In addition, we plan to apply reinforcement learning instead of supervised learning to train the AQG generator.


The work is partially supported by the Natural Science Foundation of China under grant No. 61502095, National Key Research and Development Program of China under grants (2018YFC0830200, 2017YFB1002801), the Natural Science Foundation of China grants (U1736204, 61602259), the Judicial Big Data Research Centre, School of Law at Southeast University and the project no. 31511120201.


  • [1] A. Abujabal, M. Yahya, M. Riedewald, and G. Weikum (2017)

    Automated template generation for question answering over knowledge graphs

    See DBLP:conf/www/2017, pp. 1191–1200. External Links: Link, Document Cited by: §4.2, §4.2, Table 2.
  • [2] J. Bao, N. Duan, Z. Yan, M. Zhou, and T. Zhao (2016) Constraint-based question answering with knowledge graph. See DBLP:conf/coling/2016, pp. 2503–2514. External Links: Link Cited by: §1, §4.1, §4.2, §4.2, Table 2.
  • [3] J. Berant, A. Chou, R. Frostig, and P. Liang (2013) Semantic parsing on freebase from question-answer pairs. See DBLP:conf/emnlp/2013, pp. 1533–1544. External Links: Link Cited by: §4.1.
  • [4] J. Berant and P. Liang (2014) Semantic parsing via paraphrasing. See DBLP:conf/acl/2014-1, pp. 1415–1425. External Links: Link Cited by: §5.
  • [5] W. Cui, Y. Xiao, H. Wang, Y. Song, S. Hwang, and W. Wang (2017) KBQA: learning question answering over QA corpora and knowledge bases. PVLDB 10 (5), pp. 565–576. External Links: Link, Document Cited by: Table 2.
  • [6] J. Ding, W. Hu, Q. Xu, and Y. Qu (2019) Leveraging frequent query substructures to generate formal queries for complex question answering. In

    Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019

    pp. 2614–2622. External Links: Link, Document Cited by: §2.2, §5.
  • [7] A. Fader, L. Zettlemoyer, and O. Etzioni (2014) Open question answering over curated and extracted knowledge bases. See DBLP:conf/kdd/2014, pp. 1156–1165. External Links: Link, Document Cited by: §5.
  • [8] K. He, X. Zhang, S. Ren, and J. Sun (2016) Deep residual learning for image recognition. See DBLP:conf/cvpr/2016, pp. 770–778. External Links: Link, Document Cited by: §3.2.2.
  • [9] S. Hu, L. Zou, and X. Zhang (2018) A state-transition framework to answer complex questions over knowledge base. See DBLP:conf/emnlp/2018, pp. 2098–2108. External Links: Link Cited by: §2.2, §4.2, §4.2, Table 2, §5.
  • [10] R. Koncel-Kedziorski, D. Bekal, Y. Luan, M. Lapata, and H. Hajishirzi (2019) Text generation from knowledge graphs with graph transformers. See DBLP:conf/naacl/2019-1, pp. 2284–2293. External Links: Link Cited by: §2.4, §5.
  • [11] K. Luo, F. Lin, X. Luo, and K. Q. Zhu (2018) Knowledge base question answering via encoding of complex query graphs. See DBLP:conf/emnlp/2018, pp. 2185–2194. External Links: Link Cited by: §1, §1, §3.1, §4.1, §4.2, §4.2, §4.2, Table 2, §5, footnote 3.
  • [12] G. Maheshwari, P. Trivedi, D. Lukovnikov, N. Chakraborty, A. Fischer, and J. Lehmann (2019) Learning to rank query graphs for complex question answering over knowledge graphs. See DBLP:conf/semweb/2019-1, pp. 487–504. External Links: Link, Document Cited by: §1, §4.1, §4.2, §4.2, §4.2, Table 2, §5.
  • [13] J. Pennington, R. Socher, and C. D. Manning (2014) Glove: global vectors for word representation. See DBLP:conf/emnlp/2014, pp. 1532–1543. External Links: Link Cited by: §4.1.
  • [14] S. Reddy, O. Täckström, S. Petrov, M. Steedman, and M. Lapata (2017) Universal semantic parsing. See DBLP:conf/emnlp/2017, pp. 89–101. External Links: Link Cited by: §5.
  • [15] P. Trivedi, G. Maheshwari, M. Dubey, and J. Lehmann (2017) LC-quad: A corpus for complex question answering over knowledge graphs. See DBLP:conf/semweb/2017-2, pp. 210–218. External Links: Link, Document Cited by: §4.1.
  • [16] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin (2017) Attention is all you need. See DBLP:conf/nips/2017, pp. 5998–6008. External Links: Link Cited by: §2.4.
  • [17] O. Vinyals, M. Fortunato, and N. Jaitly (2015) Pointer networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett (Eds.), pp. 2692–2700. External Links: Link Cited by: §3.2.2.
  • [18] Y. Yang and M. Chang (2015) S-MART: novel tree-based structured learning algorithms applied to tweet entity linking. See DBLP:conf/acl/2015-1, pp. 504–513. External Links: Link Cited by: §4.1.
  • [19] W. Yih, M. Chang, X. He, and J. Gao (2015) Semantic parsing via staged query graph generation: question answering with knowledge base. See DBLP:conf/acl/2015-1, pp. 1321–1331. External Links: Link Cited by: §1, §1, §2.1, §4.2, Table 2, §5, footnote 2.
  • [20] M. Yu, W. Yin, K. S. Hasan, C. N. dos Santos, B. Xiang, and B. Zhou (2017) Improved neural relation detection for knowledge base question answering. See DBLP:conf/acl/2017-1, pp. 571–581. External Links: Link, Document Cited by: §4.2, §4.2, Table 2, §5.