Efficiently Learning Probabilistic Logical Models by Cheaply Ranking Mined Rules

Jonathan Feldstein, Dominic Phillips, Efthymia Tsamoura · DOI

Introduction

In the field of Neurosymbolic AI, researchers aim to integrate the interpretability of symbolic logic with the predictive power of neural networks. A significant bottleneck in this integration is "structure learning"—the automated discovery of logical rules from raw data. Traditionally, these rules are either handcrafted by experts or learned through computationally expensive algorithms.

Existing symbolic methods, such as Inductive Logic Programming, often fail when datasets exceed a few thousand facts. While recent differentiable or neural approaches offer some improvements, they remain constrained by massive GPU memory requirements and struggle with large-scale relational databases. This paper introduces SPECTRUM (Structural Pattern Extraction and Cheap Tuning of Rules based on Utility Measure), a framework designed to learn high-quality logical theories from millions of facts using standard hardware.

Methodology: The SPECTRUM Framework

SPECTRUM achieves its efficiency through three primary innovations:

1. Rule Utility Metric

Instead of relying on expensive "exact inference" to evaluate rule quality, SPECTRUM employs a "cheap" utility metric. This heuristic combines precision (accuracy) and recall (coverage) with two critical adjustments:

  • Symmetry Factor: Corrects for logically identical rules that appear different in graph form, ensuring useful patterns aren't discarded.
  • Complexity Factor: Implements Occam’s Razor by penalizing overly specific or long rules.

2. Linear-Time Pattern Mining

To identify candidate rules, the framework utilizes a novel algorithm that explores the data graph through parallel paths. Unlike traditional random walks, this method avoids backtracking and loops, ensuring it visits new information efficiently. The algorithm's runtime is linear relative to the number of entities in the dataset.

Graphical representation of a logical rule structure, showing the relationship between the rule body and the head.

3. Greedy Optimization

Once candidate rules are mined and ranked by the utility metric, a greedy algorithm selects the optimal subset to form the final theory. Because the utility measure is computationally inexpensive, this selection process does not become a bottleneck, even with large rule sets.

Experimental Evaluation

The authors evaluated SPECTRUM across diverse domains:

  • Knowledge Graph Completion: Benchmarks included Family, UMLS, Kinship, WN18RR, and FB15K-237.
  • Large-Scale Scalability: Tested on the Collective Activity Detection (CAD) dataset (~250k facts) and the Yelp 2020 dataset (~2.2 million facts).
  • Probabilistic Models: Evaluated using Markov Logic Networks (MLN) on IMDB and WEBKB benchmarks.

Results and Key Insights

SPECTRUM demonstrates that solving hard probabilistic inference problems is not a prerequisite for ranking useful rules; a well-constructed heuristic serves as an effective proxy.

Unprecedented Scalability and Speed

The framework's most notable achievement is its ability to scale linearly with dataset size. On the Kinship dataset, SPECTRUM completed its task in 3.9 seconds on a standard CPU, whereas the state-of-the-art neural model (NCRL) required 480 seconds on a high-end V100 GPU. Furthermore, SPECTRUM successfully processed the Yelp dataset's 2.2 million facts in approximately 6 minutes—a task that caused neural models to exceed 30GB of GPU memory.

Runtime of SPECTRUM normalized by the number of rules (M) vs. dataset size, demonstrating near-linear scalability across various benchmarks.

Accuracy and Interpretability

Despite its speed, SPECTRUM matched or exceeded the predictive accuracy (MRR and Hit@10) of neural models on nearly all benchmarks. Notably, in the CAD and Yelp experiments, the system automatically rediscovered logical rules nearly identical to those previously handcrafted by human experts.

Limitations and Future Work

While highly effective, SPECTRUM currently has some constraints:

  • Arity Restrictions: The pattern mining algorithm is limited to unary and binary relations (e.g., Friend(User1, User2)), and cannot yet handle higher-arity relations like Gave(Person, Object, Recipient).
  • Rule Shapes: The framework is optimized for specific "connected" Datalog-style rule shapes.

Future research will focus on generalizing the pattern mining to accommodate higher-arity relations and a broader variety of logical shapes. Additionally, while the current evaluation assumed noiseless data, the underlying framework is designed to be robust against mislabeled facts.

Summary updated

BibTeX
@misc{feldstein2024efficiently,
  author = {Jonathan Feldstein and Dominic Phillips and Efthymia Tsamoura},
  title = {{Efficiently Learning Probabilistic Logical Models by Cheaply Ranking Mined Rules}},
  year = {2024},
  eprint = {2409.16238},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.16238},
}
Figure