Year: 2019

Abstract:
Knowledge graphs (KGs) represent world’s facts in structured forms. KG completion exploits the existing facts in a KG to discover new ones. Translation-based embedding model (TransE) is a prominent formulation to do KG completion. Despite the efficiency of TransE in memory and time, it is claimed that TransE suffers from several limitations in encoding relation patterns (such as symmetric, reflexive relations etc). To solve that, most of the attempts have circled around the revision of the TransE score function, resulting more complicated score functions (such as TransA/D/G/H/R etc). These attempts have totally disregarded effect of loss functions to this end. We show that loss functions are key factors in this regard and disregarding them results in conclusions which are inaccurate or even wrong. More concretely, we show that the claimed limitations are inaccurate, as the effect of the loss was ignored. In this regard, we pose theoretical investigations of the main limitations of TransE in the light of loss function. To the best of our knowledge, so far, this has not been comprehensively investigated. We show that by a proper selection of the loss function for training the TransE model, the main limitations are mitigated. That is achieved by setting upper-bound for the scores of positive samples, defining the region of truth (i.e. the region that a triple is considered positive by the model). Our theoretical proofs with experimental results fill the gap in understanding of the limitation of translation-based class of embedding models and confirm the importance of the selection of loss functions for training the models and on their performance.

heading: 1 INTRODUCTION
text: Knowledge is considered as commonsense facts and other information accumulated from different sources. A Knowledge Graph (KG) is collection of facts and is usually represented as a set of triples (h, r, t) where h, t are entities and r is a relation, e.g. (iphone, hyponym, smartphone). Entities and relations are nodes and edges in the graph, respectively. As KGs are inherently incomplete, making prediction of missing links is a fundamental task in knowlege graph analyses. Among different approaches used for KG completion, KG Embedding (KGE) has recently received growing attentions. KGE embeds entities and relations as low dimensional vectors known as embeddings. To measure the degree of plausibility of a triple, a scoring function is defined over the embeddings.
TransE, Translation-based Embedding model, (Bordes et al., 2013) is one of the most widely used KGE models. The original assumption of TransE is to hold: h + r = t, for every positive triple (h, r, t) where h, r, t ∈ Rd are embedding vectors of head (h), relation (r) and tail (t) respectively. TransE and its many variants like TransH (Wang et al., 2014) and TransR (Lin et al., 2015b), underperform greatly compared to the current state-of-the-art models. That is reported to be due to the limitations of their scoring functions. For instance, (Wang et al., 2018) reports that TransE cannot encode a relation pattern which is neither reflexive nor irreflexive.
In most of these works the effect of the loss function is ignored and the provided proofs are based on the assumptions that are not fulfilled by the associated loss functions. For instance (Sun et al., 2019) proves that TransE is incapable of encoding symmetric relation. To this end the loss function must enforce the distance of ‖h + r− t‖ to zero, but this is never fulfilled (or even approximated) by the employed loss function. Similarly, (Wang et al., 2018) reports that TransE cannot encode a relation pattern which is neither reflexive nor irreflexive and (Wang et al., 2014) adds that TransE cannot
properly encode reflexive, one-to-many, many-to-one and many-to-many relations. However, as mentioned earlier, such reported limitations are not accurate and the problem is not fully investigated due to the effect of the loss function.
In this regards, although TransH, TransR and TransD (Wang et al., 2014; Lin et al., 2015b; Ji et al., 2015) addressed the reported problem of TransE in one-to-many, many-to-one, many-to-many and reflexive etc, they were misled by the assumption (enforcing ‖h + r− t‖ to be zero) that was not fulfilled by the employed loss function. Considering the same assumption, (Kazemi & Poole, 2018) investigated three additional limitations of TransE, FTransE (Feng et al., 2016), STransE (Nguyen et al., 2016), TransH and TransR models: (i) if the models encode a reflexive relation r, they automatically encode symmetric, (ii) if the models encode a reflexive relation r, they automatically encode transitive and, (iii) if entity e1 has relation r with every entity in ∆ ∈ E and entity e2 has relation r with one of entities in ∆, then e2 must have the relation r with every entity in ∆.
Assuming that the loss function enforces the norm to be zero, the aforementioned works have investigated these limitations by focusing on the capability of scoring functions in encoding relation patterns. However, we prove that the selection of loss function affects the boundary of score functions; consequently, the selection of loss functions significantly affects the limitations. Therefore, the above mentioned theories corresponding to the limitations of translation-based embedding models in encoding relation patterns are inaccurate. We pose new theories about the limitations of TransX(X=H,D,R, etc) models considering the loss functions. To the best of our knowledge, it is the first time that the effect of loss function is investigated to prove theories corresponding to the limitations of translation-based models.
In a nutshell, the key contributions of this paper is as follows. (i) We show that different loss functions enforce different upper-bounds and lower-bounds for the scores of positive and negative samples respectively. This implies that existing theories corresponding the limitation of TransX models are inaccurate because the effect of loss function is ignored. We introduce new theories accordingly and prove that the proper selection of loss functions mitigates the main limitations. (ii) We reformulate the existing loss functions and their optimization problems as an standard constrained optimization problem. This makes perfectly clear that how each of the loss functions affect on the boundary of triples scores and consequently ability of relation pattern encoding. (iii) Using symmetric relation patterns, we obtain a proper upper-bound of positive triples score to enable encoding of symmetric patterns. (iv) We additionally investigate the theoretical capability of translation-based embedding model when translation is applied in the complex space (TransComplEx). We show that TransComplEx is a more powerful embedding model with fewer theoretical limitations in encoding different relation patterns such as symmetric while it is efficient in memory and time.

