Learning Hierarchy-Aware Quaternion Knowledge Graph Embeddings with Representing Relations as 3 D Rotations (2022)

Abstract: Knowledge graph embedding aims to represent entities and relations as low-dimensional vectors, which is an effective way for predicting missing links. It is crucial for knowledge graph embedding models to model and infer various relation patterns, such as symmetry/antisymmetry. However, many existing approaches fail to model semantic hierarchies, which are common in the real world. We propose a new model called HRQE, which represents entities as pure quaternions. The relational embedding consists of two parts: (a) Using unit quaternions to represent the rotation part in 3D space, where the head entities are rotated by the corresponding relations through Hamilton product. (b) Using scale parameters to constrain the modulus of entities to make them have hierarchical distributions. To the best of our knowledge, HRQE is the first model that can encode symmetry/antisymmetry, inversion, composition, multiple relation patterns and learn semantic hierarchies simultaneously. Experimental results demonstrate the effectiveness of HRQE against some of the SOTA methods on four well-established knowledge graph completion benchmarks.

## introduction knowledge graphs represent human knowledge of the real world as structured triples-(head entity, relation, tail entity) also known as @xcite . there are some outstanding knowledge graphs, such as wordnet @xcite , freebase @xcite , dbpedia @xcite . they have gained widespread attention for their successful usage in various applications (e.g., question answering, natural language processing, and recommendation systems). although millions of entities and billions of facts exist in large-scale knowledge graphs, they still * corresponding author suffer from the incompleteness problem. therefore, knowledge graph completion (also known as link prediction) which aims to predict missing links among entities based on the known triples has gained growing interest. learning low-dimensional representations of entities and relations for knowledge graphs is an effective solution for this task. learning knowledge graph embeddings in the complex space c or quaternion space h has been proven to be a highly effective inductive bias, largely owing to their ability to model connectivity patterns of the relations. for example, com-plex @xcite , which infers new relational triplets with the asymmetrical hermitian product can model the symmetry/antisymmetry patterns. rotate @xcite , which represents entities as points in a complex space and relations as rotations, can model relation patterns including symmetry/antisymmetry, inversion, and composition. duale @xcite , which combines rotation and translation in dual quaternion space can additionally model the multiple relations pattern. however, many existing models fail to model semantic hierarchies in knowledge graphs. semantic hierarchy is a ubiquitous property in knowledge graphs. for instance, word-net contains the triple [arbor/cassia/palm, hypernym, tree], where "tree" is at a higher level than "arbor/cassia/palm" in the hierarchy. freebase contains the triple [america, /location/location/contains, california/los angeles], where "california/los angeles" is at a lower level than "america" in the hierarchy. although there exists some work that takes the hierarchy structures into account @xcite , they usually require additional data to obtain the hierarchy information or cannot model various relation patterns. therefore, it is still challenging to find an approach that is capable of modeling the various relation patterns and semantic hierarchy simultaneously. 2 related work ## quaternion background a quaternion 𝑄 ∈ h is a hyper-complex number consisting of a real and three separate imaginary components (hamilton, 1844), defined as 𝑄 = 𝑎 + 𝑏i + 𝑐j + 𝑑k, where 𝑎, 𝑏, 𝑐, 𝑑 ∈ r and i, j, k are imaginary units. i, j and k are satisfied with hamilton's rules (i 2 = j 2 = k 2 = @xmath0. and based on these rules, more non-commutative multiplication rules can be derived, such as @xmath1, @xmath2, @xmath3, @xmath4, @xmath5, and @xmath6. some widely used operations of quaternion algebra are introduced as follows: quaternion conjugate: the conjugate of a quaternion 𝑄 is defined as usually, we convert the 3d space point (𝑥, 𝑦, 𝑧) into a pure quaternion 𝑄 = 0 + 𝑥i + 𝑦j + 𝑧k, 𝑥, 𝑦 and 𝑧 ∈ r for further quaternion operations. quaternion-inner product: the quaternion inner product between 𝑄 1 = 𝑎 1 + 𝑏 1 i + 𝑐 1 j + 𝑑 1 k and 𝑄 2 = 𝑎 2 + 𝑏 2 i + 𝑐 2 j + 𝑑 2 k is obtained by taking the inner products between corresponding scalar and imaginary components and returns a scalar