MusTQ: A Temporal Knowledge Graph Question Answering Dataset for Multi-Step Temporal Reasoning (2024)

Abstract: Question answering over temporal knowledge graphs (TKGQA) is an emerging topic, which has attracted increasing interest since it considers the dynamic knowledge in the world. Several datasets along with model developments are proposed in the TKGQA research field. However, existing studies generally focus on fact-centered reasoning, with limited attention to temporal reasoning. To tackle the intricate and comprehensive nature of temporal reasoning, we propose a new TKGQA dataset, MusTQ, which contains 666K multistep temporal reasoning questions as well as a TKG. The multi-step temporal reasoning is established based on six basic temporal reasoning types derived from a well-established measure theory. Using MusTQ, we evaluate previous TKGQA methods and find that they typically fall short in multi-step temporal reasoning. Furthermore, we propose a TKGQA model, MusTKGQA, which enhances multistep reasoning ability with entity-time attention mechanism and optimized temporal knowledge graph representation. Extensive experiments on MusTQ show that our model achieves stateof-the-art multi-step temporal reasoning performance.1

heading: 1 Introduction
text: Given natural questions, question answering over temporal knowledge graphs (TKGQA) aims to provide the corresponding answers using a temporal knowledge graph (TKG) as the knowledge base. Since many real-world facts will change over time and formulating questions with temporal constraint is a straightforward method to ensure factual validity, TKGQA has gradually attracted increasing research attention (Saxena et al., 2021; Ding et al., 2023; Chen et al., 2022; Long et al., 2022; Xiao
* Corresponding authors. 1https://github.com/theTyZ/MusTQ
et al., 2022; Shang et al., 2022; Mavromatis et al., 2022; Jiao et al., 2023; Ding et al., 2022) .
Compared with the traditional knowledge graph question answering (KGQA) that adopts static knowledge graphs as the knowledge base, TKGQA should not only consider the knowledge formed in triples but also emphasize its temporal information. Therefore, reasoning on temporal information could naturally become a vital perspective for questions that involve temporal constraints. Existing TKGQA datasets either query the information in TKG (Saxena et al., 2021; Chen et al., 2023) or make prediction in the future timestamps (Ding et al., 2023). In this paper, we mainly focus on the former type of TKGQA datasets. Though great success has been achieved in previous work, existing TKGQA datasets typically focus on fact-centered reasoning questions, with less attention on temporal reasoning. Specifically, they only involve singlestep temporal reasoning, ignoring the systematical exploration of temporal reasoning. Among them, CronQuestions (Saxena et al., 2021) constructs its questions with single-step temporal reasoning related to explicit time or entity. Although MultiTQ (Chen et al., 2023) contains two-step temporal reasoning questions, its questions only involve fact-centered reasoning and lack systematic explorations on temporal reasoning.
In this paper, we propose MusTQ (Muti-Step Temporal Reasoning Questions), a new TKGQA dataset, which aims to enhance the temporal reasoning ability in TKGQA. In order to systematically study temporal reasoning, we start with the measure of time. According to the well-established theory for the scale of measurement (Stevens, 1946), the measure of time determines the basic operations that can be applied to the temporal data. The timestamp information in TKG involves the following three operations: determination of i) equality; ii) greater or less; iii) equality of intervals or differences. The first operation maps the facts to their
11688
corresponding timestamps, while the second operation sorts facts according to their chronology. The final operation enables timestamp reasoning with the addition and subtraction operations. Under the guidance of this theory, we classify temporal reasoning into temporal comparison reasoning and temporal numeric reasoning. The former uses operations i) and ii) to reason timestamps based on the comparison, while the latter uses operation iii) to reason timestamps based on the interval. Further, we divide these two categories into six detailed reasoning types and construct the diverse multi-step temporal reasoning by their combination. Finally, MusTQ contains ~666K temporal questions and an underlying TKG (with 125k entities and 326k facts) as its knowledge base.
Based on our MusTQ, we build and evaluate various baseline systems, including the pre-trained language models and the representative KGQA and TKGQA models. The experimental results demonstrate that all existing methods show their limited capabilities in multi-step temporal reasoning. Furthermore, we propose a new TKGQA model, MusTKGQA, which improves the multi-step temporal reasoning ability via carefully designed TKG representation learning and entity-time attention mechanism. In detail, to enhance the temporal reasoning, we optimize the TKG representation in time and fact perspectives with sequence alignment and fact alignment respectively. The sequence alignment enhances the reasoning between timestamps, while the fact alignment improves the awareness for time boundary of interval facts. Then, we propose an entity-time attention mechanism to infer the temporal information of the question steply and finally reason the answer. Extensive experiments on MusTQ show that our model achieves state-ofthe-art multi-step temporal reasoning performance. The results on the previous CronQuestions dataset also show the strong ability of our model. Our main contributions are concluded as follows: • We construct the first TKGQA dataset (i.e.,
MusTQ) for multi-step temporal reasoning. The involved single-step temporal reasoning types are founded systematically upon the operations for the measure of time. Our dataset contains about 666K questions and includes temporal comparison reasoning and temporal numeric reasoning as its basic stepwise reasoning categories. • We propose a model MusTKGQA that conducts multi-step temporal reasoning through the entitytime attention mechanism based on TKG representation. To enhance temporal reasoning ability, the TKG representation is optimized by sequence alignment and fact alignment. • Experiments on MusTQ show that our model achieves state-of-the-art performance on multistep temporal reasoning.