heading: 2 RELATED WORKS
text: Most of the previous work have investigated the capability of translation-based class of embedding models considering solely the formulation of the score function. Accordingly, in this section, we review the score functions of TransE and some of its variants together with their capabilities. Then, in the next section the existing limitations of Translation-based embedding models emphasized in recent works are reviewed. These limitations will be reinvestigated in the light of score and loss functions in the section 4.
The score of TransE (Bordes et al., 2013) is defined as: fr(h, t) = ‖h + r − t‖. TransH (Wang et al., 2014) projects each entity (e) to the relation space (e⊥ = e − wrewTr ). The score function is defined as fr(h, t) = ‖h⊥ + r − t⊥‖. TransH can encode reflexive, one-to-many, many-to-one and many-to-many relations. However, recent theories (Kazemi & Poole, 2018) prove that encoding reflexive results in encoding the both symmetric and transitive which is undesired. TransR (Lin et al., 2015b) projects each entity (e) to the relation space by using a matrix provided for each relation (e⊥ = eMr, Mr ∈ Rde×dr ). TransR uses the same scoring function as TransH. TransD (Ji et al., 2015) provides two vectors for each individual entities and relations (h,hp, r, rp, t, tp). Head and tail entities are projected by using the following matrices: Mrh = rTp hp + I m×n,Mrt = rTp tp + I m×n. The score function of TransD is similar to the score function of TransH.
RotatE (Sun et al., 2019) rotates the head to the tail entity by using relation. RotatE embeds entities and relations in the Complex space. By inclusion of constraints on the norm of entity vectors, the
model would be degenerated to TransE. The scoring function of RotatE is fr(h, t) = ‖h ◦ r − t‖, where h, r, t ∈ Cd, and ◦ is element-wise product. RotatE obtains the state-of-the-art results using very big embedding dimension (1000) and a lot of negative samples (1000). TorusE (Ebisu & Ichise, 2018) fixes the problem of regularization in TransE by applying translation on a compact Lie group. The model has several variants including mapping from torus to Complex space. In this case, the model is regarded as a very special case of RotatE Sun et al. (2019) that applies rotation instead of translation in the target the Complex space. According to Sun et al. (2019), TorusE is not defined on the entire Complex space. Therefore, it has less representation capacity. TorusE needs a very big embedding dimension (10000 as reported in Ebisu & Ichise (2018)) which is a limitation.

heading: 3 THE MAIN LIMITATIONS OF TRANSLATION-BASED EMBEDDING MODELS
text: We review six limitations of translation-based embedding models in encoding relation patterns (e.g. reflexive, symmetric) mentioned in the literature (Wang et al., 2014; Kazemi & Poole, 2018; Wang et al., 2018; Sun et al., 2019).
Limitation L1. TransE cannot encode reflexive relations when the relation vector is non-zero (Wang et al., 2014).
Limitation L2. TransE cannot encode a relation which is neither reflexive nor irreflexive. To see that, if TransE encodes a relation r, which is neither reflexive nor irreflexive we have h1 + r = h1 and h2 + r 6= h2, resulting r = 0, r 6= 0 which is a contradiction (Wang et al., 2018). Limitation L3. TransE cannot properly encode symmetric relation when r 6= 0. To see that (Sun et al., 2019), if r is symmetric, then we have: h + r = t and t + r = h. Therefore, r = 0 and so all entities appeared in head or tail parts of training triples will have the same embedding vectors.
The following limitations hold for TransE, FTransE, STransE, TransH and TransR (Feng et al., 2016; Nguyen et al., 2016; Kazemi & Poole, 2018):
Limitation L4. If r is reflexive on ∆ ∈ E , where E is the set of all entities in the KG, then r must also be symmetric.
Limitation L5. If r is reflexive on ∆ ∈ E , r must also be transitive. Limitation L6. If entity e1 has relation r with every entity in ∆ ∈ E and entity e2 has relation r with one of entities in ∆, then e2 must have the relation r with every entity in ∆.

