Entropy-based approach to missing-links prediction

Link-prediction is an active research field within network theory, aiming at uncovering missing connections or predicting the emergence of future relationships from the observed network structure. This paper represents our contribution to the stream of research concerning missing links prediction. Here, we propose an entropy-based method to predict a given percentage of missing links, by identifying them with the most probable non-observed ones. The probability coefficients are computed by solving opportunely defined null-models over the accessible network structure. Upon comparing our likelihood-based, local method with the most popular algorithms over a set of economic, financial and food networks, we find ours to perform best, as pointed out by a number of statistical indicators (e.g. the precision, the area under the ROC curve, etc.). Moreover, the entropy-based formalism adopted in the present paper allows us to straightforwardly extend the link-prediction exercise to directed networks as well, thus overcoming one of the main limitations of current algorithms. The higher accuracy achievable by employing these methods - together with their larger flexibility - makes them strong competitors of available link-prediction algorithms.


INTRODUCTION
Link-prediction is an active research field within network theory, aiming at uncovering missing connections (e.g. in incomplete datasets) or predicting the emergence of future relationships from the observed network structure. Loosely speaking, the missing links prediction problem can be stated by asking the following question: given a snapshot of a network, can the next most-likely links to be established be predicted? Such an issue is relevant in many research areas, such as social networks [1][2][3][4], protein networks [5,6], brain networks [7], etc.
To this aim, several algorithms have been proposed so far. Overall, "recipes" for link-prediction can be classified as belonging to either two main classes, similarity-based algorithms or likelihood-based algorithms [8,18]. Both classes of algorithms output a list of scores to be assigned to non-observed links: while the similarity-based ones may employ local [10], quasi-local [7,[11][12][13][14][15] or global information [16][17][18] (e.g. the nodes degree, the degree of common neighbours and the length of paths connecting any two nodes, respectively), the likelihood-based ones [19][20][21] are defined by a likelihood function whose maximization provides the probability that any two nodes are connected. This is usually achieved by assuming that some kind of benchmark information is known and by treating it as a constraint to account for. An alternative classification distinguishes between algorithms employing purely structural information (either binary or weighted [8]) and algorithms making use of some kind of external information as well (e.g. nodes attributes [22]). This paper represents our contribution to the stream of research concerning missing links prediction. A novel algorithm is proposed, building upon a series of results concerning constrained entropy-maximization [23][24][25]. In a nutshell, we advance the hypothesis that the tasks of predicting missing links and reconstructing a given network structure share many similarities worth to be further explored. The method we propose in the present work makes a first step in this direction, by employing entropybased null-models to approach the link-prediction problem. As a last remark, we notice that while the problem of missing links prediction is usually associated to the problem of spurious links identification, here we only address the former one.
The remainder of the paper is organized as follows. In the "Methods" section an overview of the missing links prediction problem is provided, together with a detailed description of the method we propose here. The "Data" section contains a synthetic description of the datasets used for testing our methods. In the "Results" section, we compare our method with the most common linkprediction algorithms and we comment on the results in the "Discussion" section.

METHODS
In order to fix the formalism, let us briefly reformulate the link-prediction problem ab initio.
Let us indicate with the symbol A the adjacency matrix of the observed network and with the symbol E the corresponding set of observed links: as a consequence, upon indicating with U the set of all nodes pairs, U \ E will be referred to as to the set of non-existent links. In order to fully control a given recipe for link-prediction, the link set is usually partitioned into a training set, E T , and a probe set, E P = E \ E T . The former is used in the "calibration" phase of a given prediction algorithm, while the latter is used for testing it: links belonging to E P are, in fact, removed, thus constituting the actual "prediction target". We denote with |E P | ≡ L miss the cardinality of the probe set, corresponding to the number of missing links. Naturally, the adjacency matrix is partitioned as well: the portion of it corresponding to the training set will be indicated with the symbol A T . The union of the missing links set and the non-existent links set E N = E P ∪ U \ E ≡ U \ E T will be referred to as to the set of non-observed links.
Link-prediction algorithms output a list of scores to be assigned to non-observed links. Upon indicating with i and j the nodes constituting the extremes of nonobserved links, the most traditional recipes are quickly reviewed below. In what follows, we will focus on the algorithms employing either local or quasi-local information.
Link-prediction for undirected networks • The simplest recipe to define scores is based the number of common neighbours (CN) of i and j • a slightly more elaborate function of it is represented by the Jaccard coefficient (J), which discounts the information encoded into the size of the nodes neighbourhoods: (2) • algorithms based on the information provided by nodes degrees exist. The simplest example is provided by the one inspired to the "preferential attachment" (PA) mechanism, whose generic score reads • other, instead, are defined by the inverse of some kind of function of the neighbours degree (according to the original Adamic-Adar -AA -prescription or subsequent variations, as the "resource allocation" -RA -one) • modifications of the aforementioned indices have been recently proposed, encoding information on the link density of the neighbourhood of each pair of nodes. These indices are the so-called CARbased ones [7] and prescribe to "correct" the scores above by adding a factor |γ(l)|, counting how many neighbours of node l ∈ Γ(i) ∩ Γ(j) are also common neighbours of i and j. More explicitly where e i indicates the external degree of node i, i.e. the number of neighbours of i that are not neighbours of j.

Entropy-based approach to link-prediction
The rationale of our method is based upon the concept of network reconstructability. In other words, provided that the accessible portion A T of a network is satisfactorily reproduced by a given amount of topological information, it is reasonable to suppose that the latter allows the inaccessible portion to be inferred with reasonable accuracy as well. Invoking the aforementioned concept allows us to rephrase the link imputation problem within the network reconstruction framework, making it possible to employ the techniques developed there.
From a technical point of view, our algorithm is a local, likelihood-based one. It rests upon the information provided by local, topological quantities, which are enforced as constraints of a maximization procedure defined within the Exponential Random Graph (ERG) framework [23,25]. In the case of binary, undirected networks, constraints are represented by nodes degrees, i.e. k(A T ) and the ERG framework leads to the maximization of the likelihood function L = ln P (A T ) where and p ij = xixj 1+xixj . The numerical value of the unknown coefficients x is obtained upon solving the system of equations (see the appendix for the derivation of the condition above). Our algorithm, which is trained on A T , prescribes to interpret the probability coefficients {p ij } ij∈E N assigned to the non-observed links, as scores to carry out the link-prediction: upon sorting the coefficients {p ij } ij∈E N in decreasing order, the first L miss largest ones are naturally interpreted as pointing out the L miss most probable missing links (notice that such a prescription is based on the assumption that the number of missing links is known, although their identity is not: as a consequence, this number is retained). In other words, the reconstructability assumption underlying our method leads us to interpret the non-observed links which have been assigned the largest probability coefficients as the ones that are most likely to appear given the chosen constraints. Our recipe has a remarkable, equivalent formulation. In fact, the subset Σ * of L miss links characterized by the largest probability coefficients identifies the subgraph satisfying the relationship Since the maximum value of such a product is achieved once the L miss largest factors are selected, the generic entry σ * ij obeys the following rule: σ * ij = 1 if ij belongs to the set of L miss most probable missing links and σ * ij = 0 otherwise; in other words, Σ * is the subgraph with largest probability among the ones with precisely L miss links. In the remainder of the paper, this approach will be named after the null-model employed to calculate the link scores, i.e. UBCM (Undirected Binary Configuration Model) [25].

Link-prediction for directed networks
Remarkably, our algorithm can be generalized to approach the missing links prediction problem in directed networks as well. It is enough to maximize the likelihood L = ln P (A T ) where, now, P (A T ) = i =j p aij ij (1 − p ij ) 1−aij by solving the system of equations and consider the coefficients {p ij } ij∈E N as scores to be assigned to the non-observed links (see the appendix for the derivation of the condition above). The proper prediction step is still carried out by applying the recipe defined by eq. 12, with the only difference that, now, the product runs over the directed pairs of nodes.
In the remainder of the paper, this approach will be named after the null-model employed to calculate the link scores, i.e. DBCM (Directed Binary Configuration Model) [25].
Notice, instead, that no unambiguous ways to generalize traditional scores exist. Here we have adopted the (directed) extensions listed below, with the aim of accounting for link directionality whenever possible: • when considering directed networks, the concept of common neighbours can be replaced by the concepts of "successors" and "predecessors", i.e. the nodes respectively "pointed by" and "pointing to" a given node. Upon indicating the set of "successors" of i with Γ S and the set of "predecessors" of j with Γ P , the CN index can be generalized as follows • building upon the directed version of the CN index, the J index reads • the RA and AA indices can be straightforwardly generalized as follows: one employing the total degree of nodes and the other employing the nodes out-and indegree • while the CAR-based indices are not straightforwardly generalizable to the directed case, other scores exist aiming at extending the concept of "closed triad" to account for link directionality [26]: here, the "triad weight" w i,j,l = #T i→j,l +#T i↔j,l #T i,j,l is defined by the (global) number #T i,j,l of observed, open triads of the particular kind T i,j,l , the (global) number #T i→j,l of observed, closed triads via a directed link from i to j and the (global) number #T i↔j,l of observed, closed triads via a reciprocal link between i and j; w(l) is, instead, a nodespecific weight that can be set either to w(l) = 1 k l or to 1. In order to avoid misinterpretations, we set the weight to 1.

Testing link-prediction
Once a link-prediction algorithm has been defined, a number of statistical indices exist to test its effectiveness. In what follows we will briefly review the ones we have employed in the present paper to compare the aforementioned algorithms. The first index we have considered is the true positive rate (also known with the name of precision), defined as TPR = L r L miss (20) and quantifying the percentage of missing links that are correctly recovered (i.e. the number L r of rightly identified missing links within the list of the first L miss links with the largest score). A similar-in-spirit index is the accuracy quantifying the percentage of correctly classified links (i.e. both the missing ones and the non-existent ones) with respect to the total number of non-observed links.
The third index we consider is the traditional area under the ROC curve, or AUC, proxied by the number n counts the number of times a missing-link is assigned a higher probability than to a non-existent one, while n accounts for the number of times they are assigned an equal probability. The denominator n coincides with the total number of comparisons (i.e. the number of missing links times the number of non-existent links). This index is intended to quantify the probability that any missing-link is assigned a score that is larger than the score assigned to any non-observed link. If all scores were i.i.d. the AUC value should be distributed around an expected value of 1/2: therefore, the extent to which the AUC value exceeds 0.5 provides an indication of how much better the algorithm performs than pure chance.
The set of missing links is usually randomly removed: we have followed such a procedure, by 1) randomly removing the 10% of links 10 times, 2) quantifying the performance of the algorithms above, by computing the three aforementioned indices over each sample, 3) averaging these values over the sample set (the sample standard deviation is used to proxy the estimation error.)

