
Semantic Framework based Query Generation for Temporal Question
Answering over Knowledge Graphs
Wentao Ding, Hao Chen, Huayu Li, Yuzhong Qu
State Key Laboratory for Novel Software Technology, Nanjing University, China
{wtding, haochen97, lihuayuu}@smail.nju.edu.cn, yzqu@nju.edu.cn
Abstract
Answering factual questions with temporal in-
tent 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 in-
trinsic connections between events can make
them temporally related, which may limit their
capability. We systematically analyze the pos-
sible interpretation of temporal constraints and
conclude the interpretation structures as the Se-
mantic Framework of Temporal Constraints,
SF-TCons. Based on the semantic frame-
work, we propose a temporal question answer-
ing method, SF-TQA, which generates query
graphs by exploring the relevant facts of men-
tioned entities, where the exploring process is
restricted by SF-TCons. Our evaluations show
that SF-TQA significantly outperforms exist-
ing methods on two benchmarks over different
knowledge graphs.
1 Introduction
With the rapid growth of knowledge graphs, tem-
poral question answering over knowledge graphs
(temporal KGQA) is attracting rising attention in
recent years (Jia et al.,2018b,2021). In tempo-
ral KGQA, a common phenomenon is that ques-
tions express temporal relations between events
or time expressions, while knowledge graphs de-
scribe 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 an-
swers. 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 restric-
tions. In previous studies (e.g., Jia et al.,2018b),
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:
T1=time(position_held(ANS, U.S._president))
∧T2=time(Murder_of_John_Lennon)
∧OVERLAPS(T1, T2).
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 connec-
tions can also make events temporally related. We
argue that the neglect of such cases may limit the
capability of existing methods. Therefore, the pos-
sible temporal constraints, especially those that do
not rely on explicit time values, need to be specifi-
cally studied. The main challenges in concluding
1
For example, Wikidata says that J.L.’s “residence”(
wd:
P551
) includes Liverpool and New York, but does not provide
the corresponding time duration.
arXiv:2210.04490v3 [cs.CL] 11 May 2023