1 Introduction
Knowledge graphs (KGs) have been successful in a range of AI tasks including question answering, data integration, and recommender systems. The main characteristic of KGs lies in their graphbased knowledge representation structure in the form of (head,relation,tail) triples, where head and tail are entities (nodes) with a relation (edge) between them. The usage of this graph structure addresses many of the previous challenges of machine learning for heterogeneous data with complex structure. However, KGs are usually incomplete, which directly affects the performance of learning models on various downstream learning tasks.
One of the approaches to deal with the knowledge graph incompleteness problem is to predict the missing links based on the existed ones. This can be done via knowledge graph embeddings (KGEs). Every KGE model uses a transformation function to map entities of the graph through relations in a vector space to score the plausibility of triples via a score function. The performance of KGE models heavily relies on the design of their score function that in turn defines the type of transformation they support. Such transformations distinguish the extent to which a model is able to learn complex motifs and patterns formed by combinations of the nodes and edges in the KG.
A systematic analysis of already existing KGEs shows that most of them have been designed in Euclidean geometry and usually support a single transformation type – often translation or rotation. This limits their ability in embedding complex graph structures. A brief overview of stateoftheart KGE models and their support for different transformation types is given in Table 1. While all existing models cover at most two transformation types, projective geometry provides a uniform way for simultaneously representing five transformation types namely translation, rotation, homothety, inversion, and reflection. The combination of such transformation types results in various transformation functions (parabolic, circular, elliptic, hyperbolic, and loxodromic). Following this, projective transformations subsumes all five possible transformation functions.
Models  Tran.  Rot.  Hom.  Inv.  Refl. 

TransE  
RotatE  
ComplEx  
QuatE  
E 
Our core contribution is a new fivestar embedding model, i.e. a model that simultaneously supports these five transformation types and consequently variousshaped transformation functions. Furthermore, we formally show that this model, dubbed E, is (a) fully expressive (as defined in wang2018multi ), (b) subsumes the KGE models DistMult, RotatE, pRotatE, TransE, and ComplEx; (c) allows to learn composition, inverse, reflexive and symmetric relation patterns. Our evaluation of standard link prediction benchmarks shows that E outperforms existing models.
2 Preliminaries and Background
2.1 Knowledge Graph Embeddings
A KG is a multirelational directed graph as where are the set of nodes (entities) and edges (relations between entities) respectively. The set contains all triples as (head, relation, tail), e.g. (Paris, CapitalOf, France).
In order to apply learning methods on KGs, certain models are employed to transform KGs into a vector space. Knowledge Graph Embeddings (KGEs) are one of the most used techniques, which are based on learning vector representations of entities () and relations () of a KG. Specifically, a vector representation denoted by () is learned by the model per triple , where , and is a vector space. TransE bordes2013transe considers , in ComplEx complex2016trouillon and RotatE (complex space) is used and in QuatE quate2019zhang (quaternion space). In this paper, we choose a projective space to embed the graph i.e. (a complex projective line which is introduced later).
Most KGE models are defined via a relationspecific transformation function which maps head entities to tail entities, i.e. . On top of such a transformation function, the score function is defined to measure the plausibility for triples: . Generally, the formulation of any score function can be either or .
2.2 Projective Geometry
Projective geometry uses homogeneous coordinates which represent dimensional coordinates with numbers (i.e. use one additional parameter). For example, a point in 2D Cartesian coordinates, becomes in homogeneous coordinates where . In the case of 1dimensional real numbers, becomes where . The key elements of projective geometry are as follows:
A projective line is a space in which a projective geometry is defined. A projective geometry requires a point at infinity in order to satisfy the axiom of “two parallel lines intersect in infinity”. Therefore, an extended line (where is a real line) is realized with and a point at infinity (which topologically is a circle). More concretely, the projective line is a set with an additional member denoting the point at infinity. The projective line is real () when . In case of , where is complex space, the set denotes the complex projective line .
The Riemann Sphere is an extended complex plane with a point at infinity. More precisely, it is built on a plane of complex numbers wrapped around a sphere where poles denote and . In projective geometry, every complex line is a Riemann sphere. The Riemann sphere is employed as a tool for projective transformations as shown in Figure 1.
A Projective Transformation is the mapping of the Riemann sphere to itself. Let be the homogeneous coordinates of a point in . A projective transformation in is expressed by a matrix multiplication richter2011perspectives ; salomon2007transformations as such that
(1) 
where the matrix must be invertible (). By identifying with a projective transformation is represented by a fractional expression through a sequence of homogenization, transformation, and dehomogenization as
(2) 
where the mapping is defined as
(3) 
The resulting mapping introduced in Equation 3 describes all Möbius transformations.
The Möbius Group is the set of all Möbius transformations which is a projective linear group , i.e., the group of all invertible matrices with the operation of matrix multiplication on a projective space. The group is denoted by as it is the automorphism group of the Riemann sphere or equivalently
2.3 Variants of Möbius Transformations
Every Möbius transformation has at most two fixed points on the Riemann sphere obtained by solving richter2011perspectives which gives
(4) 
Depending on the number of fixed points, Möbius transformations form parabolic or circular (one fixed point), elliptic as well as hyperbolic, and loxodromic (two fixed points) transformation functions (see Figure 1upper row, and Table 2 for detailed conditions). All transformations in each group form a subgroup which is isomorphic to the group of all matrices mentioned in the row Iso in Table 2.
The illustration in the lower row of Figure 1 gives insights about the way the Möbius transformation induces the five transformation types (translation, rotation, inversion, reflection and homothety). Given a grid, the transformation is performed by (a) a stereographic projection from Complex plane to Riemann sphere, (b) moving the sphere, (c) stereographic projection from sphere to plane. Each transformation has a characteristic constant which determines sparsity/density of the transformation. is an expansion factor which indicates how the fixed point is repulsive, and the second fixed point is attractive. is a rotation factor, determining the degree to which a transformation rotates the plane counterclockwise around and clockwise around
Function  Parabolic  Circular  Elliptic  Hyperbolic  Loxodromic 

