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

2025-04-15 0 0 417.7KB 11 页 10玖币
侵权投诉
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
such constraints come from the complexity of nat-
ural language and the lack of supervision signals.
Practical KGQA tasks often provide only question-
answer pairs. i.e., the constraints on the relevant
facts are unknown. Manually enumerating all possi-
ble 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.” (Fillmore et al.,2006),
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 tem-
poral constraint should provide certain KG facts,
which support a possible interpretation of it. We
conclude the temporal constraints and their corre-
sponding interpretation structures as the
S
emantic
F
ramework of
T
emporal
Cons
traints, SF-TCons.
SF-TCons describes what kinds of knowledge are
needed and how they are composed in the poten-
tial 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 interpreta-
tion structures for temporal KGQA tasks.
Based on SF-TCons, we propose a semantic-
framework-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 ex-
ecutable logical queries that resembles subgraphs
of KG (Yih et al.,2015). SF-TQA improves the ac-
curacy of query generation by regarding SF-TCons
as restrictions in the exploration. SF-TQA firstly
evokes possible interpretations of temporal intents
according to TimeML (Pustejovsky et al.,2010) an-
notations. It then grounds the temporal elements in
corresponding interpretation structures by the rele-
vant 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 2discusses the SF-TCons in detail. Sec-
tion 3presents SF-TQA. Section 4evaluates the SF-
TQA with two benchmarks over different knowl-
edge graphs. Section 5summarizes the related
work. The last section concludes this paper.
2 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 “be-
fore WWI”, what is needed is its start time “1914”
rather than the named entity
wd:Q361
in KG. There-
fore, temporal constraints can be interpreted by de-
scribing 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.
2.1 Temporal Constraints in Questions
Depending on whether the constraints concern
quantitative attributes of a single event or the re-
lations between events, we classify the temporal
constraints as follows.
Value Constraints.
The intentions about quan-
titative values are often expressed with time values
or ordinals (e.g., “
first
president”). They require
certain events to have corresponding temporal or
ordinal attributes. Thus, they could be denoted as
follow.
HASVALUE(E1, T1),(VC-1)
HASVALUE(E1, O1),(VC-2)
where
E, T, O
denotes events, time expressions
and ordinals respectively. As an example, the
intent “first president” could be denoted as
HASVALUE(“president”,“first”)
. Specifically,
temporal interrogatives (e.g., “
when
did sth. hap-
pen?”) are denoted as
HASVALUE(E1, T ?)
, which
declare the existence of the temporal attributes but
has no restrict on the specific value.
Relation Constraints.
The possible relations
between time and events have been well studied in
the AI area. We follow TimeML, the most com-
monly used annotation specification, to model the
relation constraints.
Example 3.
TimeML-style annotations for the
question in Example 2:
Where was John Lennon [
Event1
standing] [
Signal1
when] he was [Event2shot]?
h
TLINK reltype=SIMULTANEOUS target=EVENT
1
relatedTo=EVENT2signal=SIGNAL1/i
As illustrated in Example 3, temporal relations
are triggered by certain signals (e.g., “when”) and
classified into pre-defined reltypes. For the practi-
cal demand of QA tasks, we formalized the relation
constraints as
RELATION(TR, E1, T1),(RC-1)
RELATION(TR, E1, E2),(RC-2)
where
TR
denotes the 13 temporal reltypes in
TimeML (Pustejovsky et al.,2003),
E
and
T
de-
notes events and time expressions respectively. The
TimeML-style annotation in the example question
corresponds the following RC-2 constraint:
RELATION(SIMULTANEOUS,“standing”,“shot”)
2.2 Interpretation Structure for Temporal
Constraints
As previously mentioned, one temporal constraint
could be supported by various interpretations. We
summarize 6 interpretation structures (IS) accord-
ing to whether the involved event expressions are in-
trinsically connected and what connector between
them can correspond to the expected meanings. In
order to enhance the generality of the IS as much
as possible, we do not restrict the specific semantic
representations of involved events, but only focus
on the key knowledge that they can provide. The 6
IS are presented as follows.
IS-1 Comparison structure
HASVALUE(E1, T1)|RELATION(Tr, E1, T1|E2)
COMPAREh◦,time(E1),time(T1|E2)i
This structure interprets
VC-1
and
RC
, where
denotes algebraic predicate for time values (Allen,
1983;Jia et al.,2018b). Specifically, the predicate
is required to be EQUAL in
VC-1
and is determined
according to the identified type
Tr
in
RC
. This
structure supposes that the involved events provides
certain time values.
For example, the question: Which movie did
Alfred Hitchcock [
Event1
direct] [
Signal1
in] [
Time1
1960]? corresponds to the following constraint
and KG facts, where the “direct” event provides
the value “1960-10-7”.
COMPAREhINCLUDES,time(“direct”),“1960”i
Alfred_Hitchcock Psycho (ANS)
director (E1)
“1960-10-7”
in_time
“1960” (T1)INCLUDES
IS-2 Ordering Structure
HASVALUE(E1, O1)ORDERhattr(E1), O1i
This structure interprets
VC-2
by ordering entities
(or facts) that are described by
E1
. It supposes that
E1
describes a common attribute of certain objects
to be ordered. For example, the question: “When
did Henry the VIII [
Event1
marry]his [
Ordinal1
first]
wife?” corresponds to
ORDERhattr(“marry”),“first”i
Henry_VIII_of_England
. . .
Cathe. . . Aragon
(T=1506, 1st (O1))
spouse (E1)
Cathe. . . Parr
(T=1543, 6th)
spouse(E1)
IS-3 Direct Query Structure
HASVALUE(E1, X)FINDhent(E1),attr(X)i
In some cases, the expected values are directly
represented in KG facts. This structure interprets
VC
by directly finding the expected value
X
in
certain attributes of some related entity. It supposes
that the entity is related to the mentioned event
E1
.
For example, the description: “. . . did the
[
Ordinal1
7th] [
Event1
Harry Potter book]...” cor-
responds to the following representation and KG
facts, where the entity “Harry Potter and the
Deathly Hallows” has some attribute with the value
“7”.
FINDhent(“. . . book”),attr(“7th”)i
Harry. . . Hallows
“7” (O1)
. . . .series_ordinal
H.P. (E1)
part_of. . .
IS-4 Same Entity Structure
RELATION(Tr, E1, E2)
SAMEENTITYhe, attr(E1),attr(E2)i
This structure interprets simultaneous cases of
RC-
2
. It supposes that the events should be attributes
of a certain entity e.
摘要:

SemanticFrameworkbasedQueryGenerationforTemporalQuestionAnsweringoverKnowledgeGraphsWentaoDing,HaoChen,HuayuLi,YuzhongQuStateKeyLaboratoryforNovelSoftwareTechnology,NanjingUniversity,China{wtding,haochen97,lihuayuu}@smail.nju.edu.cn,yzqu@nju.edu.cnAbstractAnsweringfactualquestionswithtemporalin-tent...

展开>> 收起<<
Semantic Framework based Query Generation for Temporal Question Answering over Knowledge Graphs.pdf

共11页,预览3页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!

相关推荐

分类:学术论文 价格:10玖币 属性:11 页 大小:417.7KB 格式:PDF 时间:2025-04-15

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 11
客服
关注