Sébastien Ferré
email: ferre@irisa.fr

Application of Concepts of Neighbours to Knowledge Graph Completion 1

Keywords: Knowledge Graph, Multi-Relational Data, Knowledge Graph Completion, Link Prediction, Graph Pattern, Concepts of Nearest Neighbours, Inference Rules, Analogical Inference, Explainable AI

The open nature of Knowledge Graphs (KG) often implies that they are incomplete. Knowledge graph completion (aka. link prediction) consists in infering new relationships between the entities of a KG based on existing relationships. Most existing approaches rely on the learning of latent feature vectors for the encoding of entities and relations. In general however, latent features cannot be easily interpreted. Rule-based approaches offer interpretability but a distinct ruleset must be learned for each relation. In both latent-and rule-based approaches, the training phase has to be run again when the KG is updated. We propose a new approach that does not need a training phase, and that can provide interpretable explanations for each inference. It relies on the computation of Concepts of Nearest Neighbours (C-NN) to identify clusters of similar entities based on common graph patterns. Different rules are then derived from those graph patterns, and combined to predict new relationships. We evaluate our approach on standard benchmarks for link prediction, where it gets competitive performance compared to existing approaches.

Introduction

There is a growing interest for knowledge graphs (KG) as a way to represent and share data on the Web. The Semantic Web [START_REF] Berners-Lee | The Semantic Web[END_REF] defines standards for represention (RDF), querying (SPARQL), and reasoning (RDFS, OWL), and thousands of open KGs are available: e.g., DBpedia, Wikidata (formerly Freebase), YAGO, WordNet. The open nature of KGs often implies that they are incomplete, and a lot of work have studied the use of machine learning techniques to complete them.

The task of knowledge graph completion, aka. link prediction [START_REF] Nickel | A review of relational machine learning for knowledge graphs[END_REF], consists in predicting missing edges or missing parts of edges. It is therefore a form of machine learning. Suppose that film Avatar is missing a director in the KG, one wants to predict it, i.e. identify it among all KG nodes. The idea is to find regularities in the existing knowledge, and to exploit them in order to rank KG nodes. The higher the correct node is in the ranking, the better the prediction is. Link prediction was originally introduced for social networks with a single edge type (a single relation) [START_REF] Liben-Nowell | The link-prediction problem for social networks[END_REF], and was later extended to multi-relational data and applied to KGs [START_REF] Nickel | A review of relational machine learning for knowledge graphs[END_REF]. Compared to the classical task of supervised classification, knowledge graph completion faces several challenges. First, there are as many classification problems as there are relations, which count in the hundreds or thousands in KGs. Second, for each relation, the number of "classes" is the number of different entities in the range of the relation, which typically counts in the thousands for relations like spouse or birthPlace. Third, some relations can be multi-valued, like the relation from films to actors.

In this paper, we report on extensive experimental results about a novel approach to knowledge graph completion that is based on Concepts of Nearest Neighbours (C-NN), which were introduced in [START_REF] Ferré | Concepts de plus proches voisins dans des graphes de connaissances[END_REF], and applied to query relaxation in [START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF]. This paper is an extended version of [START_REF] Ferré | Link Prediction in Knowledge Graphs with Concepts of Nearest Neighbours[END_REF] that reports on first results about the application of C-NNs to link prediction. In particular, the extension includes an analogical form of inference, and an extensive and deeper experimental evaluation. The C-NN approach introduces a symbolic form of k-NN (k Nearest Neighbours) where numerical distances are replaced by graph patterns that provide an intelligible representation of how similar two entities are.

Our hypothesis is that the partitioning of the KG entities into concepts of neighbours (see Section 5) provides a valuable basis for different kinds of inferences. We here focus on knowledge graph completion, i.e. the inference of the missing node of an incomplete edge. The combinatorial aspect of graph patterns over knowledge graphs is tackled by delaying their computation to inference time, which enables to bound the number of C-NNs by the number of entities, and in practice it is generally much smaller. The intensive knowledge-based computation at inference time is managed with in-memory KG indices (as is common in RDF stores), and any-time algorithms for both C-NN computation and inference. This allows us to scale up to standard link prediction benchmarks, which count up to 100K entities. Scaling further to millions of entities like in DBpedia or Wikidata is left for future work.

The contribution of this work is a novel approach to knowledge graph completion that has the following properties:

(1) it is a form of instance-based learning, i.e. it can perform inferences without training, and hence accomodate new data without re-training; (2) it is a symbolic approach, i.e. it can provide explanations for each inference;

(3) it shows competitive performance on standard link prediction benchmarks.

The rest of the paper is organized as follows. Section 2 discusses related work on knowledge graph completion. Section 3 contains preliminaries about knowledge graphs and queries. Section 4 presents an overview of our approach. Section 5 recalls the definition of C-NNs, and their efficient computation. Section 6 presents our method to perform C-NN-based knowledge graph completion. Section 7 reports on positive experimental results on standard benchmarks (WN18, WN18RR, FB15k, FB15k-237), along with an in-depth analysis of results. Finally, Section 8 concludes and sketches future work.

Related Work

Nickel et al [START_REF] Nickel | A review of relational machine learning for knowledge graphs[END_REF] published a "review of relational machine learning for knowledge graphs", where link prediction is the main inference task. They identify two kinds of approaches that differ by the kind of model they use: latent feature models, and graph feature models. The former is by far the most studied one. Before going into details, it is useful to set the vocabulary as it is used in the domain. Nodes are called entities, edge labels are called relations, and edges are called triples (e i , r k , e j ), where e i is the head entity, e j is the tail entity, and r k is the relation that links the head to the tail.

Latent feature models learn embeddings of entities and relations into low-dimensional vector spaces, and then make inferences about a triple (e i , r k , e j ) by combining the embeddings of the two entities and the embedding of the relation. The existing methods vary by how they learn the embeddings, and how they combine them. Those methods are based on a range of techniques including: matrix factorization, tensor factorization, neural networks, and gradient descent. For example, one of the first method for KGs, TransE [START_REF] Bordes | Translating embeddings for modeling multirelational data[END_REF], models a relation as a translation in the embedding space of entities, and scores a candidate triple according to the distance between the translated head and the tail. The authors of TransE, Bordes et al, introduced two datasets, FB15k and WN18, respectively derived from Freebase and WordNet, which became becnhmarks in the evaluation of link prediction methods. Toutanova and Chen [START_REF] Toutanova | Observed versus latent features for knowledge base and text inference[END_REF] however showed that a very simple method was able to outperform previous methods because of a flaw in the datasets: many test triples have their inverse among the training triples. They introduced a challenging subset of FB15k, called FB15k-237, where all inverse triples are removed. Dettmers [START_REF] Dettmers | Convolutional 2D Knowledge Graph Embeddings[END_REF] introduced a similar subset of WN18, called WN18RR. Lately, performance was significantly improved on the challenging FB15k-237 by using convolutional architectures to learn embeddings [START_REF] Schlichtkrull | Modeling relational data with graph convolutional networks[END_REF] or to combine the embeddings in scoring functions [START_REF] Dettmers | Convolutional 2D Knowledge Graph Embeddings[END_REF]. The state-of-the-art results are obtained by ComplEx-N3, combining low-rank tensor decomposition with the addition of inverse relations, and various optimizations about hyper-parameters and regularization [START_REF] Lacroix | Canonical Tensor Decomposition for Knowledge Base Completion[END_REF]. The task of link prediction has also been extended with the embedding model RAE to multi-fold relations (aka. n-ary relations), and to instance reconstruction where only one entity of an n-ary relation is known, and all other entities have to be infered together [START_REF] Zhang | Scalable Instance Reconstruction in Knowledge Bases via Relatedness Affiliated Embedding[END_REF]. In this work, we limit ourselves to binary relations, and let those advanced cases for future work.

The latent feature models face two major drawbacks for their application to real settings. First, as they rely on the learning of entity embeddings, they cannot be applied to unseen entities, and the model has to be retrained whenever new entities or relations are introduced in the knowledge graph. Second, the predictions come without any explanation, and the meaning of learned latent features generally remain obscure. Given that it is unrealistic to expect high precision knowledge graph completion, simply because some of the missing information cannot be inferred from existing knowledge, human curation is necessary in practice. An explanation may comfort the curator in the veracity of the prediction, and could even be used to define automated inference rules.

Graph feature models, also called observed feature models, make inferences directly from the observed edges in the KG. Random walk inference [START_REF] Lao | Random walk inference and learning in a large scale knowledge base[END_REF] takes relation paths as features, and sets the feature values through random walks in the KG. The feature weights are learned by logistic regression for each target relation, and then used to score the candidate triples. The method has shown improvement over Horn clause generation with ILP (Inductive Logic Programming) [START_REF] Muggleton | Inverse Entailment and Progol[END_REF]. AMIE+ [START_REF] Galárraga | Fast rule mining in ontological knowledge bases with AMIE+[END_REF] manages to generate such Horn clauses in a much more efficient way by designing new ILP algorithms tailored to KGs. They also introduce a novel rule measure that improves the inference precision under the Open World Assumption (OWA) that holds in KGs. A fine-grained evaluation [START_REF] Meilicke | Fine-Grained Evaluation of Rule-and Embedding-Based Systems for Knowledge Graph Completion[END_REF] has shown that rule-based approaches are competitive with latent-based approaches, both in performance and in running time. AnyBURL [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF] restricts to path-like Horn clauses, and employs an anytime bottom-up strategy for learning rules. It significantly improves performance compared to AMIE+, and gets close to the state-of-the-art of latent feature models. Graph feature models, especially rule-based approaches, offer the advantage to produce intelligible explanations for inferences, unlike the latent feature models. Moreover, they can be applied to unseen entities because inferences are based on the neighborhood of the entity in the knowledge graph, rather than on a learned embedding. However, they require a distinct training phase for each of the possibly many target relations, whereas the latent feature models are generally learned in one training phase. A drawback of both kinds of approaches is that new embeddings and new rulesets need to be learned whenever the KG is updated, which becomes a challenge for dynamic data.

