Title: ROTATE: KNOWLEDGE GRAPH EMBEDDING BY RELA-TIONAL ROTATION IN COMPLEX SPACE

Abstract: We study the problem of learning representations of entities and relations in knowledge graphs for predicting missing links. The success of such a task heavily relies on the ability of modeling and inferring the patterns of (or between) the relations. In this paper, we present a new approach for knowledge graph embedding called RotatE, which is able to model and infer various relation patterns including: symmetry/antisymmetry, inversion, and composition. Specifically, the RotatE model defines each relation as a rotation from the source entity to the target entity in the complex vector space. In addition, we propose a novel self-adversarial negative sampling technique for efficiently and effectively training the RotatE model. Experimental results on multiple benchmark knowledge graphs show that the proposed RotatE model is not only scalable, but also able to infer and model various relation patterns and significantly outperform existing state-of-the-art models for link prediction.

1. INTRODUCTION:

Knowledge graphs are collections of factual triplets, where each triplet (h, r, t) represents a relation r between a head entity h and a tail entity t. Examples of real-world knowledge graphs include Freebase (Bollacker et al., 2008) , Yago (Suchanek et al., 2007) , and WordNet (Miller, 1995) . Knowledge graphs are potentially useful to a variety of applications such as question-answering (Hao et al., 2017) , information retrieval (Xiong et al., 2017) , recommender systems (Zhang et al., 2016) , and natural language processing (Yang & Mitchell, 2017) . Research on knowledge graphs is attracting growing interests in both academia and industry communities.

Since knowledge graphs are usually incomplete, a fundamental problem for knowledge graph is predicting the missing links. Recently, extensive studies have been done on learning low-dimensional representations of entities and relations for missing link prediction (a.k.a., knowledge graph embedding) (Bordes et al., 2013; Trouillon et al., 2016; Dettmers et al., 2017) . These methods have been shown to be scalable and effective. The general intuition of these methods is to model and infer the connectivity patterns in knowledge graphs according to the observed knowledge facts. For example, some relations are symmetric (e.g., marriage) while others are antisymmetric (e.g., filiation); some relations are the inverse of other relations (e.g., hypernym and hyponym); and some relations may be composed by others (e.g., my mother's husband is my father). It is critical to find ways to model and infer these patterns, i.e., symmetry/antisymmetry, inversion, and composition, from the observed facts in order to predict missing links. Indeed, many existing approaches have been trying to either implicitly or explicitly model one or a few of the above relation patterns (Bordes et al., 2013; Wang et al., 2014; Lin et al., 2015b;  Model Score Function SE (Bordes et al., 2011) -Wr,1h -Wr,2t h, t ∈ R k , Wr,• ∈ R k×k TransE (Bordes et al., 2013) h + rt h, r, t ∈ R k TransX -gr,1(h) + r -gr,2(t) h, r, t ∈ R k DistMult (Yang et al., 2014) r, h, t h, r, t ∈ R k ComplEx (Trouillon et al., 2016) Re( r, h, t ) h, r, t ∈ C k HolE (Nickel et al., 2016) r, h ⊗ t h, r, t ∈ R k ConvE (Dettmers et al., 2017) σ (vec(σ([r, h] (Wang et al., 2014) , TransR (Lin et al., 2015b), and STransE (Nguyen et al., 2016) , where g r,i (•) denotes a matrix multiplication with respect to relation r. Yang et al., 2014; Trouillon et al., 2016) . For example, the TransE model (Bordes et al., 2011) , which represents relations as translations, aims to model the inversion and composition patterns; the DisMult model (Yang et al., 2014) , which models the three-way interactions between head entities, relations, and tail entities, aims to model the symmetry pattern. However, none of existing models is capable of modeling and inferring all the above patterns. Therefore, we are looking for an approach that is able to model and infer all the three types of relation patterns.

* Ω))W ), t h, r, t ∈ R k RotatE -h • r -t 2 h, r, t ∈ C k , |ri| = 1

In this paper, we propose such an approach called RotatE for knowledge graph embedding. Our motivation is from Euler's identity e iθ = cos θ + i sin θ, which indicates that a unitary complex number can be regarded as a rotation in the complex plane. Specifically, the RotatE model maps the entities and relations to the complex vector space and defines each relation as a rotation from the source entity to the target entity. Given a triplet (h, r, t), we expect that t = h • r, where h, r, t ∈ C k are the embeddings, the modulus |r i | = 1 and • denotes the Hadamard (element-wise) product. Specifically, for each dimension in the complex space, we expect that:

EQUATION

It turns out that such a simple operation can effectively model all the three relation patterns: symmetric/antisymmetric, inversion, and composition. For example, a relation r is symmetric if and only if each element of its embedding r, i.e. r i , satisfies r i = e 0/iπ = ±1; two relations r 1 and r 2 are inverse if and only if their embeddings are conjugates: r 2 = r1 ; a relation r 3 = e iθ3 is a combination of other two relations r 1 = e iθ1 and r 2 = e iθ2 if and only if

