# Translation-Based Embeddings with Octonion for Knowledge Graph Completion
## 3 Methodology
### TransO: A Translation-Based KGC Model with Octonion  
As mentioned above, translation-based methods have the advantages of a small number of parameters, easy training, and high deployment efficiency in general. However, limited by relatively simple operation rules, their feature interaction can only stay at a shallow level, and it is difficult to capture latent dependencies in KGs. As a kind of hypercomplex number, octonion has internal relevance and dependencies in its form, which is conducive to capturing the deep features and internal dependencies in KGs. We attempt to combine the translation method with octonion in order to exploit the advantages of both. For a given triple \((head,rel,tail)\), in which \(head,tail\in\mathcal{E}\), respectively, denote the head and tail entity in the entity set \(\mathcal{E}\), and \(rel\in\mathcal{R}\) denotes the relation in the relation set \(\mathcal{R}\), we regard both the head and the tail entity in the triple as octonion and represent them by \(h\) and \(t\), respectively, i.e., \(h,t\in\mathbb{O}\), and we regard the relation in triple as the combination of two octonions and represent it by \(r_{1}\) and \(r_{2}\), i.e., \(r_{1},r_{2}\in\mathbb{O}\). The two octonions \(r_{1}\) and \(r_{2}\) are only related to the relation and are used, respectively, for multiplication and translation interactions with the head entity, in which the multiplication interaction uses the charac teristics of octonion multiplication to mine the internal dependencies and deep features between all the components of the entities and relations, and the translation interaction uses the translation thoughts of the TransE method to mine the external dependencies and shallow features between the entities and relations. Subsequently, we judge the authenticity of the triple by calculating the distance between the head entity after the multiplication and translation interactions \(r_{1}h+r_{2}\) and the tail entity \(t\). In addition, by referring to the design in [19], we add hypersphere decision boundary radii \(b_{head},b_{tail}\in\mathbb{R}\) for the head and tail entities, which are offset parameters related only to the entities themselves, and each entity has a boundary radius. By introducing these two parameters, our model will change from treating an entity as a point in space to a hypersphere, and the boundary radius parameter reflects the sphere of influence of the entity as a hypersphere. When \(b_{head},b_{tail}\) are large, offset corrections can be made for triples with lower scores but higher relatedness between entities to better reflect entity-specific distance characteristics. However, as mentioned in Section 3.1.1, due to the relatively special operation rules of octonion, directly introducing octonion in hypercomplex form to the translation-based method does not match the widely used vector and matrix data forms in KGC methods. Therefore, we use the octonion coordinate vectors and component matrices in linear algebra to represent \(h,r_{1},r_{2},t\in\mathbb{O}\), i.e., we use \(\mathbf{s}(h),\mathbf{s}(r_{2}),\mathbf{s}(t)\in\mathbb{R}^{8}\) and \(\mathbf{m}(r_{1})\in\mathbb{R}^{8\times 8}\), and convert the problem of calculating \(r_{1}h+r_{2}-t\in\mathbb{O}\) into calculating \(\mathbf{m}(r_{1})\cdot\mathbf{s}(h)+\mathbf{s}(r_{2})-\mathbf{s}(t)\in\mathbb{R}^{8}\) in linear algebraic form. According to Theorems 1-3, octonions can be integrated into the translation-based KGC method in the form of a matrix or vector.