Our approach relies on graph features but a key difference is that there is no training phase, and all the learning is done at inference time. It is therefore an instance-based approach rather than a modelbased approach. Given an incomplete triple (e i , r k , ?) we compute Concepts of Nearest Neighbours (C- NN) from the observed features of head entity e i , where C-NNs have a representation equivalent to the bodies of AMIE+'s rules. From there, we infer a ranking of candidate entities for the tail of relation r k . In fact, as r k is not involved in the computation of C-NNs, many target relations can be inferred at nearly the same cost as a single relation. Indeed the main cost is in the computation of C-NNs, which is easily controlled because the computation algorithm is anytime. Compared to rule-based approaches, it amounts to compute only rule bodies that match the head entity e i , and to add the rule head according to relation r k .

Preliminaries

A knowledge graph (KG) is defined by a structure K = E, R, T , where E is the set of nodes, also called entities, R is the set of edge labels, also called relations, and T ⊆ E × R × E is the set of directed and labelled edges, also called triples. Each triple (e i , r k , e j ) represents the fact that relation r k relates entity e i to entity e j . This definition is very close to RDF graphs, where entities can be either URIs or literals (or blank nodes) and relations are URIs called properties. It is also equivalent to sets of logical facts, where entities are constants, and relations are binary predicates. As a running example, Figure 1 defines a small KG describing (part of) the British royal family (where ({a, b}, r, {c, d}) is a compact notation for (a, r, c), (a, r, d), (b, r, c), (b, r, d)).

Queries based on graph patterns play a central role in our approach as they are used to characterize the C-NNs, and can be used as explanations for inferences. There are two kinds of query elements: triple patterns and filters. A triple pattern (x, r, y) ∈ V × R × V is similar to a triple but with variables (taken from V) in place of entities. A filter is a Boolean expression on variables and entities. We here only consider equalities between a variable and an entity (x = e) and let richer filters about literal values for future work (e.g., inequalities and intervals on numbers and dates, regular expressions on strings). A graph pattern P is a set of query elements. Vars(P) denotes the set of variables occuring in P. Equality filters are equivalent to allowing entities in triple patterns: e.g., pattern {(x, parent, y), (y = Kate)} is equivalent to the triple pattern (x, parent, Kate). There are two advantages in using filters: [START_REF] Ferré | Link Prediction in Knowledge Graphs with Concepts of Nearest Neighbours[END_REF] simplifying the handling of triple patterns that have a single form (var-var) instead of four (var-var, entity-var, varentity, entity-entity); (2) opening perspectives for richer filters (e.g., x > 10, x ∈ [0, 10]). A query Q = (x 1 , ..., x n ) ← P is the projection of a graph pattern on a subset of its variables. Such queries find a concrete form in SPARQL with syntax SELECT ?x1...?xn WHERE { P }. Queries can be seen as anonymous rules, i.e. rules like those in AMIE+ [START_REF] Galárraga | Fast rule mining in ontological knowledge bases with AMIE+[END_REF] but missing the relation in the head. For example, the query Q ex = (x, y) ← (x, parent, u), (u, parent, v), (y, parent, v), (y, gender, s), (s = male) retrieves all (person,uncle) pairs, i.e. all pairs (x, y) where y is a sibling of a parent of x, and is male. We now define the answer set that is retrieved by a query. A matching of a pattern P on a KG K = E, R, T is a mapping µ from Vars(P) to entities in E such that µ(t) ∈ T for every triple pattern t ∈ P, and µ( f ) evaluates to true for every filter f ∈ P, where µ(t) and µ( f ) are obtained from t and f by replacing every variable x by µ(x). In the example KG, a possible matching for the pattern of the above query is µ ex = {x → Charlotte, y → Harry, u → William, v → Diana, s → male}. A matching is therefore a homomorphism from the pattern to the graph. Term "matching" is taken from the evaluation of SPARQL queries. In logics, terms "grounding" and "instantiation" are used instead. The answer set ans(Q, K) of a query Q = (x 1 , ..., x n ) ← P is the set of tuples (µ(x 1 ), ..., µ(x n )) obtained from all matchings µ of P on K. In the running example, the pair (Charlotte, Harry) is therefore an answer of query Q ex . Note that several matchings can lead to the same answer, and that duplicate answers are ignored. In the following, we only consider queries with a single projected variable, whose sets of answers are assimilated to sets of entities.

Overview of the Approach

Figure 2 shows a schematic overview of our approach. Given a knowledge graph and a triple (e i , r k , e j ), the goal is to predict the link to e j from e i through relation r k , i.e. e j is here the unknown to predict. For example, assume triple (Charlotte, parent, Kate) is missing in the KG of Figure 1, and we want to predict who is the mother of Charlotte. The first step is to compute a collection of Concepts of Nearest Neighbours (C-NN) δ for entity e i (see Section 5). In the example where e i is Charlotte, one C-NN contains Diana and Kate because they have female gender like Charlotte, and another C-NN contains George and Louis because they have William as a parent like Charlotte. The second and third step are to generate a collection of inference rules for each C-NN, and to derive a set of candidate entities from each rule (see Section 6.1). A candidate entity may be inferred by several rules, possibly generated from different concepts. In the example, a rule generated from the latter C-NN is that "persons who have William as a parent also have Kate as a parent", and Kate is therefore a candidate for the unknown entity. Finally, the different candidates can be ranked by scoring them based on rule measures such as support and confidence, and the ranking can be evaluated with standard ranking measures such as Hits@N and MRR w.r.t. the expected entity e j (see Section 7).

Concepts of Nearest Neighbours (C-NN)

In this section, we shortly recall the theoretical definitions underlying Concepts of Nearest Neighbours (C-NN), as well as the algorithmic and practical aspects of their approximate computation under a given timeout. Further details are available in [START_REF] Ferré | Concepts de plus proches voisins dans des graphes de connaissances[END_REF][START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF]. In the following definitions, we assume a knowledge graph K = E, R, T .

Theoretical Definitions

We start by defining graph concepts, introduced in Graph-FCA [START_REF] Ferré | Graph-FCA: An extension of formal concept analysis to knowledge graphs[END_REF], which is a generalization of Formal Concept Analysis (FCA) [START_REF] Ganter | Formal Concept Analysis -Mathematical Foundations[END_REF] to knowledge graphs. FCA concepts are a formalization of the classical theory of concepts in philosophy, where each concept has two related sides: the intension that characterizes what concept instances have in common, and the extension that enumerates those instances. Definition 1. A graph concept is defined as a pair C = (A, Q), where A is a set of entities and Q is a query such that A = ans(Q) is the set of answers of Q, and Q = msq(A) is the most specific query that verifies A = ans(Q). A is called the extension ext(C) of the concept, and Q is called the intension int(C) of the concept.

The most specific query Q = msq(A) represents what the neighborhood of entities in A have in common. It is well-defined under graph homomorphism (unlike under subgraph isomorphism). It can be computed from A by using the categorical product of graphs (see PGP intersection ∩ q in [START_REF] Ferré | Graph-FCA: An extension of formal concept analysis to knowledge graphs[END_REF]), or equivalently Plotkin's anti-unification of sets of facts [START_REF] Plotkin | Automatic Methods of Inductive Inference[END_REF]. In the example KG, William and Charlotte have in common the following query that says that they have married parents:

Q WC = msq({William, Charlotte})
= x ← (x, gender, s), (x, parent, y), (y, gender, t), (t = male), (x, parent, z), (z, gender, u), (u = f emale), (y, spouse, z), (z, spouse, y).

We have A WC = ans(Q WC ) = {William, Harry, George, Charlotte, Louis} so that

C WC = (A WC , Q WC ) is a graph concept. A concept C 1 = (A 1 , Q 1 ) is more specific than a concept C 2 = (A 2 , Q 2 ), in notation C 1 C 2 , if A 1 ⊆ A 2 .
For example, a concept more specific than C WC is the concept of the children of Kate and William, whose extension is {George, Charlotte, Louis}, and whose intension is x ← (x, gender, s), (x, parent, y), (y = William), (x, parent, z), (z = Kate).

The total number of graph concepts in a knowledge graph is finite but in the worst case, it is exponential in the number of entities. It is therefore not feasible in general to compute the set of all concepts. Instead of considering concepts generated by subsets of entities, we consider concepts generated by pairs of entities, and use them as as a symbolic form of distance between entities. Definition 2. Let e 1 , e 2 ∈ E be two entities. The conceptual distance δ(e 1 , e 2 ) between e 1 and e 2 is the most specific graph concept whose extension contains both entities, i.e. δ(e 1 , e 2 ) = (A, Q) with Q = msq({e 1 , e 2 }), and A = ans(Q).

For example, the above concept C WC is the conceptual distance between William and Charlotte. The "distance values" have therefore a symbolic representation through the concept intension Q that represents what the two entities have in common. The concept extension A contains in addition to the two entities all entities e 3 that match the common query (e 3 ∈ ans(Q)). Such an entity e 3 can be seen as "between" e 1 and e 2 : in formulas, for all e 3 ∈ ext(δ(e 1 , e 2 )), δ(e 1 , e 3 ) δ(e 1 , e 2 ) and δ(e 3 , e 2 ) δ(e 1 , e 2 ). Note that order on conceptual distances is a partial ordering, unlike classical distance measures.

