Perform Like an Engine: A Closed-Loop Neural-Symbolic Learning Framework for Knowledge Graph Inference

Guanglin Niu, Bo Li, Yongfei Zhang, Shiliang Pu · DOI

Abstract

Knowledge graph (KG) inference aims to address the natural incompleteness of KGs, including rule learning-based and KG embedding (KGE) models. However, the rule learning-based models suffer from low efficiency and generalization while KGE models lack interpretability. To address these challenges, we propose a novel and effective closed-loop neural-symbolic learning framework EngineKG via incorporating our developed KGE and rule learning modules. KGE module exploits symbolic rules and paths to enhance the semantic association between entities and relations for improving KG embeddings and interpretability. A novel rule pruning mechanism is proposed in the rule learning module by leveraging paths as initial candidate rules and employing KG embeddings together with concepts for extracting more high-quality rules. Experimental results on four real-world datasets show that our model outperforms the relevant baselines on link prediction tasks, demonstrating the superiority of our KG inference model in a neural-symbolic learning fashion.

Introduction

Knowledge Graphs (KGs) serve as the foundation for critical AI applications, including search engines and recommendation systems. Despite their utility, KGs are inherently incomplete. Current research typically bifurcates into two paradigms: symbolic rule learning and Knowledge Graph Embeddings (KGE). Rule learning offers high interpretability through logical patterns but struggles with generalization and computational efficiency. Conversely, KGE models map entities into continuous vector spaces, providing high efficiency and generalization but operating as "black boxes" lacking explanatory power.

EngineKG addresses this gap by creating a closed-loop neural-symbolic framework. It treats KG completion as a cyclical process, where embeddings and rules iteratively improve one another, combining the generalization of deep learning with the transparency of symbolic logic.

The EngineKG Framework

The core of EngineKG is a framework that mimics the cycle of an internal combustion engine, consisting of four distinct "strokes":

  1. Intake Stroke: Symbolic rules and existing paths are injected into the system to guide initial learning.
  2. Compression Stroke: The KGE module compresses graph data into low-dimensional embeddings. Unlike standard models, it uses a joint logic and data-driven representation, learning from both raw triples and logical paths.
  3. Expansion Stroke: The rule learning module mines new, high-quality rules. To manage the search space, it employs two pruning filters: Embedding-based Semantic Relevance (checking if rule bodies and heads are semantically related via vectors) and Concept-based Co-occurrence (using the KG's ontology to ensure rules are logically sound).
  4. Exhaust Stroke: The rule set is updated with newly discovered rules, which are then recycled into the next iteration's Intake stroke.
The EngineKG framework mimics a four-stroke engine cycle to iteratively refine embeddings and rules.

Experimental Evaluation

The model was evaluated on four standard datasets: FB15K, FB15K237, NELL-995, and DBpedia-242. These datasets represent a variety of scales and ontological structures, with DBpedia-242 specifically allowing for the testing of concept-based pruning.

Key Results and Performance

EngineKG consistently outperformed traditional KGE models (such as TransE and RotatE) and previous neural-symbolic hybrids like IterE.

  • Accuracy: On the FB15K237 dataset, EngineKG achieved a Mean Reciprocal Rank (MRR) of 0.555, a significant improvement over the previous state-of-the-art baseline of 0.443.
  • The Power of the Loop: A critical insight is that performance improves steadily as the model iterates. As shown in the performance metrics across datasets, the closed-loop system allows the embeddings to provide a "soft" semantic filter that makes "hard" symbolic rule mining more efficient and accurate over time.
Performance metrics (MRR, Hits@10, Hits@1) across four datasets improve steadily over iterations of the closed-loop process.
  • Efficiency and Interpretability: The rule mining process is significantly faster than traditional tools; for instance, on NELL-995, EngineKG generated rules in 1.55 seconds compared to 5.35 seconds for AMIE+. Furthermore, the model provides a "trace" for its predictions, allowing users to see the specific logical rules and paths that led to a predicted link.

Conclusion

EngineKG demonstrates that embeddings and symbolic rules should not just coexist but should actively iterate in a closed loop. By using paths as candidate rules and leveraging ontology as a guardrail, the framework achieves state-of-the-art results in link prediction while maintaining interpretability. Future work will explore applying this logic to dynamic KGs and incorporating textual descriptions to further refine entity embeddings.

Summary updated

BibTeX
@inproceedings{niu2022perform,
  author = {Guanglin Niu and Bo Li and Yongfei Zhang and Shiliang Pu},
  title = {{Perform Like an Engine: A Closed-Loop Neural-Symbolic Learning Framework for Knowledge Graph Inference}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
}
Figure