heading: 2 Related Work
text: Temporal Questions over KG. Several datasets are proposed for temporal question answering. TempQuestions (Jia et al., 2018) and TimeQuestions (Jia et al., 2021) are two datasets that collect temporal questions from KGQA datasets. However, they adopt traditional static knowledge graphs as their knowledge base (Bollacker et al., 2008; Vrandečić and Krötzsch, 2014). CronQuestions (Saxena et al., 2021) is the first temporal question dataset over TKG (Lacroix et al., 2020), whose questions are classified into simple and complex questions based on the number of facts leveraged to answer the questions. Additionally, MultiTQ (Chen et al., 2023) focuses on questions in multiple temporal granularities and contains two-step comparison temporal reasoning questions with ICEWS (GarcíaDurán et al., 2018). However, its questions are factcentered and lack temporal reasoning variety. The questions in the above datasets require models to query information within the provided KGs. ForecastTKGQuestions (Ding et al., 2023) is another TKGQA dataset that aims to predict facts in the future timestamps beyond the given TKG. We mainly
focus on datasets that query information within TKG. Different from existing datasets that generally focus on fact-centered reasoning, our MusTQ contains multi-step temporal reasoning questions constructed based on the systematical exploration of temporal reasoning. Table 1 shows the comparison between our MusTQ and previous datasets.
TKGQA Models. Question answering on TKG generally leverages the Temporal Knowledge Graph Embedding (TKGE) for answer reasoning, which aims to learn the low-dimensional representation of entities, relations, and timestamps. CronKGQA (Saxena et al., 2021) leverages TKGE to make answer reasoning with the semantics of the questions. Based on CronKGQA, various TKGQA models are proposed to emphasize the time information of the question. Among them, TempoQR (Mavromatis et al., 2022) introduces time scope information to make time-aware question representation for answer reasoning. TSQA (Shang et al., 2022) infers the timestamps through the time estimation module. SubGTR (Chen et al., 2022) adopts logical reasoning on the subgraph of the question. Besides, LGQA (Liu et al., 2023) emphasizes the graph structural information in QA. Moreover, MultiQA (Chen et al., 2023) considers the multi-granularity temporal questions and ForecastTKGQA (Ding et al., 2023) is for TKGQA in the forecast scenario. However, none of these methods consider multi-step temporal reasoning in various temporal reasoning categories. To tackle this real-world challenge, we propose MusTKGQA.

heading: 3 MusTQ Construction
text: MusTQ consists of multi-step temporal questions and a TKG as its knowledge base. We first introduce the TKG in MusTQ (§ 3.1). Then we describe the systematic temporal reasoning categories, and the single-step reasoning types in each category (§ 3.2). Next, we present the process of developing multi-step temporal reasoning questions (§ 3.3). Finally, we show the data statistics of MusTQ (§ 3.4).