A numerical distance dist(e 1 , e 2 ) = |ext(δ(e 1 , e 2 ))| can be derived from the size of the concept extension, because the closer e 1 and e 2 are, the more specific their conceptual distance is, and the smaller the extension is. For example, the numerical distance is 5 between Charlotte and William (see C wc ), and 3 between George and Charlotte.

The number of conceptual distances δ(e 1 , e 2 ) is no more exponential but it is still quadratic in the number of entities. By delaying their computation until we know for which entity e predictions are to be made, we fix one of the two entities in δ(e 1 , e 2 ), and the number of concepts becomes linear. Those concepts are called Concepts of Nearest Neighbours (C-NN). 1 lists the 6 C-NNs of Charlotte in the running example. Each row describes a concept of neighbours with its id, its extension, its intension, and its direct sub-concepts among the C-NNs. The bold part of extensions represent the proper extensions proper(δ l ) of C-NNs, i.e. the entities that do not appear in sub-concepts. The proper extensions of C-NN(Charlotte, K) define a partition over the set of entities E, where two entities are in the same proper extension if and only if they are at the same conceptual distance to entity Charlotte. The intension of the associated graph concept δ l provides a symbolic representation of the similarity between every e ∈ proper(δ l ) and Charlotte. For instance, concept δ 2 says that Diana and Kate have in common with Charlotte to be female persons. Figure 3 and the last column of Table 1 give the partial ordering between C-NNs: e.g., δ 1 δ 2 . Smaller C-NNs contain entities that are closer to the chosen entity, here Charlotte. In particular, C-NNs δ 2 and δ 3 contain the nearest neighbours of Charlotte. Although their numerical distance are the same (3), their intensions are very different: either being female or having William and Kate as parents.

Discussion. Given that C-NN(e, K) partitions the set of entities, the number of C-NNs can only be smaller or equal to the number of entities, and in practice it is generally much smaller. This is interesting because, in comparison, the number of graph concepts is exponential in the number of entities in the worst case. Note that the search space of ILP approaches like AMIE+ is the set of queries, which is even larger than the set of all graph concepts. Computing the C-NNs for a given entity is therefore a much more tractable task than mining frequent patterns or learning rules, although the space of representations is the same. The pending questions that we study in this paper is whether those C-NNs are useful for inference, and how they compare to other approaches. Compared to the use of numerical measures, like commonly done in k-NN approaches, C-NNs define a more subtle ordering of entities. First, because conceptual distances are only partially ordered, it can be that among two entities none is more similar than the other to the chosen entity e. This reflects the fact that there can be several ways to be similar to something, without necessarily a prefered one. For instance, who is most similar to Charlotte? Diana because she is also a female (C-NN δ 2 ) or George because he is also a son of William and Kate (C-NN δ 3 )? Second, because conceptual distances partition the set of entities, it can be said that when two entities are at the exact same conceptual distance, they are undistinguishable in terms of similarity (ex. George and Louis in C-NN δ 3 ). Third, the concept intension provides an intelligible explanation of the similarity to the chosen entity. h := chooseEdge(H) // choice of the splitting query element 5:

P 1 := P ∪ {h} // refined graph pattern 6:

S 1 := S ∩ ans(x ← P 1 , K) // refined cluster 7:

S 0 := S \ S 0 // remainder of cluster S 8:

S.remove(S , P, H)

9: S.add(S 1 , P 1 , H \ {h}) only if S 1 = ∅ 10:
S.add(S 0 , P, H \ {h}) only if S 0 = ∅ 11: end while 12: return S

Algorithmic and Practical Aspects

We here sketch the algorithmic and practical aspects of computing the set C-NN(e, K) of concepts of nearest neighbours of query entity e in a knowlege graph K. More details are available in [START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF]. The naive approach would be to compute |E| conceptual distances between e and the other entities. However, this is inefficient because in practice different entities will lead to the same concept or to concepts with overlapping intensions, and so some computations will be done again and again. Intuitively, our approach consists in computing the conceptual distances against clusters of entities instead of single entities. More concretely, our algorithm works by iteratively refining a partition {S l } l of the set of entities E, where each S l is a cluster of entities, in order to get an increasingly accurate partition converging to the partition induced by the proper extensions of C-NNs.

Each cluster S l is associated with a query Q l = x ← P l , and a set of candidate query elements H l . The relationship to C-NNs is that when H l is empty, the pair δ l = (ans(Q l ), Q l ) is a C-NN (i.e. δ l ∈ C-NN(e, K)), and S l is the proper extension of δ l . When H l is not empty, δ l is a generalization of concepts of neighbours, in the sense that either ans(Q l ) is the union of the extensions of several concepts of neighbours (lack of discrimination), or Q l is not necessarily the most specific query that matches all entities in ans(Q l ) (lack of precision in the conceptual similarity). In that case, one gets overestimates of conceptual distances for some of the entities in S l .

Algorithm 1 details the partitioning algorithm. Initially, there is a single cluster S 0 = E with P 0 being the empty pattern, and H 0 being the description of e. The description of an entity e is a graph pattern that is obtained by extracting a subgraph around e and, for each entity e i in the subgraph, by replacing e i by a variable y i , and by adding filter y i = e i . Here, we choose to extract the subgraph that contains all edges starting from e up to some depth.

Then at each iteration, any cluster S -with pattern P and set of candidate query elements H -is split in two clusters S 1 , S 0 by using an element h ∈ H as a discriminating feature. Element h must be chosen so that P ∪ {h} defines a connected pattern including variable x. Each addition of a query element therefore does one of the following: (a) add a filter contraint on a pattern variable, (b) add an edge between two pattern variables, or (c) add an edge from a pattern variable to a fresh variable. Many strategies are possible for choosing this element. In this work, we only consider two simple strategies:

• Random: random choice among the valid elements; The new clusters are defined as follows:

P 1 = P ∪ {h} Q 1 = x ← P 1 S 1 = S ∩ ans(Q 1 , K) H 1 = H \ {h} P 0 = P Q 0 = Q S 0 = S \ S 1 H 0 = H \ {h}
The equations for S 1 , S 0 ensure that after each split there is still a partition, possibly a more accurate one. The empty clusters (S i = ∅) are removed from the partition. As a consequence, although the search space is the set of subgraphs of the description of e, which has a size exponential in the size of the description, the number of clusters remains below the number of entities at all time. In the running example, the initial cluster S 1-6 (the union of concepts δ 1 to δ 6 ) is split with element (x = Charlotte) into S 1 and S 2-6 . Then cluster S 2-6 is split with element (x, gender, s) into S 2-5 and S 6 . Then cluster S 2-5 is split with element (s = f emale) into S 2 and S 3-5 . Next splits involve elements (x, parent, y) and (y = William) on S 3-5 .

Handling of RDF Schema (RDFS). The implementation takes into account the domain knowledge expressed as RDF Schema axioms [START_REF] Hitzler | Foundations of Semantic Web Technologies[END_REF]. A special treatment is done for triples (e i , rdf:type, e j ), where e j is a class, i.e. an unary predicate from the logical point of view. Such an unary predicate is simulated by not replacing e j by a variable in the description of e. Taking inspiration from query relaxation [START_REF] Hurtado | Query Relaxation in RDF[END_REF], the implementation also takes into account hierarchies of classes and properties, and domains and ranges of properties. For instance, this enables to find that two entities with respective type "horse" and "cat" have type "mammal" in common, even if it does not appear in their explicit description. A naive way to achieve this is to saturate entity descriptions with inferred triples. A more efficient way is to refine the above equation defining H 0 as H 0 = H \ {h} ∪ relax(h), where relax(h) is a set of relaxations of h [START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF]. For instance, the relaxation of a class is its set of superclasses.

Termination and efficiency. The above algorithm terminates because the set H (or its saturation in case of RDFS axioms) decreases at each split. However, in the case of large descriptions or large knowledge graphs, it can still take a long time. Now, previous experiments [START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF] show that most concepts are produced early, and that the rest of the time is spent at finding the last few concepts. Moreover, our algorithm is anytime because it can output a partition of entities at any time, and hence concepts of neighbours (possibly generalizations of them). It therefore makes sense to control runtime with a timeout parameter. Actually, the above algorithm converges to an approximation of the C-NNs, in the sense that the conceptual distance may be still be an overestimate at full runtime for some entities. This is because graph patterns are constrained to be subsets of the description of e. In order to get exact results, the duplication of variables and their adjacent edges should be allowed, but this would considerably increase the search space.

Experiments on KGs with up to a million triples have shown that the algorithm can compute all C-NNs for descriptions of hundreds of edges in a matter of seconds or minutes. In contrast, query relaxation does not scale beyond 3 relaxation steps, which is insufficient to identify similar entities in most cases; and computing pairwise symbolic similarities does not scale to large numbers of entities. A key ingredient of the efficiency of the algorithm also lies in the notion of lazy join for the computation of answer sets of queries. In short, the principle is to compute S 1 from S in an incremental way (rather than computing ans(Q 1 , K) from scratch), and to avoid the enumeration of all matchings of P 1 by computing joins only as much as necessary to compute the set of query answers (see details in [START_REF] Ferré | Answers Partitioning and Lazy Joins for Efficient Query Relaxation and Application to Similarity Search[END_REF]). A last point to discuss is the scalability of C-NNs computation w.r.t. the KG size, i.e. what is the impact of doubling the number of entities. If we make the reasonable assumption that the new knowledge follows the same schema as the old knowledge (e.g., adding film descriptions to a film KG), then the impacts are that: a) the query answers are two times larger, and b) the number of C-NNs is somewhere between the same and the double, depending on the novelty of the new knowledge. As a consequence, if our objective is to compute a constant number of C-NNs for further inference, then it suffices to increase the timeout linearly with KG size.

Link Prediction

