Introduction
Knowledge Graphs (KGs) serve as the backbone for many AI applications, representing facts as triples (e.g., China — Intend to cooperate — Japan). However, real-world information is rarely static. Temporal Knowledge Graphs (TKGs) address this by adding a timestamp to each fact, capturing how relationships evolve over time. Despite their utility, TKGs are often incomplete. The task of predicting these missing facts is known as Temporal Knowledge Graph Completion (TKGC).
While previous research has attempted to model temporal dynamics, existing methods often struggle to capture the full "contextual" picture. They frequently fail to simultaneously model structural context (concurrent events) and temporal context (the chronological sequence of events). To bridge this gap, researchers have introduced SToKE (Structural and Temporal Contextualized Knowledge Embeddings), a novel framework that repurposes Pre-trained Language Models (PLMs) like BERT for graph-based reasoning.
Methodology: The SToKE Framework
SToKE treats TKGC as a "fill-in-the-blank" problem, leveraging the powerful contextual modeling capabilities of Transformers. The core innovation lies in how graph data is restructured for sequential processing.
The Event Evolution Tree (EET)
Because Transformer models are designed for sequences rather than graphs, SToKE introduces the Event Evolution Tree (EET). This structure organizes a query's local neighborhood into a hierarchical format. The "Trunk" represents the subject entity, while "Branches" represent specific facts occurring at different timestamps. The "Root-to-Crown" axis effectively maps the flow of time, allowing the model to see how a subject's relationships evolve.
Structural and Temporal Encoding
To refine this representation, SToKE employs two specialized mechanisms:
- Temporal Position Embeddings: Instead of standard sequential position IDs, SToKE uses embeddings that represent the actual temporal distance from the query time. This helps the model distinguish between an event that happened yesterday and one that happened a year ago.
- Structural Matrix (Attention Mask): To manage "knowledge noise," a custom attention mask ensures that entities only attend to relevant context—specifically, other entities within the same fact (branch) or the same subject (trunk). This keeps the self-attention mechanism focused on meaningful dependencies.
Experimental Evaluation
SToKE was evaluated on three major TKG benchmarks: ICEWS14, ICEWS05-15 (political event datasets), and GDELT (a massive, noisy dataset of global news events). These datasets vary significantly in density and scale, providing a robust test for the model's versatility.
Key Results
SToKE achieved state-of-the-art (SOTA) performance across all benchmarks, consistently outperforming both traditional embedding-based models and recent Graph Neural Network (GNN) approaches.
On the challenging GDELT dataset, SToKE showed a significant improvement, raising the Mean Reciprocal Rank (MRR) by 5.4% and Hits@1 (top-1 accuracy) by 7.8% over previous best-performing models. Ablation studies confirmed that both structural and temporal contexts are vital; removing either component led to a marked decrease in prediction accuracy.
Conclusion and Future Work
SToKE demonstrates that repurposing PLMs for temporal graph reasoning is highly effective when the structural and temporal hierarchies are properly preserved. By treating the subject entity as a "bridge" for information flow across time, the model achieves a more human-like understanding of event evolution.
Currently, the model is limited to "one-hop" neighbors—entities directly connected to the subject. Future research may explore extending the EET to capture multi-hop paths, allowing the model to reason over more complex, indirect causal relationships in global events.
Summary updated