heading: 4 OUR MODEL
text: TransE and its variants underperform compared to other embedding models due to their limitations we iterated in Section 3. In this section, we reinvestigate the limitations. We show that the corresponding theoretical proofs are inaccurate because the effect of loss function is ignored. So we propose new theories and prove that each of the limitations of TransE are resolved by revising either the scoring function or the loss. In this regard, we consider several loss functions and their effects on the boundary of the TransE scoring function. For each of the loss functions, we pose theories corresponding to the limitations. We additionally investigate the limitations of TransE using each of the loss functions while translation is performed in the complex space and show that by this new approach the aforementioned limitations are lifted. Our new model, TransComplEx, with a proper selection of loss function addresses the above problems.

heading: 4.1 TRANSCOMPLEX: TRANSLATIONAL EMBEDDING MODEL IN THE COMPLEX SPACE
text: TransComplEx translates head entity vector to the conjugate of the tail vector using relation in the complex space (Trouillon et al., 2016). Assuming h, r, t ∈ Cd be complex vectors of dimension d, the score function is defined as follows:
fr(h, t) = ‖h + r− t̄‖
Advantages of TransComplEx: We highlight four advantages of using the above formulation. (i) Comparing to TransE and its variants, TransComplEx has less limitations in encoding different relation patterns. The theories and proofs are provided in the next part. (ii) Using conjugate of tail
vector in the formulation enables the model to make difference between the role of an entity as subject or object. This cannot be properly captured by TransE and its variants. (iii) Given the example (A,Like, Juventus), (Juventus, hasP layer, C.Ronaldo), that C.Ronaldo plays for Juventus may affect the person A to like the team. This type of information cannot be properly captured by models such as CP decomposition (Hitchcock, 1927) where two independent vectors are provided (Kazemi & Poole, 2018) for Juventus (for subject and object). In contrast, our model uses same real and imaginary vectors for Juventus when it is used as subject or object. Therefore, TransComplEx can properly capture dependency between the two triples with the same entity used as subject and object. And finally, (iiii) ComplEx (Trouillon et al., 2016) has much more computational complexity comparing to TransComplEx because it needs to compute eight vector multiplications to obtain score of a triple while our model only needs to do four vector summation/subtractions. In the experiment section, we show that TransComplEx outperforms ComplEx on various dataset.