The problem of link prediction is to infer a missing entity in a triple (e i , r k , e j ), i.e. either infer the tail from the head and the relation, or infer the head from the tail and the relation. Because of the symmetry of the two problems, we only describe here the inference of the tail entity. In the following, we therefore consider e i and r k as fixed (we avoid them in indices), and e j as variable.

C-NN-based Inference

The principle of C-NN-based inference is to generate a ruleset for each concept of neighbours δ l ∈ C-NN(e i , K). Those rules are similar in nature to those of AMIE+ or AnyBURL except that only rules that are matched by the head entity e i are generated. Indeed, the bodies of generated rules are intensions of C-NNs, which are subsets of e i 's description. From the concept intension int(δ l ) = Q l = x ← P l , we generate two kinds of inference rules ρ:

(1) by-copy rules: ρ := P l → (x, r k , e j ), for each e j ∈ E;

(2) by-analogy rules: ρ := P l → (x, r k , y), for each y ∈ Vars(P l ), y = x.

Inference by copy. The first kind of rules (by-copy rules) state that when an entity matches P l as x, it is related to entity e j through relation r k . As e i matches P l as x by definition of concepts of neighbours, it can be inferred that e i is related to e j . In formula, the set of inferred entities is simply E ρ = {e j }. Of course, the strength of the inference depends on the support and confidence of the rule ρ, which are defined as follows.

supp(ρ) = |ans(x ← P l , (x, r k , e j ))| conf (ρ) = |ans(x ← P l , (x, r k , e j ))| |ans(x ← P l )| + λ
The support is defined as the number of entities that match P l as x and are related to e j through r k . The confidence is defined as the ratio of the support out of the number of entities that match P l as x. Like this is done in AnyBURL [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF], we use a constant λ 0 as a kind of additive Laplace smoothing, in order to favor rules with larger support. The principle of inference by copy is that the tail entities e j to be predicted for e i can be copied from the tail entities of e i 's neighbour entities. For example, if triple (Charlotte, parent, Kate) is missing in the above example graph, it can be inferred from some of her closest neighbours: "George and Louis are similar to Charlotte because they have William as a father, and their mother is Kate, so Charlotte's mother could be Kate too" (support=2, confidence=2/(3 + λ)). Inference by analogy. The second kind of rules (by-analogy rules) state that when a pair of entities match P l as x and y, they are related through r k . As e i matches P l as x by definition of concepts of neighbours, it can be inferred that e i is related through r k to any entity e j that matches P l as y when x = e i . In formula, the set of infered entities is E ρ = ans(y ← P l , (x = e i )). Like above, the strength of the inference depends on the support and confidence of the rule, which are defined as follows.

supp(ρ) = |ans((x, y) ← P l , (x, r k , y))| conf (ρ) = |ans((x, y) ← P l , (x, r k , y))| |ans((x, y) ← P l )| + λ
The support is defined as the number of pairs of entities that match P l as x and y, and that are related through r k . The confidence is the ratio of the support out of the number of pairs of entities that match P l as x and y, plus Laplace smoothing λ. The principle of inference by analogy here relies on the observation that "e i is to e j as x is to y". By observing that pairs (x, y) that match pattern P l often satisfy (x, r k , y), one can predict the missing entity in (e i , r k , ?) to be any entity e j such that pattern P l is matched for x = e i and y = e j . For example, assume in the example graph that George, Charlotte, and Louis are only known to have father William, and that Kate is only known to be William's spouse, i.e. triples ({George, Charlotte, Louis}, parent, Kate) are missing. Here, inference by copy for the parents of Charlotte would only produce Charles and Diana, using William and Harry as similar entities (see C-NN δ 4 in Table 1). The intension of the conceptual similarity of Charlotte with William and Harry is

Q WH = x ← P WH P WH = (
x, gender, s), (x, parent, y), (y, gender, t), (t = male), (y, spouse, z), (z, spouse, y), (z, gender, u), (u = f emale),

saying that "they have a father married to a woman". From there the following by-analogy rule can be generated: P WH → (x, parent, z). This rule states that "any female spouse (wife) of a male parent (father) is a parent". Applying this rule to Charlotte (and equivalently to George and Louis) leads to the inference of the fact (Charlotte, parent, Kate) because Kate is indeed the wife of William, who is the father of Charlotte. It is noteworthy here that Kate is predicted to be a parent although she never appears as a parent in the incomplete graph. This is not possible with inference by copy.