r 3 = r 1 • r 2 (i.e. θ 3 = θ 1 + θ 2 ).

Moreover, the RotatE model is scalable to large knowledge graphs as it remains linear in both time and memory.

To effectively optimizing the RotatE, we further propose a novel self-adversarial negative sampling technique, which generates negative samples according to the current entity and relation embeddings. The proposed technique is very general and can be applied to many existing knowledge graph embedding models. We evaluate the RotatE on four large knowledge graph benchmark datasets including FB15k (Bordes et al., 2013) , WN18 (Bordes et al., 2013) , FB15k-237 (Toutanova & Chen, 2015) and WN18RR (Dettmers et al., 2017) . Experimental results show that the RotatE model significantly outperforms existing state-of-the-art approaches. In addition, RotatE also outperforms state-of-the-art models on Countries (Bouchard et al., 2015) , a benchmark explicitly designed for composition pattern inference and modeling. To the best of our knowledge, RotatE is the first model that achieves state-of-the-art performance on all the benchmarks.1 There are also a large body of relational approaches for modeling the relational patterns on knowledge graphs (Lao et al., 2011; Neelakantan et al., 2015; Das et al., 2016; Rocktäschel & Riedel, 2017; Yang et al., 2017) . However, these approaches mainly focus on explicitly modeling the relational paths while our proposed RotatE model implicitly learns the relation patterns, which is not only much more scalable but also provides meaningful embeddings for both entities and relations.

2. RELATED WORK:

Another related problem is how to effectively draw negative samples for training knowledge graph embeddings. This problem has been explicitly studied by Cai & Wang (2017) , which proposed a generative adversarial learning framework to draw negative samples. However, such a framework requires simultaneously training the embedding model and a discrete negative sample generator, which are difficult to optimize and also computationally expensive. We propose a self-adversarial sampling scheme which only relies on the current model. It does require any additional optimization component, which make it much more efficient.

3. ROTATE: RELATIONAL ROTATION IN COMPLEX VECTOR SPACE:

In this section, we introduce our proposed RotatE model. We first introduce three important relation patterns that are widely studied in the literature of link prediction on knowledge graphs. Afterwards, we introduce our proposed RotatE model, which defines relations as rotations in complex vector space. We also show that the RotatE model is able to model and infer all three relation patterns.

3.1. MODELING AND INFERRING RELATION PATTERNS:

The key of link prediction in knowledge graph is to infer the connection patterns, e.g., relation patterns, with observed facts. According to the existing literature (Trouillon et al., 2016; Toutanova & Chen, 2015; Guu et al., 2015; Lin et al., 2015a) , three types of relation patterns are very important and widely spread in knowledge graphs: symmetry, inversion and composition. We give their formal definition here:

Definition 1. A relation r is symmetric (antisymmetric) if ∀x, y r(x, y) ⇒ r(y, x) ( r(x, y) ⇒ ¬r(y, x) ) A clause with such form is a symmetry (antisymmetry) pattern. Definition 2. Relation r 1 is inverse to relation r 2 if ∀x, y r 2 (x, y) ⇒ r 1 (y, x) A clause with such form is a inversion pattern. Definition 3. Relation r 1 is composed of relation r 2 and relation r 3 if ∀x, y, z r 2 (x, y) ∧ r 3 (y, z) ⇒ r 1 (x, z) A clause with such form is a composition pattern.

According to the definition of the above three types of relation patterns, we provide an analysis of existing models on their abilities in inferring and modeling these patterns. Specifically, we provide an analysis on TransE, TransX, DistMult, and ComplEx. 3 We did not include the analysis on HolE and ConvE since HolE is equivalent to ComplEx (Hayashi & Shimbo, 2017) , and ConvE is a black box that involves two-layer neural networks and convolution operations, which are hard to analyze. The results are summarized into Table 2 . We can see that no existing approaches are capable of modeling all the three relation patterns.

3.2. MODELING RELATIONS AS ROTATIONS IN COMPLEX VECTOR SPACE:

In this part, we introduce our proposed model that is able to model and infer all the three types of relation patterns. Inspired by Euler's identity, we map the head and tail entities h, t to the complex embeddings, i.e., h, t ∈ C k ; then we define the functional mapping induced by each relation r as an element-wise rotation from the head entity h to the tail entity t. In other words, given a triple (h, r, t), we expect that:

EQUATION