heading: 4.2 REINVESTIGATION OF THE LIMITATIONS OF TRANSLATION-BASED MODELS
text: The aim of this part is to analyze the limitations of Translation-based embedding models (including TransE and TransComplEx) by considering the effect of both score and loss functions. Different loss functions provide different upper-bound and lower-bound for positive and negative triples scores, respectively. Therefore, the loss functions affect the limitations of the models to encode relation patterns. In this regard, the existing works consider a positive triple of (h, r, t) and a negative triple of (h′, r, t′) to satisfy some assumptions in a score function. For instance in TransE where fr(h, t) = ‖h + r − t‖, it is expected that fr(h, t) = 0 and fr(h′, t′) > 0. Unfortunately, as we show later, this can not be fulfilled (or even approximated) by using the proposed loss functions (e.g. margin ranking loss and RotatE loss).
To investigate and address the limitations, we propose four conditions (Table-1) for taking a triple as positive or negative by the score function. This is done by defining upper-bound and lower-bound for the scores. We show that these conditions can be approximated by proper loss functions, and in this regards we propose four losses that each will handle one of the condition.
To better comprehend Table-1, we have visualized the conditions in Figure 1. The condition (a) indicates a triple is positive if h + r = t holds. It means that the length of residual vector i.e. = h + r − t, is zero. It is the most strict condition that expresses being positive. Authors in (Sun et al., 2019; Kazemi & Poole, 2018) consider this condition to prove their theories as well as limitation of TransE in encoding of symmetric relations. However, the employed loss cannot approximate (a), rather it fulfills (c), resulting the reported limitation to be void in that setting.
Condition (b) considers a triple to be positive if its residual vector lies on a hyper-sphere with radius γ1. It is less restrictive than (a) which considers a point to express being positive. The optimization problem that approximates the conditions (a) (γ1 = 0) and (b) (γ1 > 0) is as follows: minξh,t ∑ (h,r,t)∈S+ ξh,t 2 fr(h, t) = γ1, (h, r, t) ∈ S+ fr(h
′, t′) ≥ γ2 − ξh,t, (h′, r, t′) ∈ S− ξh,t ≥ 0
(1)
where S+, S− are the set of positive and negative samples respectively. ξh,t are slack variables to reduce the effect of noise in negative samples (Nayyeri et al., 2019).
One loss function that approximates the conditions (a) and (b) is as follows. Please note that for case (a) we set γ1 = 0 and for case (b) we set γ1 > 0 in the formula.
La|b = ∑
(h,r,t)∈S+
( λ1‖fr(h, t)− γ1‖ + ∑ (h′,r,t′)∈S−
(h,r,t)
λ2 max(γ2 − fr(h′, t′), 0 ) . (2)
Condition (c) considers a triple to be positive if its residual vector lies inside a hyper-sphere of radius γ1. The optimization problem that approximates the condition (c) is as follows (Nayyeri et al., 2019): minξh,t ∑ (h,r,t)∈S+ ξh,t 2 fr(h, t) ≤ γ1, (h, r, t) ∈ S+ fr(h
′, t′) ≥ γ2 − ξh,t, (h′, r, t′) ∈ S− ξh,t ≥ 0
(3)
The loss function that approximates the condition (c) is as follows Nayyeri et al. (2019): Lc = ∑
(h,r,t)∈S+
( λ1 max(fr(h, t)− γ1, 0) + ∑ (h′,r,t′)∈S−
(h,r,t)
λ2 max(γ2 − fr(h′, t′), 0) ) .
(4)
Remark: The loss function which is defined in Zhou et al. (2017b) is slightly different from the loss in 4. The former slides the margin while the latter fixes the margin by inclusion of a lower-bound for the score of negative triples. Both losses put an upper-bound for scores of positive triples.
Apart from the loss 4, the RotatE loss Sun et al. (2019) also approximates the condition (c). The formulation of the RotatE loss is as follows:
LRotatEc = − ∑
(h,r,t)∈S+
( log σ(γ − fr(h, t)) + ∑ (h′,r,t′)∈S−
(h,r,t)
log σ(fr(h ′, t′)− γ) ) .
Condition (d) is similar to (c), but provides different γ1, γ2 for each triples. Using (d), there is not a unique region of truth for all positive triples, rather for each positive triple (h, r, t) and its corresponding negative of (h′, r, t′) there are triple-specific region of truth and falsity. Margin ranking loss (Bordes et al., 2013) approximates (d). Defining [x]+ = max(0, x), the loss is defined as:
Ld = ∑∑ [fr(h, t) + γ − fr(h′, t′)]+ . (5)
To investigate the limitations, we must assume that the relation vectors is not null otherwise we will have the same embedding for head and tail which is undesirable. Considering the conditions (a) to (d), we investigate the limitations L1 to L6 and we prove that existing theories are just valid under (a), which is not fulfilled under the given loss. In this regard we have the following theorem. For complete proofs, please refer to the appendix of the paper.
Theorem T1. (Addressing L1): TransE and TransComplEx cannot infer a reflexive relation pattern with a non-zero relation vector under (a). However, under (b-d), TransE and TransComplEx can infer reflexive pattern.
Theorem T2. (Addressing L2): (i) TransComplEx can infer a relation which is neither reflexive nor irreflexive under (b-d). (ii) TransE cannot infer a relation which is neither reflexive nor irreflexive under (a-d).
Theorem T3. (Addressing L3): (i) TransComplEx can infer symmetric relations under (a-d). (ii) TransE cannot infer symmetric relations under (a) with non-zero vector for relation. (iii) TransE can infer a symmetric relation under (b-d).
Proof: Proofs of (i) and (ii) are provided in the appendix. For (iii) we have:
Under (b), for TransE we have ‖h + r− t‖ = γ1 and ‖t + r− h‖ = γ1. The necessity condition for encoding symmetric relation is ‖h+r−t‖ = ‖t+r−h‖. This implies ‖h‖ cos(θh,r) = ‖t‖ cos(θt,r). Let h− t = u, by definition we have ‖u + r‖ = γ1, ‖u− r‖ = γ1. Now let γ1 = α‖r‖, we have:{
‖u‖2 + (1− α2)‖r‖2 = −2〈u, r〉 ‖u‖2 + (1− α2)‖r‖2 = 2〈u, r〉 (6)
Therefore we have: ‖u‖2+(1−α2)‖r‖2 = −(‖u‖2+(1−α2)‖r‖2), which can be written as ‖u‖2 = (α2 − 1)‖r‖2. To avoid contradiction we must have α > 1. Once α > 1 we have cos(θu,r) = π/2. Therefore, TransE can encode symmetric relation with condition (b), when γ1 = α‖r‖ and α > 1. Figure 2 shows different conditions for encoding symmetric relation.
Conditions (c-d) are directly resulted from (b), as it is subsumed by (c) and (d). That completes the proof.
Theorem T4. (Addressing L4): For both TransE and TransComplEx, (i) Limitation L4 holds under (a). (ii) Limitation L4 is not valid under (b-d).
Theorem T5. (Addressing L5): For both TransE and TransComplEx, (i) Limitation L5 holds under (a). (ii) Limitation L5 holds is not valid under (b-d).
Theorem T6. (Addressing L6): For both TransE and TransComplEx, (i) Limitation L6 holds under (a). (ii) Limitation L6 is not valid under (b-d).

heading: 4.3 ENCODING RELATION PATTERNS IN TRANSCOMPLEX
text: Most of KGE models learn from triples. Recent work incorporates relation patterns such as transitive, symmetric on the top of triples to further improve performance of models. For instance, ComplEx-NNE+AER (Ding et al., 2018) encodes implication relation in the ComplEx model. RUGE (Guo et al., 2018) injects First Order Horn Clause rules in an embedding model. SimplE
(Kazemi & Poole, 2018) captures symmetric, antisymmetric and inverse relations by weight tying in the model. Inspired by (Minervini et al., 2017) and considering the score function of TransComplEx, in this part, we derive formulae for equivalence, symmetric, inverse and implication to be used as regularization terms in the optimization problem. Therefore, TransComplEx incorporates different relation patterns to optimize the embeddings.
Symmetric: Assume that r is a symmetric relation. To encode it we should have fr(h, t) ≈ fr(t, h), therefore ‖fr(h, t)−fr(t, h)‖ = 0. According to the definition of score function of TransComplEx, we have the following algebraic formulae: RSym := ‖Re(h)−Re(t)‖ = 0. Using similar argument to symmetric, the following formulae are derived for transitive, composition, inverse and implication.
Equivalence: Let p, q be equivalence relations, therefore we should have fp(h, t) ≈ fq(h, t). We obtain,REq := ‖p− q‖ = 0. Implication: Let p→ q, be the implication rule. We obtainRImp := max(fp(h, t)− fq(h, t), 0) = 0.
Inverse: Let r ←→ r−1 be the inverse relation. We obtainRInv := ‖r− r−1‖. Finally, the following optimization problem should be solved:
min θ L+
∑ ηiRi (7)
where θ is embedding parameters, L is one of the losses 2, 4 or 5 and Ri is one of the derived formulae mentioned above.

heading: 5 EXPERIMENTS AND EVALUATIONS
text: In this section, we evaluate performance of our model, TransComplEx, with different loss functions on the link prediction task. The aim of the task is to complete the triple (h, r, ?) or (?, r, t) by prediction of the missed entity h or t. Filtered Mean Rank (MR), Mean Reciprocal Rank (MRR) and Hit@10 are used for evaluations (Wang et al., 2017; Lin et al., 2015b).
Dataset. We use two dataset extracted from Freebase (Bollacker et al., 2008) (i.e. FB15K (Bordes et al., 2013) and FB15K-237 (Toutanova & Chen, 2015)) and two others extracted from WordNet (Miller, 1995) (i.e. WN18 (Bordes et al., 2013) and WN18RR (Dettmers et al., 2018)). FB15K and WN18 are earlier dataset which have been extensively used to compare performance of KGEs. FB15K-237 and WN18RR are two dataset which are supposed to be more challenging after removing inverse patterns from FB15K and WN18. Guo et al. (2018) and Ding et al. (2018) extracted different relation patterns from FB15K and WN18 respectively. The relation patterns are provided by their confidence level, e.g. (a,BornIn, b) 0.9−−→ (a,Nationality, b). We drop the relation patterns with confidence level less than 0.8. Generally, we use 454 and 14 relation patterns for FB15K and WN18 respectively. We do grounding for symmetric and transitive relation patterns. Thanks to the formulation of score function, grounding is not needed for inverse, implication and equivalence.
Experimental Setup. We implement TransComplEx with the losses 2, 4 and 5 and TransE with the loss 4 in PyTorch. Adagrad is used as an optimizer. We generate 100 mini-batches in each iteration. The hyperparameter corresponding to the score function is embedding dimension d. We add slack variables to the losses 2 and 4 to have soft margin as in (Nayyeri et al., 2019). The loss 4 is rewritten as follows Nayyeri et al. (2019):
min ξrh,t ∑ (h,r,t)∈S+ ( λ0 ξ r h,t 2 + λ1 max(fr(h, t)− γ1, 0)+
λ2 ∑
(h,r,t)∈S− h′,r,t′
max(γ2 − fr(h ′ , t ′ )− ξrh,t, 0) ) .
(8)
We set λ1 and λ2 to one and search for the hyperparameters γ1(γ2 > γ1) and λ0 in the sets {0.1, 0.2, . . . , 2} and {0.01, 0.1, 1, 10, 100} respectively. Moreover, we generate α ∈ {1, 2, 5, 10}
negative samples per each positive. The embedding dimension and learning rate are tuned from the sets {100, 200}, {0.0001, 0.0005, 0.001, 0.005, 0.01} respectively. All hyperparameters are adjusted by early stopping on validation set according to MRR. RPTransComplEx# denotes the TransComplEx model which is trained by the loss function # (2, 4, 5). RP indicates that relation patterns are injected during learning by regularizing the derived formulae (see 7). TransComplEx# refers to our model trained with the loss # without regularizing relation patterns formulae. The same notation is used for TransE#. The optimal configurations for RPTransComplEx are provided in the appendix.
Results. Table 2 presents comparison of TransComplEx and its relation pattern encoded variants (RPTransComplEx) with three classes of embedding models on the most famous two datasets of FB15K and WN18. The first category (CAT1) of models consist of translation-based model (e.g. TransX, TorusE). The second category (CAT2) are embedding models which are not translationbased (e.g. ConvE, ComplEx, ANALOGY). The previous two categories (CAT1/2) can learn relation patterns that are reflected in triples. In other words they learn patterns implicitly from existing triples. The last category (CAT3) consist of models which can explicitly encode (inject) rules in their training process (e.g. RUGE, ComplEx-NNE+AER, SimplE, SimplE+). The models in CAT3 are actually trained on relation patterns as well as triples.
We trained relation pattern version of our model i.e. RPTransComplEx using the losses of 2, 4, 5. All variants of RPTransComplEx, except PRTransComplEx4, are generally performing better than models in CAT3 which also explicitly inject relation patterns. The exception, PRTransComplEx5, is due to the fact that it uses margin ranking loss which we already showed its restriction regarding condition (d). In this regard, please consider histogram (d) in Figure 1.
As all limitations were mitigated by condition (c), we expected that RPTransComplEx4, which is associated to (c), should perform better than others. This is empirically approved as shown in Table-
2. The question is that how our model behaves under the loss 4 while we additionally disregard injection of relation patterns. To this end, we considered TransComplEx4 which uses loss 4 but does not do any injection. Since the performances of RPTransComplEx4 and TransComplEx4 are very close, we conclude that the latter also learns the pattern over the existing triples quite efficiently. This is also confirmed by the convergence performance of them as shown in Figure 3 over the symmetric relation.
To have a fair comparison1 with the categories of models which disregard injection of relation patterns (CAT1/2) we used the TransComplEx4 version of our approach. As shown in Table-2, we can observe that TransComplEx4 performs better than other models in CAT1/2 considering MR and Hits@10 and performing very closely to the best models on MRR.
As discussed earlier, FB15K-237 and WN18RR are two more challenging dataset provided recently. Table 3 presents the comparisons of our models with those other models that their performance results were available on these two datasets. Similar to our previous discussion on Table-2, we observe that PRTransComplEx4 and TransComplEx4 are performing closely which means that the latter has learned the relation pattern over triples very well without any injection. On WN18RR, TorusE was performing better than TransComplEx4 due to big embedding dimension of 10,000. On FB15k-237, RPTransComplEx4 performed better that others on MRR and Hits@10.
In order to investigate the effect of grounding, we train RPTransComplEx4 in two settings: 1) RPTransComplEx4(w grounding) is trained when the grounded patterns are injected, 2) RPTransComplEx4(w/o grounding) is trained when the relation patterns which are not grounded used. According to the Table 4, the grounding does not affect the performance significantly. We conclude that the model properly learns the relation patterns even without injection.
Boosting techniques: There are several ways to improve the performance of embedding models: 1) designing a more sophisticated scoring function, 2) proper selection of loss function, 3) using
1Accordingly, we ran the RotatE code in our setting (embedding dimension 200 and 10 negative samples). The original paper used very big numbers of 1000 and 1000 respectively.
more negative samples 4) using negative sampling techniques, 5) enriching dataset (e.g. adding reverse triples). Among the mentioned techniques, we focus on the first and second ones and avoid using other techniques. We keep the setting used in (Trouillon et al., 2016) to have a fair comparison. Using other techniques can further improve the performance of every models including ours. For example, TransComplEx with embedding dimension 200 and 50 negative samples gets 52.2 for Hits@10. Further analyses of our models in a big setting (bigger embedding dimension and more negative samples) are provided in appendix. Still, loss 4 is performing better and we conclude that our theoretical framework is approved in empirical experiments.