Condition  15cm  
()  15cm  
15cm  
15cm  
15cm  
Isomorphic 
3 Related Work
KGE models can be classified according to their embedding space. We will first cover KGEs operating in Euclidean space and then describe related work for other geometric spaces.
Euclidean Knowledge Graph Embedding Models A large number of KGE models such as TransE bordes2013transe and its variants ji2015knowledge ; lin2015learning ; wang2014knowledge as well as RotatE sun2019rotate
are designed using translational or rotational (Hadamard product) score functions in Euclidean space. The score and loss functions of these models optimize the embedding vectors in a way that maximise the plausibility of triples, which is measured by the distance between rotated/translated head and tail vectors. Some embedding models such as DisMult
yang2014embeddingDistmult , ComplEx complex2016trouillon , QuatE quate2019zhang , and RESCAL nickel2011three, including our proposed model, are designed based on elementwise multiplication of transformed head and tail. In this case, the plausibility of triples is measured based on the angle of transformed head and tail. A third category of KGE models are those designed on top of Neural networks (NN) as score function such as ConvE
dettmers2018convolutional and NTN socher2013reasoning .NonEuclidean Knowledge Graph Embedding Models The aforementioned KGE models are limited to Euclidean space, which limits their ability to embed complex structures. Some recent efforts investigated other spaces for embeddings of structures  often simpler structures than KGs. For example, the hyperbolic space has been extensively studied in scalefree networks. In recent work, learning continuous hierarchies from unstructured similarity scores using the Lorentz model was investigated nickel2018learning . In balazevic2019multi , an embedding model dubbed MuRP is proposed that embeds multirelational KGs on a Poincaré ball ji2016knowledge
. MuRP only focuses on resolving the problem of embedding on KGs with multiple simultaneous hierarchies. Overall, while the advantages of projective geometry are eminent in a wide variety of application domains, including computer vision and robotics, to our knowledge no investigation has focused on it within the context of knowledge graph embeddings.
4 Method
Our method 5E inherits the five main pillars of projective transformation, namely translation, rotation, homothety, inversion and reflection. The pipeline for performing the transformation includes the following steps: (1) elementwise stereographic projection in order to map the head entity from a complex plane into a point on a Riemann sphere, (2) relationspecific transformation to move the Riemann sphere into a new position and/or direction; (3) stereographic projection to project the mapped head from the Riemann sphere to a complex plane, (4) selection of complex inner product between the transformed head and the tail.
4.1 Model Formulation
Embedding of Knowledge Graphs on a Complex Projective Line Let be the embedding dimension. Given a triple , the head and tail entities are embedded into a dimensional complex projective line i.e. . A relation is embedded into a dimensional vector where each element is a matrix. contains four complex vectors and . With , we refer to the th element of respectively.
Relationspecific Transformation In Section 2.2, we showed that for a projective transformation on the complex projective line, there exists an equivalent transformation on the Riemann sphere. We present our model formulation using both perspectives as this allows to understand them more comprehensively.
Möbius Representation of Transformation: We use a relationspecific Möbius transformation to map the head entity () from a source to a target complex plane (). The transformation is performed using stereographic projection and transformation () on/from the Riemann sphere. To do so, we compute to specify the elementwise transformation:
(5) 
This results in the relationspecific transformed head entity
Projective Representation of Transformation: Using homogeneous coordinates, we can also represent the Möbius transformation from Equation 5 as a projective transformation:
(6) 
where the matrix and the subsequent matrices of are invertible i.e. . The matrix representation of Equation 6 is where and is a vector with all the elements being 1.
Score Function The correctness of triples in a KG is the similarity between the relationspecific transformed head and tail . The model aims to minimize the angle between and tail , i.e. their product () is maximized for positive triples. For sampled negative triples, it is conversely minimized. Overall, the score function for E is
(7) 
where is the function that returns the real part of the complex number .
4.2 Theoretical Analysis
We first show that E is a composition of translation, rotation, homothety, inversion and reflection transformations. We then prove that E is fully expressive and subsumes various popular and stateoftheart KGE models namely TransE, DistMult, ComplEx, RotatE, and pRotatE. Further details, including all proofs, are in the supplementary material.
Möbius – Composition of Five Transformations The Möbius transformation in Equation 5 is a composition of a series of five subsequent transformations and as shown in kisil2012geometry .
(8) 
where (translation by ), (inversion and reflection w.r.t. real axis), (homothety and rotation) and (translation by . This shows that E is capable of performing 5 transformations simultaneously.
Subsumption of Other KGE Models
Definition 1 (from wang2018multi ).
A model subsumes a model when any scoring over triples of a KG measured by model can also be obtained by model .
We can formally show that E subsumes various stateoftheart models:
Proposition 1.
E with variants of its score function subsumes DistMult, pRotatE, RotatE, TransE and ComplEx. Specifically, E subsumes DistMult, ComplEx and pRotatE with its original score function and subsumes RotatE and TransE with score function (changed inner product to distance).
Definition 2 (from kazemi2018simple ).
A model is fully expressive if there exist assignments to the embeddings of the entities and relations, that accurately separate correct triples from incorrect ones for any given ground truth.
Corollary 1.
The E model is fully expressive.
Inference of Patterns
For relations which exhibit patterns in the form of where premise can be a conjunction of several triples, a model is said to be able to infer those if the implication holds for the score function, i.e. if the score of all triples in the premise is positive then the score for the conclusion must be positive.
We investigated the inference ability of 5E for specific patterns including reflexive, symmetric, inverse relations and composition.
Proposition 2.
Let be relations and (e.g. UncleOf) a composition of and E infers composition with
Proposition 3.
Let be the inverse of . E infers this pattern with
Proposition 4.
Let be symmetric. E infers the symmetric pattern if
Proposition 5.
Let be a reflexive relation. In dimension , E infers reflexive patterns with distinct representations of entities if the fixed points are nonidentical.
TransE only infers composition and inverse patterns, and RotatE is capable of inferring all the mentioned patterns but it is not fully expressive. ComplEx infers these patterns and is fully expressive. However, it has less flexibility in learning complex structures due to using only rotation and homothety.
Discussion on Other Model Properties
5E inherits various important properties of projective transformation as well as Möbius transformations. Because the projective linear group is isomorphic to the Möbius group, i.e., kisil2012geometry , the properties which are mentioned for Equation 6 are also valid for Equation 5. We investigate the inherited properties of 5E from two perspectives: capturing local similarities of nodes, and capturing structural groups.
Capturing Local Similarities The similarity of nodes in a KG is local, i.e. nodes of a neighborhood are more likely to be semantically more similar faerman2018lasagne ; hamilton2017representation than nodes at higher distance. A projective transformation is a bijective conformal mapping, i.e. it preserves angle locally but not necessarily the length. It also preserves orientation after mapping kisil2012geometry . Therefore, 5E is capable of capturing similarity by preserving angle locally via a relationspecific transformation of nodes.
Furthermore, the map ( is a generalized linear group, which transfers the matrix into a Möbius transformation is a group homomorphism. If then becomes limited to only perform a mapping from the special linear group to a Möbius group that preserves volume and orientation.
In the context of KGs, after a relationspecific transformation (Equation 6 or equivalently Equation 5) of nodes in the head position to nodes in tail position, the relative distance of nodes can be preserved. From this ability, we expect that 5E is able to propagate the structural similarity from one group of nodes to another.
Capturing Structural Groups When going beyond by changing the determinant to , the volume and orientation are changed after transformation. Therefore, 5E is more flexible than all of the current KGEs on KGs with various graph structures as those are not able to change volume and orientation. Additionally, the characteristic of a projective transformation in mapping line to circle or circle to line kisil2012geometry increases the flexibility of the model. This enables covering various shaped structural transformations (see Section 5). This strong flexibility is obtained by properly mixing various transformation types mentioned in Equation 8 and Table 1.
5 Experiments and Results
Experimental Setup Following the best practices of evaluations for embedding models, we consider the mostused metrics namely Mean Reciprocal Rank (MRR) and Hits@n. We evaluated our model on four widely used benchmark datasets namely FB15k, FB15k237, WN18, and WN18RR. We compare against the best performing models on those benchmarks namely TransE bordes2013transe , RotatE sun2019rotate , TuckEr tucker2019balavzevic , ComplEx complex2016trouillon , QuatE quate2019zhang , MuRP balazevic2019multi , ConvE dettmers2018convolutional and SimplE kazemi2018simple . We developed our model on top of a standard framework lacroix2018canonical
and applied 1N scoring loss with N3 regularization, and added reverse counterparts of each triple to the train set. All details for the metrics, training datasets and hyperparameters are in the supplementary material.
Results and Discussion. The evaluation results are shown in Table 3, which includes results for 5E with embedding dimensions of 100 and 500. Results for other models are taken from quate2019zhang except for TuckER and MuRP which are taken from tucker2019balavzevic and balazevic2019multi . We first look at the WN18 and WN18RR benchmarks. Our model outperforms all stateoftheart models across all metrics in WN18RR. This is visible in comparisons of the results for example in Hits@10 for which 5E gets around 0.590 whereas TransE as a translationbased model performs 0.501, RotatE as a rotationbased model gets 0.571, and Tucker shows 0.526. In WN18, our model outperforms other models for Hits@3 and Hits@10 while being close to best for MRR and Hits@1. Here, it should be considered that the only model performing better  QuatE  used an embedding dimension of 1000. Generally, we can observe that 5E obtains positive results with a low embedding dimension of 100 (lowest in all settings by others) on WN18.
On the FB15k datasets, we observe that 5E outperforms TransE, RotatE, ComplEx SimplE and MuRP on FB15K237. Our model performs close to TuckEr. QuatE outperforms our model, which may be due to its higher embedding dimension (1000). The same pattern can be seen on FB15K, except for TuckEr, where 5E outperforms the model with a considerable margin on MRR, Hits@1,3.
Learned Transformation Types. Each relation in the KG is represented as projective transformations in 5E (one projective transformation per dimension). Figure 2 shows the transformation types learned by 5E in WN18RR relations, in a grid view. The original and plain view of the grid is given in subgraph (a) for comparisons of the changes after the transformations, and (b) to (e) show specific relations in WN18. Here we highlight the analysis of the results on some example relations:
Inversion: In subgraph (b), the lines (samecolor points) in the original grid are mapped to circle or curve (see Section 4.2), after a relationspecific transformation by the hasPart relation.
It is also visible in subgraph (d) and (e) for hypernym and hyponym relations.
Rotation and Reflection: By comparing the direction of the lines with same color (e.g., red) in the original grid and in all examples of the transformed grids, we conclude that the learned transformation covers rotation, for example in hypernym and hyponym.
We can also interpret the results for the hasPart relation as counterclockwise rotation and then reflection w.r.t. the real axis.
Translation: In subgraph (b), there is a movement in the real and imaginary axis of the grid towards down and slightly right for hasPart relation, which represents translation.
However, this is not the case for hypernym relation.
Homothety: Semantically, the pairs (hypernym, hypernym) and (hasPart partOf) form inverse patterns (see Corollary 3).
We see that the transformed grid of hypernym and hyponym are different only w.r.t. rotation.
The scale is not changed, so the determinants of the two projective matrices are 1 (no homothety) (see Section 4.2).
Comparing hasPart and partOf grids, the scale is changed, so the determinant of those two projection matrices should not be equal to one. This shows both of those transformations cover homothety.
Learned Transformation Functions. Figure 3 illustrates the results of learned transformation functions for various relations in WN18RR. Subfigure (a) and (b) refer to the hyponym relation. However, the depicted shape of transformation function differs for hyperbolic and elliptic transformations. This confirms the flexibility of the model in embedding various graph structures as well as diversity in density/sparsity of flow (e.g., hyponym relation). We also observed that when two pairs of relations form inverse patterns (in the same dimension), the model mainly learns the same transformation functions but with different directions.
6 Conclusion
In this paper, we introduce a new knowledge graph embedding model which operates on the complete set of projective transformations. We build the model on well researched generic mathematical foundations and could indeed show that it subsumes other stateoftheart embedding models. Furthermore, we prove that the model is fully expressive. By supporting a wider range of transformations than previous models, it can embed KGs with more complex structures, supports a wider range of relational patterns and can suitably handle areas of the KG with varying density. Our experimental evaluation on four well established datasets shows that the model outperforms multiple recent strong baselines.
References
 [1] I. Balazevic, C. Allen, and T. Hospedales. Multirelational poincaré graph embeddings. In Advances in Neural Information Processing Systems, pages 4465–4475, 2019.
 [2] I. Balažević, C. Allen, and T. M. Hospedales. Tucker: Tensor factorization for knowledge graph completion. arXiv preprint arXiv:1901.09590, 2019.
 [3] A. Bordes, N. Usunier, A. GarciaDuran, J. Weston, and O. Yakhnenko. Translating embeddings for modeling multirelational data. In Advances in neural information processing systems, pages 2787–2795, 2013.

[4]
T. Dettmers, P. Minervini, P. Stenetorp, and S. Riedel.
Convolutional 2d knowledge graph embeddings.
In
ThirtySecond AAAI Conference on Artificial Intelligence
, 2018.  [5] E. Faerman, F. Borutta, K. Fountoulakis, and M. W. Mahoney. Lasagne: Locality and structure aware graph node embedding. In 2018 IEEE/WIC/ACM International Conference on Web Intelligence (WI), pages 246–253. IEEE, 2018.
 [6] W. L. Hamilton, R. Ying, and J. Leskovec. Representation learning on graphs: Methods and applications. arXiv preprint arXiv:1709.05584, 2017.
 [7] G. Ji, S. He, L. Xu, K. Liu, and J. Zhao. Knowledge graph embedding via dynamic mapping matrix. 1:687–696, 2015.
 [8] G. Ji, K. Liu, S. He, and J. Zhao. Knowledge graph completion with adaptive sparse transfer matrix. pages 985–991, 2016.
 [9] S. M. Kazemi and D. Poole. Simple embedding for link prediction in knowledge graphs. In Advances in neural information processing systems, pages 4284–4295, 2018.
 [10] V. V. Kisil. Geometry of Möbius Transformations: Elliptic, Parabolic and Hyperbolic Actions of SL2 [real Number]. World Scientific, 2012.

[11]
T. Lacroix, N. Usunier, and G. Obozinski.
Canonical tensor decomposition for knowledge base completion.
In ICML, 2018.  [12] Y. Lin, Z. Liu, M. Sun, Y. Liu, and X. Zhu. Learning entity and relation embeddings for knowledge graph completion. 15:2181–2187, 2015.
 [13] M. Nickel and D. Kiela. Learning continuous hierarchies in the lorentz model of hyperbolic geometry. arXiv preprint arXiv:1806.03417, 2018.
 [14] M. Nickel, V. Tresp, and H.P. Kriegel. A threeway model for collective learning on multirelational data. 11:809–816, 2011.
 [15] J. RichterGebert. Perspectives on projective geometry: A guided tour through real and complex geometry. Springer Science & Business Media, 2011.
 [16] D. Salomon. Transformations and projections in computer graphics. Springer Science & Business Media, 2007.
 [17] R. Socher, D. Chen, C. D. Manning, and A. Ng. Reasoning with neural tensor networks for knowledge base completion. pages 926–934, 2013.
 [18] Z. Sun, Z.H. Deng, J.Y. Nie, and J. Tang. Rotate: Knowledge graph embedding by relational rotation in complex space. arXiv preprint arXiv:1902.10197, 2019.
 [19] T. Trouillon, J. Welbl, S. Riedel, É. Gaussier, and G. Bouchard. Complex embeddings for simple link prediction. In International Conference on Machine Learning, pages 2071–2080, 2016.
 [20] Y. Wang, R. Gemulla, and H. Li. On multirelational link prediction with bilinear models. In ThirtySecond AAAI Conference on Artificial Intelligence, 2018.
 [21] Z. Wang, J. Zhang, J. Feng, and Z. Chen. Knowledge graph and text jointly embedding. pages 1591–1601, 2014.
 [22] B. Yang, W.t. Yih, X. He, J. Gao, and L. Deng. Embedding entities and relations for learning and inference in knowledge bases. arXiv preprint arXiv:1412.6575, 2014.
 [23] S. Zhang, Y. Tay, L. Yao, and Q. Liu. Quaternion knowledge graph embedding. arXiv preprint arXiv:1904.10281, 2019.