Conflict Detection for Temporal Knowledge Graphs:A Fast Constraint Mining Algorithm and New Benchmarks

Jianhao Chen, Junyang Ren, Wentao Ding, Haoyuan Ouyang, Wei Hu, Yuzhong QuarXiv 2023

TL;DR

This paper introduces PaTeCon+, an automated and highly efficient algorithm for mining temporal constraints from large-scale Knowledge Graphs (KGs). By leveraging statistical pruning and a novel entity-level confidence measure, PaTeCon+ identifies conflicting temporal facts (e.g., a person being in two places at once) significantly faster than previous methods and outperforms human-written rules in detecting real-world errors.

What Problem Does This Paper Address?

Knowledge Graphs like Wikidata and Freebase are increasingly storing "temporal facts"—events tied to specific time intervals. However, these massive datasets often contain errors and inconsistencies. Traditional conflict detection relies on human experts to manually write logical constraints (e.g., "a person cannot have two different birth dates").

This manual approach has three major flaws:

  1. Labor-Intensive: It’s impossible for humans to write rules for every possible property in a graph with millions of facts.
  2. Granularity Issues: Human rules are often too broad. For instance, a rule saying "a player can't be in two teams at once" is generally true for clubs but fails for players simultaneously on a club and a national team.
  3. Static Nature: Manual rules don't automatically update as the graph evolves.

Deep learning methods for graph completion also struggle because they lack theoretical guarantees for the consistency of the new facts they predict.

Methods

The authors propose PaTeCon+, which automates the discovery of these rules by looking for recurring structural patterns in the graph.

  • Structural Patterns: The algorithm searches for common graph motifs where temporal facts interact. For example, Pattern (a) in the figure below captures two facts sharing a single subject, which is the basis for many "disjoint" or "ordering" constraints. The common structural patterns used to identify potential temporal constraints.

  • Entity-level Confidence: Instead of just counting how many facts satisfy a rule, PaTeCon+ measures how many entities (e.g., specific people or organizations) follow the regularity. This is a stricter and more accurate way to distinguish true rules from statistical noise.

  • Two-stage Pruning (The "+" in PaTeCon+): To handle graphs with tens of millions of facts, the authors introduced a pruning strategy based on Bernoulli’s Law of Large Numbers.
  • Stage 1: It samples a small number of instances for a candidate rule; if the early confidence is very low, it stops calculating for that rule immediately.
  • Stage 2: It identifies properties that never seem to participate in useful constraints and prunes them from the search space entirely.
Figure 2: The common structural pattern of the temporal constraints illustrated in Figure 1.

Datasets

The study utilizes several datasets, including two massive new benchmarks created by the authors:

  • WD50K: A standard subset of Wikidata.
  • WD27M & FB37M: Large-scale datasets derived from Wikidata (27 million facts) and Freebase (37 million facts).
  • WD-411 & FB-128 (New Benchmarks): The authors created these by comparing old KG versions with newer ones to find facts that were deleted (likely errors) and then having experts annotate them. These provide the first real-world "ground truth" for temporal conflict detection.

Key Insights and Ideas

  • Automated Refinement: PaTeCon+ can automatically discover the nuances that humans miss. While a human might write a coarse rule about sports teams, PaTeCon+ can refine it to specify that the constraint only applies to "national association football teams," thus avoiding false positives for club/national team overlaps. An example of a refined constraint mined by PaTeCon+ that includes specific class restrictions.

  • Statistical Efficiency: The "aha moment" here is that you don't need to check every single instance to know a rule is bad. By using statistical sampling, the algorithm can discard 90% of useless candidates almost instantly.

  • Consistency as a Filter: The mined constraints can be used as a post-processing filter for deep learning models. If a model predicts a new fact that violates a high-confidence mined constraint, that prediction can be automatically downranked or rejected.
An example of a refined constraint mined by PaTeCon+ that includes specific class restrictions.

Key Results

  • Massive Speedup: On the FB37M dataset, PaTeCon+ reduced the running time from nearly 3 hours to just 25 minutes—an 86% improvement over the original version.
  • Superior Detection: Mined constraints achieved a recall of 51.34% on the WD-411 error benchmark, more than doubling the 23.11% recall achieved by state-of-the-art hand-crafted rules.
  • Model Enhancement: When used to filter predictions from temporal KG completion models (like TiRGN), the constraints consistently improved the accuracy (MRR and Hit@1) of the results.

Limitations and Future Work

The authors acknowledge that their current structural patterns are relatively simple, involving at most two subjects. Future work could expand these to multi-subject patterns for more complex social or historical constraints.

Additionally, the current system uses qualitative predicates (like "before" or "disjoint"). The authors suggest that adding quantitative constraints (e.g., "a person's professorship must start at least 15 years after their birth") would further improve the precision of conflict detection. Finally, exploring a "human-in-the-loop" approach where experts verify the most promising mined rules could provide the best of both worlds: automation and nuance.

Summary updated

BibTeX
@misc{chen2023conflict,
  author = {Jianhao Chen and Junyang Ren and Wentao Ding and Haoyuan Ouyang and Wei Hu and Yuzhong Qu},
  title = {{Conflict Detection for Temporal Knowledge Graphs:A Fast Constraint Mining Algorithm and New Benchmarks}},
  year = {2023},
  eprint = {2312.11053},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.11053},
}
Figure