heading: 6 CONCLUSION
text: In this paper, we reinvestigated the main limitations of Translation-based embedding models from two aspects: score and loss. We showed that existing theories corresponding to the limitations of the models are inaccurate because the effect of loss functions has been ignored. Accordingly, we presented new theories about the limitations by consideration of the effect of score and loss functions. We proposed TransComplEx, a new variant of TransE which is proven to be less limited comparing to the TransE. The model is trained by using various loss functions on standard dataset including FB15K, FB15K-237, WN18 and WN18RR. According to the experiments, TransComplEx with proper loss function significantly outperformed translation-based embedding models. Moreover, TransComplEx got competitive performance comparing to the state-of-the-art embedding models while it is more efficient in time and memory. The experimental results conformed the presented theories corresponding to the limitations.

heading: A FURTHER EXPERIMENTS WITH A BIGGER SETTING
text: In this section we compare TransE, TransComplEx and RotatE trained by using the losses 2 (condition (a),(b)) , 4 (condition (c)) and the RotatE loss (condition (c)). In contrast to our previous experiments, we use a bigger setting: For FB15K-237, we set the embedding dimension to 300 and the number of the negative samples to 256, and for WN18RR, we set the embedding dimension and the number of negative samples to 300 and 250 respectively. We additionally use adversarial negative sampling technique used in (Sun et al., 2019) for all models.
Analysis of the results: Table 5 presents a comparison of TransE, TransComplEx and RotatE trained by different losses. TransE2(γ1 = 0) is trained by using the loss 2 when γ1 = 0. TransE2(γ1 > 0) refers to the TransE model which is trained by using the loss 2 when γ1 is a non-zero positive value. The TransE model which is trained by the losses 4 and the RotatE loss (i.e., LRotatEc ) are denoted by TransE4 and TransELRotatEc respectively. The similar notations are considered for TransComplEx and RotatE when they are trained by using different loss functions. The loss 2 with γ1 = 0 approximates the condition (a). The loss 2 with γ1 > 0 approximates the condition (b). The condition (c) can be approximated by using the loss 4 and the RotatE loss (i.e., LRotatEc ). However, the loss 4 provides a better separation for positive and the negative samples than the RotatE loss. According to the table 5, the loss 4 obtains a better performance than the other losses in each class of the studied models. It is consistent with our theories indicating that the condition (c) is less restrictive. Although we only investigated the main limitations of the translation-based class of embedding models, the theories can be generalized to different models including the RotatE model. From the table, we can see that the loss 4 improves the performance of RotatE. Regarding the table 5, the loss 2 (γ1 = 0) gets the worst results. It confirms our theories that with the condition (a), most of the limitations are held. However, with the condition (c), the limitations no longer exist. There have not been any losses that approximate the condition (a). However, most of the theories corresponding to the main limitations of the translation-based class of embedding models have been proven using the condition (a) while the used loss didn’t approximate the condition. Therefore, the theories and experimental justifications have not been accurate.