heading: 3.1 Temporal Knowledge Graph
text: A TKG G consists of temporal facts in the form of (s, r, o, τ), where s, o ∈ E and r ∈ R. E ,R denote the set of entities and relations in G, respectively. τ ∈ T represents the valid time of the fact (s, r, o) in the set of timestamps T . We adopt the Wikidata subset (Lacroix et al., 2020) as the base of our TKG because its time annotations are in the form
of timestamps τp: (s, r, o, τp, τp) and time intervals (τs, τe): (s, r, o, τs, τe), which are denoted as timestamp facts and interval facts, respectively. Following Saxena et al. (2021), we balance the number of facts in different relations and supplement necessary temporal information for the occurrence of its entities via the following heuristic rules: (1) The dataset adopts the time granularity down to the year; (2) We eliminate duplicate facts and maintain a refined TKG by narrowing the time span to the period the majority of facts occurrences are concentrated. Finally, the TKG includes 125K entities, 202 relations, and 326K facts with the time span from 1 AD to 2027 AD (i.e., 2027 timestamps).

heading: 3.2 Temporal Reasoning Category
text: To propose multi-step temporal questions, we first systematically construct multiple basic temporal reasoning types based on all basic operations for time. According to a well-established measure theory (Stevens, 1946), the timestamp information contains three fundamental empirical operations, i.e., determination of i) equality; ii) greater or less; iii) equality of intervals or differences. These operations are used to perform the following two temporal reasoning categories:
Temporal Comparison Reasoning. Based on the operations i) and ii), this category compares the temporal information of different facts. In detail, the operation i) enables the measuring of equivalence for categorized variables (e.g., timestamp). Each fact in TKG could be mapped to a specific timestamp based on the operation i). Consequently, we establish the fine-grained reasoning types (1) Explicit Time and (2) Fact which need equivalence reasoning by considering the timestamp or occurrence of fact, separately. The operation ii) corresponds to ‘>/<’ in mathematics. Under its guidance, variables could compare with each other to establish their rank-ordering. Thus, we introduce the fine-grained types: (3) Before/After reasons the time span based on the occurrence of the fact. (4) Ordinal infers the target timestamp based on facts occurring at the ordinal positions.
Temporal Numeric Reasoning. This category processes the numeric reasoning between timestamps with the operation iii). The operation makes it possible to measure the differences between timestamps, and it corresponds ‘+/−’ in mathematics. We develop the following reasoning types to make inferences based on time intervals: (5) Time Dif-
to an example time constraint template or basic template . “{head}” and “{tail}” denote head and tail entities, respectively. “{diff}” is a digit that denotes the explicit time difference and “{ordinal}” indicates the ordinal number.
ference and (6) Count, where the temporal interval is denoted by explicit time gaps and the cardinal number of factual occurrences, respectively.
Among the above six reasoning types, types (1- 3) only form time constraints, while types (4-6) lead to the questions themselves.

heading: 3.3 Temporal Question Construction
text: We leverage the manual templates w.r.t six reasoning types to construct multi-step temporal reasoning questions in four steps (c.f., Table 3): First, based on reasoning types (4-6), we employ human experts to construct base templates using four highfrequency relations in TKG. The human experts construct 63 unique base templates (for the construction details, please refer to Appendix A). The base template examples are shown in Table 2.
Second, we extend the base templates with essential time constraints to incorporate multi-step temporal reasoning. We adopt the reasoning types (1-3) to introduce time constraints into base templates. This process collects 691 templates with time constraints. To enhance the semantics diversity, human experts are further employed to create several paraphrasing templates to rewrite these
templates. As a result, we obtain 12,754 templates with time constraints. Table 4 gives several example templates with different numbers of reasoning steps. Third, we fill time slots (e.g., {time}) in each template with the time information described as the timestamp or fact time.
Finally, multi-step questions are completed by completing the time-filled templates with entity aliases from the TKG (entity filling). To ensure reality and validity, we only use the entities within a 3-hop distance of the entity in the basic template during entity filling. Appendix B lists several examples of question construction. Ultimately, we construct 666K unique question-answer pairs. The boundaries of entities and timestamps within questions are also provided in MusTQ.

heading: 3.4 Data Statistics
text: To ensure temporal reasoning without guessing from seen questions, we make sure there is no overlap of the multi-step reasoning (i.e., the combination of entities, timestamps and reasoning types) between the training set and the test set. The data statistics of the dataset splitting are shown in Table 5. MusTQ includes questions with a range of two to four temporal reasoning steps. Most questions require temporal reasoning within three steps. There are four types of answers in MusTQ. In ad-
dition to the entity and time answers, which are commonly involved in existing datasets (Saxena et al., 2021; Chen et al., 2023), MusTQ contains boolean answers to verify the mentioned time differences in question. The questions with numeric answers are also included to evaluate the ability to understand the time interval by reasoning the fact times within the interval.

