
HiSMatch: Historical Structure Matching based Temporal Knowledge
Graph Reasoning
Zixuan Li1,2,3∗
, Zhongni Hou1,2, Saiping Guan1,2†
, Xiaolong Jin1,2, Weihua Peng3,
Long Bai1,2, Yajuan Lyu3, Wei Li3, Jiafeng Guo1,2, Xueqi Cheng1,2
1School of Computer Science and Technology, University of Chinese Academy of Sciences;
2CAS Key Laboratory of Network Data Science and Technology,
Institute of Computing Technology, Chinese Academy of Sciences; 3Baidu Inc.
{lizixuan, houzhongni18z, guansaiping, jinxiaolong}@ict.ac.cn
{pengweihua,lvyajuan}@baidu.com
Abstract
A Temporal Knowledge Graph (TKG) is a se-
quence of KGs with respective timestamps,
which adopts quadruples in the form of (sub-
ject,relation,object,timestamp) to describe
dynamic facts. TKG reasoning has facili-
tated many real-world applications via answer-
ing such queries as (query entity,query rela-
tion,?,future timestamp) about future. This
is actually a matching task between a query
and candidate entities based on their historical
structures, which reflect behavioral trends of
the entities at different timestamps. In addi-
tion, recent KGs provide background knowl-
edge of all the entities, which is also help-
ful for the matching. Thus, in this paper,
we propose the Historical Structure Matching
(HiSMatch) model. It applies two structure
encoders to capture the semantic information
contained in the historical structures of the
query and candidate entities. Besides, it adopts
another encoder to integrate the background
knowledge into the model. TKG reasoning ex-
periments on six benchmark datasets demon-
strate the significant improvement of the pro-
posed HiSMatch model, with up to 5.6% per-
formance improvement in MRR, compared to
the state-of-the-art baselines.
1 Introduction
Knowledge Graphs (KGs), which store facts as
triples in the form of (subject,relation,object),
have been widely applied to many NLP applica-
tions, such as question answering (Lan and Jiang,
2020), dialogue generation (He et al.,2017) and
recommendation (Wang et al.,2019). However,
facts may constantly change over time. Tempo-
ral Knowledge Graphs (TKGs) is a kind of KGs
that describe such dynamic facts by extending each
triple with a timestamp as (subject,relation,object,
timestamp). Usually, a TKG is represented as a
∗
This work was done while the first author was doing
internship at Baidu Inc.
†Corresponding author.
sequence of KG snapshots. The TKG reasoning
task is to infer new facts from known ones, which
primarily has two settings, interpolation and extrap-
olation. The former attempts to complete missing
facts in history, while the latter aims to predict fu-
ture facts with historical facts. This paper focuses
on the extrapolation setting, which is more chal-
lenging and far from being solved (Jin et al.,2020).
This task can be seen as answering the query about
the future facts (e.g., (COVID-19,Infect,?,2022-
8-1)) by selecting from all the candidate entities.
The key of answering the queries about future
facts is to understand the history thoroughly. All
the existing models conduct reasoning based on
substructures extracted from the whole history.
These substructures can be divided into two types,
i.e., query-related history (Jin et al.,2019;Zhu
et al.,2021) and candidate-related history (Li et al.,
2021b,2022;Han et al.,2021a;Deng et al.,2020).
The former contains the latest historical facts re-
lated to the subject and relation in the query, which
reflects the behavioral trends of the subject concern-
ing the query relation. The latter contains all the
latest historical facts of the candidates without con-
sidering the query, which indicates the behavioral
trends of all the entities. Both of these two kinds of
history are vital to TKG reasoning. Take the query
(COVID-19,Infect, ?, 2022-8-1) for example, the
query-related history contains facts like (COVID-
19,Infect, *, t), where tis before 2022-8-1. The
candidate-related history of a candidate A, includes
facts reflecting its own behaviors, like (A,*,*,t)
or (*,*,A,t). In the realistic situation, the occur-
rence of the fact (COVID-19,Infect,A,2022-8-1) is
caused by the interactions between these two kinds
of history. However, existing models only focus
on one kind of history and underestimate the other,
which limits their performance on TKG reasoning.
Overall, it still remains a challenge to model both
two kinds of history in a unified framework.
To reduce the computational cost caused by the
arXiv:2210.09708v1 [cs.AI] 18 Oct 2022