DATA
Our approach to link-prediction has been tested on a number of economic and financial datasets (see table I) and on several food-webs (see table II). As a first dataset, we have considered the World Trade Web (WTW) across a period of 51 years, i.e. from 1950 to 2000. The dataset in [27] collects yearly, bilateral, aggregated data on exports and imports (the generic entry m agg ij (y) is the sum of the single commodity-specific trade exchanges between i and j during the year y). The binary, directed representation of the WTW we have considered here has been obtained by linking any two nodes whenever the corresponding element m agg ij (y) is strictly positive, i.e. a ij (y) = Θ[m agg ij (y)]. As a second dataset, we have considered the Dutch Interbank Network (DIN) across a period of 11 years, i.e. from 1998 to 2008 [28]. Such a dataset collects quarterly data on exposures between Dutch banks, larger than 1.5 million euros and with maturity shorter than one year.
As a third dataset, we have considered the e-MID (i.e. the electronic Market for Interbank Deposits) network in a series of 61 temporal snapshots, corresponding to the maintenance periods (and ranging from 2005 to 2010). In this case, links represent granted loans [29]. As for the WTW, the binary, directed representations of both the DIN and e-MID have been obtained by linking any two nodes whenever a positive weight is observed between them.
The three real-world systems above are defined by directed connections. In order to evaluate the performance of the link-prediction algorithms considered in the present paper on undirected networks, we have properly symmetrized the adjacency matrices of these systems, according to the prescription a sym ij = a ij + a ji − a ij a ji .
Food-webs, instead, are considered in their binary, directed version only: if species i preys on species j, a directed link is drawn from j to i.  [25].