heading: 4 MusTKGQA
text: To answer the temporal reasoning questions, we propose MusTKGQA which first enhances the temporal knowledge graph embedding (TKGE) with sequence alignment and fact alignment (§ 4.1). Then, our model leverages the enhanced TKGE to perform the multi-step temporal reasoning through an entity-time attention mechanism (§ 4.2).

heading: 4.1 Enhanced TKGE
text: TKGE represents the TKG by learning the embeddings of entities, relations and timestamps, which is widely adopted in TKGQA. TNTComplEx (Lacroix et al., 2020) is a state-of-the-art TKGE model that learns representation in the complex vector space through entity prediction (s, r, ?, t) and time prediction (s, r, o, ?) tasks which correspond to the information query scenario of our MusTQ. Besides, it considers nontimesensitive information together with dynamic facts, which could help to query related entities when there is no explicit time information (please refer to Appendix C for more details). However, TNTComplEx is weak for multi-step temporal reasoning due to the following two drawbacks: (1) It neglects the explicit modeling of chronological order between timestamps, resulting in limited ability in numeric reasoning. (2) It is weak in recognizing the validity period of the fact. In the time prediction task, given
an interval fact that happens at ts and ends at te, each timestamp within its valid period (ts, te) is sampled equally as the golden labels. Therefore, the time boundaries (ts and te) of the interval fact are not fully modeled. Given these, we introduce sequence alignment and fact alignment in TKGE to enhance the modeling of chronological order and time boundary, respectively. Sequence Alignment. We perform sequence alignment to sort timestamps in chronological order with fixed-length intervals. Specifically, we introduce three relations in TKG to enhance the representation of timestamps: next year (nexty), prior year (priory), and this year (thisy). For example, facts (2005, nexty, 2006) and (2006, priory, 2005) describe the chronological order between the years 2005 and 2006. Besides, with fact (2006, thisy, 2006), the awareness of the same year is enhanced. Fact Alignment. To model the time boundary information of interval facts, we introduce additional time prediction samples. For each interval fact (s, r, o, ts, te), two timestamp facts can be constructed: (s, rs, o, ts), (s, re, o, te), where rs and re are two relations denote the start time and end time. In this way, the boundary information of facts could be explicitly considered in TKGE.
Equipped with these optimizations, the trained TKGE model (Θ(·)) is further used to generate the low-dimensional representation of elements in G.

