arXiv:2610.33473cs.IROct 2026

Manuscript Offprint

arXiv:2610.33473

DyHist: Query-Aware Historical Dynamics Modeling for Temporal Knowledge Graph Extrapolation

Peiyuan Jiang, Yao Liu, Yubo Wen, Yanglei Gan, Lu Liu, Ruojie Zhang, Jiaye Yang, Yuewei Xue, Jiaya Deng, Xiaogu Guo, Qiao Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Temporal Knowledge Graph (TKG) extrapolation aims to predict future facts from observed historical events. Existing methods usually achieve this goal by jointly modeling local historical evolution and long-range historical contexts. First, local evolution modeling often summarizes local history into an overall evolving representation, where query-relevant local deviations may not be sufficiently exploited as useful predictive features. Second, existing long-range history modeling often treats historical recurrence as a stable cue, while overlooking that its reliability may vary across relations and recent contexts. To address these issues, we propose DyHist, a query-aware historical dynamics modeling framework for TKG extrapolation. DyHist captures local dynamics by separating recent evidence from medium-range context and explicitly modeling their query-relevant deviations as predictive features. It further uses a relation-aware historical prior to calibrate candidate scores with time-decayed support, recent trends, and relation-specific strength, enabling recurrence signals to contribute differently across relations and recent contexts. Experiments on four benchmarks show that DyHist achieves the best MRR against recent baselines. Code is available at https://github.com/PANPANKK/DyHist.

1 Introduction

Knowledge Graphs (KGs) represent facts as triples (s,r,o)(s, r, o), but many real-world facts evolve over time (Sun et al., 2020; Wang et al., 2021; Xu et al., 2023). Temporal Knowledge Graphs (TKGs) therefore extend triples into timestamped facts (s,r,o,t)(s, r, o, t), enabling reasoning over time-dependent facts (Zhu et al., 2021). TKG reasoning includes interpolation over observed timestamps and extrapolation to future timestamps. This paper focuses on extrapolation, which is important for early warning and decision-making (Li et al., 2021a).

Accurate TKG extrapolation relies on deeply exploiting historical facts. Given a future query (s,r,?,t)(s, r, ?, t), the model needs to infer the missing object by exploiting historical dependencies among entities and relations. Existing methods have improved this task by modeling both short-term local evolution and long-range historical recurrence (Li et al., 2022a; Chen et al., 2024c; Tang et al., 2025). For short-term local history modeling, existing methods typically encode adjacent historical snapshots with GNN-based spatial encoders and recurrent or attention-based temporal modules to capture short-range structural evolution. Beyond adjacent-snapshot encoding, recent methods further enhance local history modeling with query-related paths, subgraphs, neighborhoods, or high-order structural associations (Han et al., 2021; Chen et al., 2025; Zhang et al., 2023; Ahrabian et al., 2026). For long-range history modeling, existing methods exploit distant historical facts mainly from two perspectives. Some methods extract explicit recurrence signals from historical candidates, occurrence records, or frequency statistics, while others encode query-related global contexts to capture implicit long-range dependencies (Zhu et al., 2021; Xu et al., 2023; Ye et al., 2026). Despite these advances, existing methods still have two limitations in historical information utilization. First, local history is usually encoded into a unified evolving representation through graph-based message passing and recurrent temporal aggregation. Although this captures the overall temporal evolution, the difference between earlier context and recent evidence is usually only implicitly fused into the evolving state, rather than being explicitly modeled as a predictive signal. As illustrated in Figure 1, Oman mainly appears in earlier local snapshots, whereas Djibouti becomes more prominent in recent snapshots. Compressing the whole local sequence into a unified representation may obscure such query-relevant shifts between earlier context and recent evidence.

Figure

Figure 1: Illustration of local historical evidence for the query (Iran, Engage in diplomatic cooperation, ?, t). Red links denote Oman as medium-range contextual evidence, while green links denote Djibouti as more recent evidence near the query time.

Second, existing long-range history modeling often exploits repeated co-occurrence as recurrence evidence, while underexploring how its reliability may vary across relations and recent contexts. For relatively stable relations such as Cooperate, recurrence may provide useful cues due to persistent diplomatic or economic ties. For more event-driven relations such as Accuse or Make statement, however, candidate entities may shift with recent events, making recurrence less consistently reliable.

To address these issues, we propose DyHist, a query-aware framework for modeling historical dynamics in TKG extrapolation. DyHist models historical dynamics from both local and long-range perspectives. For local history, DyHist uses query-aware snapshot descriptors to adaptively select non-overlapping recent evidence and medium-range context. The selected evidence is fused into a broader local historical context, which is then compared with the latest short-term evidence. DyHist explicitly models their deviation through fast-slow residual injection with a learned gate, allowing query-relevant recent changes to complement the overall local representation. For long-range history, DyHist introduces a relation-aware historical prior to calibrate candidate scores. For each candidate entity, the prior aggregates previous occurrences of the complete fact (s,r,o)(s, r, o) with temporal decay, measures whether its historical support has recently increased, and scales the resulting recurrence evidence with a learnable relation-specific strength. The main contributions of this paper are as follows:

• We propose DyHist, a query-aware historical dynamics modeling framework for TKG extrapolation that jointly models recent evidence, medium-range context, and long-range historical recurrence for more accurate future fact prediction.

• We introduce query-aware dual-window selection and fast-slow residual injection for local history modeling. The model adaptively selects non-overlapping query-relevant recent and medium-range evidence and explicitly captures the deviation between the latest short-term evidence and the broader local historical context.

• We introduce a relation-aware dynamic historical prior that calibrates candidate scores using time-decayed complete-fact recurrence, recent support trends, and learnable relation-specific strength. Extensive experiments on four datasets demonstrate the effectiveness of DyHist.

References (30)