and • is the Hadmard (or element-wise) product. Specifically, for each element in the embeddings, we have t i = h i r i . Here, we constrain the modulus of each element of r ∈ C k , i.e., r i ∈ C, to be |r i | = 1. By doing this, r i is of the form e iθr,i , which corresponds to a counterclockwise rotation by θ r,i radians about the origin of the complex plane, and only affects the phases of the entity embeddings in the complex vector space. We refer to the proposed model as RotatE due to its rotational nature. According to the above definition, for each triple (h, r, t), we define the distance function of RotatE as: 

EQUATION

3.3. OPTIMIZATION:

Negative sampling has been proved quite effective for both learning knowledge graph embedding (Trouillon et al., 2016) and word embedding (Mikolov et al., 2013) . Here we use a loss function similar to the negative sampling loss (Mikolov et al., 2013) for effectively optimizing distance-based models:

EQUATION

where γ is a fixed margin, σ is the sigmoid function, and

(h i , r, t i ) is the i-th negative triplet.

We also propose a new approach for drawing negative samples. The negative sampling loss samples the negative triplets in a uniform way. Such a uniform negative sampling suffers the problem of inefficiency since many samples are obviously false as training goes on, which does not provide any meaningful information. Therefore, we propose an approach called self-adversarial negative sampling, which samples negative triples according to the current embedding model. Specifically, we sample negative triples from the following distribution:

EQUATION

)

where α is the temperature of sampling. Moreover, since the sampling procedure may be costly, we treat the above probability as the weight of the negative sample. Therefore, the final negative sampling loss with self-adversarial training takes the following form:

EQUATION

In the experiments, we will compare different approaches for negative sampling.

4. EXPERIMENTS:



4.1. EXPERIMENTAL SETTING:

We evaluate our proposed model on four widely used knowledge graphs. The statistics of these knowledge graphs are summarized into Table 3 .

• FB15k (Bordes et al., 2013) is a subset of Freebase (Bollacker et al., 2008) , a large-scale knowledge graph containing general knowledge facts. Toutanova & Chen (2015) showed that almost 81% of the test triplets (x, r, y) can be inferred via a directly linked triplet (x, r , y) or (y, r , x). Therefore, the key of link prediction on FB15k is to model and infer the symmetry/antisymmetry and inversion patterns.

• WN18 (Bordes et al., 2013 ) is a subset of WordNet (Miller, 1995) , a database featuring lexical relations between words. This dataset also has many inverse relations. So the main relation patterns in WN18 are also symmetry/antisymmetry and inversion.

• FB15k-237 (Toutanova & Chen, 2015 ) is a subset of FB15k, where inverse relations are deleted. Therefore, the key of link prediction on FB15k-237 boils down to model and infer the symmetry/antisymmetry and composition patterns.

• WN18RR (Dettmers et al., 2017 ) is a subset of WN18. The inverse relations are deleted, and the main relation patterns are symmetry/antisymmetry and composition.

Hyperparameter Settings. We use Adam (Kingma & Ba, 2014) as the optimizer and fine-tune the hyperparameters on the validation dataset. The ranges of the hyperparameters for the grid search are set as follows: embedding dimension5 k ∈ {125, 250, 500, 1000}, batch size b ∈ {512, 1024, 2048}, self-adversarial sampling temperature α ∈ {0.5, 1.0}, and fixed margin γ ∈ {3, 6, 9, 12, 18, 24, 30}.

Both the real and imaginary parts of the entity embeddings are uniformly initialized, and the phases of the relation embeddings are uniformly initialized between 0 and 2π. No regularization is used since we find that the fixed margin γ could prevent our model from over-fitting.

Evaluation Settings. We evaluate the performance of link prediction in the filtered setting: we rank test triples against all other candidate triples not appearing in the training, validation, or test set, where candidates are generated by corrupting subjects or objects: (h , r, t) or (h, r, t ). Mean Rank (MR), Mean Reciprocal Rank (MRR) and Hits at N (H@N) are standard evaluation measures for these datasets and are evaluated in our experiments.

Baseline. Apart from RotatE, we propose a variant of RotatE as baseline, where the modulus of the entity embeddings are also constrained:

|h i | = |t i | = C,

and the distance function is thus 2C sin θ h +θr-θt 2 (See Equation 17at Appendix F for a detailed derivation). In this way, we can investigate how RotatE works without modulus information and with only phase information. We refer to the baseline as pRotatE. It is obvious to see that pRotatE can also model and infer all the three relation patterns.

4.2. MAIN RESULTS:

We compare RotatE to several state-of-the-art models, including TransE (Bordes et al., 2013) , Dist-Mult (Yang et al., 2014) , ComplEx (Trouillon et al., 2016) , HolE (Nickel et al., 2016) , and ConvE (Dettmers et al., 2017) , as well as our baseline model pRotatE, to empirically show the importance of modeling and inferring the relation patterns for the task of predicting missing links.