heading: 4.2 Temporal Question Reasoning
text: After enhancing the TKGE, for a given TKGQA question q, we reason its answer based on both q and the enhanced TKGE. In detail, we first fuse the TKGE information with q to obtain the TKGEenhanced question representation. Second, based on the fused information, we leverage an entitytime attention mechanism to get attention distributions over the mentioned entities in question. Third, we perform temporal reasoning for each entity. Finally, we reason the answer for the question q. TKGE-enhanced Question Representation. At the start, we integrate question q with the entity and timestamp information in G. q is first tokenized into a token sequence q = {w1, w2, ..., w|q|}, where wi indicates the i-th token. Then, we obtain the contextual embeddings for each question token via a frozen BERT (Devlin et al., 2019):
hqcls, hw1 , ..., hw|q| ←Wc BERT({w1, ..., w|q|}) (1) where Wc is trainable parameters, h q cls ∈ Rd denotes the hidden state of special token [CLS],
which gathers the whole information of q. hwi ∈ Rd denotes the hidden state of wi. Next, the TKGEenhanced question representation is calculated as:
hqcls, hw1 , ..., hw|q| ← g(h q cls, h ′ w1 , ..., h ′ w|q|) (2)
h ′ wi = { Θ(wi) wi ∈ T ∪ E hwi otherwise
(3)
where g denotes the transformer encoder (Vaswani et al., 2017). In this manner, hqcls and h q cls denote the overall representation of question q before and after TKG information fusion, respectively. Entity-Time Attention Mechanism. The proposed attention mechanism is used to obtain the attention distributions over entities in question during different reasoning steps. To introduce the time scope information for multiple entities mentioned in q, we leverage two-step temporal reasoning (which provides the related time scope information) before the answer reasoning step.
For the initial step of temporal and answer reasoning, we construct queries qt and qa guided by the question representation:
qt, qa ←Wt[hqcls; h q cls],Wa[h q cls; h q cls] (4)
Subsequently, since the temporal constraints reasoning steps depend on each other, qt serves as guidance for the next step query q′t = W ′ t [qt; h q cls], where Wt, Wa and W ′t ∈ Rd×2d are trainable parameters. Assuming there are k entities mentioned in q, denotes as Eq = {e1, ..., e|Eq |} (ei ∈ E), we next use these three queries to calculate the attention distributions over them:
Attna = |Eq|∑
i=1
βai Θ(ei) | βai = softmax(qaΘ(ei)), (5)
where Attna denotes the attention distribution calculated by query qa. Similarily, Attnt, Attn′t, β t i and βt ′ i are obtained based on queries qt and q ′ t. Temporal Reasoning. For each entity ei ∈ Eq, we calculate its contextual representation based on other entities and the mentioned time τ in q:
eti =
|Eq|∑
j=1,j ̸=i βtjΘ(ej) + γ t iΘ(ei) (6)
et ′ i =
|Eq|∑
j=1,j ̸=i βt
′ j Θ(ej) + γ t′ i Θ(ei) (7)
where eti and e t′ i denote the contextual representation of ei based on queries qt and q′t, respectively.
γti and γ t′ i are attention weights of ei, which gather the time information τ :
γti = β t i Sigmoid(Waqa)Wtqt +Θ(τ) (8)
γt ′ i = β t′ i Sigmoid(Waqa)Wt′q ′ t +Θ(τ) (9)
where Wa, Wt and Wt′ are trainable parameters. Following Mavromatis et al. (2022), we next conduct temporal reasoning by inferring the time information νi for entity ei:
R(νti ) = R(Θ(ei))⊙R(ωti)− I(Θ(ei))⊙ I(ωti) (10)
I(νti ) = R(Θ(ei))⊙ I(ωti) + I(Θ(ei))⊙R(ωti) (11)
where νti denotes the time information after reasoning based on query qt and ωti = (W t qqt) ⊙ eti. ⊙ denotes the element-wise product. eti is the conjugate vector of eti. R and I represent the real part and imaginary part of the complex embedding. Similarly, based on query q′t, ν t′ i is calculated with ωt ′ i , where ω t′ i = (W t′ q q ′ t) ⊙ et ′ i . W t q and W t′ q are trainable parameters. Answer Reasoning. We combine the reasoned temporal information νt
′ i /ν t i when token wj in q is
the entity ei through a transformer gq:
mqcls,mw1 , ...,mw|q| ← gq(h q cls, h ′ w1 , ..., h ′ w|q|) (12)
h ′ wj =
{ hwj + ν t′ i + ν t i wj = ei ∈ Eq
hwj otherwise (13)
where mqcls is utilized for final question representation that incorporates information from both TKG G and the reasoned temporal information.
In the answer reasoning step, we use the queried attention information Attna for reasoning. Specifically, various answer types are considered based on mqcls. We make the answer reasoning into four classification tasks: (1) Entity Prediction: we score each entity ϵ ∈ E with time τ mentioned in q:
se = R(< Attna,Wemqcls,Θ(ϵ),Θ(τ) >) (14)
where < ... > denotes inner product. We is the trainable parameters. Θ(ϵ) is the conjugate vector of Θ(ϵ). se ∈ R|E| represents the prediction score over all entities in G. (2) Time Prediction: we leverage max function to score each timestamp τ ∈ T with time reasoning queried attention information Attnt, Attn′t:
st = max(R(< Attna,Wτmqcls,Attnt,Θ(τ) >),
R(< Attna,Wτmqcls,Attn ′ t,Θ(τ) >))
(15)
where st ∈ R|T | denotes the prediction score over all timestamps. Wτ is the trainable parameters. (3) Boolean Prediction: we get the maximum score with time reasoning queried attention information and the time τ mentioned in q. Then, the boolean answer is obtained through projection fb:
sb = fb(max(R(< Attna,Wbmqcls,Attnt,Θ(τ) >),
R(< Attna,Wbmqcls,Attn ′ t,Θ(τ) >)))
(16)
where sb ∈ R2 is the boolean prediction score. Wb is the trainable parameters. (4) Numeric Prediction: we use the entity and time score distribution to predict numeric answer through projection fc: sc = fc([se; st]).
The model employs the softmax function to calculate the prediction probability and adopts crossentropy loss during training.

heading: 5 Experiments

heading: 5.1 Experimental Setups
text: We evaluate the performance of previous baselines and our MusTKGQA on MusTQ. Baselines. We select pre-trained language models (PLMs), traditional KGQA, and strong TKGQA models as baselines.
(1) Pre-trained language models: We include two representative PLMs BERT (Devlin et al., 2019) and RoBERTa (Liu et al., 2019) as baselines. To adopt these PLMs in TKGQA, following Saxena et al. (2021), we use PLMs to encode the questions, and then add the prediction head on the top of the question representation followed by a softmax function to make the answer prediction. We also combine the TKG information and introduce two variants for each PLM. a) RoBERTaTC and BERTTC : We obtain the TKG-enhanced question representation by concatenating question representation obtained by PLMs with the mentioned entity and timestamp embeddings in TKG. Then we acquire the fused information with projection. We calculate the prediction score of all entities and timestamps through dot-product against their TKG embeddings. For the boolean answer and numeric answer prediction, we only use projection to predict answers. Here, we use TComplEx (Lacroix et al., 2020) to obtain the TKGE. b) RoBERTaAL and BERTAL further employ our proposed sequence alignment and fact alignment.
(2) KGQA model: EmbedKGQA (Saxena et al., 2020) is a widely used KGQA model that leverages KG embeddings to perform multi-hop KGQA.
However, this model cannot model the temporal information, thus we leverage the random time embeddings when adapting this model in TKGQA.
(3) TKGQA model: CronKGQA (Saxena et al., 2021) and TempoQR (Mavromatis et al., 2022) are two strong TKGQA models that specialize in single-step temporal reasoning. The TempoQR has two versions, i.e., soft-supervision and hardsupervision. Here, we use the soft-supervision version in our baseline since it can efficient reasoning with questions including multiple entities.
Metrics. For questions with entity and time answers, we report the Hits@n to show the proportion that the golden answer is included in the top-n of the candidate list. Following Saxena et al. (2021), we report Hits@1 and Hits@10. For questions with boolean and numeric answers, we use accuracy as the evaluation metric, which is equal to Hits@1.
Implementation Details. The details of training hyper-parameters are given in Appendix D.