Comparison with rules in other approaches. The main difference with other rule-based approaches is that we only generate rules that are specific to the entity e i and relation r k for which predictions are to be made. Looking in more detail to the structure of rules, each approach has its own language bias. In AMIE+ [START_REF] Galárraga | Fast rule mining in ontological knowledge bases with AMIE+[END_REF], only by-analogy rules are considered, and equality filters are excluded in most experiments because they make the number of rules explodes with the length of rules. They only retain closed rules, i.e. rules where each variable occurs at least twice. However, non-closed rules still have to be generated in order to reach all closed rules. Another difference is about rule measures. They use PCA confidence, a variation of classical confidence under the Partial Completeness Assumption (PCA); and head coverage, which is a form of recall of the rule relative to the extension of relation r k . In AnyBURL [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF], rule shapes are restricted to chains and cycles (including rule's head), where rule's head and equality filters cannot occur in the middle of a chain. The case of a chain with an equality filter on rule's head is a subset of our by-copy rules. The case of a cycle is a subset of our by-analogy rules. AnyBURL supports a third kind of rule that is not covered in this work: P → (e i , r k , y), where y ∈ Vars(P). Here, entities e j are predicted based on their own description, indepently of entity e i , which acts as a constant here. In RLvLR [START_REF] Omran | Scalable Rule Learning via Learning Representation[END_REF], rules are equivalent to the cyclic rules of AnyBURL.

Aggregation of Inferences

Given an incomplete triple (e i , r k , ?), the output of a link prediction system is a ranking of entities e j . Rankings of entities are evaluated with measures such as Hits@N (defined as 1 if the correct entity is among the first N entities, 0 otherwise), and MRR (Mean Reciprocal Rank, the inverse of the rank of the correct entity).

The question addressed in this section is how to aggregate all inferences presented in previous section into a global ranking. Indeed, the known entity e i leads to multiple concepts of neighbours, each concept of neighbours δ l generates multiple rules, and each rule ρ infers a set E ρ of candidate entities e j . The same candidate e j may be inferred by several rules, possibly generated from different concepts. In order to avoid the handling of too many rules, we exclude rules whose confidence is less than 1%, which is a very weak constraint. As a consequence, it may happen that some entities are not inferred by any rule, and hence that rankings do not include all entities of the KG. The missing entities are those for which there is not a single supporting evidence, and their rank is considered as infinite (Hits@N=0, MRR=0). The idea is to combine the measures of rules to give a score to each candidate e j , in order to get a global ranking. In this paper, we consider two scores, which we reuse or adapt from previous work, and detail below:

• Maximum Confidence (MC): introduced in AnyBURL [17];
• Dempster-Shafer (DS): adapted from Denoeux's work on k-NN classification [START_REF] Denoeux | A k-nearest neighbor classification rule based on Dempster-Shafer theory[END_REF].

Maximum Confidence (MC) score. This score is quite simple, and was shown effective in AnyBURL's work. The score of entity e j is simply the list of the confidences of the rules that infer triple (e i , r k , e j ), in decreasing order. This is a refinement of the score that was used in first experiments of AMIE, where the score was the maximum confidence among rules predicting e j . Using a list of confidences instead of a single confidence allows for a finer ranking. Ranking of lists of confidences is done similarly to lexicographic ordering. Candidates are first compared with the first confidence. If their first confidence are equal, comparison is done with the second confidence, and so on. Then, candidates with longer lists are put first because they have more rules predicting them.

Dempster-Shafer (DS) score. This score is inspired by the work of Denoeux [START_REF] Denoeux | A k-nearest neighbor classification rule based on Dempster-Shafer theory[END_REF], and adapted to our concepts of neighbours. Denoeux defines a k-NN classification rule based on Dempster-Shafer (DS) theory. Each k-nearest neighbour x l of an instance to be classified x is used as a piece of evidence that supports the fact that x belongs to the class c l of x l . The degree of support is defined as a function of the distance between x and x l , in such a way that the choice of k is less sensitive, so that large values of k can be chosen. DS theory enables to combine the k pieces of evidence into a global evidence, and to define a measure of belief for each class, which can be used as a score.

We adapt Denoeux's work to the inference of e j in triple (e i , r k , ?) in the following way. Each rule ρ that predicts e j is used as a piece of evidence. The degree of support depends on the extensional distance dist(ρ) = |ext(δ l )| of the concept of neighbours δ l that generated the rule, and on the confidence of the rule. In order to have comparable pieces of evidence, we instantiate each by-analogy rule P l → (x, r k , y) for each possible value of y into a by-copy rule: P l , (y = e j ) → (x, r k , e j ). Indeed, by-analogy rules tend to be more general, and hence to have larger distances.

Because in KGs a head entity can be linked to several tail entities through the same relation, we consider a distinct classification problem for each candidate tail entity e j ∈ E with two classes c 1 j (e j is a tail entity) and c 0 j (e j is not a tail entity). For each candidate entity e j and each rule ρ predicting e j , the rules[e j ] := ∅ // initialisation of the set of rules inferring each entity 3: end for 4: for all (S , P, H) ∈ Partitioning(e i , K) // for each C-NN do

5:

for all e j ∈ E do 6:

ρ := P → (x, r k , e j ) // for each by-copy rule for all e j ∈ ans(y ← P, (x = e i )) // for each inferred entity do score[e j ] := getS core(rules[e j ]) // aggregating rule scores into an entity score 22: end for 23: return a ranking of entities e j ∈ E according to score[e j ] degree of support can therefore be formalized by defining a mass distribution m j,ρ over sets of classes as follows.

m j,ρ ({c 1 j }) = α 0 conf (ρ) e -dist(ρ) m j,ρ ({c 0 j }) = 0 m j,ρ ({c 1 j , c 0 j }) = 1 -α 0 conf (ρ) e -dist(ρ)
m j,ρ ({c 1 j }) represents the degree of belief for e j being the tail entity, while m j,ρ ({c 1 j , c 0 j }) represents the degree of uncertainty. m j,ρ ({c 0 j }) is set to 0 to reflect the OWA (Open World Assumption) of KGs according to which a missing fact is not considered as false. Constant α 0 determines the maximum degree of belief, which can be lower than 1 to reflect uncertainty about known triples (e.g. 0.95). The degree of belief decreases exponentially with distance. Finally, we make the degree of belief proportional to the confidence of infering entity e j with rule ρ. In [START_REF] Denoeux | A k-nearest neighbor classification rule based on Dempster-Shafer theory[END_REF], that confidence factor does not exist because it would be 1 for the class of the nearest neighbour, and 0 for every other class.

By applying Dempster-Shafer theory to combine the evidence from all rules ρ that predict entity e j , we arrive at the following equation for the belief of each candidate tail entity e j .

Bel j = m j ({c We can use that belief as a score to rank all predicted entities by decreasing belief. The score used by AMIE+ is a special case of this score, where α 0 = 1, dist(ρ) = 0 for all rules, and PCA confidence is used instead of classical confidence.

1 j }) = 1 - ρ 1 -α 0 conf (ρ) e -dist(ρ)

Inference Algorithm and Explanations

Algorithm 2 summarizes the full inference process in pseudo-code. Lines 1-3 initialises for each candidate entity the set of rules that infer it. Line 4 iterates over the C-NNs of entity e i , after calling the partitioning algorithm (see Algorithm 1). Line 5 iterates over the by-copy rules generated from the current concept, and Line 11 iterates over the by-analogy rules. For each rule, if its confidence is above some threshold (0.01 in our experiments), it is added to the set of rules of all the entities infered by the rule (Line 8 for by-copy rules, and Lines 14-16 for by-analogy rules). Lines 20-22 computes a score for each candidate entity by aggregating each set of rules into a single score. Finally, Line 23 simply returns a ranking of the candidate entities based on their computed score.

The algorithm can easily be extended to output for each inferred entity an explanation of why it was inferred. At Line 21, an explanation can be computed from the set of rules, in addition to the entity score. A simple form of explanation is to select the top-K rules according to the chosen score: confidence in the case of Maximum Confidence, and degree of belief in the case of Demster-Shafer. Each rule is directly interpretable in terms of entities and relationships (see Section 6.1). Their readability can be improved by pretty-printing or graphical representation of the graph pattern. In our implementation, the graph patterns are displayed in a Turtle-like notation by doing a tree traversal starting from variable x, which for recall denotes entity e i and its neighbours. A more advanced form of explanation could post-process rules by removing redundant elements, or by merging similar rules. This is left for future work.

Experiments

We here report on experiments comparing our approach to other approaches on several standard benchmarks for link prediction. We first present the methodology, and study the impact on performance of the different strategies and hyper-parameters of our approach. Then we report performance results on benchmarks with an in-depth analysis. Finally, we discuss example inferences and explanations, and present a fine-grained comparison with AnyBURL. The companion page2 provides access to the source code, the datasets, and the experiment main results and logs.

Methodology

Datasets. We use four datasets that are used in many work to evaluate the link prediction task (WN18, WN18RR, FB15k, FB15k-237), plus an additional dataset that we derived from the Mondial dataset [START_REF] May | Information Extraction and Integration with FLORID: The MONDIAL Case Study[END_REF]. Table 2 provides statistics about datasets (numbers of: entities, relations, train edges, validation edges, and test edges). WN18 and FB15k were introduced by Bordes et al [START_REF] Bordes | Translating embeddings for modeling multirelational data[END_REF] for link prediction evaluation. WN18 is derived from a subset of WordNet, and FB15k from FreeBase. In later work, it was observed that many test triples had their inverse in the training set (e.g., hypernym is the inverse of hyponym in WordNet), and could be solved with very simple rules (e.g., (y, hypernym, x) → (x, hyponym, y)). More challenging datasets were introduced by removing from the validation and test sets all pairs of entities that occur in the training set. FB15k-237 was introduced by Toutanova and Chen [START_REF] Toutanova | Observed versus latent features for knowledge base and text inference[END_REF], and WN18RR was introduced by Dettmers et al. [START_REF] Dettmers | Convolutional 2D Knowledge Graph Embeddings[END_REF]. We introduce Mondial as a subset of the Mondial database [START_REF] May | Information Extraction and Integration with FLORID: The MONDIAL Case Study[END_REF], which contains facts about world geography. We simplified it to the task of link prediction by removing labelling edges and edges containing dates and numbers, and by unreifying n-ary relations into binary relations. Triples whose relation is rdf:type were also removed from the validation and test sets because they do not represent proper links between entities. The dataset is available from the companion page. It is smaller than other datasets but it makes it easier to interpret results, and we use it to study the impact of the different strategies and hyper-parameters without introducing a bias in our evaluation on the classical benchmarks.

Task. We follow the same protocol as introduced in [START_REF] Bordes | Translating embeddings for modeling multirelational data[END_REF], and followed by subsequent work. The task is to infer, for each test triple, the tail entity from the head and the relation, and also the head entity from the tail and the relation. We call test entity the known entity, and missing entity the entity to be infered. We evaluate the performance of our approach by using the same three measures as in [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF]: MRR and Hits@{1,10} (given in percents in this paper). Like in previous work, we use filtered versions of those measures to reflect the fact that, for instance, there may be several correct tail entities for a 1-n relation (e.g., the relation from awards to nominees). For example, if the correct entity is at rank 7 but 2 out of the first 6 entities form triples that belong to the dataset (and are therefore considered as valid), then it is considered to be at rank 5.

Method. Because our approach has no training phase we can use both train and validation datasets as examples for our instance-based inference. We consider a few alternative strategies:

• Random vs Ordered choice of a query element in the partitionning algorithm (see Section 5.2);

• by-copy vs by-analogy vs both kinds of inference rules (see Section 6.1);

• MC vs DS score for ranking infered entities (see Section 6.2).

Our approach has only three hyper-parameters (and no parameter to learn): the maximum depth of the description of the test entity, and two timeouts: one for the computation of C-NNs, and another one for the inference of an entity ranking. For the inference of a ranking of entities, we set λ = 2 in the definition of rule confidence, and α 0 = 0.95 in the DS-score.

The implementation of our approach has been integrated to SEWELIS as an improvement of previous work on the guided edition of RDF graphs [START_REF] Hermann | An Interactive Guidance Process Supporting Consistent Updates of RDFS Graphs[END_REF]. A standalone program for link prediction is available from the companion page. We ran our experiments on Fedora 25, with CPU Intel(R) Core(TM) i7-6600U @ 2.60GHz, and 16GB DDR4 memory. So far, our implementation is simple and uses a single core, although our partitioning algorithm lends itself to parallelization. We have observed that in all our experiments the memory footprint, which includes the training and validation triples, remains under a few percents, i.e. a few hundreds MB. An alternative implementation 3 for the computation of C-NNs has recently been developed as a Java library on top of the Jena Framework 4 , in order to facilitate their reuse in other applications.

Baselines. We compare our approach to a number of historical or state-of-the-art latent-based approaches: DISTMULT [START_REF] Yang | Embedding Entities and Relations for Learning and Inference in Knowledge Bases[END_REF], ANALOGY [START_REF] Liu | Analogical Inference for Multi-relational Embeddings[END_REF], KB_LR [START_REF] García-Durán | KBlrn: End-to-End Learning of Knowledge Base Representations with Latent, Relational, and Numerical Features[END_REF], R-GCN+ [START_REF] Schlichtkrull | Modeling relational data with graph convolutional networks[END_REF], ConvE [START_REF] Dettmers | Convolutional 2D Knowledge Graph Embeddings[END_REF], ComplEx-N3 [START_REF] Lacroix | Canonical Tensor Decomposition for Knowledge Base Completion[END_REF], and CrossE [START_REF] Zhang | Interaction Embeddings for Prediction and Explanation in Knowledge Graphs[END_REF]. We do so by choosing the same tasks and measures as in previous work because it was not possible for us to run them ourselves (no access to a GPU), and also because it allows for a fairer comparison (e.g., choice of hyper-parameters by authors). We also compare our approach to rule-based approaches: AMIE+ [START_REF] Galárraga | Fast rule mining in ontological knowledge bases with AMIE+[END_REF], RuleN [START_REF] Meilicke | Fine-Grained Evaluation of Rule-and Embedding-Based Systems for Knowledge Graph Completion[END_REF], and AnyBURL [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF]. Most performance results of the above approaches are reproduced from Meilicke et al. [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF] (see Section 7.3 for details). We add yet another baseline Freq that simply consists in ranking entities e j according to their decreasing frequency of usage in r k over the train+valid dataset, as defined by f req j = |ans(x ← (x, r k , y), (y = e j ))|. It is independent of the test entity, and therefore acts as a default ranking.

Impact of Strategies and Hyper-parameters and Consistency of Results

Impact of strategies. Table 3 compares the obtained MRR (in percents) on the Mondial dataset with different strategies. The timeout was set to 0.1s for both C-NN computation and inference, and the maximum depth was set to 3. For recall, there are three axes composing the strategy:

• choice of a spliting element: Random vs Ordered;

• kinds of inference rules: by-copy vs by-analogy vs both (by-copy+analogy);

• aggregation of inferences: MC (max. confidence) vs DS (Dempster-Shafer).

This results in 12 different strategies, and Table 3 shows that the best performing combines Random, by-copy+analogy, and MC. Looking more in detail, we observe that combining both kinds of rules is always beneficial, as well as aggregating inferences with maximum confidence. However, Ordered element choice is better with by-copy rules, while Random element choice is better with by-analogy rules. We can also evaluate the importance of each axis by measuring the MRR decrease when replacing the best option by another. The most important options are in order: by-analogy rules (-16.9), Random choice (-5.3), by-copy rules (-3.1), and finally MC aggregation (-1.3). From now on, we only use the best performing strategy.

Impact of timeout. Table 4 shows the evolution of a number of measures when timeout exponentially increases from 1ms to 1s. There are three performance measures (Hits@1, Hits@10, MRR), followed by three measures about the inference process, averaged over the test set: number of computed concepts of neighbours, number of inferred entities, and maximum confidence over all inferred entities. It can be 4. ROC curve of predicting Hits@1 correctness depending on maximum confidence threshold observed that with only 1% of the largest timeout (timeout 0.01s vs 1s), the MRR is already at 82% of the larger MRR, and 60% of the inferred entities are obtained, despite the fact that only 13% of the concepts have been computed. This indicates that early approximations of concepts of neighbours are already informative. Furthermore, increasing the timeout and hence the number of concepts does not only improve MRR but also increases confidence in inferences as indicated by the steadily increasing maximum confidence.

Impact of description depth. We have observed that increasing description depth beyond 2-3 makes almost no significant difference on performance measures, as well as on the number of inferred entities and on the maximum confidence. In the following, we therefore stick to a maximum description depth equal to 3.

Consistency of results.

To evaluate the consistency of the results of our approach, we perform two analyses on the Mondial dataset (with timeout=0.1s). First, we analyze the variability of the performance measures by spliting the test set 10-fold. We observe that the standard error accross the 10 folds is very small for all measures: e.g., 0.5% for MRR, around 1% for Hits@1 and Hits@10, and 0.4% for maximum confidence.

Second, we analyze the relevance of the maximum confidence by measuring how predictive it is about the correctness of predictions. Figure 4 shows the ROC curve for the classification task that consists in predicting whether the top entity in the filtered ranking is correct based on the hypothesis that its associated maximum confidence is above a threshold varying from 0 to 1. For example, with threshold at 0.70, the true positive rate is at 73% while the false positive rate is at 16%. The shape of the curve, as well

as its AUC (Area Under Curve) equal to 84%, demonstrate the relevance of the maximum confidence to estimate the validity of predictions. This comes in complement with interpretable explanations for inferred entities in the form of rules.

Results on Benchmarks

Tables 5 and6 compare the results of our approach (C-NN) to other approaches presented above as baselines on the four datasets WN18, WN18RR, FB15k, and FB15k-237. The baselines are organized in three groups: naive baseline Freq, latent-based approaches, and rule-based approaches. In each group, approaches are sorted by publication year. The source indicates which paper the results are taken from. The results for AnyBURL are those where 1000s (largest available time) are allocated to the computation of rules. In the results of C-NN, the timeouts (computation of concepts + inference) are 1+1s for WN datasets, and 1.5+0.5s for FB datasets. The output logs of C-NN predictions and explanations are available from the companion page.

ComplEx-N3 clearly outperforms other approaches on all datasets except WN18 where C-NN outperforms other approaches on the three measures. C-NN comes second on FB15k, and remains close to the best approaches on WN18RR. On FB15k-237, the MRR delta is -7.4 with ComplEx-N3, but only -0.4 with AnyBURL, the best rule-based approach. It is noteworthy that C-NN is competitive with AnyBURL because, whereas AnyBURL rules are computed in a supervised manner (knowing the target relation r k ), C-NN concepts are computed in an unsupervised manner (i.e, only knowing the source entity e i ). This implies that the concepts of neighbours of an entity can be computed once, and used for many different inference tasks, e.g. predicting links for several target relations.

Looking at the Freq baseline, it becomes visible how FB15k-237 is difficult because performance improvements over Freq are relatively small while they are huge on other datasets.

In-depth Analysis of Results

In this section, we refine the performance evaluation of our approach by analysing results w.r.t two criteria: (a) the kind of rule (by-copy vs by-analogy) that inferred the rank-1 predictions, (b) the characteristics of the relation to be predicted.

Prediction by-copy vs by-analogy. We here analyze predictions according to the kind of the best rule, i.e. the rule with highest confidence, which contributed to decide the first entity in the generated ranking. For recall, there are two kinds of rules: by-copy rules and by-analogy rules (see Section 6.1). Table 7 shows the performance measures, and maximum confidence, on two subsets of the test set for each dataset, depending on the kind of the best rule. Line "percent" gives the relative size of those subsets. The two percentages may not sum up to 100% because for some test cases, no prediction could be made: e.g., all predicted entities are already known to hold, and are therefore filtered out.

The balance between by-copy and by-analogy can be explained by the nature of each dataset. In WN18 and FB15k it is well known that most test triples can be inferred from an inverse triple, which is well captured with by-analogy rules: e.g., hypernym(y, x) → hyponym(x, y). In FB15k-237, all inverse triples have been removed, and for many relations, some candidate entities are much more frequent than others: e.g., US nationality for people. Those frequent entities are easily inferred with by-copy rules. In WN18RR, by-analogy rules remain dominant for two reasons. First, inverse relations have been removed (e.g., hyponym as inverse of hypernym), but other inverse triples have been retained. In particular, symmetric relations such as similar_to and derivationally_related_form are still present, and account for about one third of test triples. Second, there are much less situations like "US nationality", where a single word would dominate in a relation. The performance measures (Hits@1, Hits@10, MRR) are consistent with the balance between by-copy and by-analogy: measures are better for the most frequent kind of rule. However, it appears that by-analogy rules always have a higher confidence on average. We hypothesize that this is because by-analogy inference relies on the similarity with not only entity e i but with pair of entities (e i , e j ), and involves an explicit relationship between e i and e j , expressed as a graph pattern.

Results depending on relation characteristics. Relations are not all alike in knowledge graphs. They vary in frequency, and whether they are functional or multi-valued. We here define the frequency of a relation r as the number of test triples using it; and its degree as the average number of tail entities per head entity in the training set. When the degree equals (or is closed to) 1, the relation is said functional, otherwise it is said multi-valued. As the benchmarks imply to predict both the tail from the head, and the head from the tail, we also consider inverse relations. Their frequency is the same, and their degree is the average number of head entities per tail entity. The degree of the inverse relation is unrelated to the degree of the relation, and all combinations are possible, i.e. 1-1, n-1, 1-n, and n-n relations.

Figure 5 shows a bubble plot of the 224 relations and their inverses, which are found in the test set of FB15k-237, the most challenging dataset. Each buble is positioned according to its degree (ranging from 1 to 4000), and to the MRR of its predictions (ranging from 0 to 1). The bubble size reflects the frequency of the relation, and hence its weight in the global performance measures. Several observations can be made. First, the relations cover a wide range of frequencies and degrees, and there are no obvious correlation between those two dimensions. Second, there is a clear tendency that the higher the degree, the lower the MRR, i.e. multi-valued relations are harder to predict than functional relations. However, many relations stand under and above this tendency. Some relations have a low MRR despite a low degree (e.g., place of birth); and some relation succeeds to have a high MRR despite degrees up to 50 (e.g., inverse of food nutrient with degree=15). Examples of frequent relations with high MRR are: people nationality (degree=1.1, MRR=79.3), people gender (degree=1, MRR=90.4), topic webpage category (degree=1, MRR=100), marriage type of union (degree=1.1, MRR=100), award winners ceremony (de-gree=12, MRR=71.4), and its inverse (degree=22, MRR=70.1). Scalability w.r.t. the size of the knowledge graph. The scalability of the C-NN approach is difficult to evaluate because the runtime is determined by the user-given timeouts. It can only be evaluated by comparing the prediction performance for KGs of different sizes. However, the prediction performance cannot be compared easily between different datasets because inference difficulty varies from one dataset to another. Even starting from one large KG and using subgraphs of different sizes is tricky if one wants to keep the same inference difficulty. Synthetic KGs may be useful for benchmarking the scalability of query or reasoning engines [START_REF] Bizer | The berlin sparql benchmark[END_REF][START_REF] Guo | LUBM: A benchmark for OWL knowledge base systems[END_REF] but they may not have enough regularities for the task of link prediction.

We propose the following methodology to give some hint on the scalability of our approach. We consider an additional link prediction dataset, YAGO03-10 [START_REF] Dettmers | Convolutional 2D Knowledge Graph Embeddings[END_REF], that is similar in contents to the Freebase datasets but with about 10 times more entities (123K). According to our discussion at the end of Section 5, the timeout should increase linearly with the number of entities. We therefore ran our approach with timeouts 15+5s, and we checked if C-NN's performance remains competitive with AnyBURL's performance on YAGO3 (available in [START_REF] Meilicke | Anytime Bottom-Up Rule Learning for Knowledge Graph Completion[END_REF], with timeout=1000s like above). Estimating on 10% of test instances (out of 10000), we obtain the following results.

Approach

H@1 H@10 MRR AnyBURL 42.9 63.9 49 C-NN 42.4±1.5 67.8±1.4 51.2±1.4

The differences are comparable with those of other datasets, hence supporting the linear scaling rule. Now, the consequence of that linear scaling is that our approach cannot yet be applied in practice to very large KGs with millions of entities, like DBpedia or Wikidata, as the timeout per inference would have to be increased to non-practical values (about 15min on DBpedia). In order to achieve this goal, it will be necessary to compute more concepts of neighbours in less time. Optimization will not be enough, and it will be necessary to find robust sampling strategies: to compute C-NNs on a representative subset of entities, to select the relevant part of entity descriptions in the partitioning process, and to estimate the confidence of rules without computing all pattern matchings.

Example Inferences and Explanations

In this section, we look at example inferences in order to discuss the explainability of our approach. Note that further work is required to make explanations easier to use, and that our objective is here to show the potential of our approach, and the limits of the current implementation. We here consider inferences for the Mondial datasets because they are easier to read. Indeed, the Freebase and WordNet datasets use opaque identifiers for entities (e.g., 03735637 in WordNet, 05h43ls in Freebase), while Mondial uses clear URIs (e.g., http://www.semwebtech.org/mondial/10/country/ANG for Angola). In the next section we discuss inferences on FB15k-237 in comparison to AnyBURL.

We describe below four correct and one incorrect inferences. Those are not cherry-picked. They are simply the top five inferences in the experiment log available on the companion page (only considering 0.1+0.1s timeout). In the following, support and confidence measures are abbreviated as 'supp' and 'conf'.

(1) The (missing) neighbors countries of Angola are correctly predicted to be Zambia and Zaire (conf=0.91) by the following by-analogy rule (supp=85, conf=0.91). Subsequent predictions have ethnicGroup(x, z), locatedIn(u, x), f lowsInto(v, u), locatedInWater(w, u), neighbor(y, x) → neighbor(x, y)

This rule is a specialization of the rule neighbor(y, x) → neighbor(x, y) saying that neighborhood is a symmetric relationship. Because of our instance-based approach, our rules tend to be overly specific compared to rule mining approaches. Note that the above rule still covers 85 countries (out of 244). However, although this is let for future work, it would be relatively easy to wipe out the superfluous atoms of the rule by checking which atoms can be removed without decreasing the rule confidence.

(2) Sweden is correctly predicted to be encompassed in Europe by the following by-value rule (supp=25, conf=0.56). The subsequent prediction is America (conf=0.36).

language(x, y), neighbor(x, z), locatedIn(u, x), Lake(u), locatedIn(v, x), Mountain(v) → encompassed(x, Europe)

This rule says that a country x is in Europe if it has a language and a neighbor country, and if it contains a lake and a mountain. Obviously, this is not a generally valid rule, as its confidence shows, but its inferences are still valid in the majority of cases. It is interesting to see that our approach can not only make logical inferences like in the first example, but also statistical inferences based on best guess rules. (3) Islay is correctly predicted to belong to Inner Hebrides (conf=0.34 0.34 0.31) by the following top-1 by-analogy rule (supp=54, conf=0.34), and two other rules (not shown, conf=0.34 and conf=0.31).

There are five subsequent predictions (all UK islands) with same first and second confidences but lower third confidence, then Canares (conf=0.29), Lesser Antilles (conf=0.27).

locatedIn(x, u), locatedIn(z, u), belongT oI slands(z, y), locatedInWater(x, v), (v = AtlanticOcean) → belongT oI slands(x, y)

This rules says that an island x belongs to islands y if x shares a location (here, UK) with another island z that belongs to y, and x is located in the Atlantic Ocean. Apart from the specialization to the Atlantic Ocean, this rules makes sense because if two islands are located in a same place, e.g. a same country, there is a good chance that they belong to the same islands. However, this is not precise enough, like here where UK islands belong to 5 different islands (Inner Hebrides, Outer Hebrides, Shetlands, ...). The top-3 rules are required to discriminate between them. This demonstrates the value of the maximum confidence measure that makes use of all rule confidences in ranking. Note that without the additional rules, the correct entity would still be at a small rank, here 5th in the worst case. (4) Matternhorn is correctly predicted to be located in Switzerland (conf=0.42 0.36) by the following top-1 by-analogy rule (supp=153, confs=0.42) and another rule (not shown, conf=0.36). Subsequent predictions are France (conf=0.42 0.27), Austria (conf=0.42 0.14), Germany (conf=0.42 0.11).

Mountain(x), inMountains(x, z), inMountains(u, z), locatedIn(u, y) → locatedIn(x, y) This rule is similar to the previous one. In short, it says that two mountains that belong to the same mountain range tends to be located in the same place (typically a country). The confidence is 0.42 so that there are many exceptions but the support is high (supp=153). Similarly to the previous example, an additional rule was required to discriminate with neighbor countries. (5) The Baltic sea is incorrectly predicted to have an inflow from Goetaaelv (conf=0.33) by the following by-copy rule (supp=1, conf=0.33), instead of the expected Narva and Dalaelv (conf=0.03), which are predicted at ranks 274 and 302. Goetaaelv flows into a neighbor sea (Kattegat) of the Baltic sea but not in the Baltic sea proper.

locatedIn(x, y), neighbor(y, z), locatedInWater(u, x), (u = Seeland), locatedInWater(v, x), I sland(v) → f lowsInto(Goetaaelv, x)

This rule is very specific, and its support is only 1. It is clear that such an explanation should not be trusted blindly. Laplace smoothing helped lower its confidence from 1 downto 0.33 but no better rule was found here. Note however that rules with low support can still be useful sometimes when they retrieve very similar entities from which valid inferences can be drawn.

In conclusion, the current output of our implementation already contains a lot of information to understand the top prediction, and to assess its strength. It is important to see the given rules as statistical rules (similar to association rules [START_REF] Agrawal | Fast algorithms for mining association rules[END_REF]), rather than as logical rules that are either true or false, and to take into account the associated measures such as support and confidence. The above examples call for an interactive user interface in order to let users access more than the top-1 inference rule of the top-1 prediction, on demand.

Detailed Comparison with AnyBURL

In this section, we detail the comparison with predictions made by AnyBURL 5 . Indeed, AnyBURL is the state-of-the-art among rule-based approaches. The main question we answer here is: How predictions differ between C-NN and AnyBURL? Table 8 gives for the four datasets the distribution of test instances into four cases depending on the Hits@1 success of each approach (C-NN and AnyBURL). If the rank-1 predicted entity is correct, then Hits@1 equals 1, otherwise it equals 0. Case 1/1 means that both approaches are correct, case 1/0 means that C-NN is correct but not AnyBURL, etc. The four cases sum up to 100%. We consider the null hypothesis that if one approach has lesser performance, then its set of correct predictions is a subset of the correct predictions of the other approach. For instance, on FB15k-237 where AnyBURL is better, we expect that case 0/1 is empty. This is rejected in all four datasets. For instance, on FB15k-237, C-NN is the only correct approach for 4.7% test instances, which amounts to 1918 test instances. Those results demonstrate that C-NN and AnyBURL can complement each other, and that improvement of state-of-the-art performances remains possible. This is made explicit in the last two columns that allow to compare Hits@1 of the best of the two approaches and the best ensemble of the two (union of correct predictions).

We now detail a few test instances where C-NN and AnyBURL differ (cases 1/0 and 0/1). The analysis is limited by the fact that AnyBURL's code does not output rules as explanations for predictions (although the code could be modified to do so). Here are a few test instances where C-NN succeeds while AnyBURL fails:

• Wichita falls were correctly predicted to have Central Time Zone because it is contained in Texas (by-copy rule, support=31, confidence=0.79); • Joe Shuster was correctly predicted to have written "Superman II: The Richard Donner Cut" because he has produced a story that was honored for the film, and he won some award (by-analogy rule, support=5, confidence=0.36); • Joe Shuster was also correctly predicted to live in Cleveland because he has produced the story "Superman II" (by-copy rule, support=1, confidence=0.33). Here the explanation is not so convincing because of the very low support; • Film "Good Will Hunting" was correctly predicted to have two crew roles "make-up artist" and "special effects supervisor" because it was nominated for the "Satellite Award for Best Original Screenplay" (by-copy rule, support=16, confidence=0.78). Here the rule is probably overly specific as most films probably have the two crew roles, not only those nominated for the "Satellite Award...". Post-processing would be useful to remove the redundant parts.

Those C-NN rules could be found by AnyBURL, so they do not exhibit real limits of AnyBURL. However, all those rules except the second contain equality filters (constants in AnyBURL's terminology), and the number of such rules is extremely large, even for small rules, because of the high number of entities in KGs. C-NN here has the advantage that it only needs to generate rules for a given test instance (instance-based learning), while AnyBURL has to generate the rules before seeing any test instance (model-based learning). We can therefore expect C-NN to have a better coverage of such rules. Now, here are test instances where C-NN fails while AnyBURL succeeds. In each instance, we give the best C-NN rule, which fails, and then the "successful C-NN rule", i.e. the highest-confidence rule found by our approach that infers the correct entity.

• Lily Tomlin was incorrectly predicted to be nominated for TV series "Murphy Brown", instead of "The West Wing" (predicted 2nd), because he is an actor of the TV series, and won an award (by-analogy rule, support=364, confidence=0.53). The successful rule predicts "The West Wing" because he was nominated along with Joshua Malina (by-copy rule, support=14, confidence=0.50); • Film "Life is beautiful" was incorrectly predicted to have genre Italian, instead of War Film (predicted 8th), because it appears on the title list of the Netflix genre "Italian" (by-analogy rule, sup-port=393, confidence=0.56). The successful rule predicts War Film because it was produced in Italy (by-copy rule, support=14, confidence=0.25).

It is difficult to derive conclusions without knowing the successful AnyBURL's rules. Still, it can be observed that errors made by C-NN are reasonable ones. In the second example, the successful rule has weaker measures of support and confidence, and is less intuitive than the unsuccessful one. In reality, the film "Life is beautiful" has both genres "Italian" and "War Film", but the gold standard only contains the second. One must keep in mind that what is used as gold standard in those experiments are actually incomplete (and possibly incorrect) knowledge graphs.

Conclusion

We have shown that a symbolic approach to the problem of knowledge graph completion can be competitive with state-of-the-art approaches, both latent-based and rule-based. This comes with the major advantage that our approach can provide detailed explanations for each inference, in terms of the graph features. Compared to rule-based approaches, which can provide similar explanations, we follow an instance-based approach, and hence avoid the need for a training phase that can be costly in runtime and memory (rule mining), in particular with dynamic data. Moreover, our rule language bias is weaker by allowing arbitrary conjunctive rules with constants, while avoiding a combinatorial explosion thanks to our instance-based approach and our partitioning algorithm. Our approach is analogous to classification with k-nearest neighbours but our distances are defined as partially-ordered graph concepts instead of numbers.

There are many tracks for future work. Extending graph patterns with n-ary relations and richer filters over numbers, dates, etc. Optimizing and scaling the computation of C-NNs by finding good strategies to drive the partitioning process, or by parallelizing it. Improving the selection and display of rules as explanations. Evaluating our approach on other datasets, and other inference tasks.

EFig. 1 .

 1 Fig. 1. Example knowledge graph describing part of the British royal family.

Fig. 2 .

 2 Fig. 2. Overview of link prediction based on concepts of nearest neighbours

Definition 3 .

 3 Let e ∈ E be an entity. The Concepts of Nearest Neighbours (C-NN) (in short, concepts of neighbours) of e are all the conceptual distances between e and every entity e ∈ E. C-NN(e, K) = {δ(e, e ) | e ∈ E} Table

Fig. 3 .

 3 Fig. 3. Venn diagram of the extensions of the 6 C-NNs of Charlotte, labelled by their numerical distance.

Algorithm 1

 1 Partitioning algorithm for entity e in knowledge graph K Require: K = E, R, T a knowledge graph, and e ∈ E an entity 1: S := an empty collection of clusters 2: S.add(E, ∅, descr(e)) // the initial cluster (all entities, empty pattern, all edges describing e) 3: while no timeout ∧ ∃(S , P, H) ∈ S : H = ∅ do 4:

•

  Ordered: choice of equality elements first, then triple patterns whose relation is the least frequently used in P (novelty).

Algorithm 2

 2 Inference and ranking of candidate entities e j for entity e i and relation r k based on C-NNs Require: K = E, R, T a knowledge graph, e i ∈ E an entity, and r k the relation to predict for e i Require: getScore, a function computing an entity score from a set of rules (e.g., max confidence)1: for all e j ∈ E do 2:

7 :

 7 if conf (ρ) minConf then 8: rules[e j ] := rules[e j ] for all y ∈ Vars(P) s.t. y = x do 12: ρ := P → (x, r k , y) // for each by-analogy rule 13:if conf (ρ) minConf then 14:

15 : 20 :

 1520 rules[e j ] := rules[e j ] for all e j ∈ E do 21:

Fig. 5 .

 5 Fig. 5. MRR as a function of relation degree. Bubble sizes are proportional to relation frequency.

  : South Sudan and Cameroon (conf=0.41).

Table 1

 1 Description of the 6 C-NNs of Charlotte in the royal family KG.

	l	ext(δ l ) (proper in bold)	int(δ l )	sub-concepts
	1 {Charlotte}	x ← (x = Charlotte)	-
	2 {Diana, Kate, Charlotte}	x ← (x, gender, s), (s = f emale)	1
	3 {George, Louis, Charlotte} x ← (x, gender, s), (x, parent, y), (y = William), 1
			(x, parent, z), (z = Kate)
	4 {William, Harry,	x ← (x, gender, s),	3
		George, Louis, Charlotte}	(x, parent, y), (y, gender, t), (t = male),
			(x, parent, z), (z, gender, u), (u = f emale),
			(y, spouse, z), (z, spouse, y)
	5 {Charles, Diana, Kate,	x ← (x, gender, s)	2, 4
		William, Harry,
		George, Louis, Charlotte}
	6 {female, male, ...} = E	x ← ∅	5

Table 2

 2 Statistics of datasets.

	Dataset	entities	relations	train edges	valid. edges	test edges
	WN18	40 943	18	141 442	5 000	5 000
	WN18RR	40 559	11	86 835	3 034	3 134
	FB15k	14 951	1 345	483 142	50 000	59 071
	FB15k-237	15 541	237	272 115	17 535	20,466
	Mondial	2 473	20	8 456	570	701

Table 3

 3

	Comparing MRR on Mondial with 12 different strategies
	by-copy	by-analogy	by-copy+analogy
	MC	DS	MC	DS	MC	DS
	Random 28.6 16.9 42.4 41.3 45.5	44.2
	Ordered 30.1 19.2 33.7 30.8 40.2	37.3

Table 4

 4 Evolution of performance and internal parameters with timeout

	timeout(s)	Hits@1 Hits@10 MRR	nb. concepts nb. inferred max. conf
	0.001	15.7	31.8	21.2	3.7	103	0.20
	0.01	32.3	51.3	38.9	11.9	211	0.42
	0.1	38.6	59.1	45.5	35.0	311	0.57
	1	39.3	63.7	47.3	89.2	351	0.66

Table 5

 5

	Comparison of performance results on WN18 and WN18RR
				WN18			WN18RR
	Approach	source H@1 H@10 MRR H@1 H@10 MRR
	Freq		1.8	5.0	2.9	1.5	4.4	2.6
	Latent-based
	DISTMULT [27]	[10]	70.1	94.3	81.3	-	-	-
	ANALOGY [28]	[28]	93.9	-	94.2	-	-	-
	KB_LR [29]	[29]	-	95.1	93.6	-	-	-
	R-GCN+ [10]	[17]	69.7	96.4	81.9	-	-	-
	ConvE [9]	[17]	93.5	95.5	94.2	39.0	48.0	46.0
	ComplEx-N3 [11]	[17]	-	96.0	95.0	-	57.0	48.0
	CrossE [30]	[17]	74.1	95.0	83.0	-	-	-
	Rule-based
	AMIE+ [15]	[17]	87.2	94.8	-	35.8	38.8	-
	RuleN [16]	[17]	94.5	95.8	-	42.7	53.6	-
	AnyBURL [17]	[17]	93.9	95.6	95.0	44.6	55.5	48.0
	C-NN (ours)		96.7	97.2	96.9	44.4	51.9	46.9
	C-NN -best other		+2.2	+0.8	+1.9	-0.2	-5.1	-1.1
	C-NN -best other rule-based +2.2	+1.4	+1.

Table 6

 6

	Comparison of performance results on FB15k and FB15k-237
				FB15k			FB15k-237
	Approach	source H@1 H@10 MRR H@1 H@10 MRR
	Freq		14.3	28.5	19.2	17.5	35.6	23.6
	Latent-based
	DISTMULT [27]	[10]	52.2	81.4	63.4	10.6	37.6	19.1
	ANALOGY [28]	[28]	64.6	-	72.5	-	-	-
	KB_LR [29]	[29]	74.2	87.3	79.0	22.0	48.2	30.6
	R-GCN+ [10]	[17]	60.1	84.2	69.6	15.1	41.7	24.9
	ConvE [9]	[17]	67.0	87.3	74.5	23.9	49.1	31.6
	ComplEx-N3 [11]	[17]	-	91.0	86.0	-	56.0	37.0
	CrossE [30]	[17]	63.4	87.5	72.8	21.1	47.4	29.9
	Rule-based
	AMIE+ [15]	[17]	64.7	85.8	-	17.4	40.9	-
	RuleN [16]	[17]	77.2	87.0	-	18.2	42.0	-
	AnyBURL [17]	[17]	80.4	89.0	83.0	23.0	47.9	30.0
	C-NN (ours)		82.7	89.0	84.9	22.2	44.6	29.6
	C-NN -best other		+2.3	-2.0	-1.1	-1.7	-11.4	-7.4
	C-NN -best other rule-based +2.3	0.0	+1.9	-0.8	-3.3	-0.4

Table 7

 7 Split of test sets depending on the kind of inference rule (by-copy vs by-analogy).

		WN18	WN18RR	FB15k	Fb15k-237
	measure	by-c by-a by-c by-a by-c by-a by-c by-a
	percent	2%	98% 38% 57% 14% 85% 73% 25%
	Hits@1	15.0 98.7 15.2 67.8 37.0 91.0 26.2 12.2
	Hits@10	34.4 98.8 29.4 71.6 63.5 94.2 49.9 32.3
	MRR	22.0 98.7 19.9 69.1 47.0 92.1 34.1 18.7
	max. conf 0.24 0.96 0.28 0.70 0.60 0.88 0.61 0.66

Table 8

 8 Distribution of test instances depending of Hits@1 success of C-NN and AnyBURL. The last two columns give the average Hits@1 first for the best of the two approaches, and second for the best ensemble.

		H@1 C-NN / H@1 AnyBURL	H@1
	dataset	nb. test 1 / 1 1 / 0 0 / 1	0 / 0	best of two best ensemble
	WN18	10 100 93.2	3.4	0.9	2.5	96.6	97.5
	WN18RR	6 268 41.3	3.1	3.6	52.0	44.9	48.0
	FB15k	118 142 75.3	7.4	5.5	11.8	82.7	88.2
	FB15k-237	40 932 17.5	4.7	6.2	71.6	23.7	28.4

Companion page: http://www.irisa.fr/LIS/ferre/pub/link_prediction2020/

https://bitbucket.org/sebferre/conceptsofneighbours/

https://jena.apache.org/

Detailed predictions for state-of-the-art latent-based approaches are not available, and specific hardware (GPUs) is required to run them in a reasonable amount of time.

Acknowledgements

I kindly thank the reviewers for their insightful remarks, and valuable suggestions, which contributed to significantly improve this paper.