Source-linked AI summary

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

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

arXiv:2112.08025v2cs.LGcs.AI

TL;DR

Link forecasting on temporal knowledge graphs requires predicting events at future timestamps while retaining understandable reasoning. TLogic mines temporal logical rules from temporal random walks, achieving better overall benchmark performance and explicit, time-consistent explanations. Its conclusion also identifies acyclic rules and more sophisticated walk sampling as future improvements.

  • Problem

    Link forecasting seeks to predict future events in temporal knowledge graphs, while existing embedding methods often lack explainability and comprehensible reasoning chains.

  • Method

    TLogic automatically mines cyclic temporal logical rules from temporal random walks and applies them to forecast links using prior observed events.

  • Results

    TLogic achieves better overall performance than state-of-the-art baselines on three benchmark datasets and provides explicit, time-consistent, human-readable explanations.

  • Takeaways & Limitations

    TLogic transfers learned rules to related datasets with a common vocabulary in the inductive setting.

  • Takeaways & Limitations

    Future work should consider acyclic rules and more sophisticated temporal-walk sampling to identify promising walks.

Abstract

from arXiv · show

Conventional static knowledge graphs model entities in relational data as nodes, connected by edges of specific relation types. However, information and knowledge evolve continuously, and temporal dynamics emerge, which are expected to influence future situations. In temporal knowledge graphs, time information is integrated into the graph by equipping each edge with a timestamp or a time range. Embedding-based methods have been introduced for link prediction on temporal knowledge graphs, but they mostly lack explainability and comprehensible reasoning chains. Particularly, they are usually not designed to deal with link forecasting -- event prediction involving future timestamps. We address the task of link forecasting on temporal knowledge graphs and introduce TLogic, an explainable framework that is based on temporal logical rules extracted via temporal random walks. We compare TLogic with state-of-the-art baselines on three benchmark datasets and show better overall performance while our method also provides explanations that preserve time consistency. Furthermore, in contrast to most state-of-the-art embedding-based methods, TLogic works well in the inductive setting where already learned rules are transferred to related datasets with a common vocabulary.

Introduction

Temporal knowledge graphs attach timestamps to relational facts, enabling forecasting of future links. TLogic addresses this task with automatically mined temporal rules that provide interpretable, time-consistent explanations.

  • Temporal Knowledge Graphs: Temporal KGs extend entity-relation triples with timestamps or time ranges representing when events occur.This work focuses on graphs whose edges have single timestamps.
  • Forecasting Task: Link forecasting predicts object candidates for queries whose timestamps were not seen during training.The task supports applications including clinical decision support, supply chain management, and extreme-events modeling.
  • Motivation: Embedding-based temporal methods learn complex event patterns but often lack transparency and interpretability.Their low-dimensional representations make the reasoning behind predictions difficult to understand.
  • Motivation: Logical rules can provide human-understandable explanations, but manual rule creation faces a knowledge acquisition bottleneck and symbolic methods may not scale.Domain experts may struggle to formalize complex event conditions sufficiently for rule construction.
  • TLogic: TLogic automatically mines cyclic temporal logical rules from temporal random walks to support link forecasting.The framework is presented as a symbolic approach that produces explicit explanations and is evaluated on three benchmark datasets.

Related Work

Prior temporal KG methods combine embeddings, symbolic rules, or random walks, but limitations remain in interpretability, inductive generalization, temporal expressiveness, and forecasting support.

  • Embedding-Based Methods: Embedding methods incorporate timestamps into entity or relation representations, but their black-box predictions are difficult for humans to understand.Shallow embeddings are also described as unsuitable for inductive settings with unseen entities, relations, or timestamps.
  • Forecasting Methods: Only CyGNet, RE-Net, and xERTE among the cited methods are designed for forecasting, while xERTE also extracts explanations.The passage contrasts forecasting-oriented methods with approaches developed for temporal link prediction more generally.
  • Symbolic Methods: Symbolic KG methods mine logical rules for link prediction, but StreamLearner restricts temporal rules to body atoms sharing one timestamp.StreamLearner generalizes rules generated by a static rule learner to the temporal domain.
  • Random-Walk Approaches: Random-walk approaches can support interpretable explanations, yet dynnode2vec and change2vec do not capture temporal patterns within their walks.These methods alternately sample walks on temporal KG snapshots and learn node-embedding parameters.

Preliminaries

The paper formalizes temporal KGs, forecasting queries, temporally constrained random walks, and cyclic temporal rules. TLogic learns rules from sampled walks and applies them using confidence and temporal proximity.

  • Temporal Knowledge Graph: A temporal KG is a collection of quadruples (es, r, eo, t), where t records when the relational event occurs.Entities, relations, and timestamps are represented by the sets E, R, and T.
  • Temporal Ordering: Temporal ordering uses t < ˆt for earlier timestamps and t ≤ ˆt when equal timestamps are permitted.These relations define the temporal comparisons used by the framework.
  • Link Forecasting: Link forecasting ranks object candidates for a query (es, r, ?, t) at a previously unseen timestamp.Subject prediction is converted into an inverse-relation query (eo, r−1, ?, t).
  • Temporal Random Walk: A temporal random walk traverses edges backward in time, allowing transitions at the same timestamp.The walk is represented as a sequence of temporally ordered edges and uses inverse relations to move in both directions.
  • Temporal Logical Rules: A cyclic temporal rule connects the same endpoint variables through a head walk and a body conjunction, implying a future head event when the body holds.Grounding replaces variables with constants, and all groundings must satisfy the temporal constraints.
  • Rule Learning: Rule learning samples temporal random walks for chosen lengths and transition distributions, transforms them into rules, and estimates their confidence.The algorithm takes a temporal KG, rule lengths, walk count, and either uniform or exponential transitions as inputs.