Table 4 summarizes our results on FB15k and WN18. We can see that RotatE outperforms all the state-of-the-art models. The performance of pRotatE and RotatE are similar on these two datasets. Table 5 summarizes our results on FB15k-237 and WN18RR, where the improvement is much more significant. The difference between RotatE and pRotatE is much larger on FB15k-237 and FB15k WN18 MR MRR H@1 H@3 H@10 MR MRR H@1 H@3 H@10 TransE WN18RR, where there are a lot of composition patterns. This indicates that modulus is very important for modeling and inferring the composition pattern.

Moreover, the performance of these models on different datasets is consistent with our analysis on the three relation patterns (Table 2 ):

• On FB15K, the main relation patterns are symmetry/antisymmetry and inversion. We can see that ComplEx performs well while TransE does not perform well since Com-plEx can infer both symmetry/antisymmetry and inversion patterns while TransE cannot infer symmetry pattern. Surprisingly, DistMult achieves good performance on this dataset although it cannot model the antisymmetry and inversion patterns. The reason is that for most of the relations in FB15K, the types of head entities and tail entities are different. Although DistMult gives the same score to a true triplet (h, r, t) and its opposition triplet (t, r, h), (t, r, h) is usually impossible to be valid since the entity type of t does not match the head entity type of h. For example, DistMult assigns the same score to (Obama, nationality, USA) and (USA, nationality, Obama). But (USA, nationality, Obama) can be simply predicted as false since USA cannot be the head entity of the relation nationality.

• On WN18, the main relation patterns are also symmetry/antisymmetry and inversion. As expected, ComplEx still performs very well on this dataset. However, different from the results on FB15K, the performance of DistMult significantly decreases on WN18. The reason is that DistMult cannot model antisymmetry and inversion patterns, and almost all the entities in WN18 are words and belong to the same entity type, which do not have the same problem as FB15K.

• On FB15k-237, the main relation pattern is composition. We can see that TransE performs really well while ComplEx does not perform well. The reason is that, as discussed before, TransE is able to infer the composition pattern while ComplEx cannot infer the composition pattern.

• On WN18RR, one of the main relation patterns is the symmetry pattern since almost each word has a symmetric relation in WN18RR, e.g., also see and similar to. TransE does not well on this dataset since it is not able to model the symmetric relations.

Countries (AUC-PR) DistMult:

ComplEx ConvE RotatE S1 1.00 ± 0.00 0.97 ± 0.02 1.00 ± 0.00 1.00 ± 0.00 S2 0.72 ± 0.12 0.57 ± 0.10 0.99 ± 0.01 1.00 ± 0.00 S3 0.52 ± 0.07 0.43 ± 0.07 0.86 ± 0.05 0.95 ± 0.00

Table 6 : Results on the Countries datasets. Other results are taken from (Dettmers et al., 2017) . The symmetry, inversion and composition pattern is represented in Figure 2a , 2c and 2g, respectively.

4.3. INFERRING RELATION PATTERNS ON COUNTRIES DATASET:

We also evaluate our model on the Countries dataset (Bouchard et al., 2015; Nickel et al., 2016) , which is carefully designed to explicitly test the capabilities of the link prediction models for composition pattern modeling and inferring. It contains 2 relations and 272 entities (244 countries, 5 regions and 23 subregions). Unlike link prediction on general knowledge graphs, the queries in Countries are of the form locatedIn(c, ?), and the answer is one of the five regions. The Countries dataset has 3 tasks, each requiring inferring a composition pattern with increasing length and difficulty. For example, task S2 requires inferring a relatively simpler composition pattern:

neighborOf(c 1 , c 2 ) ∧ locatedIn(c 2 , r) ⇒ locatedIn(c 1 , r),

while task S3 requires inferring the most complex composition pattern:

neighborOf(c 1 , c 2 ) ∧ locatedIn(c 2 , s) ∧ locatedIn(s, r) ⇒ locatedIn(c 1 , r).

In Table 6 , we report the results with respect to the AUC-PR metric, which is commonly used in the literature. We can see that RotatE outperforms all the previous models. The performance of RotatE is significantly better than other methods on S3, which is the most difficult task.

4.4. IMPLICIT RELATION PATTERN INFERENCE:

In this section, we verify whether the relation patterns are implicitly represented by RotatE relation embeddings. We ignore the specific positions in the relation embedding θ r and plot the histogram of the phase of each element in the relation embedding, i.e., {θ r,i }.

Symmetry pattern requires the symmetric relations to have property r • r = 1, and the solution is r i = ±1. We investigate the relation embeddings from a 500-dimensional RotatE trained on WN18. Figure 2a gives the histogram of the embedding phases of a symmetric relation similar to. We can find that the embedding phases are either π (r i = -1) or 0, 2π (r i = 1). Inversion pattern requires the embeddings of a pair of inverse relations to be conjugate. We use the same RotatE model trained on WN18 for an analysis. Figure 2c illustrates the element-wise addition of the embedding phases from relation r 1 = hypernym and its inversed relation r 2 = hyponym. All the additive embedding phases are 0 or 2π, which represents that r 1 = r -1 2 . This case shows that the inversion pattern is also inferred and modeled in the RotatE model.

