NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Effect of Rule Injectionin a Leakage Free Dataset

Mirza Mohtashim Alam, Mojtaba Nayyeri, Chengjin Xu, Md. Rashad Al Hasan Rony, Hamed Shariat Yazdi, Afshin Sadeghi, Jens LehmannKR4L@ECAI 2020

Abstract

This paper investigates the impact of injecting logical rules into Knowledge Graph Embedding (KGE) models. While such injections typically enhance performance on standard benchmarks, the authors reveal that much of this success is attributable to data leakage. By evaluating models on "leakage-free" datasets, the study demonstrates that even with logical rules, KGE models face significant challenges when trivial relational patterns are removed, suggesting that current models rely more on pattern matching than deep reasoning.

Introduction

Knowledge Graphs (KGs) store facts as triples, such as (Helsinki, isCapitalOf, Finland). To utilize these graphs in AI applications, Knowledge Graph Embedding (KGE) models map entities and relations into a continuous vector space. Despite their popularity, these models face two major hurdles:

  1. Relational Blindness: Standard models often fail to capture inherent logical patterns, such as symmetry (if A is married to B, B is married to A).
  2. The Leakage Illusion: Popular benchmarks like FB15k and WN18 are heavily "leaky," containing test triples whose inverses are already present in the training set. This allows models to achieve high scores by simple pattern flipping rather than true understanding.

Methodology

The researchers developed a multi-stage pipeline to address these issues through rule injection. The process begins with Rule Extraction using AMIE+, a tool that identifies logical patterns like implication, symmetry, inversion, and equivalence. These abstract rules are then grounded by instantiating them with concrete entity pairs from the dataset.

The rule extraction and grounding pipeline using AMIE+.

Finally, these groundings are used to modify the loss functions of models like TransE and RotatE. This "Rule Injection" forces the model's vector space to respect logical constraints. To test the true generalization of these models, the authors also created "leakage-free" datasets by removing triples that could be trivially inferred from the training data.

Data Leakage and Benchmarking

The study quantified the extent of leakage in industry-standard sets, finding that a staggering 71% of FB15k and 93% of WN18 test triples were leaked. This high degree of redundancy suggests that many reported KGE performance metrics may be misleading.

Key Results and Discussion

Empirical results show that while rule injection provides a significant boost on standard (leaky) datasets, it cannot fully compensate for the removal of leaked data. For example, on the standard WN18 set, RotatE's Hits@10 improved from 0.8171 to 0.9262 with rule injection. However, when evaluated on leakage-free data, performance across all models dropped drastically.

Performance comparison of RotatE and TransE models across standard and leakage-free datasets with and without rule injection.

As shown in the results table, RotatE's performance on FB15k fell from 0.8791 (with rules, standard) to 0.6410 (with rules, leakage-free). This indicates that while logical rules act as effective regularizers for existing patterns, they do not grant models a "magic" ability to predict entirely novel links in the absence of simple relational cues.

Conclusion

Rule injection is a powerful tool for improving KGE model accuracy by explicitly teaching logical relationships. However, the dramatic performance drop on leakage-free datasets serves as a reality check for the field. Future work will focus on automating the pipeline and testing on more robust datasets like FB15k-237 and WN18RR to further explore the limits of relational reasoning in KGE models.

Summary updated

BibTeX
@inproceedings{alam2020effect,
  author = {Mirza Mohtashim Alam and Mojtaba Nayyeri and Chengjin Xu and Md. Rashad Al Hasan Rony and Hamed Shariat Yazdi and Afshin Sadeghi and Jens Lehmann},
  title = {{The Effect of Rule Injectionin a Leakage Free Dataset}},
  booktitle = {KR4L@ECAI},
  year = {2020},
}
Figure