heading: B RELATION PATTERN CONVERGENCE ANALYSIS
text: Figure 4 visualizes the convergence curve of the inverse loss with (RPTransComplEx4) and without (TransComplEx4) injection when the models are trained on WN18. Figure 5 shows the convergence of the TransComplEx4 model trained on FB15K with and without the relation pattern injection. The
figures show that the models trained by using the loss 4 can properly encode the relation patterns even without any injection mechanism. In other words, the TransComplEx4 model can properly encode several relation patterns by only training on the triples (without using any additional relation pattern set to be injected). This shows the advantages of the models and the used losses.

heading: C PROOF OF THE THEOREM
text: The proof of theorems are provided as follows:
Proof of the Theorem T1 1) Let r be a reflexive relation and condition a) holds. For TransE, we have
h + r− h = 0. (9)
Therefore, the relation vector collapses to a null vector (r = 0). As a consequence of r = 0, embedding vectors of head and tail entities will be same which is undesired. Therefore, TransE cannot infer reflexive relation with r 6= 0. For TransComplEx, we have
h + r− h̄ = 0. (10)
We have
Re(r) = 0, Im(r) = −2Im(h). (11)
Therefore, all entities will have same embedding vectors which is undesired.
2) Using condition (b), we have
‖h + r− t‖ = γ1. It gives ‖r‖ = γ1. Therefore, in order to infer reflexive relation, the length of the relation vector should be γ1. Consequently, TransE and TransComplEx can infer reflexive relation. The same procedure can be used for the conditions (c) and (d).
Proof of the theorem T2: i) Let the relation r be neither reflexive nor irreflexive and two triples (e1, r, e1), (e2, r, e2) be positive and negative respectively. Therefore the following inequalities hold:
{ ‖e1 + r− ē1‖ ≤ λ1, ‖e2 + r− ē2‖ ≥ λ2.
(12)
Equation 12 is rewritten as follows:
‖Re(r) + i(Im(r) + 2Im(e1))‖ ≤ γ1, ‖Re(r) + i(Im(r) + 2Im(e2))‖ ≥ γ2,
(13)
For TransE in real space, ‖Re(r)‖ ≤ γ1 and ‖Re(r)‖ ≥ γ2 cannot be held simultaneously when γ2 > γ1. Therefore, TransE in real space cannot encode a relation which is neither reflexive nor irreflexive. In contrast, TransE in complex space can encode the relation by proper assignment of imaginary parts of entities. Therefore, theoretically TransComplEx can infer a relation which is neither reflexive nor irreflexive.
Proof of the theorem T3: i), ii) Let r be a symmetric relation and a) holds. We have
h + r = t̄, t + r = h̄.
(14)
Trivially, we have
Re(h) +Re(r) = Re(t), Re(t) +Re(r) = Re(h),
Im(h) + Im(r) = −Im(t), Im(t) + Im(r) = −Im(h),
(15)
For TransE in real space, there is
Re(h) +Re(r) = Re(t), Re(t) +Re(r) = Re(h),
Therefore, Re(r) = 0. It means that TransE cannot infer symmetric relations with condition a). For TransComplEx, additionally we have
Im(h) + Im(r) = −Im(t), Im(t) + Im(r) = −Im(h),
It concludes Im(h) + Im(r) + Im(t) = 0. Therefore, TransE in complex space with condition a) can infer symmetric relation. Because a) is an special case of b) and c), TransComplEx can infer symmetric relations in all conditions.
3) For TransE with condition b), there is
‖h + r− t‖ = γ1, (16) ‖t + r− h‖ = γ1. (17)
The necessity condition for encoding symmetric relation is ‖h + r− t‖ = ‖t + r− h‖. This implies ‖h‖cos(θh,r) = ‖t‖cos(θt,r). Let h− t = u, by 17 we have ‖u + r‖ = γ1, ‖u− r‖ = γ1. Let γ1 = α‖r‖. We have {
‖u‖2 + (1− α2)‖r‖2 = −2〈u, r〉 ‖u‖2 + (1− α2)‖r‖2 = 2〈u, r〉 (18)
Regarding 18, we have
‖u‖2 + (1− α2)‖r‖2 = −(|u‖2 + (1− α2)‖r‖2). → ‖u‖2 = (α2 − 1)‖r‖2. To avoid contradiction, α ≥ 1. If α ≥ 1 we have cos(θu,r) = π/2. Therefore, TransE can encode symmetric pattern with condition b), if γ1 = α‖r‖ and α ≥ 1. From the proof of condition b), we conclude that TransE can encode symmetric patterns under conditions c) and d).
Proof of the theorem T4: i) The proof of the lemma with condition a) for TransE is mentioned in the paper Kazemi & Poole (2018). For TransComplEx, the proof is trivial. ii) Now, we prove that the limitation L4 is not valid when b) holds.
Let condition b) holds and relation r be reflexive, we have ‖e1 + r− e1‖ = γ1, ‖e2 + r− e2‖ = γ1. Let ‖e1 + r− e2‖ = γ1. To violate the limitation L4, the triple (e2, r, e1) should be negative i.e., ‖e2 + r− e1‖ > γ1, → ‖e2 + r− e1‖2 > γ21 , → ‖e2‖2 + ‖e1‖2 + ‖r‖2 + 2 < e2, r > −2 < e2, e1 > −2 < e1, r > > γ21 . Considering ‖e1 + r− e2‖ = γ1, we have < e2, r > − < e1, r > > 0, →< e2 − e1, r > > 0, → cos(θ(e2−e1),r) > 0, Therefore, the limitation L4 is not valid i.e., if a relation r is reflexive, it may not be symmetric. TransE is special case of TransComplEx and also condition b) is special case of condition c). Therefore using conditions b), c) and d), the limitation L4 is not valid for TransE and TransComplEx.
Proof of the theorem T5
i) Under condition a), equation h + r − t = 0 holds. Therefore, according to the paper Kazemi & Poole (2018), the model has the limitation L5.
ii) If a relation is reflexive, with condition b), we have ‖e1 + r − e1‖ = γ1, ‖e2 + r − e2‖ = γ1. Therefore, ‖r‖ = λ1. Let {
‖e1 + r− e2‖ = γ1, ‖e2 + r− e3‖ = γ1.
(19)
we need to show the following inequality wouldn’t give contradiction: ‖e2 + r− e3‖ > γ1. From 19 we have < e2, (e1 + e2 + e3) >< 0, which is not contradiction.
Therefore, with conditions b) and c), the limitation L5 is not valid for both TransE and TransComplEx.
Proof of the theorem T6: i) With condition (a), the limitation L6 is proved in Kazemi & Poole (2018). ii) Considering the assumption of L6 and the condition (b), we have
 ‖e1 + r− s1‖ = γ1, ‖e1 + r− s2‖ = γ1. ‖e2 + r− s1‖ = γ1.
