Joint Semantics and Data-Driven Path Representation for Knowledge Graph Inference

Guanglin Niu, Bo Li, Yongfei Zhang, Yongpan Sheng, Chuan Shi, Jingyang Li, Shiliang PuarXiv 2020

TL;DR

This paper introduces a novel approach to knowledge graph (KG) inference by combining symbolic reasoning (horn rules) with data-driven methods (KG embeddings). Their method effectively represents paths in KGs, balancing explainability with generalization, leading to improved performance on link prediction and path query answering tasks.

What Problem Does This Paper Address?

Knowledge graphs (KGs) are powerful for representing complex relationships, but inferring information beyond direct triples (e.g., through multi-hop paths) is challenging. Existing path-based inference methods often rely solely on data-driven approaches, making them less explainable. Furthermore, they struggle to handle the inherent heterogeneity between entities and relations within paths, leading to a loss of semantic richness. This paper aims to bridge this gap by developing a method that leverages both the semantic interpretability of symbolic rules and the generalization capabilities of data-driven embeddings for more accurate and explainable KG inference.

Methods

The proposed approach, "Joint Semantics and Data-Driven Path Representation," tackles KG inference in several key ways:

  • Horn Rule-based Path Composition: The method first uses horn rules (e.g., r3(x, y) ← r1(x, z) ∧ r2(z, y)) to condense multi-hop paths into single relations or shorter, more meaningful paths. This process is transparent and explainable.
  • Entity Converter: To address the heterogeneity between entities and relations in paths, an "entity converter" is introduced. This converter transforms entity representations into a semantic space similar to relations. Two modules are offered:
  • Attentive Entity-to-Type Conversion: For KGs with explicit entity types (like Freebase), this module uses an attention mechanism to select relevant entity types based on the path's context and relation.
  • Entity-to-Relation Space Projection: For KGs without entity types, this module projects entity embeddings into a relation-specific space.
  • Bi-directional Path Encoder: A shared-parameter RNN encoder processes the path sequences (including both forward and inverse paths) to learn path representations.
  • Fusion Representation Learning: The model learns entity and relation embeddings by considering the fusion of multiple paths between entity pairs, weighted by their importance and confidence derived from horn rules.
  • Joint Objective Function: A two-component loss function combines triple-specific loss (similar to standard KG embedding losses) with path-specific loss, balancing the learning of direct facts and path-based inferences.

Datasets

The paper evaluates its approach on three standard KG benchmark datasets:

  • FB15K: A large dataset derived from Freebase, notable for its rich entity type hierarchy.
  • WN18: Derived from WordNet, a lexical database.
  • NELL-995: A dataset from the Never-Ending Language Learner project, known for its sparsity.

The paper does not introduce new datasets.

Key Insights and Ideas

  • Bridging Symbolic and Sub-symbolic Reasoning: The core innovation is the seamless integration of horn rules (symbolic, explainable) with KG embeddings (sub-symbolic, generalizable). This hybrid approach seems to unlock performance gains that neither method achieves alone.
  • Handling Entity-Relation Heterogeneity: The "entity converter" is a crucial component. The paper demonstrates that simply averaging entity types or ignoring entities altogether is suboptimal. Transforming entities to be semantically comparable to relations is key to effectively incorporating them into path representations.
  • Explainability Through Path Composition: The use of horn rules not only condenses paths but also provides a traceable, human-understandable explanation for how a path leads to an inference. This is a significant advantage over purely data-driven black-box models.
  • Importance of All Components: Ablation studies clearly show that removing any of the core components (entity converter, rule-based composition, or bi-directional path encoding) leads to a noticeable drop in performance, highlighting the synergistic nature of the proposed method.

Key Results

The proposed model consistently outperforms state-of-the-art baselines on both link prediction and path query answering tasks across the evaluated datasets.

  • Link Prediction: The model achieves significant improvements in MRR and Hits@n scores. For instance, on FB15K, it shows a 5.5% MRR gain over PTransE-add, and on NELL-995, a 15.1% MRR gain.
  • Path Query Answering (Entity Prediction): The model demonstrates substantial improvements, with gains of 26.3% MR on FB15K and 55.0% MR on WN18 compared to PTransE.
  • Path Query Answering (Relation Inference): The model consistently outperforms PTransE, attributing the gains to the joint consideration of entities and relations along paths, along with the use of horn rules.
  • Ablation Studies: Removing the entity converter (-EC) led to a drop of 5.88% in Hits@10 on FB15K, and removing bi-directional paths (-BDP) dropped 3.8%, emphasizing the importance of these components.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while horn rules improve accuracy and explainability, they might not cover all path segments, necessitating the data-driven path encoder for generalization.
  • The performance of the attentive entity-to-type conversion module is dependent on the availability and quality of entity types in the KG.
  • Future Work:
    • Investigate the integration of graph neural networks (GNNs) with horn rules to better capture neighbor information for KG embeddings.
  • Incorporate richer side information, such as textual descriptions of entities and ontology, beyond just relations, to further enhance semantic representations.

Summary updated

BibTeX
@misc{niu2020joint,
  author = {Guanglin Niu and Bo Li and Yongfei Zhang and Yongpan Sheng and Chuan Shi and Jingyang Li and Shiliang Pu},
  title = {{Joint Semantics and Data-Driven Path Representation for Knowledge Graph Inference}},
  year = {2020},
  eprint = {2010.02602},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.02602},
}
Figure