heading: 5.2 Results & Analyses
text: Table 6 shows the result of baselines and our model on MusTQ w.r.t different answer types. “Overall” indicates the overall performance on all questions. For EmbedKGQA, CronKGQA and TempoQR, their overall performances are not reported due to they cannot handle questions with boolean and numeric answers.
The performance of baselines. For PLM baselines, compared to the performance of original PLMs with their TKG-enhanced variants, the TKG information greatly benefits the performances of TKGQA. Additionally, equipped with our optimized TKGE, PLMs significantly improve their multi-step temporal reasoning ability. For the KGQA baseline, EmbedKGQA shows its limited ability in questions with time answers due to its unawareness of time. When answering the entityanswer questions, it could leverage the structured information between entities and achieve better results than original PLMs.
With temporal information derived from TKG, TKGQA baselines can infer temporal information and perform temporal reasoning. Both CronKGQA and TempoQR outperform EmbedKGQA by a large margin. TempoQR shows its superiority in dealing with entity-answer and time-answer questions. For example, TempoQR achieves 0.371 Hits@1, while the counterparts of EmbedKGQA and CronKGQA are 0.155 and 0.278, respectively. However, the per-
formance of TempoQR is still worse than the PLM variants. This is because TempoQR is initially for single-step temporal reasoning and models limited entity information, while the PLM variants consider all mentioned entities in question.
MusTKGQA VS. All. MusTKGQA outperforms all baselines in all answer types. It outperforms the best baseline models (i.e., BERTAL) by 0.148 Hits@1. Compared with BERTAL, MusTKGQA increases 0.148, 0.206, 0.162, 0.076 Hits@1 for entity-, time-, boolean-, and numeric-answer questions, respectively, demonstrating its effectiveness in multi-step temporal reasoning.
Fine-grained Multi-Step Reasoning Comparison. We further analyze the ability of PLMs and MusTKGQA to tackle questions with different reasoning steps. As shown in Table 7, MusTKGQA outperforms the baseline models for questions w.r.t different reasoning steps. For 4-step reasoning questions, MusTKGQA gets great improvements of 0.122 Hits@1 over the best baseline BERTAL.
Fine-grained Single-Step Reasoning Comparison. CronQuestions (Saxena et al., 2021) is a widely-used TKGQA dataset with single-step reasoning questions. We also measure the single-step
temporal reasoning performance of MusTKGQA as well as baselines on CronQuestions. As shown in Table 8, MusTKGQA outperforms all baselines, indicating its strong single-step reasoning ability.

