Training Relation Embeddings under Logical Constraints

Pushpendre Rastogi, Adam Poliak, Benjamin Van DurmeKG4IR @ SIGIR 2017

TL;DR

This paper introduces a novel method to imbue knowledge graph embedding (KGE) models with logical reasoning capabilities by encoding logical rules as convex constraints on entity and relation embeddings. This approach ensures that logically entailed facts are assigned higher scores than their antecedents, leading to more consistent and accurate predictions, as demonstrated on a logical deduction puzzle and the WordNet knowledge graph.

What Problem Does This Paper Address?

Machine learning models for Knowledge Base Completion (KBC), often called knowledge graph embedding (KGE) models, learn vector representations (embeddings) for entities and relations. While these models excel at predicting missing links, they often fail to adhere to logical rules that humans naturally use for reasoning. For instance, if a KGE model predicts "Alice murdered Bob," it might not also predict "Alice killed Bob," even though "murder" implies "kill." Traditional KBC methods lack a mechanism to enforce such logical consistency, leading to potentially flawed inferences. This paper aims to bridge this gap by directly incorporating logical rules into the KGE training process.

Methods

The core contribution is the formulation of logical rules as convex constraints within the embedding space. The authors propose that for any logical rule of the form $f_1, \dots, f_{n-1} \Rightarrow f_n$, the score of the entailed fact $f_n$ should be greater than or equal to the minimum score of its antecedents: $\text{score}(f_n) \ge \min_{i \in [1, n-1]} (\text{score}(f_i))$. These inequalities are translated into geometric constraints on the entity and relation vectors.

The paper details how to derive these constraints for various logical rules, including:

  • Relational Implication (RELIMP): If $(r, t)$ is true, then $(r', t)$ is true.
  • Reverse Relational Implication (REVIMP): If $(r, (x, y))$ is true, then $(r', (y, x))$ is true.
  • Symmetry (SYMM): If $(r, (e, e'))$ is true, then $(r, (e', e))$ is true.
  • Entailment (ENTAIL): Rules like $(r, (e, x)) \Rightarrow (r', (e', x))$ or $(r, (x, e)) \Rightarrow (r', (x, e'))$.
  • Property Transitivity (PROTRANS): If $(r, (x, y))$ and $(r', (y, e'))$ are true, then $(r'', (x, e'))$ is true.
  • Type Implication (TYPEIMP): If $(r, (x, y))$ is true, then $(r', (x, e))$ is true, enforcing positional argument properties.

These constraints are then integrated into the training objective using projected subgradient descent. The paper also discusses different scoring functions (e.g., inner product, L2 distance) and composition functions (e.g., concatenation) and how the constraints adapt to them.

Datasets

  • WordNet: Used for experiments on logical deduction and link prediction. The paper mentions a simplified version of a logical puzzle derived from WordNet.
  • WN18: A standard benchmark knowledge graph derived from WordNet, used for link prediction experiments. The authors incorporated a list of logical rules released by Guo et al. (2016) for this dataset.

Key Insights and Ideas

  • Logical rules as geometric constraints: The core idea of translating logical rules into convex geometric constraints in the embedding space is a powerful way to enforce logical consistency without explicit symbolic reasoning modules.
  • Score consistency for entailment: The principle that the score of an entailed fact must be at least as high as its antecedents is a sound heuristic for improving KGE performance.
  • Generalizability of constraints: The method is general enough to handle various types of logical rules and different KGE models (denoted A, B, C, D).
  • Improved performance through regularization: The constraints act as a form of regularization, guiding the learning process towards embeddings that are not only predictive but also logically coherent.

Key Results

  • Logical Deduction Puzzle: The proposed method (Models A and B with constraints) significantly outperformed a baseline system (RESCAL equivalent) on a logical deduction problem, achieving much higher precision and recall for logically entailed facts. For instance, Model B with constraints achieved a MAP of 0.83 compared to 0.01 for the baseline.
  • Link Prediction on WN18: For Model B, incorporating REVIMP constraints led to a substantial improvement in performance, with MRR increasing almost 3 times and HITS@10 increasing 4 times. Model A and C were found to be unsuitable for this task.
  • Combination System: A combined system of Model B and Model T (similar to TransE) achieved the best overall performance on WN18, indicating the utility of the constrained models even when combined with other approaches.

Limitations and Future Work

  • Model Suitability: The paper notes that some KGE models (A and C) are not well-suited for tasks requiring complex relational reasoning even with constraints.
  • Computational Cost: While the constraints are designed to be amenable to projection, the paper acknowledges that implementing constraints for certain complex rules and models can still be challenging.
  • Future Work: The authors suggest exploring more complex logical rules and investigating how these constraints can be applied to other machine learning tasks beyond KBC. They also mention the potential for combining different constrained models to achieve better overall performance.

Summary updated

BibTeX
@inproceedings{rastogi2017training,
  author = {Pushpendre Rastogi and Adam Poliak and Benjamin Van Durme},
  title = {{Training Relation Embeddings under Logical Constraints}},
  booktitle = {KG4IR @ SIGIR},
  year = {2017},
  url = {https://openreview.net/forum?id=BkNDeUZ_Wr},
}
Figure