Abstract
In this work, we move beyond the traditional complex-valued representations, introducing more expressive hypercomplex representations to model entities and relations for knowledge graph embeddings. More specifically, quaternion embeddings, hypercomplex-valued embeddings with three imaginary components, are utilized to represent entities. Relations are modelled as rotations in the quaternion space. The advantages of the proposed approach are: (1) Latent inter-dependencies (between all components) are aptly captured with Hamilton product, encouraging a more compact interaction between entities and relations; (2) Quaternions enable expressive rotation in four-dimensional space and have more degree of freedom than rotation in complex plane; (3) The proposed framework is a generalization of ComplEx on hypercomplex space while offering better geometrical interpretations, concurrently satisfying the key desiderata of relational representation learning (i.e., modeling symmetry, anti-symmetry and inversion). Experimental results demonstrate that our method achieves state-of-the-art performance on four well-established knowledge graph completion benchmarks.
Introduction
Knowledge Graphs (KGs) such as Freebase and WordNet are foundational to modern AI, yet they are often incomplete. The task of link prediction aims to fill these gaps by predicting missing relationships between entities. Traditional embedding models like TransE map entities into Euclidean space, but struggle with complex relational patterns like asymmetry. Subsequent models like ComplEx and RotatE utilized the complex plane to handle these nuances. However, complex numbers are restricted to a single plane of rotation. QuatE (Quaternion Knowledge Graph Embeddings) addresses this by moving to hypercomplex 4D space, providing greater expressive power and capturing deeper latent inter-dependencies.
Methodology
QuatE represents entities as vectors of quaternions, which are hypercomplex numbers of the form $Q = a + bi + cj + dk$. Relations are modeled as unit quaternions that act as rotations in this 4D space.
Hamilton Product and Latent Interaction
A core innovation of QuatE is the use of the Hamilton product to combine head entities and relations. Unlike the element-wise multiplication in complex-valued models, the Hamilton product forces interaction between all four components of the quaternion. This creates "inter-latent dependencies," leading to a more compact and expressive representation.
As shown in the table above, QuatE is a formal generalization of previous models like DistMult and ComplEx. If the $j$ and $k$ components are set to zero, QuatE effectively becomes ComplEx. The scoring function for a triplet $(h, r, t)$ involves rotating the head entity $h$ by the relation $r$ and then calculating the inner product with the tail entity $t$.
Geometric Interpretation
The shift from 2D complex numbers to 4D quaternions provides significant geometric advantages. While complex rotations are limited to a single plane, quaternions allow for rotations across two planes simultaneously. This increased "degree of freedom" allows the model to capture more complex relational structures without a proportional increase in parameters. Furthermore, quaternions avoid issues like "Gimbal lock" and provide a more stable way to parameterize spatial transformations.
Experimental Evaluation
The model was evaluated on four standard benchmarks: WN18, FB15K, WN18RR, and FB15K-237. The latter two are particularly challenging as they remove inverse relations to better test the model's reasoning capabilities.
Key Results
QuatE achieved state-of-the-art (SOTA) results across all four benchmarks at the time of publication:
- Performance: On the challenging WN18RR dataset, QuatE achieved a Mean Reciprocal Rank (MRR) of 0.488, surpassing previous leaders like RotatE.
- Efficiency: The model is remarkably lean. On FB15K-237, QuatE achieved SOTA results using only 5.82 million parameters—an 80% reduction compared to RotatE’s 29.32 million parameters.
- Relational Modeling: Qualitative analysis showed that QuatE is particularly adept at modeling symmetry and composition patterns.
Limitations and Future Work
Despite its power, QuatE has some considerations:
- Initialization: Quaternions require a specialized initialization strategy (adapted from "He initialization") to ensure proper convergence.
- Complexity: The Hamilton product is more computationally expensive than standard element-wise products, though this is often offset by smaller embedding dimensions.
- Future Directions: The authors suggest exploring even higher-dimensional systems like Octonions (8D), though they warn of potential diminishing returns.
Conclusion
QuatE demonstrates that hypercomplex representations offer a powerful and efficient framework for knowledge graph embeddings. By leveraging the geometric properties of quaternions and the Hamilton product, the model captures intricate relational patterns more effectively than traditional complex-valued approaches.
Summary updated