heading: 5.3 Ablation Study
text: We introduce the following variants by moving the modules in MusTKGQA: (1) -Seq and (2) -Fact remove the sequence alignment and fact alignment in the original MusTKGQA. (3) -Seq&Fact removes both alignments. (4) MusTKGQATC replaces the TKGE module from TNTComplEx to TComplEx. Table 9 shows that two alignment tasks greatly improve the effects of MusTKGQA, and TNTComplEx could enhance the information fusion in optimization, verifying the rationality of our model.

heading: 6 Conclusion
text: We propose the first multi-step temporal reasoning TKGQA dataset, MusTQ, which constructs multi-step reasoning under the guidance of a wellestablished measure theory. MusTQ is centered on temporal reasoning and is challenging for existing TKGQA models. Further, we establish the MusTKGQA model with entity-time attention mechanism and optimized TKG representation to tackle temporal reasoning in multi-steps. Experimental results on MusTQ show that our model achieves state-of-the-art multi-step temporal reasoning performance. The results on the previous CronQuestions dataset also show the strong ability of our model.
Limitations
While we show the multi-step temporal reasoning in the MusTQ dataset, there are some limitations worth considering in future work: (1) Our MusTQ is constructed through manual templates. Though paraphrasing is used in the construction process, the dataset might be limited in linguistic diversity. (2) Following (Saxena et al., 2021), our dataset also adopts the time granularity down to the year. Thus, the dataset cannot capture the fine-grained time information with year level.
Ethical Considerations
In this section, we consider the potential ethical issues of our work. In this paper, we propose the MusTQ dataset with multi-step temporal reasoning questions and a TKG. The questions are collected via manually-constructed templates. During template collection, the salary for each human annotator is determined by the average time of annotation and local labor compensation standards. For the TKG, we use the subset of WikiData (Lacroix et al., 2020), and the corresponding license is the CC0 License, which is granted to copy, distribute and modify the contents.

heading: Acknowledgements
text: We thank the anonymous reviewers for their valuable comments. This work is supported by the National Natural Science Foundation of China (No.62072323, U21A20488, No.62102276), Shanghai Science and Technology Innovation Action Plan (No.22511104700), China Postdoctoral Science Foundation (Grant No.
2023M732563), Zhejiang Lab Open ResearchProject (No.K2022NB0AB04), the Natural Science Foundation of Jiangsu Province (Grant No. BK20210705) and Project Funded by the Priority Academic Program Development of Jiangsu Higher Education Institutions.

heading: A Base Template Construction
text: We invite five graduate students specializing in Knowledge Graphs to serve as human experts for dataset construction. Before template construction, we first provide them with an illustration of all three single-step temporal reasoning types adopted in the base template. Then we show them some example templates in existing datasets. As the examination, we ask all human experts to write three base templates for each reasoning type that query the facts with the ‘win’ relation. Based on the analysis of templates written in the examination, we put forward the following requirements for template construction:
1) The template must be a question and its statement should be fluent.
2) Each template should adopt one given singlestep temporal reasoning type and query one relation.
3) The entities and the type-specific reasoning information in the template should be annotated as corresponding slots. In detail, the head entity and tail entity should be annotated as {head} and {tail} separately. The ordinal number is represented as {ordinal}. The time difference is denoted as {diff} and the count number is shown as {count}.
Next, we ask the human experts to make templates for four frequently occurring relations Position held, Member of sports team, Nominated for, and Win based on the proposed template construction requirements. To ensure the template is satisfying, we ask all experts to vote. The template was considered desirable if more than half of the votes passed. Finally, we obtain 63 unique base templates.

heading: B Example Questions In MusTQ
text: We give some examples to show the multi-step temporal reasoning questions of MusTQ in Table 10.