RESULTS
The performance of our link-prediction algorithm is shown in figs. 1, 2 and 3: the three panels of fig. 1 and 2 refer to the WTW, the DIN and e-MID respectively while food-webs are reported in fig. 3.
As a general comment, our method performs better than the other algorithms, with respect to all considered indices. The success of the method is particularly evident when considering the AUC index, proxying the probability of (correctly) assigning a larger score to a missing-link than to a non-existent link.
We argue the success of our algorithm to rest upon a core result that has been verified in a number of previous works [25,30,31]: the (purely) topological structure of the networks considered here can be reconstructed, to a large degree of accuracy, by enforcing the information encoded into the degree sequences alone; very likely, thus, the same amount of information also defines an accurate recipe to spot potential missing links. Otherwise stated, the level of "complexity" of the considered networks seems to be largely encoded into the degree sequences, thus requiring (just) their enforcement to be fully accounted for.
The founding principle of our approach is, thus, radically different from the one inspiring other link-prediction algorithms: we aim at finding the (most likely) generative process for the network at hand, while other methods define increasingly detailed procedures with little control on the "quality" of the included information. This becomes evident when considering that other algorithms (i.e. the CN, J, RA, AA and the CAR-based ones) employ a larger amount of information than the UBCMand DBCM-based ones: while the latter take as input just the nodes degrees, the former exploit the informa-tion provided by the whole set of common neighbours. This may indicate that the information encoded into the neighbourhood of any two nodes -supposedly providing more information than the one encoded into the degrees alone -is, actually, a mere consequence of lower-order statistics (i.e. the degrees themselves).
This also sheds light on the reason why our algorithm is less sensitive than others to the original value of link density: provided that our entropy-based recipes successfully individuate the process generating the networks at hand, the number of observed links is automatically accounted for.
Our comparison also points out that one of the factors determining the goodness of a given link-prediction algorithm concerns how the available information is used. An illustrative example is provided by the performance of the PA algorithm defined by eq. 18, requiring the same basic knowledge of our entropy-based recipes, i.e. the degree sequences of nodes. As clear upon inspecting the e-MID directed case, the assumption that any two nodes establish a connection with a probability that is proportional to their total degrees fails to capture the process shaping the network structure; entropy-maximization, on the other hand, makes a better use of the available information, by retaining the information on link directionality (that indeed plays a role, completely ignored by the aforementioned PA prescription).
Interestingly, the DBCM recipe described in the "Methods" section induces the "correct", directed generalization of the PA algorithm, defined by eq. 23 and outperforming the one defined by eq. 18. For sparse networks, in fact, the DBCM probability coefficients can be approximated as follows a simplified prescription that performs very similarly to the entropy-based algorithm on the DIN and e-MID; on dense networks -as the WTW -the DBCM performs much better, instead. The UBCM, on the other hand, reduces to p UBCM ij ∝ k i · k j , i.e. the undirected PA prescription defined by eq. 3.
Finally, let us comment on the performance of the TC index. The algorithm employing it has been designed to provide a solution to the problem of forecasting new connections among social networks users. By definition, it only predicts new links among disconnected nodes, disregarding all nodes pairs connected by, e.g. a nonreciprocated link. This explains the poor performance of the algorithm in our context, despite it performs satisfactorily to solve the specific task it was designed for [26]. this is employed to carry out the prediction step. While the usual link-prediction algorithms assume the existence of some node-specific tendency at a microscopic level (e.g. social agents tend to close triads), ours focuses on the most likely process that may have generated the considered network. The guessed process is, first, trained on the visible portion of the network and, then, employed to infer the (supposedly) unknown portion of the network: the "homogeneity" assumption underlying the whole procedure leads us to expect that a model satisfactorily reproducing the accessible part of a system is also effective in spotting potential missing links. One of the most effective recipes to tune generative processes is the one based on the entropy-maximization: beside guaranteeing that the available information is encoded in the least-biased way, the ERG framework is also very flexible, being applicable to both undirected and directed networks; other algorithms, on the contrary, rest upon concepts unambiguously defined only for undirected networks (an example is provided by the whole family of CAR indicators, whose core concept -i.e. the "local community links" factor |γ(l)| -does not admit a straightforward generalization).
Although every newly-proposed algorithm fosters the idea to be applicable to different kinds of systems, the effectiveness of a given (null) model depends on the particular system at hand: while economic, financial and food networks seem to be largely explained by the degree sequences, other systems may require a different (or additional) kind of information.
The results obtained so far on undirected, as well as directed, binary networks push us to look for further extensions of the proposed link-prediction technique. Interesting perspectives are represented by bipartite and weighted networks, for which the link-and weight-imputation topics are still little explored.
representing a functional of the probability distribution {P (A)} A∈A defined over the ensemble of configurations A. Its constrained maximization represents an inference procedure which has been proved to be maximally noncommittal with respect to the missing information [25]. To this aim, let us define the Lagrangean function a formula defining the Exponential Random Graph formalism in its full generality. Since we are interested in defining a link-prediction algorithm employing only lo-cal information, let us now enforce the nodes degrees as constraints. In the undirected case, this amounts at posing C(A T ) = k(A T ) which leads to the equivalence M m=1 θ m C m (A T ) = i<j (θ i + θ j )a ij (A T ) and, upon identifying x i ≡ e −θi , further leads to eq. 10. In the directed case, instead, C(A T ) = { k out (A T ), k in (A T )}, leading to M m=1 θ m C m (A T ) = i =j (θ i + λ j )a ij (A T ) and to the directed version of P (A) (a function, now, of x i ≡ e −θi and y i = e −λi ).
The recipe to estimate the unknown parameters comes from another principle, i.e. the likelihood maximization one. Upon maximizing the function L = ln P (A T ) (27) with respect to the unknowns (i.e. x in the undirected case and { x, y} in the directed case) the systems of equations 11 and 13 are recovered. As a last remark, we stress that the computational complexity of the whole algorithm is the one required for solving the systems of equations 11 and 13. In both cases, the formulation provided in the present paper can be further simplified by limiting ourselves to consider only the distinct values of the degrees [24]. This induces the resolution of a reduced system of equations, further lowering the computational complexity of the whole algorithm.