Abstract
Knowledge Graph (KG) embedding has become a cornerstone for representing relational data in continuous vector spaces. However, traditional methods often overlook the rich symbolic logic inherent in these graphs. This paper introduces KALE (Knowledge And Logic Embedding), a unified framework that jointly embeds fact triples and logical rules. By treating triples as atomic formulae and rules as complex formulae within a fuzzy logic framework, KALE learns representations that are consistent with both observed facts and general reasoning patterns. Experimental results on WN18 and FB122 demonstrate that KALE significantly outperforms state-of-the-art embedding models in link prediction and triple classification.
Introduction
Knowledge Graphs like Freebase and WordNet represent information as triples of the form $(head, relation, tail)$. While embedding techniques like TransE have shown success in mapping these entities and relations into low-dimensional spaces, they typically treat each triple in isolation. This approach ignores the "common sense" or logical rules that govern the relationships within the graph. For instance, a rule might dictate that if a city is the capital of a country, it is necessarily located within that country.
Previous attempts to incorporate such rules often treated them as a post-processing step or a separate inference engine. KALE proposes a paradigm shift: integrating logical rules directly into the embedding process. By using rules as geometric constraints during training, the model shapes the vector space to be intrinsically consistent with logical dependencies, leading to more robust and predictive representations.
Methodology: The KALE Framework
KALE unifies triples and rules using a combination of First-Order Logic (FOL) and Fuzzy Logic. The framework operates on two levels: the knowledge layer and the logic layer.
Triple and Rule Modeling
- Knowledge Layer (Triples): Following the translational paradigm, a triple $(e_i, r_k, e_j)$ is modeled such that $e_i + r_k \approx e_j$. The "truth value" of a triple is derived from the distance in the vector space, mapped to a continuous range $[0, 1]$.
- Logic Layer (Rules): Logical rules (e.g., $\forall x, y: (x, r_s, y) \Rightarrow (x, r_t, y)$) are "grounded" into specific propositional instances using entities from the KG.
- Fuzzy Logic Composition: To handle complex formulae, KALE employs the Product T-Norm. For an implication $A \Rightarrow B$, the truth value is defined as $I(A \Rightarrow B) = I(A) \cdot I(B) - I(A) + 1$. This "soft" logic allows the model to differentiate between degrees of truth, accommodating the noise and exceptions found in real-world data.
Joint Learning
The model is trained by minimizing a global margin-based ranking loss. This objective ensures that "positive" formulae—actual triples and satisfied rules—have higher truth values than "negative" or corrupted ones. This joint optimization forces the embeddings to satisfy both the local connectivity of the graph and the global constraints imposed by the logic.
Experimental Evaluation
The authors evaluated KALE on two standard benchmarks: WN18 (WordNet subset) and FB122 (Freebase subset), incorporating 14 and 47 logical rules respectively. A key feature of the evaluation was the split of test sets into Test-I (triples not inferable by rules) and Test-II (triples inferable by rules).
Link Prediction Results
KALE consistently outperformed baselines like TransE, TransH, and TransR. As shown in the results table, the "Joint" version of KALE—which trains on triples and rules simultaneously—achieved the best performance.
Notably, KALE improved performance on Test-I cases. This suggests that the inclusion of rules helps the model learn better general-purpose embeddings for entities, even for relations not explicitly covered by the rules. On WN18, KALE-Joint achieved a Mean Reciprocal Rank (MRR) of 0.662 in the filtered setting, a substantial improvement over TransE's 0.453.
Discussion and Insights
The success of KALE highlights several key insights:
- Rules as Geometric Constraints: Rules do more than just provide new facts; they constrain the relative positions of relations in the vector space.
- Synergy of Logic and Embeddings: The "Joint" training approach proved superior to "Pre-inference" (adding inferred triples before training), indicating that the unified loss function effectively captures the interplay between facts and logic.
- Robustness to Noise: By using fuzzy logic instead of hard symbolic logic, KALE remains resilient to the inherent uncertainty of large-scale knowledge bases.
Conclusion
KALE demonstrates that symbolic logic and continuous embeddings are not mutually exclusive but rather complementary. By integrating logical rules into the training process, KALE achieves state-of-the-art performance on KG tasks. Future work includes the automatic discovery of rules and extending the framework to handle more complex logical structures, further bridging the gap between reasoning and representation learning.
Summary updated