Abstract
Inductive logic reasoning is a fundamental task in graph analysis, which aims to generalize patterns from data. This task has been extensively studied for traditional graph representations, such as knowledge graphs (KGs), using techniques like inductive logic programming (ILP). Existing ILP methods assume learning from KGs with static facts and binary relations. Beyond KGs, graph structures are widely present in other applications such as procedural instructions, scene graphs, and program executions. While ILP is beneficial for these applications, applying it to those graphs is nontrivial: they are more complex than KGs, which usually involve timestamps and n-ary relations, effectively a type of hypergraph with temporal events. In this work, we propose temporal inductive logic reasoning (TILR), an ILP method that reasons on temporal hypergraphs. To enable hypergraph reasoning, we introduce the multi-start random B-walk, a novel graph traversal method for hypergraphs. By combining it with a path-consistency algorithm, TILR learns logic rules by generalizing from both temporal and relational data. To address the lack of hypergraph benchmarks, we create and release two temporal hypergraph datasets: YouCook2-HG and nuScenes-HG. Experiments on these benchmarks demonstrate that TILR achieves superior reasoning capability over various strong baselines.
Introduction
Most modern AI reasoning happens on Knowledge Graphs (KGs), which typically represent facts as simple binary relations: Subject → Predicate → Object (e.g., "Alice is the daughter of Bob"). However, the real world is rarely that simple. Real-world events often involve multiple entities interacting over specific durations. For instance, a cooking recipe involves mixing several ingredients simultaneously, and the sequence of these actions is governed by temporal intervals rather than discrete timestamps.
The Challenge of N-ary and Temporal Relations
Current Inductive Logic Programming (ILP) methods face two major gaps when dealing with complex real-world data:
- N-ary Relations: Many events involve more than two entities. "Mixing onion, garlic, and oil" is a single action involving three "heads" and one "tail" (the mixture). This requires a hypergraph where edges can connect any number of nodes.
- Time Intervals: Standard temporal graphs often use single time points. However, real-world events have durations. "Sautéing onions" happens during a specific interval, and its relationship to other events (before, during, or overlapping) is crucial for understanding the logic of a process.
Existing methods that attempt to simplify these structures into standard graphs lose vital information, leading to "lossy" reasoning.
Methodology: TILR and B-Walks
The researchers introduced TILR (Temporal Inductive Logic Reasoning), a framework designed to learn interpretable logic rules from temporal hypergraphs. TILR incorporates three key innovations:
Multi-start Random B-walk (MRBW)
In a standard graph, a random walk moves from one node to another. In a hypergraph, a transition might require "collecting" several nodes before moving across a hyperedge. TILR utilizes "B-connectivity," a constraint where a transition only occurs if all required head nodes have been visited. This models processes like recipes perfectly: you cannot "mix" ingredients that haven't been gathered yet.
Temporal Interval Algebra and Path-Consistency
Instead of simple timestamps, TILR incorporates Allen’s interval algebra, allowing the model to understand 13 distinct temporal relationships (e.g., Before, Meets, Overlaps, During). To ensure these learned rules are logically sound over time, a Path-Consistency Algorithm enforces temporal transitivity (e.g., if A is before B and B is before C, then A must be before C).
Datasets and Evaluation
To evaluate TILR, the authors released two new benchmarks:
- YouCook2-HG: Recipes represented as sequences of n-ary actions with specific time intervals.
- nuScenes-HG: Autonomous driving data involving complex spatial-temporal interactions between vehicles and pedestrians.
TILR was compared against traditional ILP baselines (NeuralLP, DRUM) and Graph Neural Networks (GNNs) using "clique expansion."
Key Results
TILR demonstrated superior reasoning capability:
- Accuracy: On YouCook2-HG, the differentiable TILR model ($TILR_\theta$-PC) achieved an MRR of 0.72, significantly outperforming traditional ILP (0.40) and GNNs (0.37).
- Interpretability: Unlike "black-box" models, TILR produces human-readable rules. It can explicitly state: "To make an Onion Ring, first Remove layers, then Cut the onion, then Mix with flour, then Put in the fryer."
- Structural Integrity: Converting a hypergraph to a standard graph (clique expansion) resulted in a performance drop of up to 30%, confirming that n-ary structures contain essential logic.
Conclusion
TILR represents a significant step forward in AI logic, moving beyond binary relations to capture the multi-entity, temporal nature of the real world. By preserving the "higher-order" truth of hypergraphs, it provides a more robust and interpretable backbone for reasoning in complex domains like robotics and procedural understanding.
Summary updated