Abstract
Knowledge Graph Completion (KGC) is essential for addressing the inherent incompleteness of large-scale knowledge bases. While hypercomplex embedding models like QuatE have demonstrated success in modeling complex relational patterns through rotations, they often suffer from "entity rigidity," treating entities as static points regardless of context. This paper introduces QuatDE, a novel KGC model that employs a dynamic mapping strategy within quaternion space. By integrating transition vectors and the Hamilton product, QuatDE effectively captures the multi-faceted semantic roles of entities and handles complex 1-to-N relational patterns. Our evaluation on standard benchmarks shows that QuatDE significantly outperforms state-of-the-art models, achieving substantial improvements in Mean Rank and triplet classification accuracy.
Introduction
Knowledge Graphs (KGs) represent real-world facts as triplets consisting of a head entity, a relation, and a tail entity $(h, r, t)$. Despite their utility in downstream tasks like recommendation systems and search, KGs are notoriously incomplete. Knowledge Graph Completion (KGC) aims to predict these missing links by learning low-dimensional embeddings of entities and relations.
Recent advancements have shifted from real-valued embeddings to hypercomplex spaces. Models like RotatE (complex numbers) and QuatE (quaternions) represent relations as rotations in space, which effectively models symmetry, anti-symmetry, and inversion. However, these models face significant hurdles in representing the nuanced nature of real-world data.
The Challenge of Entity Rigidity
A primary limitation of existing models is the assumption of entity rigidity. In models like QuatE, an entity is represented by a single, static vector. This ignores the fact that entities often play diverse roles depending on the relation involved.
As shown in Figure 1, an entity like Steven Spielberg possesses multiple semantic facets: he is a "Director" in the context of films, a "Jewish person" in terms of ethnicity, and a "Friend" to individuals like Bill Clinton. A rigid embedding struggles to distinguish these roles, leading to sub-optimal performance in complex relational patterns such as 1-to-N or N-to-N mappings. When one head entity relates to multiple valid tail entities via the same relation, a fixed rotation makes it difficult to accurately separate or cluster those tails.
Methodology: Dynamic Quaternion Mapping
QuatDE addresses these flaws by extending the quaternion-based architecture with a Dynamic Mapping Strategy.
Quaternion Representation
Entities and relations are embedded in the quaternion space $\mathbb{H}$, defined by $a + bi + cj + dk$. This 4D representation offers more degrees of freedom than real or complex spaces, allowing for more expressive modeling of relational interactions through the non-commutative Hamilton product ($\otimes$).
The Dynamic Mapping Innovation
The core contribution of QuatDE is the introduction of three additional quaternion vectors to the scoring function:
- Subject Transfer Vector ($P^\triangleleft_h$): Dynamically adjusts the head entity's position.
- Object Transfer Vector ($P^\triangleleft_t$): Dynamically adjusts the tail entity's position.
- Relation Transfer Vector ($V^\triangleleft_r$): Projects entities into a specific relational subspace.
Unlike QuatE, which applies a fixed rotation (Figure 3a), QuatDE uses a dynamic mapping function $S_r(e)$ that combines entity embeddings with these transfer vectors (Figure 3b). This allows the model to "shift" an entity's representation based on the specific triplet context, effectively separating different semantic meanings and allowing for more flexible clustering of tail entities in 1-to-N scenarios.
Experimental Evaluation
We evaluated QuatDE on three standard KGC benchmarks:
- WN18: A WordNet subset rich in inverse relations.
- WN18RR: A version of WN18 with inverse relations removed to prevent simple pattern matching.
- FB15K-237: A subset of Freebase focusing on real-world facts across various domains.
Key Results
QuatDE achieved state-of-the-art (SOTA) performance across multiple metrics:
- Mean Rank (MR) Improvements: QuatDE showed significant gains, improving MR by 26% on WN18 and 15% on WN18RR compared to the QuatE baseline.
- FB15K-237 Performance: The model achieved a 0.017 higher Mean Reciprocal Rank (MRR) and a 1.3% boost in Hit@10 over QuatE.
- Triplet Classification: On WN18RR, QuatDE reached an accuracy of 87.6%, outperforming competitive models like ConvE and RotatE.
Discussion and Insights
A notable finding is QuatDE's efficiency in lower dimensions. On WN18, QuatDE outperformed QuatE using a dimension of only 50, whereas QuatE required a dimension of 300. This suggests that dynamic mapping is a more parameter-efficient method for capturing complex information than simply scaling embedding size.
By allowing the tail entity's position to be adjusted by both the relation and the head entity, QuatDE effectively solves the 1-to-N problem. It can cluster similar entities (e.g., movies directed by the same person) without forcing them to collapse into a single point in the embedding space.
Limitations
While QuatDE functions similarly to a Quaternion-valued Neural Network (QNN), the field of hypercomplex deep learning is still maturing. The current architecture involves additional transfer vectors, which increases parameter count, although this is mitigated by the model's high performance at lower dimensions.
Conclusion
QuatDE represents a significant step forward in Knowledge Graph Completion by moving beyond rigid geometric rotations. By introducing dynamic mapping in quaternion space, the model successfully captures the multi-faceted nature of real-world entities and complex relational patterns. Future work will explore the application of these dynamic hypercomplex embeddings to noisier, open-domain knowledge graphs.
Summary updated