Composition pattern requires the embedding phases of the composed relation to be the addition of the other two relations. Since there is no significant composition pattern in WN18, we study the inference of the composition patterns on FB15k-237, where a 1000-dimensional RotatE is trained. Figure 2d -2g illustrate such a r 1 = r 2 • r 3 case, where θ 2,i + θ 3,i = θ 1,i or θ 2,i + θ 3,i = θ 1,i + 2π.

More results of implicitly inferring basic patterns are presented in the appendix.

4.5. COMPARING DIFFERENT NEGATIVE SAMPLING TECHNIQUES:

In this part, we compare different negative sampling techniques including uniform sampling, our proposed self-adversarial technique, and the KBGAN model (Cai & Wang, 2017) , which aims to optimize a generative adversarial network to generate the negative samples. We re-implement a 50dimension TransE model with the margin-based ranking criterion that was used in (Cai & Wang, 2017) , and evaluate its performance on FB15k-237, WN18RR and WN18 with self-adversarial negative sampling. Table 7 summarizes our results. We can see that self-adversarial sampling is the most effective negative sampling technique.

4.6. FURTHER EXPERIMENTS ON TRANSE AND COMPLEX:

One may argue that the contribution of RotatE comes from the self-adversarial negative sampling technique. In this part, we conduct further experiments on TransE and ComplEx in the same setting as RotatE to make a fair comparison among the three models. Table 8 shows the results of TransE and ComplEx trained with the self-adversarial negative sampling technique on FB15k and FB15k-237 datasets, where a large number of relations are available. In addition, we evaluate these three models on the Countries dataset, which explicitly requires inferring the composition pattern. We also provide a detailed ablation study on TransE and RotatE in the appendix.

From Table 8 , we can see that similar results are observed as Table 4 and 5 (He et al., 2015) . The rest of the results are from RotatE trained with the self-adversarial negative sampling technique. the Countries datasets do not have the symmetric relation between different regions, and all the three tasks in the Countries datasets only require inferring the region for a given city. Therefore, the TransE model does not suffer from its inability of modeling symmetric relations. For ComplEx, we can see that it does not perform well on Countries since it cannot infer the composition pattern.

4.7. EXPERIMENTAL RESULTS ON FB15K BY RELATION CATEGORY:

We also did some further investigation on the performance of RotatE on different relation categories: one-to-many, many-to-one, and many-to-many relations6 . The results of RotatE on different relation categories on the data set FB15k are summarized into Table 9 . We also compare an additional approach KG2E KL (He et al., 2015) , which is a probabilistic framework for knowledge graph embedding methods and aims to model the uncertainties of the entities and relations in knowledge graphs with the TransE model. We also summarize the statistics of different relation categories into Table 10 in the appendix.

We can see that besides the one-to-one relation, the RotatE model also performs quite well on the non-injective relations, especially on many-to-many relations. We also notice that the probabilistic framework KG2E KL(bern) (He et al., 2015) is quite powerful, which consistently outperforms its corresponding knowledge graph embedding model, showing the importance of modeling the uncertainties in knowledge graphs. We leave the work of modeling the uncertainties in knowledge graphs with RotatE as our future work.

5. CONCLUSION:

We have proposed a new knowledge graph embedding method called RotatE, which represents entities as complex vectors and relations as rotations in complex vector space. In addition, we propose a novel self-adversarial negative sampling technique for efficiently and effectively training the RotatE model. Our experimental results show that the RotatE model outperforms all existing state-of-theart models on four large-scale benchmarks. Moreover, RotatE also achieves state-of-the-art results on a benchmark that is explicitly designed for composition pattern inference and modeling. A deep investigation into RotatE relation embeddings shows that the three relation patterns are implicitly represented in the relation embeddings. In the future, we plan to evaluate the RotatE model on more datasets and leverage a probabilistic framework to model the uncertainties of entities and relations. 

r = e iθr = cos θ r + i sin θ r (10) t = Ce iθt = C cos θ t + iC sin θ t (11) (12) Therefore, we have h • rt = C e i(θ h +θr) -e iθt = C e i(θ h +θr-θt) -1 (13) = C cos(θ h + θ r -θ t ) -1 + i sin(θ h + θ r -θ t )

= C (cos(θ h + θ r -θ t ) -1) 2 + sin 2 (θ h + θ r -θ t ) (15)

EQUATION

If the embedding of (h, r, t) in TransE is h , r , t , let θ h = ch , θ r = cr , θ t = ct and C = 1/c , we have

