# Translation-Based Embeddings with Octonion for Knowledge Graph Completion
## 3 Methodology
### PTransO: Poincare-Extended TransO Model  
Since hyperbolic space has inherent advantages in modeling hierarchical information, we propose the PTransO model, which is used to build TransO in hyperbolic Poincare space. However, hyperbolic space is not directly defined for linear algebraic operations of matrices or vectors; linear algebraic multiplication of octonion component matrices and coordinate vectors cannot be directly performed in hyperbolic space. By means of tangent space equivalent to Euclidean space, PTransO allocates this part of the multiplication interaction into the tangent space, and transfers the interaction result from tangent space to hyperbolic space through exponential mapping. Meanwhile, due to the definition of Mobius vector addition in hyperbolic space, PTransO allocates the translation interaction to hyperbolic Poincare space, replacing vector addition in traditional Euclidean geometry space, so as to integrate the Euclidean-based translation thoughts into hyperbolic space. Finally, the distance between the interacted head entity and the tail entity is evaluated by the hyperbolic distance calculation. In short, PTransO makes use of the characteristics whereby the tangent space \(\mathcal{T}^{c}_{\mathbf{x}}\) in hyperbolic space can be regarded as Euclidean space, making the tangent space a bridge between hyperbolic geometry and Euclidean geometry. In the modeling process, PTransO uses both tangent space and hyperbolic Poincare space, capturing the octonion multiplication interaction of entities and relations in tangent space, and capturing the translation interaction in hyperbolic Poincare space. For the triple \((head,rel,tail)\), the illustration of the interaction between entities and relations in PTransO is shown in Figure 7, and the scoring function of the PTransO model is shown in Equation (11):  
\[ \begin{split}& f_{rel}(head,tail)=-d^{c_{rel}}_{\mathbb{B}} \left(\mathbf{p}^{(rel)}_{head},\mathbf{p}^{(rel)}_{tail}\right)^{2}+b_{head} +b_{tail}\\ &=-d^{c_{rel}}_{\mathbb{B}}\left(\exp^{c_{rel}}_{\mathbb{0}}( \mathbf{R}\cdot\mathbf{h}),\exp^{c_{rel}}_{\mathbb{0}}(\mathbf{t})\oplus_{c_ {rel}}\exp^{c_{rel}}_{\mathbb{0}}(\mathbf{r})\right)^{2}+b_{head}+b_{tail} \end{split}  \tag{11}\]  
where \(\mathbf{h},\mathbf{t},\mathbf{r}\in\mathbb{R}^{8}\) denote the octonion coordinate vectors of the entity and the relation in translation interaction; \(\mathbf{R}\in\mathbb{R}^{8\times 8}\) denotes the octonion component matrix of the relation in multiplication interaction; \(\mathbf{h}\), \(\mathbf{t}\), \(\mathbf{r}\) and \(\mathbf{R}\) are all constructed in the tangent space \(\mathcal{T}^{c}_{\mathbb{0}}\) equivalent to Euclidean space. \(\mathbf{p}^{(rel)}_{head},\mathbf{p}^{(rel)}_{tail}\in\mathbb{B}^{8,c_{tail}}\) denote the vectors of the head entity _head_ and the tail entity _tail_ in the hyperbolic Poincare space after interacting with relation _rel_, respectively. \(b_{head},b_{tail}\in\mathbb{R}\) are consistent with those defined in the TransO model, which are the bias parameters related to the head entity and tail entity, respectively. The generating steps of \(\mathbf{p}_{head}^{(rel)}\) are as follows:  
1. Make the multiplication interaction-related relation component matrix \(\mathbf{R}\) interact with the head entity coordinate vector \(\mathbf{h}\) in the tangent space;
2. Transfer the interaction result to the hyperbolic Poincare space by exponential mapping \(\exp_{\mathbf{0}}^{c}(\mathbf{v})\). Moreover, the generating steps of \(\mathbf{p}_{tail}^{(rel)}\) are:  
1. Transfer the tail entity coordinate vector \(\mathbf{t}\) and translation interaction-related relation coordinate vector \(\mathbf{r}\) to hyperbolic Poincare space by exponential mapping \(\exp_{\mathbf{0}}^{c}(\mathbf{v})\);
2. Add these two transferred vectors by Mobius addition \(\oplus_{c}\).