Rule-Guided Compositional Representation Learning on Knowledge Graphs

Guanglin Niu, Yongfei Zhang, Bo Li, Peng Cui, Si Liu, Jingyang Li, Xiaowei Zhang

Introduction

Knowledge Graphs (KGs), such as Freebase and DBpedia, are foundational for many intelligent systems, yet they are notoriously incomplete. To address this, Representation Learning (RL) has emerged as a dominant approach, mapping entities and relations into a continuous low-dimensional vector space to predict missing links. However, existing RL methods often suffer from two primary limitations: structure sparseness, where single triples provide insufficient information, and the "black box" nature of multi-hop path modeling, which lacks semantic constraints and explainability.

The RPJE Framework

To overcome these challenges, this paper introduces RPJE (Rule and Path-based Joint Embedding). RPJE integrates symbolic logic rules—specifically Horn clauses—directly into the representation learning process. These rules are automatically mined from the KG using tools like AMIE+.

Rule-Guided Path Composition

Unlike previous models that compose multi-hop paths using purely mathematical operations (e.g., vector addition), RPJE uses length-2 rules (e.g., BornInCity(x, z) ∧ CityInState(z, y) ⇒ BornInState(x, y)) to ground path representations in logic. This "shortcut" mechanism ensures that the composed path vector is semantically aligned with a known relation, reducing error propagation.

Rule-guided path composition and semantic association in the RPJE framework.

Semantic Association and Confidence

RPJE also utilizes length-1 rules (e.g., Nationality(x, y) ⇐ BornInCountry(x, y)) to constrain the embeddings of semantically similar relations, forcing them closer in the vector space. Recognizing that mined rules are not always perfectly accurate, the framework incorporates a confidence weighting mechanism ($\mu$). This ensures that the influence of a rule on the final embedding is proportional to its reliability.

Experimental Setup and Results

The authors evaluated RPJE on four benchmark datasets: FB15K, FB15K-237, WN18, and NELL-995. The model was compared against state-of-the-art baselines including TransE, PTransE, and RUGE.

RPJE consistently outperformed all baselines. On the FB15K dataset, it achieved a Hits@10 of 90.3%, a significant improvement over PTransE's 83.4%. On the more challenging FB15K-237 dataset, RPJE improved the Mean Reciprocal Rank (MRR) by approximately 29.5%. Notably, the model showed substantial gains in handling complex "N-1" and "1-N" relations, improving accuracy by up to 13.4% over the best-performing baselines.

Discussion: The Role of Logic and Confidence

A key insight from this work is that symbolic logic serves as an effective "teacher" for continuous embeddings. By using rules to guide path composition, the model gains a degree of explainability; it can justify a predicted link based on the logical chain of relations that formed the path.

Impact of confidence thresholds on MR and Hits@10 metrics across different RPJE variants.

Furthermore, the empirical analysis revealed a "sweet spot" for the rule confidence threshold. As shown in Figure 3, setting the threshold between 0.7 and 0.8 typically yields the best performance. A threshold that is too low introduces noise from unreliable rules, while one that is too high ignores valuable patterns that could aid in link prediction.

Conclusion and Future Work

RPJE demonstrates that the integration of symbolic reasoning and representation learning is a powerful strategy for KG completion. While the current model is limited to paths of length 3 for efficiency, future work could explore more complex architectures like LSTMs or Attention mechanisms to capture longer dependencies. Additionally, a "closed-loop" system that iteratively mines rules and learns embeddings could further enhance the synergy between symbolic and sub-symbolic AI.

Summary updated

BibTeX
@inproceedings{niu2020rule,
  author = {Guanglin Niu and Yongfei Zhang and Bo Li and Peng Cui and Si Liu and Jingyang Li and Xiaowei Zhang},
  title = {{Rule-Guided Compositional Representation Learning on Knowledge Graphs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i03.5687},
}
Figure