Logical Neural Networks for Knowledge Base Completion with Embeddings & Rules

Prithviraj Sen, Breno W. S. R. de Carvalho, Ibrahim Abdelaziz, Pavan Kapanipathi, Salim Roukos, Alexander G. Gray

Abstract

Knowledge Base Completion (KBC) is critical for addressing the inherent incompleteness of large-scale knowledge graphs. This paper introduces a neuro-symbolic framework using Logical Neural Networks (LNNs) to learn human-interpretable first-order logic rules. By integrating the explainability of path-based rules with the predictive strength of knowledge graph embeddings (KGE), the proposed method achieves significant performance gains over traditional rule-based approaches while maintaining transparency.

Introduction

Knowledge Bases (KBs) such as Freebase and WordNet serve as foundational resources for AI applications but often suffer from missing facts. The task of Knowledge Base Completion (KBC) aims to predict these missing relations (e.g., predicting a person's citizenship based on their place of birth). Current approaches typically fall into two categories: Knowledge Graph Embeddings (KGE), which offer high accuracy but lack interpretability, and Rule-based methods, which are explainable but often less performant.

Rule-based methods are further categorized into edge-based (EB) and path-based (PB) approaches. EB methods can struggle with context, as they decompose paths into individual edges, potentially leading to incorrect inferences. PB methods are more robust but present scaling challenges.

Logical rule representation for Knowledge Base Completion

Methodology: Logical Neural Networks

The authors propose a framework based on Logical Neural Networks (LNNs). In an LNN, neural network nodes function as logical operators (e.g., AND, OR) with continuous truth values between 0 and 1. This architecture allows the logic to be differentiable and learnable via standard gradient descent.

Handling High-Arity Inputs

A significant challenge in KBC is the high "arity" of inputs—KBs often contain hundreds of relations. Standard LNN operators can become unstable when processing many inputs simultaneously. To address this, the authors introduce a weighted-sum operator ($\phi$) to pre-process inputs. This operator helps maintain a manageable "transition zone" between true and false states, preserving the model's interpretability even in complex graphs.

The weighted-sum operator (phi) for handling high-arity inputs in LNNs

EB-LNN and PB-LNN Architectures

The researchers developed specific LNN architectures to learn both edge-based and path-based rules. Furthermore, they integrated KGE scores to "bias" the LNN learning process, effectively combining the strengths of symbolic logic and vector embeddings.

Evaluation and Key Insights

The models were evaluated on four standard benchmarks: Kinship, UMLS, WN18RR, and FB15K-237. Several key insights emerged:

  • Path Integrity: Path-based (PB) rules consistently outperformed edge-based (EB) rules by approximately 40% in Mean Reciprocal Rank (MRR), confirming that preserving connection context is vital.
  • Neuro-Symbolic Synergy: The hybrid approach (PB-LNN combined with KGE) outperformed state-of-the-art rule-based baselines like NeuralLP and RNNLogic by roughly 10%. Integrating KGE scores (specifically CP-N3) provided an additional 7.5% relative improvement.
  • Interpretability: Unlike pure embedding methods, the LNN approach successfully learned complex, human-readable rules, including recursive rules for hierarchical datasets like WN18RR.

Conclusion

This work demonstrates that combining differentiable logic with knowledge graph embeddings provides a powerful and explainable solution for KBC. While challenges remain regarding scalability in extremely dense graphs and cross-lingual performance, the LNN framework represents a significant step toward unified, interpretable neuro-symbolic AI.

Summary updated

BibTeX
@inproceedings{sen2022logical,
  author = {Prithviraj Sen and Breno W. S. R. de Carvalho and Ibrahim Abdelaziz and Pavan Kapanipathi and Salim Roukos and Alexander G. Gray},
  title = {{Logical Neural Networks for Knowledge Base Completion with Embeddings \& Rules}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.255},
}
Figure