TLogic: Temporal Logical Rules for Explainable Link Forecasting on Temporal Knowledge Graphs

Yushan Liu, Yunpu Ma, Marcel Hildebrandt, Mitchell Joblin, Volker Tresp

Introduction

Knowledge Graphs (KGs) represent facts as triples, such as (Angela Merkel, visit, China). However, real-world events are inherently temporal, occurring at specific timestamps. Predicting future events in these Temporal Knowledge Graphs (TKGs)—a task known as link forecasting—is crucial for various applications. While existing embedding-based methods achieve high accuracy, they often function as "black boxes" and struggle with inductive reasoning when new entities appear. TLogic addresses these challenges by automatically mining human-readable temporal logical rules from historical data.

Methods

TLogic employs a symbolic reasoning approach rather than complex neural architectures. The framework operates in two distinct phases:

  1. Rule Learning via Temporal Random Walks: TLogic explores the TKG by performing random walks backward in time from known facts. By observing recurring sequences of relations, it "lifts" specific paths into generalized logical rules. For instance, a rule might suggest that a phone discussion often precedes a formal consultation.
  2. Rule Application and Scoring: To forecast a future event, TLogic identifies historical instances that satisfy the "body" of its learned rules. Potential answers are ranked using a scoring function that integrates rule confidence with a time-decay factor, prioritizing more recent historical evidence.

The explainability of this approach is a core feature. Unlike latent embeddings, TLogic provides the specific historical paths (walks) that justify each prediction.

Table of learned temporal rules with their associated confidence scores and logical bodies.

Datasets

The performance of TLogic was evaluated on three standard benchmarks derived from the International Crisis Early Warning System (ICEWS) dataset:

  • ICEWS14: Events from the year 2014.
  • ICEWS18: Events from the year 2018.
  • ICEWS0515: A comprehensive decade-long span from 2005 to 2015. These datasets provide a rigorous testing ground for daily-resolution temporal link prediction.

Key Results and Insights

TLogic demonstrates state-of-the-art (SOTA) performance across multiple metrics. On the ICEWS14 dataset, it achieved a Mean Reciprocal Rank (MRR) of 0.4304, significantly outperforming existing models like RE-Net and xERTE.

Comparison of TLogic against various baseline and state-of-the-art models across three ICEWS datasets.

Beyond raw accuracy, several key insights emerged:

  • Inductive Capability: Because TLogic learns rules based on relations rather than specific entity embeddings, it can be applied to new entities or even different time periods without retraining.
  • Efficiency: The rule-learning process is highly efficient; for ICEWS14, it required only 180 seconds on a standard 8-CPU machine.
  • Temporal Consistency: By enforcing a strict backward-in-time constraint on random walks, TLogic ensures that its reasoning respects causality.

Conclusion

TLogic represents a significant step forward in making temporal link forecasting both accurate and interpretable. By combining symbolic logic with temporal random walks, it provides a robust, inductive framework that matches or exceeds the performance of "black-box" deep learning models while offering clear explanations for its predictions. Future work may explore the integration of acyclic rules and more sophisticated sampling techniques to further enhance rule discovery in massive graphs.

Summary updated

BibTeX
@inproceedings{liu2022tlogic,
  author = {Yushan Liu and Yunpu Ma and Marcel Hildebrandt and Mitchell Joblin and Volker Tresp},
  title = {{TLogic: Temporal Logical Rules for Explainable Link Forecasting on Temporal Knowledge Graphs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i4.20330},
}
Figure