R otate CT : Knowledge Graph Embedding by Rotation and Coordinate Transformation in Complex Space (2022)

Abstract: Knowledge graph embedding, which aims to learn representations of entities and relations in knowledge graphs, finds applications in various downstream tasks. The key to success of knowledge graph embedding models are the ability to model relation patterns including symmetry/antisymmetry, inversion, commutative composition and non-commutative composition. Although existing methods fail in modeling the non-commutative composition patterns, several approaches support this pattern by modeling beyond Euclidean space and complex space. Nevertheless, expanding to complicated spaces such as quaternion can easily lead to a substantial increase in the amount of parameters, which greatly reduces the computational efficiency. In this paper, we propose a new knowledge graph embedding method called RotateCT, which first transforms the coordinates of each entity, and then represents each relation as a rotation from head entity to tail entity in complex space. By design, RotateCT can infer the non-commutative composition patterns and improve the computational efficiency. Experiments on multiple datasets empirically show that RotateCT outperforms most state-of-the-art methods on link prediction and path query answering.

## introduction knowledge graphs (kgs) contain structured facts of the real world. real-world large-scale kgs such as wordnet @xcite , @xcite , freebase @xcite and nell @xcite have been applied to strengthen the performance of several downstream tasks including recommender systems @xcite , question answering @xcite , conversation generation @xcite , relation extraction @xcite and machine translation @xcite . generally, kgs figure 1 : an example in real world. sam's mother's spouse is john, i.e., sam's father; sam's spouse's mother is rachel, i.e., sam's mother-in-law. "mother" and "spouse" form a non-commutative composition pattern. a popular approach for link prediction and pqa is knowledge graph embedding (kge), which encodes each element in kg into a continuous lowdimensional vector space. the performance of kge methods greatly relys on the ability of modeling and inferring relation patterns including symmetry/antisymmetry, inversion and composition. in particular, the composition patterns can be further divided into the commutative composition patterns and non-commutative composition patterns. for example, "spouse" is a symmetric relation and "mother" is an antisymmetric relation. relations such as "has_part" and "part_of" forms an inversion pattern. the meaning of the composition of "mother" and "spouse" depends on the relative order. by contrast, the composition of "mother" and "mother" has a definite meaning, i.e., "grandmother" (fig. 1 provides an ex-ample of the non-commutative composition patterns in real world). existing methods can capture one or more relation patterns. transe @xcite models antisymmetry, inversion and commutative composition patterns by translating relations from head entities to tail entities. rotate @xcite , which regards relations as rotations from head entities to tail entities in complex space, can model the symmetry/antisymmetry, inversion and commutative composition patterns. however, most approaches fail to model the non-commutative composition patterns, which is essential for learning more meaningful embeddings. therefore, quaternion-valued methods such as quate @xcite , ro-tate3d @xcite and duale @xcite emerge in sight. by the non-commutativity of quaternion, these methods successfully model the non-commutative composition patterns. nevertheless, a quaternion has two more dimensions than a complex number, which increases the space cost. seeking out a balanced solution that can model the non-commutative composition patterns and maintain a relatively low space cost is pressing. to address this challenge, we revisit complex space and notice an interesting case: the combination of rotation and coordinate transformation in complex plane is non-commutative, which can empower a kge method the ability of modeling the non-commutative composition patterns. in addition, the complex number is two dimensions less than the quaternion, which reduces the space cost. in this paper, we propose a novel method called rotatect for knowledge graph embedding. our method first translates the origin of complex plane by a relation-specific displacement. further, each relation is regarded as a rotation about the new origin of complex plane from head entity to tail entity. by combining rotation and coordinate transformation, rotatect obtains non-commutativity, which enables rotatect to effectively model the non-commutative composition patterns. in summary, our contributions are listed as follows: (1) rotatect provides an elegant way to model the non-commutative composition patterns and improve the parameter efficiency. to the best of our knowledge, this paper is the first to introduce coordinate transformation into the complex plane for modeling non-commutative composition patterns. (2) we provide comprehensive theoretical analyses on the non-commutative property of combining rotation and coordinate transformation, and discuss the inference patterns, parameter efficiency of rotatect. (3) experimental results demonstrate that rotatect outperforms most baseline approaches on link prediction and path query answering. ## related work in this section, unlike most papers, we roughly divide the existing kge methods into three categories according to the non-commutativity and discuss their connections to our approach. ## experiments we evaluate rotatect on two common tasks: link prediction @xcite and path query answering @xcite . in addition, we give analyses about the computational efficiency between rotatct and rotate3d. ## case studies to verify that rotatect can effectively model all the three types of relation patterns, we provide case studies via histograms on symmetry/antisymmetry and inversion patterns, and some intuitive examples on composition patterns.