lim c→0 h • r -t = h + r -t

G LINK PREDICTION ON YAGO3-10 YAGO3-10 is a subset of YAGO3 (Mahdisoltani et al., 2013) , which consists of entities that have a minimum of 10 relations each. It has 123,182 entities and 37 relations. Most of the triples deal with descriptive attributes of people, such as citizenship, gender, profession and marital status.

Table 11 shows that the RotatE model also outperforms state-of-the-art models on YAGO3-10.

H HYPERPARAMETERS:

We list the best hyperparameter setting of RotatE w.r.t the validation dataset on several benchmarks in Table 12 . 

:

The codes of our paper are available online: https://github.com/DeepGraphLearning/ KnowledgeGraphEmbedding.

The p-norm of a complex vector v is defined as v p = p |vi| p . We use L1-norm for all distancebased models in this paper and drop the subscript of • 1 for brevity.

See discussion at Appendix A

We relegate all proofs to the appendix.

Following Trouillon et al. (2016), we treat complex number as the same as real number with regard to the embedding dimension. If the same number of dimension is used for both the real and imaginary parts of the complex number as the real number, the number of parameters for the complex embedding would be twice the number of parameters for the embeddings in the real space.

Following Wang et al. (2014), for each relation r, we compute the average number of tails per head (tphr) and the average number of head per tail (hptr). If tphr < 1.5 and hptr < 1.5, r is treated as one-to-one; if tphr ≥ 1.5 and hptr ≥ 1.5, r is treated as a many-to-many; if tphr < 1.5 and hptr ≥ 1.5, r is treated as one-to-many.

Figures and Tables:

Figure 1: Illustrations of TransE and RotatE with only 1 dimension of embedding.

Figure2: Histograms of relation embedding phases {θ r,i } (r i = e iθr,i ), where for 1 represents relation award nominee/award nominations./award/award nomination/nominated for, winner represents relation award category/winners./award/award honor/award winner and for 2 represents award category/nominees./award/award nomination/nominated for. The symmetry, inversion and composition pattern is represented in Figure2a, 2c and 2g, respectively.

. The RotatE model achieves the best performance on both FB15k and FB15k-237, as it is able to model all the three relation patterns. The TransE model does not work well on the FB15k datasets, which requires modeling the symmetric pattern; the ComplEx model does not work well on FB15k-237, which requires modeling the composition pattern. The results on the Countries dataset are a little bit different, where the TransE model slightly outperforms RoateE on the S3 task. The reason is that

Figure 3: Histograms of embedding phases from two general relations and four symmetric relations on WN18. ( k = 500 )

Figure 4: Histograms of embedding phases from six symmetric relations on FB15k-237. (k = 1000)

Figure 5: Histograms of element-wise additions of inversed relation embedding phases on WN18. (k = 500)

The score functions f r (h, t) of several knowledge graph embedding models, where • denotes the generalized dot product, • denotes the Hadamard product, ⊗ denotes circular correlation, σ denotes activation function and * denotes 2D convolution. • denotes conjugate for complex vectors, and 2D reshaping for real vectors in ConvE model. TransX represents a wide range of TransE's variants, such as TransH

Table content: <table/>

The pattern modeling and inference abilities of several models.Predicting missing links with knowledge graph embedding (KGE) methods has been extensively investigated in recent years. The general methodology is to define a score function for the triplets. Formally, let E denote the set of entities and R denote the set of relations, then a knowledge graph is a collection of factual triplets (h, r, t), where h, t ∈ E and r ∈ R. Since entity embeddings are usually represented as vectors, the score function usually takes the form f r (h, t), where h and t are head and tail entity embeddings. The score function f r (h, t) measures the salience of a candidate triplet (h, r, t). The goal of the optimization is usually to score true triplet (h, r, t) higher than the corrupted false triplets (h , r, t) or (h, r, t ). Table1summarizes different score functions f r (h, t) in previous state-of-the-art methods as well as the model proposed in this paper. These models generally capture only a portion of the relation patterns. For example, TransE represents each relation as a bijection between source entities and target entities, and thus implicitly models inversion and composition of relations, but it cannot model symmetric relations; ComplEx extends DistMult by introducing complex embeddings so as to better model asymmetric relations, but it cannot infer the composition pattern. The proposed RotatE model leverages the advantages of both.

Table content: <table><tr><td>A relevant and concurrent work to our work is the TorusE (Ebisu &amp; Ichise, 2018) model, which</td></tr><tr><td>defines knowledge graph embedding as translations on a compact Lie group. The TorusE model</td></tr><tr><td>can be regarded as a special case of RotatE, where the modulus of embeddings are set fixed; our</td></tr><tr><td>RotatE is defined on the entire complex space, which has much more representation capacity. Our</td></tr><tr><td>experiments show that this is very critical for modeling and inferring the composition patterns.</td></tr><tr><td>Moreover, TorusE focuses on the problem of regularization in TransE while this paper focuses on</td></tr><tr><td>modeling and inferring multiple types of relation patterns.</td></tr></table>

