Logic Rules Powered Knowledge Graph Embedding

Pengwei Wang, Dejing Dou, Fangzhao Wu, Nisansa de Silva, Lianwen JinarXiv 2019

Abstract

Knowledge Graph Embedding (KGE) typically focuses on individual fact triples, often neglecting the rich logical structures inherent in the data. This paper introduces a novel framework that automatically mines logic rules from Knowledge Graphs and integrates them directly into the embedding process. By representing both fact triples and logic rules within a unified first-order logic (FOL) space, the authors achieve massive performance gains, most notably a 700% improvement in top-1 prediction accuracy (Hits@1) on the WN18 dataset.

Introduction

Knowledge Graph Embedding (KGE) aims to map symbolic entities and relations into continuous vector spaces to facilitate tasks like link prediction and knowledge inference. While models such as TransE have demonstrated success, they primarily model isolated "fact triples" $(h, r, t)$.

Standard Knowledge Graph triples represented as (h, r, t) tuples.

The primary limitation of these models is their failure to leverage structured background knowledge—specifically logic rules—that humans naturally use for reasoning. For instance, knowing that "Paris is the capital of France" implies "Paris is located in France." Previous attempts to incorporate such rules were hindered by manual rule selection, post-processing limitations, or disjoint semantic spaces for rules and facts. This research bridges this gap with an automated, unified approach that treats facts as simple logical implications.

Methodology

The proposed framework is a "rule-enhanced" method designed to be compatible with existing translation-based models like TransE, TransH, or TransR. The pipeline consists of three primary stages:

1. Automatic Rule Mining

Instead of relying on human experts, the system automatically mines three types of rules from the KG:

  • Inference: $r_1 \Rightarrow r_2$ (e.g., isCapitalOf $\Rightarrow$ isLocatedIn).
  • Transitivity: $(r_1 \wedge r_2) \Rightarrow r_3$ (e.g., bornIn $\wedge$ cityInCountry $\Rightarrow$ nationality).
  • Antisymmetry: $r_1 \Leftrightarrow r_2$ (e.g., hypernym is the inverse of hyponym).

Rules are assigned confidence scores based on their frequency and reliability within the dataset.

The pipeline for rule candidate extraction and scoring.

2. Unified First-Order Logic (FOL) Mapping

To ensure facts and rules are represented in the same semantic space, the authors map every triple $(h, r, t)$ to a logical implication: $r(h) \Rightarrow t$. This unification allows the model to treat a "fact" as a simplified "rule."

3. Joint Embedding and Global Loss

The framework defines algebraic operations for logical symbols (e.g., $\wedge$, $\Rightarrow$) within the vector space. A global loss function is minimized to simultaneously optimize for both original triples and the newly mined logic rules, ensuring the resulting embeddings respect both raw data and logical constraints.

Experimental Results

The model was evaluated on standard benchmarks: WN18 (WordNet), FB15K (Freebase), and FB166 (a reasoning-focused Freebase subset).

  • Precision Gains: The inclusion of logic rules significantly improved Hits@1 metrics. On WN18, TransE's Hits@1 score rose from 0.086 to 0.7013, a staggering 700% leap. This suggests that logic rules act as a "precision guide," helping the model identify exact entities rather than just general neighborhoods.
  • Comparison with State-of-the-Art: The model outperformed KALE, a previous state-of-the-art rule-based model. Unlike KALE, which only considers the truth value of a triple, this approach forces rule components to interact directly in the vector space.
  • Triple Classification: Significant gains were also observed in triple classification tasks, indicating a more robust internal representation of knowledge.

Conclusion and Future Work

This research demonstrates that automating rule mining and integrating logic into the embedding space can drastically improve KGE performance. While currently limited to three rule types and facing some computational overhead due to global loss calculations, the framework provides a scalable path forward. Future work will explore more complex logical structures and the potential for merging disparate knowledge graphs through logical consistency.

Summary updated

BibTeX
@misc{wang2019logic,
  author = {Pengwei Wang and Dejing Dou and Fangzhao Wu and Nisansa de Silva and Lianwen Jin},
  title = {{Logic Rules Powered Knowledge Graph Embedding}},
  year = {2019},
  eprint = {1903.03772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.03772},
}
Figure