heading: C TComplex & TNTComplex
text: Temporal Knowledge Graph Embedding is a method for TKG representation. For each fact (s, r, o, τ) in TKG, the entities s, o, relation r and timestamp τ are embedded as low-dimensional vectors. Lacroix et al. (2020) utilizes tensor decomposition and proposed the TComplEx and TNTComplEx based on ComplEx (Trouillon et al., 2017). ComplEx is a KG embedding methods. For each fact (s, r, o) in static KG, all entities and relation
are embeded into Complex vector space C. In detail, ComplEx represents head entity as es ∈ Cd×1, tail entity as eo ∈ Cd×1 and relation as vr ∈ Cd×1 by applying the score function ϕ(s, r, o).
ϕ(s, r, o) = R(< es,vr, eo >)
= R(
d∑
i=1
esivrieoi)
where e represents the complex conjugate of e, R denotes to adopt the real part of the complex number in the score function.
In TComplEx, the timestamp of temporal facts is also denoted as complex vector tτ ∈ Cd×1 through the score function ϕ(s, r, o, τ).
ϕ(s, r, o, τ) = R(< es,vr, eo, tτ >)
= R(< es,vr ⊙ tτ , eo >)
⊙ denotes the element-wise product. Since some facts may not be affected by time, TNTComplEx introduces the non-temporal part together with TComplEx. The score function for TNTComplEx denotes as R(< es,vr, eo, tτ > + < es,ur, eo,1 >), where ur represents the temporal agnostic relation representation.
D Implementation Details
All experiments are implemented with PyTorch (Paszke et al., 2019) on a server equipped with an Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz and a GeForce GTX 1080 Ti GPU. We adopt the dimension for TKG representation d as 512. In the experiments, we adopt the original BERT-base, RoBERTa-base, and DistillBERTbase (Sanh et al., 2019) for text semantics encoding. Same as exiting TKGQA models, we only retrieve the information embedded by the TKGE model and the LM models without further updating in MusTQ. The transformer models for both TKGE fusion and final question representation have 3 layers and 8 attention heads. We choose the Adam (Kingma and Ba, 2015) optimizer in the training process and the learning rate is 2e-5. In all, MusTQ has 120M trainable parameters and the average training time is 20 GPU hours.
The training process of the enhanced TKGE is generally the same as the original TKGE method (i.e., TNTComplEx) training process. The fivetuple and the triples would transform into the quadruples in training. Specifically, the five-tuple
knowledge could be trained by the following strategy: In the original TKGE method, for a five-tuple knowledge (s, r, o, τs, τe) the model would sample one timestamp between (τs, τe) to construct the golden quadruple (s, r, o, τsam). For the triples we construct in alignment, we leverage the dummy time embedding to fill the absent timestamp information. In answer reasoning, we would leverage the dummy time embedding to represent the embedding of time τ mentioned in question q if none is present.
We adopt the training strategy that implements all four classification tasks simultaneously to fully leverage data in the training process since there is an overlap in the types of temporal reasoning involved in the questions for each answer type. We keep the boolean prediction and numeric prediction tasks. For entity and time prediction tasks, following previous TKGQA models(Saxena et al., 2021; Mavromatis et al., 2022), we merge them by concatenating their prediction scores and calculating the answer probability over the combined scores.
Additionally, in order to obtain TKG-enhanced question representation of PLM variants, we concatenate each entity mentioned in question with the question representation obtained by PLMs and the mentioned timestamp, during which we leverage the TKG embeddings to represent the mentioned entity and timestamp. Then we fuse the information through projection and add the fusion information of each entity mentioned in question to acquire the final TKG-enhanced question representation.

heading: Future Work
text: Limitations
While we show the multi-step temporal reasoning in the MusTQ dataset, there are some limitations worth considering in future work: (1) Our MusTQ is constructed through manual templates. Though paraphrasing is used in the construction process, the dataset might be limited in linguistic diversity. (2) Following (Saxena et al. , 2021), our dataset also adopts the time granularity down to the year. Thus, the dataset cannot capture the fine-grained time information with year level. Ethical Considerations
In this section, we consider the potential ethical issues of our work. In this paper, we propose the MusTQ dataset with multi-step temporal reasoning questions and a TKG. The questions are collected via manually-constructed templates. During template collection, the salary for each human annotator is determined by the average time of annotation and local labor compensation standards. For the TKG, we use the subset of WikiData (Lacroix et al. , 2020), and the corresponding license is the CC0 License, which is granted to copy, distribute and modify the contents