Number of entities, relations, and observed triples in each split for four benchmarks. RotatE can infer the inversion pattern. (See proof in Appendix C) Lemma 3. RotatE can infer the composition pattern. (See proof in Appendix D)These results are also summarized into Table2. We can see that the RotatE model is the only model that can model and infer all the three types of relation patterns.

Table content: <table><tr><td>Lemma 1. RotatE can infer the symmetry/antisymmetry pattern. (See proof in Appendix B)</td></tr><tr><td>Lemma 2.</td></tr></table>

Results of several models evaluated on the FB15K and WN18 datasets. Results of [♥] are taken from(Nickel et al., 2016) and results of [♦] are taken from(Kadlec et al., 2017). Other results are taken from the corresponding original papers.

Table content: <table><tr><td>[♥]</td><td>-</td><td>.463</td><td>.297</td><td>.578</td><td>.749</td><td>-</td><td>.495</td><td>.113</td><td>.888</td><td>.943</td></tr><tr><td>DistMult [♦]</td><td>42</td><td>.798</td><td>-</td><td>-</td><td>.893</td><td>655</td><td>.797</td><td>-</td><td>-</td><td>.946</td></tr><tr><td>HolE</td><td>-</td><td>.524</td><td>.402</td><td>.613</td><td>.739</td><td>-</td><td>.938</td><td>.930</td><td>.945</td><td>.949</td></tr><tr><td>ComplEx</td><td>-</td><td>.692</td><td>.599</td><td>.759</td><td>.840</td><td>-</td><td>.941</td><td>.936</td><td>.945</td><td>.947</td></tr><tr><td>ConvE</td><td>51</td><td>.657</td><td>.558</td><td>.723</td><td>.831</td><td>374</td><td>.943</td><td>.935</td><td>.946</td><td>.956</td></tr><tr><td>pRotatE</td><td>43</td><td>.799</td><td>.750</td><td>.829</td><td>.884</td><td>254</td><td>.947</td><td>.942</td><td>.950</td><td>.957</td></tr><tr><td>RotatE</td><td>40</td><td>.797</td><td>.746</td><td>.830</td><td>.884</td><td>309</td><td>.949</td><td>.944</td><td>.952</td><td>.959</td></tr><tr><td/><td/><td/><td colspan="2">FB15k-237</td><td/><td/><td/><td>WN18RR</td><td/><td/></tr><tr><td/><td colspan="5">MR MRR H@1 H@3 H@10</td><td>MR</td><td colspan="4">MRR H@1 H@3 H@10</td></tr><tr><td colspan="2">TransE [♥] 357</td><td>.294</td><td>-</td><td>-</td><td>.465</td><td>3384</td><td>.226</td><td>-</td><td>-</td><td>.501</td></tr><tr><td>DistMult</td><td>254</td><td>.241</td><td>.155</td><td>.263</td><td>.419</td><td>5110</td><td>.43</td><td>.39</td><td>.44</td><td>.49</td></tr><tr><td>ComplEx</td><td>339</td><td>.247</td><td>.158</td><td>.275</td><td>.428</td><td>5261</td><td>.44</td><td>.41</td><td>.46</td><td>.51</td></tr><tr><td>ConvE</td><td>244</td><td>.325</td><td>.237</td><td>.356</td><td>.501</td><td>4187</td><td>.43</td><td>.40</td><td>.44</td><td>.52</td></tr><tr><td>pRotatE</td><td>178</td><td>.328</td><td>.230</td><td>.365</td><td>.524</td><td>2923</td><td>.462</td><td>.417</td><td>.479</td><td>.552</td></tr><tr><td>RotatE</td><td>177</td><td>.338</td><td>.241</td><td>.375</td><td>.533</td><td>3340</td><td>.476</td><td>.428</td><td>.492</td><td>.571</td></tr></table>

Results of several models evaluated on the FB15k-237 and WN18RR datasets. Results of

Table content: <table/>

It indicates that the RotatE TransE with different negative sampling techniques. The results in first 2 rows are taken from(Cai & Wang, 2017), where KBGAN uses a ComplEx negative sample generator.

