Introduction
Knowledge Graph (KG) reasoning has traditionally focused on "atomic facts"—simple triples consisting of a subject, relation, and object (e.g., (Joe Biden, holds_position, Vice President)). However, real-world knowledge is often more nuanced, involving nested facts where a triple itself acts as an entity in another relation. These structures capture temporal sequences, logical implications, and meta-knowledge that flat models struggle to represent. For instance, the fact that Joe Biden was Vice President is contextually linked to Barack Obama's presidency via a temporal or situational relation.
Methodology: The NestE Framework
NestE addresses the limitations of flat KG embedding methods (like TransE or RotatE) by treating nested reasoning as a geometric transformation. The core innovation lies in treating an entire triple as a single object that can be transformed by a nested relation.
Matrix Representation and Nested Rotations
Unlike standard models that represent facts as vectors, NestE represents an atomic fact as a $1 \times 3$ matrix. A nested relation is modeled as a $3 \times 3$ matrix. To evaluate a nested fact, the model performs a matrix-like Hamilton product, effectively "rotating" the head atomic fact into the space of the tail atomic fact. This mathematical flexibility allows the model to represent complex interactions, such as anti-diagonal matrices for inversions.
Unified Hypercomplex Spaces and Geometric Priors
NestE extends reasoning into 4D hypercomplex spaces to provide specific inductive biases tailored to the data's geometry:
- Spherical Quaternions: Optimized for modeling cyclic patterns.
- Hyperbolic Quaternions: Ideal for hierarchical structures using the Lorentz model.
- Split-Quaternions: Useful for pseudo-hyperboloid structures.
By offering a unified framework for these spaces, NestE can be adapted to the specific structural characteristics of different knowledge domains.
Logical Expressiveness
The authors theoretically demonstrate that this matrix-rotation approach captures a wide array of logical patterns, including relational symmetry, inversion, and complex implications. Crucially, NestE goes beyond standard first-order logic (Horn rules). It can capture "non-first-order" patterns where an entity in one fact implies an entity in another across a nested link, a capability missing in most traditional rule-based or embedding-based systems.
Experimental Evaluation
NestE was evaluated on three benchmark datasets specifically designed for nested facts: FBH, FBHE (based on Freebase), and DBHE (based on DBpedia). These datasets include both inferred and externally sourced nested facts, such as next_almaMater or transfers_to.
Key Results
As shown in the results table, NestE significantly outperforms state-of-the-art baselines across multiple metrics:
- Triple Prediction: NestE achieved an MRR (Mean Reciprocal Rank) improvement of 14.1% on FBHE and 17.7% on DBHE over the best baseline.
- Conditional Link Prediction: In tasks such as "Who was the president after Donald Trump?", NestE variants surpassed baselines by 8.5% to 13.9% in MRR across all datasets.
- Ablation Study: The "SB" variant, which utilizes split-quaternions and translation components, generally performed the best. This suggests that the combination of rotation and translation in hypercomplex space is a particularly powerful tool for modeling the complexities of nested knowledge.
Conclusion and Future Directions
NestE introduces a robust framework for modeling nested relational structures by treating facts as objects and relations as operators. While modeling relations as $3 \times 3$ hypercomplex matrices is computationally more intensive than simple vector operations, the resulting gains in accuracy and logical expressiveness are substantial.
Future work may explore scaling the model to "recursive" nesting (e.g., facts about facts about facts) and developing methods to extract human-readable rules from the learned latent hypercomplex transformations.
Summary updated