(20)
We show the condition that ‖e2 + r− s2‖ > γ1 holds. Substituting 20 in ‖e2 + r− s2‖ > γ1, we have cos(θ(s1−s2),(e1−e2)) < 0. Therefore, there are assignments to embeddings of entities that the limitation L6 is not valid with condition (b), (c) and (d).
Figure 6 shows that the limitation L6 is invalid by proper selection of loss function.
C.1 FURTHER LIMITATIONS AND FUTURE WORK
In the paper, we have investigated the six limitations of TransE which are resolved by revision of loss function. However, revision of loss functions can resolve further limitations including 1-N, N-1 and M-N relations. More concretely, setting upper-bound for the scores of positive samples can mitigate the M-N problem. We will leave it as future work.
Our theories can be extended to every distance-based embedding models including RotatE etc.
Moreover, the negative likelihood loss has been shown to be effective for training different embedding models including RotatE and TransE. This can also be explained by reformulation of negative
likelihood loss as standard optimization problem, showing the the loss put a boundary for the score functions.
We will consider the mentioned points as future work.

heading: D OPTIMAL HYPER-PARAMETERS
text: The following tables show the optimal configurations for our models included in the Table-2 and 3.

Review summaries:
This paper list several limitations of translational-based Knowledge Graph embedding methods, TransE which have been identified by prior works and have theoretically/empirically shown that all limitations can be addressed by altering the loss function and shifting to Complex domain. The authors propose four variants of loss function which address the limitations and propose a method, RPTransComplEx which utilizes their observations for outperforming several existing Knowledge Graph embedding methods. Overall, the proposed method is well motivated and experimental results have been found to be consistent with the theoretical analysis.

In this paper, the authors investigate the main limitations of TransE in the light of loss function. The authors claim that their contributions consist of two parts: 1) proving that the proper selection of loss functions is vital in KGE; 2) proposing a model called TransComplEx. The results show that the proper selection of the loss function can mitigate the limitations of TransX (X=H, D, R, etc) models.