Table content: <table><tr><td/><td/><td/><td/><td colspan="2">FB15k-237</td><td colspan="2">WN18RR</td><td>WN18</td></tr><tr><td/><td/><td/><td/><td colspan="4">MRR H@10 MRR H@10 MRR H@10</td></tr><tr><td/><td colspan="2">uniform</td><td/><td>.242</td><td>.422</td><td>.186</td><td>.459</td><td>.433</td><td>.915</td></tr><tr><td colspan="5">KBGAN (Cai &amp; Wang, 2017) .278</td><td>.453</td><td>.210</td><td>.479</td><td>.705</td><td>.949</td></tr><tr><td/><td colspan="2">self-adversarial</td><td/><td>.298</td><td>.475</td><td>.223</td><td>.510</td><td>.736</td><td>.947</td></tr><tr><td/><td colspan="2">FB15k</td><td colspan="2">FB15k-237</td><td/><td colspan="2">Countries (AUC-ROC)</td></tr><tr><td/><td colspan="4">MRR H@10 MRR H@10</td><td/><td>S1</td><td>S2</td><td>S3</td></tr><tr><td>TransE</td><td>.735</td><td>.871</td><td>.332</td><td>.531</td><td colspan="3">1.00 ± 0.00 1.00 ± 0.00 0.96 ± 0.00</td></tr><tr><td colspan="2">ComplEx .780</td><td>.890</td><td>.319</td><td>.509</td><td colspan="3">1.00 ± 0.00 0.98 ± 0.00</td><td>0.88 ± 0.01</td></tr><tr><td>RotatE</td><td>.797</td><td>.884</td><td>.338</td><td>.533</td><td colspan="3">1.00 ± 0.00 1.00 ± 0.00 0.95 ± 0.00</td></tr></table>

Results of TransE and ComplEx with self-adversarial sampling and negative sampling loss on FB15k, FB15k-237 and Countries datasets. model does infer and model the symmetry pattern. Figure 2b is the histogram of relation hypernym, which shows that the embedding of a general relation does not have such a ±1 pattern.

Table content: <table/>

Experimental results on FB15k by relation category. The first three rows are taken from

Table content: <table/>

Statistics of FB15k by mapping properties of relations.

Table content: <table><tr><td colspan="6">Relation Category 1-to-1 1-to-N N-to-1 N-to-N</td></tr><tr><td>#relation</td><td/><td>326</td><td>308</td><td>388</td><td>323</td></tr><tr><td colspan="2">#triplet (train)</td><td>6827</td><td>42509</td><td colspan="2">70727 363079</td></tr><tr><td colspan="2">#triplet (test)</td><td>832</td><td>5259</td><td>8637</td><td>44343</td></tr><tr><td/><td/><td/><td colspan="2">YAGO3-10</td><td/></tr><tr><td/><td colspan="5">MR MRR H@1 H@3 H@10</td></tr><tr><td colspan="2">DistMult 5926</td><td>.34</td><td>.24</td><td>.38</td><td>.54</td></tr><tr><td colspan="2">ComplEx 6351</td><td>.36</td><td>.26</td><td>.40</td><td>.55</td></tr><tr><td>ConvE</td><td>1671</td><td>.44</td><td>.35</td><td>.49</td><td>.62</td></tr><tr><td>RotatE</td><td colspan="2">1767 .495</td><td>.402</td><td>.550</td><td>.670</td></tr></table>

Results of several models evaluated on the YAGO3-10 datasets. Other results are taken from(Dettmers et al., 2017).

Table content: <table><tr><td>F PROOF OF THEOREM 4</td></tr></table>

.001 .949 ± .000 .337 ± .001 .477 ± .001

Table content: <table><tr><td>FB15k</td><td>WN18</td><td>FB15k-237</td><td>WN18RR</td></tr><tr><td>MRR .797 ±</td><td/><td/><td/></tr></table>

The average and variance of the MRR results of RotatE on FB15k, WN18, FB15k-237 and WN18RR.

Table content: <table/>

Peer review (iclr2019):
 The authors propose to model the relations as a rotation in the complex vector space. They show that this way one can model symmetry/antisymmetry, inversion and composition. Another contribution is the so-called self-adversarial negative sampling. Pros: The problem that they raise is important and the solution is relevant. The results considering the simplicity of the proposed model are impressive. The experiments, proof of lemmas and general overview are easy to follow, well-written and well-organized. The improvement given the negative sampling approach is also noteworthy. Cons: Nevertheless, this approach is very similar to TorusE [1], since the element-wise rotation on the complex plane is somehow related to transformation on high-dimensional Torus. Therefore, it is expected from the authors to investigate the differences between these two approaches. Suggestions: Also, it is important to note the result of ablation study on Table 10 in supplementary materials, since part of the improvement does not come only from how the authors model the relation but also from the negative sampling(which could improve the results of other works as well). Maybe it is even better if Table 10 is presented in the main paper. Another suggestion is to mention the negative sampling contribution also in the abstract. [1] Ebisu, Takuma, and Ryutaro Ichise. "Toruse: Knowledge graph embedding on a lie group." arXiv preprint arXiv:1711.05435 (2017)."