Semantic Framework based Query Generation for Temporal Question Answering over Knowledge Graphs (2022)

Abstract: Answering factual questions with temporal intent over knowledge graphs (temporal KGQA) attracts rising attention in recent years.In the generation of temporal queries, existing KGQA methods ignore the fact that some intrinsic connections between events can make them temporally related, which may limit their capability.We systematically analyze the possible interpretation of temporal constraints and conclude the interpretation structures as the Semantic Framework of Temporal Constraints, SF-TCons.Based on the semantic framework, we propose a temporal question answering method, SF-TQA, which generates query graphs by exploring the relevant facts of mentioned entities, where the exploring process is restricted by SF-TCons. Our evaluations show that SF-TQA significantly outperforms existing methods on two benchmarks over different knowledge graphs.

## introduction with the rapid growth of knowledge graphs, temporal question answering over knowledge graphs (temporal kgqa) is attracting rising attention in recent years @xcite . in temporal kgqa, a common phenomenon is that questions express temporal relations between events or time expressions, while knowledge graphs describe the facts resulting from each event. existing methods handle the heterogeneity between natural language and knowledge graph representation in two ways. some systems express temporal intents by constructing executable queries, some apply time-sensitive neural models to rank candidate answers. considering that neural models are difficult to characterize the clear boundaries of concepts (e.g., exactly filter all events that occur "before 2022"), this paper focuses on generating queries that correspond to the meaning of questions. from the logic perspective, formulated queries are actually logical restrictions about kg facts. the answers to a question is a set of kg objects, each of which satisfies the corresponding logical restrictions. in previous studies (e.g., @xcite , temporal intents are converted into restrictions over kg facts with quantitative time values. example 1 illustrates a typical conversion from a temporal question to such restriction. example 1. "who was the president of the u.s. when john lennon was shot?" the corresponding query on wikidata can be formulated as the following logical restriction: however, the idea of constructing queries with quantitative restrictions can not exhaust all possible scenarios. as illustrated in example 2, facts with time values are not a necessary premise to introduce a temporal relation. example 2. "where was john lennon standing when he was shot?" to construct a comparison restriction, we need to enumerate the "standing" of j.l. (i.e. all the experiences of his life). the enumeration is hard to implement and might introduce errors. 1 in fact, the temporal intent does not rely on any time value. the two events occur simultaneously just because they are different aspects of the same entity (wd: q2341090), the murder of john lennon. the above example reveals that intrinsic connections can also make events temporally related. we argue that the neglect of such cases may limit the capability of existing methods. therefore, the possible temporal constraints, especially those that do not rely on explicit time values, need to be specifically studied. the main challenges in concluding such constraints come from the complexity of natural language and the lack of supervision signals. practical kgqa tasks often provide only questionanswer pairs. i.e., the constraints on the relevant facts are unknown. manually enumerating all possible constraint structures in a huge search space will be cumbersome or even infeasible. thus, there is a need for a lightweight method to model the various constraints that correspond to possible temporal intents. inspired by the basic idea of frame semantics that "one cannot understand the meaning of a word without access to all the encyclopedic knowledge that relates to that word." @xcite , we assume that temporal intents are expressed as certain constraints about corresponding knowledge and could be interpreted by some structures over kg facts. specifically, the events involved in a temporal constraint should provide certain kg facts, which support a possible interpretation of it. we conclude the temporal constraints and their corresponding interpretation structures as the semantic framework of temporal constraints, sf-tcons. sf-tcons describes what kinds of knowledge are needed and how they are composed in the potential interpretations. it consists of 6 interpretation structures, which will be presented in section 2. to the best of our knowledge, sf-tcons is the first work to systematically summarize the interpretation structures for temporal kgqa tasks. based on sf-tcons, we propose a semanticframework-based question answering method, sf-tqa, to convert sf-tcons into executable queries. sf-tqa generates query graphs by exploring the relevant facts of mentioned entities, where the query graph is a graph representation of executable logical queries that resembles subgraphs of kg @xcite . sf-tqa improves the accuracy of query generation by regarding sf-tcons as restrictions in the exploration. sf-tqa firstly evokes possible interpretations of temporal intents according to timeml @xcite annotations. it then grounds the temporal elements in corresponding interpretation structures by the relevant kg facts. the grounding phase will generate multiple candidate queries, the best candidate will be distinguished by ranking the pairs of questions and serialized queries with a bert model. the rest of this paper is organized as follows: section 2 discusses the sf-tcons in detail. section 3 presents sf-tqa. section 4 evaluates the sf-tqa with two benchmarks over different knowledge graphs. section 5 summarizes the related work. the last section concludes this paper. ## semantic framework of temporal constraints as previously introduced, temporal intents reflect constraints on events and time expressions. we argue that what really supports the constraints is the essential knowledge underlying the involved elements. for example, in a comparison like "before wwi", what is needed is its start time "1914" rather than the named entity wd:q361 in kg. therefore, temporal constraints can be interpreted by describing what kind of knowledge is needed and how they are composed. the interpretation structures of the constraints are presented as sf-tcons, the semantic framework of temporal constraints. ## semantic-framework-based temporal question answering figure 1 illustrates the question-answering process of the semantic-framework-based temporal question answering method, sf-tqa. the query generation consists of two steps, 1) evoking the constraints and their possible interpretations (i.e., constraint evocation) and 2) grounding the constraints by exploring the relevant kg facts (i.e., constraint grounding). the generated candidate queries will be ranked by a bert model, and the execution results of the highest-scored query will be considered as answers. ## conclusion and future work in this paper, we study the logical constraint that corresponds to temporal intents in questions. our main contributions can be summarized as follows: in the near future, it is worth exploring to alleviate the possible knowledge incompleteness in practical kg by developing a hybrid questionanswering method on both knowledge graphs and web texts. in addition, this paper focuses only on temporal intent, while problems in real configurations may contain both complex non-temporal and temporal intents. therefore, it would be helpful to combine sf-tcons with general kgqa systems for complex questions.