Our Framework

TLogic learns temporal logical rules from sampled temporal walks and applies them to forecast future links with human-readable explanations. Its rule application enforces temporal consistency, ranks candidates using rule confidence and recency, and supports transfer across related datasets sharing a vocabulary.

  • Rule Learning: TLogic extracts temporal walks and lifts them into temporal rules that generalize to new data, using body groundings as explicit explanations.Rule learning and rule application are the framework’s two main components.
  • Rule Learning: Temporal walks begin with a sampled rule-head edge, continue through adjacent edges, and obey backward-in-time constraints while optionally forming cyclic walks.The final transition attempts to connect the walk back to its first entity when possible.
  • Rule Learning: The learned rules replace entities and timestamps with variables, preserve repeated entities, and impose nondecreasing body times before the future head timestamp.The consistency constraints are T1 ≤ T2 ≤· · · ≤ Tl < Tl+1.
  • Rule Learning: Rule confidence is estimated from sampled body groundings, using body support and rule support to assess how often the rule body corresponds to a head relation.Rules can be learned for selected relations or all relations, and are collected by relation and rule length.
  • Rule Application: For a query, TLogic searches a prior time-window subgraph, retrieves candidates from matching body groundings, and applies rules in decreasing confidence until enough candidates are found.With an infinite window, all facts before the query timestamp are used.
  • Inductive Setting: Rules can transfer to related datasets with a common vocabulary, enabling inductive application beyond the graph from which they were learned.When rules or matching groundings are unavailable, TLogic uses an object-distribution baseline for candidate retrieval.
  • Candidate Ranking: Candidate scores combine rule confidence with an exponential function of the time gap to the query, favoring high-confidence rules and recent groundings.If several groundings exist, the grounding whose earliest body timestamp is closest to the query is used.

Experiments

Experiments evaluate TLogic on three ICEWS link-forecasting benchmarks, showing strong overall performance, time-consistent explanations, inductive transfer, and sensitivity to walk sampling and scoring choices.

  • Benchmark results: TLogic outperforms all baselines on MRR, hits@3, and hits@10, while xERTE leads hits@1 on ICEWS18 and ICEWS0515.Results use time-aware filtering across ICEWS14, ICEWS18, and ICEWS0515.
  • Explanations: TLogic supplies temporal rules and graph walks as explicit, human-readable, time-consistent explanations for predictions.For the query about Angela Merkel consulting, two walks support the correct answer Barack Obama.
  • Inductive setting: Transferred TLogic rules retain performance close to the standard setting across metrics, including transfer to ICEWS18 with many new entities and timestamps.The comparison transfers rules between ICEWS datasets; AnyBURL drops significantly, especially on ICEWS18.
  • Number of walks: MRR increases with more sampled walks but gains become small between 100 and 200 walks.This analysis uses the ICEWS14 validation set.
  • Transition distribution: Exponential transition sampling consistently exceeds uniform sampling in MRR by favoring temporally close events during walk extraction.With 200 walks, exponential sampling produces 11,718 length-3 rules versus 8,550 for uniform, while uniform produces more length-1 rules.
  • Rule application: Using all rule lengths yields MRR 0.4373, and combining rule confidence with time difference outperforms either scoring component alone.Confidence-only scoring gives MRR 0.3869, while exponential-time-only scoring gives 0.4077.

Conclusion

TLogic applies temporal logical rules learned from temporal knowledge graphs to forecast links, while producing time-consistent, explicit, human-readable explanations. The authors report better overall performance than state-of-the-art baselines and identify acyclic rules and improved walk sampling as future directions.

  • TLogic learns temporal logical rules directly from temporal knowledge graphs and applies them to link forecasting.
  • Experiments on three datasets indicate better overall performance than state-of-the-art baselines.
  • The framework provides time-consistent, explicit, and human-readable explanations in the form of temporal logical rules.
  • Future work includes integrating acyclic rules and replacing simple temporal-walk sampling with a more sophisticated approach.

Supplementary Material

Supplementary experiments examine datasets, hyperparameters, sampling, rule lengths, time windows, scoring, rule counts, and computational complexity. They generally favor more walks, exponential transition sampling, all rule lengths, larger time windows, and combined scoring, while exposing a limitation of cyclic-only rules for length 2.

  • Time window: Larger time windows generally improve performance, although memory constraints can require reducing the window.
  • Score function: Combining rule confidence with the exponential time-difference component yields the best overall scoring performance, with the balance depending on the application and metric priorities.
  • Rule learning: The exponential transition distribution produces more longer rules, whereas uniform sampling explores neighborhoods better for shorter walks.
  • Training and inference time: Rule learning has worst-case complexity O(|R|nlDb), while inference has worst-case complexity O(|G| + |T Rrq|DL|E| log(k)).
Loading 2112.08025v2…