Abstract
Exponential Random Graph Models (ERGMs) have gained increasing popularity over the years. Rooted into statistical physics, the ERGMs framework has been successfully employed for reconstructing networks, detecting statistically significant patterns in graphs, counting networked configurations with given properties. From a technical point of view, the ERGMs workflow is defined by two subsequent optimization steps: the first one concerns the maximization of Shannon entropy and leads to identify the functional form of the ensemble probability distribution that is maximally non-committal with respect to the missing information; the second one concerns the maximization of the likelihood function induced by this probability distribution and leads to its numerical determination. This second step translates into the resolution of a system of O(N) non-linear, coupled equations (with N being the total number of nodes of the network under analysis), a problem that is affected by three main issues, i.e. accuracy, speed and scalability. The present paper aims at addressing these problems by comparing the performance of three algorithms (i.e. Newton’s method, a quasi-Newton method and a recently-proposed fixed-point recipe) in solving several ERGMs, defined by binary and weighted constraints in both a directed and an undirected fashion. While Newton’s method performs best for relatively little networks, the fixed-point recipe is to be preferred when large configurations are considered, as it ensures convergence to the solution within seconds for networks with hundreds of thousands of nodes (e.g. the Internet, Bitcoin). We attach to the paper a Python code implementing the three aforementioned algorithms on all the ERGMs considered in the present work.
Subject terms: Complex networks, Statistical physics
Introduction
Over the last 20 years, network theory has emerged as a successful framework to address problems of scientific and societal relevance1: examples of processes that are affected by the structural details of the underlying network are provided by the spreading of infectious diseases2–4, opinion dynamics5, the propagation of losses during financial crises6, etc.
Within such a context, two needs have emerged quite naturally7: 1) detecting the topological properties of a real network that can be deemed as statistically significant - typically those higher-order properties (e.g. the assortativity, the clustering coefficient, etc.) that may be not explained by local features of the nodes such as the degrees, 2) inferring the relevant details of a given network structure in case only partial information is available. Both goals can be achieved by constructing a framework for defining benchmarks, i.e. synthetic configurations retaining only some of the properties of the original system - the so-called constraints - and, otherwise, being maximally random.
Two different kinds of approaches have been proposed so far, i.e. the microcanonical and the canonical ones. Microcanonical approaches8–14 artificially generate many randomized variants of the observed network by enforcing the constraints in a ‘hard’ fashion, i.e. by creating configurations on each of which the constrained properties are identical to the empirical ones. On the other hand, canonical approaches15–19 enforce constraints in a ‘soft’ fashion, by creating a set of configurations over which the constrained properties are on average identical to the empirical ones. Softening the requirement of matching the constraints has a clear advantage: allowing the mathematical expression for the probability of a generic configuration, , to be obtained analytically, as a function of the enforced constraints.
In this second case, a pivotal role is played by the formalism of the Exponential Random Graph Models (ERGMs)20 whose popularity has steadily increased over the years. The ERGMs mathematical framework dates back to Gibbs’ (re)formulation of statistical mechanics and is based upon the variational principle known as maximum entropy, stating that the probability distribution that is maximally non-committal with respect to the missing information is the one maximizing the Shannon entropy21. This allows self-consistent inference to be made, by assuming maximal ignorance about the unknown degrees of freedom of the system.
In the context of network theory, the ERGMs framework has found a natural application to the resolution of the two aforementioned problems, i.e. 1) that of defining null models of the original network, in order to assess the significance of empirical patterns - against the hypothesis that the network structure is solely determined by the constraints themselves and 2) that of deriving the most probable configurations that are compatible with the available details about a specific network.
In both cases, after the functional form of the probability distribution has been identified, via the maximum entropy principle, one also needs to numerically determine it: to this aim, the likelihood maximization principle can be invoked, stating to maximize the probability of observing the actual configuration. This prescription typically translates into the resolution of a system of O(N) non-linear, coupled equations - with N representing the number of nodes of the network under analysis.
Problems like these are usually affected by the issues of accuracy, speed and scalability: the present paper aims at addressing them at once, by comparing the performance of three algorithms, i.e. Newton’s method, a quasi-Newton method and a recently-proposed fixed-point recipe22,23, to solve a variety of ERGMs, defined by binary and weighted constraints in both a directed and an undirected fashion.
We would like to stress that, while the theoretical architecture of ERGMs is well established, an exhaustive study of the computational cost required for their numerical optimization, alongside with a comparison among the most popular algorithms designed for the task, is still missing. Our work aims at filling precisely this gap. Additionally, we provide a Python code implementing the three aforementioned recipes on all the ERGMs considered in the present work.
General theory
Canonical approaches aim at obtaining the mathematical expression for the probability of a generic configuration, , as a function of the observed constraints: ERGMs realize this by maximizing the Shannon entropy15,16.
The Maximum Entropy Principle
Generally speaking, the problem to be solved in order to find the functional form of the probability distribution to be employed as a benchmark reads
1a |
1b |
where Shannon entropy reads
2 |
and is the vector of constraints representing the information defining the benchmark itself (notice that sums up the normalization condition). The solution to the problem above can be found by maximizing the Lagrangian function
3 |
with respect to . As a result one obtains
4 |
with representing the Hamiltonian, i.e. the function summing up the proper, imposed constraints and representing the partition function, ensuring that is properly normalized. Constraints play a pivotal role, either representing the information to filter, in order to assess the significance of certain quantities, or the only available one, in order to reconstruct the inaccessible details of a given configuration.
The maximum likelihood principle
The formalism above is perfectly general; however, it can be instantiated to study an empirical network configuration, say . In this case, the Lagrange multipliers ‘acting’ as unknown parameters in Eq. (4) can be numerically estimated by maximizing the associated likelihood function15,24. The latter is defined as
5 |
and must be maximized with respect to the vector . Remarkably, whenever the probability distribution is exponential (as the one deriving from the Shannon entropy maximization), the likelihood maximization problem
6 |
is characterized by first-order necessary conditions for optimality reading
7 |
and leading to the system of equations
8 |
to be solved. These conditions, however, are sufficient to characterize a maximum only if is concave. This is indeed the case, as we prove by noticing that
9 |
i.e. that the Hessian matrix, , of our likelihood function is ‘minus’ the covariance matrix of the constraints, hence negative semidefinite by definition. The fourth passage is an example of the well-known fluctuation-response relation20.
A graphical representation of how the two principles work is shown in Fig. 1.
Combining the MEP and the MLP principles
The Maximum Entropy Principle (MEP) and the Maximum Likelihood Principle (MLP) encode two different prescriptions aiming, respectively, at determining the functional form of a probability distribution and its numerical value. In optimization theory, the problem (the problem 1) is known as primal problem: upon noticing that the Shannon entropy is concave, while the imposed constraints are linear in , one concludes that the primal problem is convex (it is easy to see this, by rewriting it as a minimization problem for ).
As convexity implies strong duality, we can, equivalently, consider an alternative version of the problem to optimize, know as dual problem. In order to define it, let us consider the Lagrangian function
10 |
where, now, the generic expectation of the i-th constraint, , has been replaced by the corresponding empirical value, . As the dual function is given by
11 |
the dual problem reads
12 |
which is a convex problem by construction; this is readily seen by substituting Eq. (4) into Eq. (10), operation that leads to the expression
13 |
i.e. the likelihood function introduced in Eq. (5). In other words, Eq. (12) combines the MEP and the MLP into a unique optimization step whose score function becomes the Lagrangian function defined in Eq. (10).
Optimization algorithms for non-linear problems
In general, the optimization problem defined in Eq. (12) cannot be solved analytically, whence the need to resort to numerical methods. For an exhaustive review on numerical methods for optimization we refer the interested reader to25,26: in the following, we present only the concepts that are of some relevance for us. The problemis a Nonlinear Programming Problem (NLP). In order to solve it numerically, we will adopt a Sequential Quadratic Programming (SQP) approach. Starting from an initial guess , SQP solves Eq. (14) by iteratively updating the vector of Lagrange multipliers
14 |
according to the rule
15 |
, leading to the set of equations
16 |
which can be compactly rewritten as
17 |
The stepsize is selected to ensure that via a backtracking, line search procedure: starting from , if the Armijo condition
18 |
is violated, we set ( and are the parameters of the algorithm). On the other hand, the term can be selected according to a variety of methods. In the present contribution we focus on the following three ones.
Newton’s method. One speaks of Newton’s method in case is chosen to be
19 |
where is the Hessian matrix of the likelihood function and the term is typically selected as small as possible in order to avoid slowing convergence and to ensure that is negative definite (i.e. ). This choice of is also referred to as ‘exact Hessian’.
Quasi-Newton methods. Any Hessian approximation which is negative definite (i.e. satisfying ) yields an ascent direction and guarantees convergence. Although one may choose to consider the simplest prescription , which yields the ‘steepest ascent’ algorithm, here we have opted for the following recipe, i.e. the purely diagonal version of Newton’s method: , and , .
Fixed-point iteration on modified KKT conditions. In addition to the (classes of) algorithms above, we will also consider an iterative recipe which is constructed as a fixed-point iteration on a modified version of the Karush-Kuhn-Tucker (KKT) conditions, i.e. or, analogously, ; the iterate can, then, be made explicit by rewriting the latter as
20 |
The condition above will be made explicit, for each network model, in the corresponding subsection. We also observe that this choice yields a non-standard SQP method as is typically not symmetric, for our models.
A note on convergence. Provided that the Hessian approximation is negative definite, the direction is an ascent one; as such, it is guaranteed to yield an improvement of the objective function, for a step size that is sufficiently small. The role of the backtracking line search is that of finding a step size that yields such an improvement, while making sufficient progress towards the solution. As discussed in25, Newton’s method has local quadratic convergence, while the quasi-Newton method and the fixed-point iteration algorithm have local linear convergence.
Applications
Let us now apply the algorithms described in the previous section to a number of specific cases of interest. The taxonomy of the models considered in the present paper is shown in Fig. 2 while the constraints defining each model are illustrated in Fig. 3.
UBCM: binary undirected graphs with given degree sequence
Let us start by considering binary, undirected networks (BUNs). The simplest, non-trivial set of constraints is represented by the degrees of nodes: the degree of node i, i.e. , counts the number of its neighbours and coincides with the total number of 1s along the i-th row (or, equivalently, along the i-th column) of the adjacency matrix . The benchmark defined by this set of constraints is known as Undirected Binary Configuration Model (UBCM) and its Hamiltonian reads
21 |
entropy maximization15,16 leads to the factorized graph probability
22 |
where . In this case, the canonical ensemble of BUNs is the set of networks with the same number of nodes, N, of the observed graph and a number of (undirected) links varying from zero to the maximum value . The argument of the problem (6) for the specific network becomes
23 |
whose first-order optimality conditions read
24 |
Resolution of the UBCM. Newton’s and the quasi-Newton method can be easily implemented via the recipe defined in Eq. (18) (see “Appendix A” for the definition of the UBCM Hessian).
The explicit definition of the fixed-point recipe, instead, requires a preliminary observation, i.e. that the system of equations embodying the UBCM first-order optimality conditions can be re-written as follows
25 |
i.e. as a set of consistency equations. The observation that the term appears on both sides of the equation corresponding to the i-th constraint suggests an iterative recipe to solve such a system, i.e.
26 |
originally proposed in22 and further refined in23. The identification , allows the probability coefficients defining the UBCM to be numerically determined.
As any other iterative recipe, the one proposed above needs to be initialized as well. To this aim, we have tested three different sets of initial values: the first one is defined by the position , - usually, a good approximation of the solution of the system of Eq. (25), in the ‘sparse case’ (i.e. whenever the second one is a variant of the position above, reading , ; the third one, instead, prescribes to randomly draw the value of each parameter from a uniform distribution with support on the unit interval, i.e. , .
Reducing the dimensionality of the problem. The problem defining the UBCM can be further simplified by noticing that nodes with the same degree, say k, can be assigned the same value of the multiplier 24 - a result resting upon the observation that any value must match the sum of monotonic, increasing functions. This translates into the possibility of rewriting in a ‘reduced’ fashion, as
27 |
where the sums run over the distinct values of the degrees and f(k) counts the number of nodes whose degree is k. Rewriting the problem with respect to the set leads one to recover simplified versions of the three algorithms considered here: Newton’s and the quasi-Newton methods can, now, be solved via a ‘reduced’ version of eq. (18) (since both the dimension of the gradient and the order of the Hessian matrix of the likelihood function are, now, less than N), while the iterative recipe defined in (26) can be rewritten in terms of the ‘non-degenerate’ degrees, as
28 |
, where, at the denominator, the self-contribution (i.e. the probability that a node links to itself) has been explicitly excluded.
Performance testing. The performance of the three algorithms, considered in the present paper, to solve the reduced version of Eq. (25), has been tested on a bunch of real-world networks. The latter ones span a wide variety of systems, including natural, financial and technological ones. In particular, we have considered the synaptic network of the worm C. Elegans28, the network of the largest US airports29, the protein-protein interaction network of the bacterium H. Pylori30, Internet at the level of Autonomous Systems31 and eight daily snapshots of the so-called Bitcoin Lightning Network32, chosen throughout its entire history. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out.
The accuracy of each algorithm in reproducing the constraints defining the UBCM has been quantified via the maximum absolute error metrics, defined, in a perfectly general fashion, as (where is the empirical value of the i-th constraint, ). Naturally, in the UBCM case, , and the aforementioned error score becomes
29 |
(the acronym standing for Maximum Absolute Degree Error). Equivalently, it is the infinite norm of the difference between the vector of the empirical values of the constraints and that of their expected values.
For each algorithm, we have considered three different stopping criteria: the first one puts a condition on the Euclidean norm of the gradient of the likelihood function, i.e.
30 |
the second one puts a condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations, i.e.
31 |
the third one concerns the maximum number of iterations: after 1000 steps, any of the three algorithms stops.
The results about the performance of our three algorithms are reported in Table 1. Overall, all recipes perform very satisfactorily, being accurate, fast and scalable; moreover, all algorithms stop either because the condition on the norm of the likelihood is satisfied or because the condition on the norm of the vector of parameters is satisfied.
Table 1.
N | L | c | Newton | Quasi-Newton | Fixed-point | |||||
---|---|---|---|---|---|---|---|---|---|---|
MADE | Time (s) | MADE | Time (s) | MADE | Time (s) | |||||
C. Elegans (nn) | 265 | 1879 | ||||||||
US airports | 500 | 2980 | ||||||||
H. Pylori (pp) | 732 | 1465 | ||||||||
Internet (AS) | 11174 | 23409 | ||||||||
BLN 24-01-18 | 94 | 152 | ||||||||
BLN 25-02-18 | 499 | 1010 | ||||||||
BLN 30-03-18 | 1012 | 2952 | ||||||||
BLN 13-07-18 | 1999 | 8999 | ||||||||
BLN 19-12-18 | 3007 | 17689 | ||||||||
BLN 30-01-19 | 3996 | 27429 | ||||||||
BLN 01-03-19 | 5012 | 41096 | ||||||||
BLN 17-07-19 | 6447 | 54476 |
All algorithms stop either because the condition is satisfied or because the condition is satisfied. For what concerns accuracy, the two most accurate methods are Newton’s and the fixed-point ones; for what concerns speed, the fastest method is the fixed-point one (although Newton’s one approximately requires the same amount of time on each specific configuration). Only the results corresponding to the best choice of initial conditions are reported.
For what concerns accuracy, the largest maximum error per method spans an interval (across all configurations) that amounts at , and . By looking at each specific network, it is evident that the two most accurate methods are systematically Newton’s and the fixed-point ones.
For what concerns speed, the amount of time required by each method to achieve convergence spans an interval (across all configurations) that is , and (time is measured in seconds). The fastest method is the fixed-point one, although Newton’s method approximately requires the same amount of time, when compared to it on each specific configuration. Differences in the speed of convergence of any method, caused by the choice of a particular set of initial conditions, are indeed observable: the prescription reading , outperforms the other ones.
Let us now comment on the scalability of our algorithms. What we learn from our exercise is that scalability is not related to the network size in a simple way: the factors seemingly playing a major role are the ones affecting the reducibility of the original system of equations, i.e. the ones ‘deciding’ the number of different equations that actually need to be solved.
While reducibility can be easily quantified a posteriori, e.g. by calculating the coefficient of reduction, , defined as the ratio between the number of equations that survive to reduction and the number of equations defining the original problem (hence, the smaller the better), providing an exhaustive list of the aforementioned factors a priori is much more difficult.
In the case of the UBCM, is defined as the number of different degrees divided by the total number of nodes; one may, thus, argue that reducibility is affected by the heterogeneity of the degree distribution; upon considering that the latter can be quantified by computing the coefficient of variation (defined as , where s and m are, respectively, the standard deviation and the mean of the degree distribution of the network at hand), one may derive a simple rule of thumb: a larger coefficient of variation (pointing out a larger heterogeneity of the degree distribution) leads to a larger coefficient of reduction and a larger amount of time for convergence will be required. Notice that even if the degree distribution is narrow, outliers (e.g. hubs) may still play a role, forcing the corresponding parameters to assume either very large or very small values - hence, slowing down the entire convergence process.
In this sense, scalability is the result of a (non-trivial) interplay between size and reducibility. Let us take a look at Table 1: Internet is the most reducible network of our basket, although being the largest in size, while the neural network of C. Elegans is one of the least reducible networks of our basket, although being the second smallest one; as a consequence, the actual number of equations defining the UBCM on C. Elegans is while the actual number of equations defining the UBCM on Internet is - whence the larger amount of time to solve the latter. Remarkably, the time required by our recipes to ensure that the largest system of equations converges to the solution ranges from thousandths to tenths of seconds.
As a last comment, we would like to stress that, unlike several popular approximations as the Chung-Lu one27, the generic coefficient always represents a proper probability, in turn implying that eq. (23) also provides us with a recipe to sample the canonical ensemble of BUNs, under the UBCM. Notice that the factorization of the graph probability greatly simplifies the entire procedure, allowing a single graph to be sampled by implementing the Bernoulli trial
32 |
for each (undirected) pair of nodes, in either a sequential or a parallel fashion. The sampling process, whose computational complexity amounts at , can be repeated to generate as many configurations as desired. The pseudo-code for explicitly sampling the UBCM ensemble is summed up by Algorithm 1.
We explicitly acknowledge the existence of the algorithm proposed in33 for sampling binary, undirected networks from the Chung-Lu model (i.e. the ‘sparse case’ approximation of the UBCM), a recipe that is applicable whenever the condition , is verified. As explicitly acknowledged by the authors of 33. However, it does not hold in several cases of interest: an example of paramount importance is provided by sparse networks whose degree distribution is scale-free. In such cases, : hence, the hubs establish a connection with probability that becomes larger than 1 when and diverges for , thus leading to a strong violation of the requirement above.
DBCM: binary directed graphs with given in-degree and out-degree sequences
Let us now move to consider binary, directed networks (BDNs). In this case, the simplest, non-trivial set of constraints is represented by the in-degrees and the out-degrees of nodes, where counts the number of nodes ‘pointing’ to node i and counts the number of nodes i ‘points’ to. The benchmark defined by this set of constraints is known as Directed Binary Configuration Model (DBCM) whose Hamiltonian reads
33 |
as in the undirected case, entropy maximization15,16 leads to a factorized probability distribution, i.e.
34 |
where . The canonical ensemble of BDNs is, now, the set of networks with the same number of nodes, N, of the observed graph and a number of (directed) links varying from zero to the maximum value . The argument of the problem (6) for the specific network becomes
35 |
whose first-order optimality conditions read
36 |
and
37 |
Resolution of the DBCM. Newton’s and the quasi-Newton method can be easily implemented via the recipe defined in Eq. (18) (see “Appendix A” for the definition of the DBCM Hessian).
The fixed-point recipe for solving the system of equations embodying the DBCM first-order optimality conditions can, instead, be re-written in the usual iterative fashion as follows
38 |
Analogously to the undirected case, the initialization of this recipe has been implemented in three different ways. The first one reads , and , and represents a good approximation to the solution of the system of equations defining the DBCM in the ‘sparse case’ (i.e. whenever ); the second one is a variant of the position above, reading , and , ; the third one, instead, prescribes to randomly draw the value of each parameter from a uniform distribution defined on the unit interval, i.e. , and , . As for the UBCM, the identification , allows the probability coefficients defining the DBCM to be numerically determined.
Reducing the dimensionality of the problem. As for the UBCM, we can define a ‘reduced’ version of the DBCM likelihood, accounting only for the distinct (pairs of) values of the degrees. By defining and , in order to simplify the formalism, the reduced DBCM recipe reads
39 |
the implementation of the algorithms considered here must be modified in a way that is analogous to the one already described for the UBCM. In particular, the fixed-point recipe for the DBCM can be re-written by assigning to the nodes with the same out- and in-degrees (k, h) the same pair of values , i.e. as
40 |
41 |
where the sums, now, run over the distinct values of the out- and in-degrees, n(k, h) is the number of nodes whose out-degree is k and whose in-degree is h and, as usual, the last term at the denominator excludes the self-contribution (i.e. the probability that a node links to itself).
Performance testing. As for the UBCM, the performance of the three algorithms in solving the reduced version of Eqs. (37) and (38) has been tested on a bunch of real-world networks. The latter ones span economic, financial and social networks. In particular, we have considered the World Trade Web (WTW) during the decade 1992–200234, a pair of snapshots of the Bitcoin User Network at the weekly time scale (the first day of those weeks being 13-02-12 and 27-04-15, respectively)35 and of the corresponding largest weakly connected component (whose size is, respectively, and of the full network size) and a snapshot of the semantic network concerning the Twitter discussion about the Covid-19 pandemics (more precisely: it is the network of re-tweets of the (online) Italian debate about Covid-19, collected in the period 21st February–20th April 2020)36. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out.
The accuracy of each algorithm in reproducing the constraints defining the DBCM has been quantified via the maximum absolute error metrics that, in this case, reads
42 |
and accounts for the presence of two different degrees per node. As for the UBCM, it is the infinite norm of the difference between the vector of the empirical values of the constraints and that of their expected values.
The three different ‘stop criteria’ we have considered match the ones adopted for analysing the undirected case and consist in a condition on the Euclidean norm of the gradient of the likelihood function, i.e. , in a condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations, i.e. , and in a condition on the maximum number of iterations: after 10,000 steps, any of the three algorithms stops.
The results about the performance of our three algorithms are reported in Table 2. Overall, all recipes perform very satisfactorily, being accurate, fast and scalable; however, while Newton’s and the quasi-Newton methods stop because the condition on the norm of the likelihood is satisfied, the fixed-point recipe is always found to satisfy the limit condition on the number of steps (i.e. it runs for 10000 steps and, then, stops).
Table 2.
N | L | c | Newton | Quasi-Newton | Fixed-point | |||||
---|---|---|---|---|---|---|---|---|---|---|
MADE | Time (s) | MADE | Time (s) | MADE | Time (s) | |||||
WTW 92 | 162 | 5891 | ||||||||
WTW 93 | 162 | 7384 | ||||||||
WTW 94 | 162 | 9395 | ||||||||
WTW 95 | 162 | 10947 | ||||||||
WTW 96 | 162 | 11869 | ||||||||
WTW 97 | 162 | 12840 | ||||||||
WTW 98 | 162 | 13344 | ||||||||
WTW 99 | 162 | 13810 | ||||||||
WTW 00 | 162 | 14095 | ||||||||
WTW 01 | 162 | 14521 | ||||||||
WTW 02 | 162 | 13911 | ||||||||
13576 | 20604 | |||||||||
20984 | 25553 | |||||||||
297338 | 554643 | |||||||||
338334 | 571551 | |||||||||
436551 | 1489857 |
For what concerns the World Trade Web, both Newton’s and the quasi-Newton methods stop because the condition is satisfied; the fixed-point recipe, instead, always reaches the limit of 10,000 steps. The fastest and most accurate method is systematically the quasi-Newton one. The picture changes when very large networks, as Bitcoin and Twitter, are considered: in these cases, the fastest and most accurate method is the fixed-point one. Only the results corresponding to the best choice of initial conditions are reported.
Let us start by commenting the results concerning the WTW. For what concerns accuracy, the largest maximum error per method spans an interval, across all configurations, that amounts at , and . By looking at each specific network, it is evident that the most accurate method is systematically the quasi-Newton one.
For what concerns speed, the amount of time required by each method to achieve convergence spans an interval (across all configurations) that is , and (time is measured in seconds). The fastest method is the quasi-Newton one, followed by Newton’s method and the fixed-point recipe. The latter is the slowest method since it always reaches the limit of 10000 steps while the other two competing ones stop after few iterations. Appreciable differences in the speed of convergence of any method, caused by the choice of a particular set of initial conditions, are not observed.
The observations above hold true when the WTW is considered. The picture changes when very large networks, as Bitcoin and Twitter, are considered. First, let us notice that Bitcoin and Twitter ‘behave’ as the undirected version of Internet considered to solve the UBCM, i.e. they are very redundant, hosting many nodes with the same out- and in-degrees (in fact, the coefficient of reduction, , is, now, defined as the number of different ‘out-degree - in-degree’ pairs divided by twice the number of nodes). To provide a specific example, out of the original 676688 equations defining the DBCM for one of the two Bitcoin snapshots considered here, only equations survive the reduction; by converse, the WTW can be reduced to a much smaller extent (to be more specific, out of the original 324 equations defining the DBCM for the WTW in 1997, only equations survive the reduction). Interestingly, a good proxy of the reducibility of the directed configurations considered here is provided by their connectance (i.e. the denser the network, the less reducible it is).
On the one hand, this feature, common to the very large networks considered here, is what guarantees their resolution in a reasonable amount of time; on the other one, it seems not to be enough to let Newton’s and the quasi-Newton method be as fast as in the undirected case. For our binary, directed networks, in fact, the fastest (and, for some configurations, the most accurate) method becomes the fixed-point one. In order to understand this result we need to consider that both Newton’s and the quasi-Newton method require (some proxy of) the Hessian matrix of the DBCM to update the value of the parameters: since the order of the latter is for Newton’s method and O(N) for the quasi-Newton one, its calculation can be (very) time demanding - beside requiring a lot of memory for the step-wise update of the corresponding Hessian matrix. However, while this is compensated by a larger accuracy in the case of Newton’s method, this is no longer true when the quasi-Newton recipe is considered - the reason maybe lying in the poorer approximation provided by the diagonal of the Hessian matrix in case of systems like these.
As a last comment, we would like to stress that, as in the undirected case, the generic coefficient represents a proper probability, in turn implying that Eq. (35) also provides us with a recipe to sample the canonical ensemble of BDNs, under the DBCM. Notice that the factorization of the graph probability greatly simplifies the entire procedure, allowing a single graph to be sampled by implementing the Bernoulli trial
43 |
for each (directed) pair of nodes, in either a sequential or a parallel fashion. The sampling process, whose computational complexity amounts at , can be repeated to generate as many configurations as desired. The pseudo-code for explicitly sampling the DBCM ensemble is summed up by Algorithm 2.
BiCM: bipartite binary undirected graphs with given degree sequences
So far, we have considered monopartite networks. However, the algorithm we have described for solving the DBCM can be adapted, with little effort, to solve a null model designed for bipartite, binary, undirected networks (BiBUNs), i.e. the so-called Bipartite Configuration Model (BiCM)37. These networks are defined by two distinct layers (say, and ) and obey the rule that links can exist only between (and not within) layers: for this reason, they can be compactly described via a biadjacency matrix whose generic entry is 1 if node i belonging to layer is linked to node belonging to layer and 0 otherwise. The constraints defining the BiCM are represented by the degree sequences and where counts the neighbors of node i (belonging to layer ) and counts the neighbors of node (belonging to layer ).
Analogously to the DBCM case,
44 |
where . The canonical ensemble of BiBUNs includes all networks with, say, N nodes on one layer, M nodes on the other layer and a number of links (connecting nodes of different layers) ranging from zero to the maximum value .
The BiCM likelihood function reads
45 |
whose first-order optimality conditions read
46 |
Resolution of the BiCM. As for the DBCM case, Newton’s and the quasi-Newton methods can be implemented by adapting the recipe defined in Eq. (18) to the bipartite case (see “Appendix A” for the definition of the BiCM Hessian).
As for the DBCM, the fixed-point recipe for the BiCM can be re-written in the usual iterative fashion as follows
47 |
and the initialization is similar as well: in fact, we can employ the value of the solution of the BiCM in the sparse case, i.e. , and , (only this set of initial conditions has been employed to analyse the bipartite case).
Reducing the dimensionality of the problem. Exactly as for the DBCM case, the presence of nodes with the same degree, on the same layer, leads to the appearance of identical equations in the system above; hence, the computation of the solutions can be sped up by writing
48 |
where f(k) is the number of nodes, belonging to layer , whose degree is k and g(d) is the number of nodes, belonging to layer , whose degree is d.
Performance testing. The performance of the three algorithms in solving Eq. (49) has been tested on 16 snapshot of the bipartite, binary, undirected version of the WTW, gathering the country-product export relationships across the years 1995–201037. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out.
The accuracy of each algorithm in reproducing the constraints defining the BiCM has been quantified via the maximum absolute error metrics that, now, reads
49 |
to account for the degrees of nodes on both layers.
The three different ‘stop criteria’ match the ones adopted for analysing the UBCM and the DBCM and consist in a condition on the Euclidean norm of the gradient of the likelihood function, i.e. , in a condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations, i.e. , and a condition on the maximum number of iterations: after 1000 steps, any of the three algorithms stops.
The results about the performance of our three algorithms are reported in Table 3. Overall, all recipes are accurate, fast and scalable; all methods stop because the condition on the norm of the likelihood is satisfied.
Table 3.
L | c | Newton | Quasi-Newton | Fixed-point | ||||||
---|---|---|---|---|---|---|---|---|---|---|
MADE | Time (s) | MADE | Time (s) | MADE | Time (s) | |||||
WTW 95 | 1277 | 18947 | ||||||||
WTW 96 | 1277 | 19934 | ||||||||
WTW 97 | 1277 | 20222 | ||||||||
WTW 98 | 1277 | 20614 | ||||||||
WTW 99 | 1277 | 20949 | ||||||||
WTW 00 | 1277 | 21257 | ||||||||
WTW 01 | 1277 | 21326 | ||||||||
WTW 02 | 1277 | 21333 | ||||||||
WTW 03 | 1277 | 21330 | ||||||||
WTW 04 | 1277 | 21479 | ||||||||
WTW 05 | 1278 | 21841 | ||||||||
WTW 06 | 1279 | 21945 | ||||||||
WTW 07 | 1279 | 22036 | ||||||||
WTW 08 | 1279 | 21889 | ||||||||
WTW 09 | 1279 | 21621 | ||||||||
WTW 10 | 1279 | 21010 |
All algorithms stop because the condition is satisfied. For what concerns both accuracy and speed, the best performing method is Newton’s one, followed by the quasi-Newton and the fixed-point recipes. Only the results corresponding to the best choice of initial conditions are reported.
For what concerns accuracy, the largest maximum error per method spans an interval (across all configurations) that amounts at , and . By looking at each specific network, it is evident that the most accurate method is systematically Newton’s one.
For what concerns speed, the amount of time required by each method to achieve convergence spans an interval (across all configurations) that is (on average), (on average) and (on average) (time is measured in seconds). The fastest method is Newton’s one and is followed by the quasi-Newton and the fixed-point recipes. The gain in terms of speed due to the reducibility (now quantified by the ratio between the number of different pairs of degrees divided by the total number of nodes) of the system of equations defining the BiCM is also evident: while solving the original problem would have required handling a system of equations, the reduced one is defined by just distinct equations. Overall, a solution is always found within thousandths or hundredths of seconds.
As for the DBCM case, the ensemble of BiBUNs can be sampled by implementing a Bernoulli trial for any two nodes (belonging to different layers) in either a sequential or a parallel fashion. The computational complexity of the sampling process amounts at and can be repeated to generate as many configurations as desired. The pseudo-code for explicitly sampling the BiCM ensemble is summed up by Algorithm 3.
UECM: weighted undirected graphs with given strengths and degrees
So far, we have considered purely binary models. Let us now focus on a class of ‘mixed’ null models for weighted networks, defined by constraining both binary and weighted quantities. Purely weighted models such as the Undirected and the Directed Weighted Configuration Model have not been considered since, as it has been proven elsewhere38, they perform quite poorly when employed to reconstruct networks. Let us start by the simplest model, i.e. the one constraining the degrees and the strengths in an undirected fashion. While counts the number of neighbors of node i, defines the weighted equivalent of the degree of node i, i.e. its strength. For consistency, the binary adjacency matrix can be defined via the Heaviside step function, , as a position indicating that if , and zero otherwise. This particular model is known as Undirected Enhanced Configuration Model (UECM)38–40 and its Hamiltonian reads
50 |
it induces a probability distribution which is halfway between a Bernoulli and a geometric one39, i.e.
51 |
with
52 |
for any two nodes i and j such that and . Notice that the functional form above is obtained upon requiring that the weights only assume (non-negative) integer values (i.e. , ): hence, the canonical ensemble is now constituted by the weighted configurations with N nodes and a number of (undirected) links ranging between zero and the maximum value .
The argument of the problem (6) for the specific network now becomes
53 |
whose first-order optimality conditions read
54 |
Resolution of the UECM Newton’s and the quasi-Newton methods can be easily implemented via the recipe defined in Eq. (18) (see “Appendix A” for the definition of the UECM Hessian).
As for the purely binary models, the fixed-point recipe for solving the UECM first-order optimality conditions transforms the following set of consistency equations
55 |
(with ) into the usual iterative fashion, by considering the parameters at the left hand side and at the right hand side, respectively at the n-th and at the -th iteration. It is important to remark that a reduced version of the iterative recipe above can indeed be written, by assigning the same pair of values to the nodes with the same pair of values (k, s): however, the larger heterogeneity of the strengths causes this event to happen more rarely than for purely binary models such as the UBCM and the DBCM.
As for the purely binary cases, three different sets of initial conditions have been considered, whose definition follows from the simplest conceivable generalization of the purely binary cases. In particular, the first set of values reads , and , ; the second set is a variant of the first, reading , and , ; the third recipe, instead, prescribes to randomly draw the value of each parameter from the uniform distribution defined on the unit interval, i.e. , and , .
Performance testing The performance of the three algorithms to solve the system of equations defining the UECM has been tested on a bunch of real-world networks. In particular, we have considered the WTW during the decade 1990–200041. Since the weights defining the configurations of the WTW are real numbers, we have rounded them to the nearest integer value, before running the UECM. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out.
The accuracy of each algorithm in reproducing the constraints defining the UECM has been now quantified via the maximum relative error metrics, defined, in a perfectly general fashion, as (where is the empirical value of the i-th constraint, ). In the UECM case, we can define two variants of the aforementioned error, i.e.
56 |
57 |
(the acronyms standing for Maximum Relative Degree Error and Maximum Relative Strength Error). The reason driving this choice lies in the evidence that, in absolute terms, strengths are affected by a larger numerical error than degrees: this, however, doesn’t necessarily mean that a given algorithm performs poorly, as the magnitude of an error must be always compared with the numerical value of the quantity it refers to - whence the choice of considering relative scores.
The three different ‘stop criteria’ we have considered for each algorithm match the ones adopted for analysing the binary cases, consisting in a condition on the Euclidean norm of the gradient of the likelihood function, i.e. , and in a condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations, i.e. . The third condition concerns the maximum number of iterations: after 10000 steps, any of the three algorithms stops.
The results about the performance of our three algorithms are reported in Table 4. Overall, two out of three algorithms (i.e. Newton’s and the quasi-Newton methods) perform very satisfactorily, being accurate, fast and scalable; the third one (i.e. the fixed-point recipe), instead, performs very poorly. Moreover, while Newton’s method stops because the condition on the norm of the likelihood is satisfied, both the quasi-Newton and the fixed-point algorithms are always found to satisfy the limit condition on the number of steps (i.e. they run for 10000 steps and, then, stop).
Table 4.
N | L | c | Newton | Quasi-Newton | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MRDE | MASE | MRSE | Time (s) | MRDE | MASE | MRSE | Time (s) | ||||
WTW 90 | 169 | 7991 | |||||||||
WTW 91 | 184 | 8712 | |||||||||
WTW 92 | 185 | 8928 | |||||||||
WTW 93 | 187 | 9220 | |||||||||
WTW 94 | 187 | 9437 | |||||||||
WTW 95 | 187 | 9578 | |||||||||
WTW 96 | 187 | 10002 | |||||||||
WTW 97 | 187 | 10251 | |||||||||
WTW 98 | 187 | 10254 | |||||||||
WTW 99 | 187 | 10252 | |||||||||
WTW 00 | 187 | 10252 |
While Newton’s method stops because the condition is satisfied, the quasi-Newton one always reaches the limit of 10000 steps. The results on accuracy and speed clearly indicate that Newton’s method outperforms the quasi-Newton one. Only the results corresponding to the best choice of initial conditions are reported. The results of the fixed-point recipe are not shown.
For what concerns accuracy, the largest maximum error made by Newton’s method (across all configurations) amounts at and ; on the other hand, the largest maximum error made by the quasi-Newton method (across all configurations) amounts at and . For what concerns speed, Newton’s method employs tenths of seconds to achieve convergence on each configuration while the quasi-Newton one always requires tens of seconds (specifically, almost thirty seconds for each considered configuration). The results above indicate that the fastest and two most accurate method is systematically Newton’s one, suggesting that the ‘complexity’ of the model is such that the information encoded into the Hessian matrix cannot be ignored without consequences on the quality of the solution. The fixed-point algorithm, instead, stops after seconds but is affected by errors whose order of systematically magnitude amounts at and .
We also explicitly notice that the MADE basically coincides with the MRDE for all considered configurations, meaning that the largest error, made by the algorithms considered here to solve the UECM, affects the nodes with the lowest degree (i.e. equal to one). On the other hand, strengths are affected by a larger absolute error (i.e. the MASE, defined as ) than the degrees: if we calculate the MRSE, however, we realize that the largest errors affect very large strengths - hence being perfectly acceptable. For example, let us consider the WTW in 1993: the MASE amounts at 0.1 but, as the MRSE reveals, it affects a strength of the order of .
Lastly, differences in the speed of convergence of the two methods discussed in this section, caused by the choice of a particular set of initial conditions, are observable: the ‘uniform’ prescription outperforms the other ones.
Finally, let us comment on the algorithm to sample the UECM ensemble and that can be compactly achieved by implementing a two-step procedure. Let us look back at the formal expression for the pair-specific probability distribution characterizing the UECM: it induces coefficients reading
58 |
in turn suggesting that, for a specific pair of vertices i, j (with ), the appearance of the first link is ruled by a Bernoulli distribution with probability while the remaining ones can be drawn from a geometric distribution whose parameter reads ; in other words, the weight is drawn conditionally on the presence of a connection between the two considered nodes. The computational complexity of the sampling process is, again, . The pseudo-code for explicitly sampling the DBCM ensemble is summed up by Algorithm 4. Notice that the way our sampling procedure is written requires the support of the geometric distribution to coincide with the positive integers.
DECM: weighted directed graphs with given strengths and degrees
Let us now extend the ‘mixed’ model introduced in the previous section to the case of directed networks. Constraints are, now, represented by four sequences of values, i.e. , , , where the generic out-degree and in-degree are, respectively, defined as and and analogously for the generic out-strength and in-strength, reading and . Consistency requires that as for the UECM case. This model is known as Directed Enhanced Configuration Model (DECM) and its Hamiltonian reads
59 |
in turn, inducing the directed counterpart of the UECM distribution, i.e.
60 |
with
61 |
for any two nodes i and j such that and . As for the undirected case, weights are required to assume only (non-negative) integer values (i.e. , ): hence, the canonical ensemble is constituted by the weighted configurations with N nodes and a number of (directed) links ranging between zero and the maximum value .
The argument of the problem (14) for the specific network becomes
62 |
where , and whose first-order optimality conditions read
63 |
Resolution of the DECM. Newton’s and the quasi-Newton methods can be easily implemented via the recipe defined in Eq. (18) (see “Appendix A” for the definition of the DECM Hessian).
As for the UECM, the fixed-point recipe for solving the DECM first-order optimality conditions transforms the following set of consistency equations
64 |
(with ) into the usual iterative fashion, by considering the parameters at the left hand side and at the right hand side, respectively at the n-th and at the -th iteration. The reduced version of such a recipe would assign the same set of values to the nodes for which the quantities have the same value: however, the larger heterogeneity of the strengths causes the DECM to be much less reducible than the purely binary models we have considered in the present contribution.
The three different sets of initial conditions that have been considered generalize the UECM ones: in particular, the first set of values reads , , , , , and , ; the second set of initial conditions can be obtained by simply replacing L with N; the third recipe, as usual, prescribes to randomly draw the value of each parameter from the uniform distribution defined on the unit interval.
Performance testing The performance of the three algorithms to solve the system of equations defining the DECM has been tested on a bunch of real-world networks. In particular, we have considered the Electronic Italian Interbank Market (e-MID) during the decade 2000–201042. Since e-MID weights are real numbers, we have rounded them to the nearest integer value, before running the DECM. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out
The accuracy of each algorithm in reproducing the constraints defining the DECM has been quantified via the maximum relative error metrics, now reading
65 |
66 |
(the acronyms standing for for Maximum Relative Degree Error and Maximum Relative Strength Error) where we have defined , , and in order to simplify the formalism.
The three different ‘stop criteria’ we have adopted are the same ones we have considered for both the binary and the undirected, ‘mixed’ model, i.e. the condition on the Euclidean norm of the gradient of the likelihood function, i.e. ), the condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations (i.e. ) and the condition on the maximum number of iterations (i.e. after 10000 steps, any of the three algorithms stops).
The results about the performance of our three algorithms are reported in Table 5. Overall, Newton’s method performs very satisfactorily, being accurate, fast and scalable; the quasi-Newton method is accurate as well although (in some cases, much) slower. The fixed-point recipe, instead, performs very poorly, as for the undirected case. Moreover, while Newton’s method stops because the condition on the norm of the likelihood is satisfied, both the quasi-Newton and the fixed-point algorithms are always found to satisfy the limit condition on the number of steps (i.e. they run for 10,000 steps and, then, stop).
Table 5.
N | L | c | Newton | Quasi-Newton | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MRDE | MASE | MRSE | Time (s) | MRDE | MASE | MRSE | Time (s) | ||||
e-MID 00 | 196 | 10618 | |||||||||
e-MID 01 | 185 | 8951 | |||||||||
e-MID 02 | 177 | 7252 | |||||||||
e-MID 03 | 179 | 6814 | |||||||||
e-MID 04 | 180 | 6136 | |||||||||
e-MID 05 | 176 | 6203 | |||||||||
e-MID 06 | 177 | 6132 | |||||||||
e-MID 07 | 178 | 6330 | |||||||||
e-MID 08 | 173 | 4767 | |||||||||
e-MID 09 | 156 | 2961 | |||||||||
e-MID 10 | 135 | 2743 |
While Newton’s method stops because the condition is satisfied, the quasi-Newton one always reaches the limit of 10000 steps. The results on accuracy and speed clearly indicate that Newton’s method outperforms the quasi-Newton one. Only the results corresponding to the best choice of initial conditions are reported. The results of the fixed-point recipe are not shown.
For what concerns accuracy, the largest maximum error made by Newton’s method (across all configurations) amounts at and ; on the other hand, the largest maximum error made by the quasi-Newton method (across all configurations) amounts at and . For what concerns speed, Newton’s method employs tens of seconds to achieve convergence on each configuration; the time required by the quasi-Newton method is of the same order of magnitude, although it is systematically larger than the time required by Newton’s one. Overall, these results indicate that the fastest and two most accurate method is Newton’s one. As in the undirected case, the fixed-point algorithm, instead, stops after seconds but is affected by errors whose order of systematically magnitude amounts at and .
As for the UECM, the MADE basically coincides with the MRDE, for all considered configurations, while strengths are affected by a larger absolute error than the degrees: still, upon calculating the MRSE, we realize that the largest errors affect very large strengths - hence being perfectly acceptable.
Lastly, differences in the speed of convergence of the two methods discussed in this section, caused by the choice of a particular set of initial conditions, are observable: the ‘uniform’ prescription outperforms the other ones.
Finally, let us comment on the algorithm to sample the DECM ensemble: as for the UECM, it can be compactly achieved by implementing the directed counterpart of the two-step procedure described above. Given a specific pair of vertices i, j (with ), the first link can be drawn by sampling a Bernoulli distribution with probability while the remaining ones can be drawn from a geometric distribution whose parameter reads . The computational complexity of the sampling process is, again, and the pseudo-code for explicitly sampling the DECM ensemble is summed up by Algorithm 5. Notice that the way our sampling procedure is written requires the support of the geometric distribution to coincide with the positive integers.
Two-step models for undirected and directed networks
The need of considering network models defined in a two-step fashion arises from a number of considerations. First, the amount of information concerning binary and weighted quantities is often asymmetric: as it has been pointed out in43, information concerning a given network structure ranges from the knowledge of just a single, aggregated piece of information (e.g. the link density) to that of entire subgraphs. Indeed, models exist that take as input any binary, either probabilistic or deterministic, network model (i.e. any ) while placing link weights optimally, conditionally on the input configurations19,43.
Second, recipes like the UECM and the DECM are, generally speaking, difficult to solve; as we have already observed, only Newton’s method performs in a satisfactory way, both for what concerns accuracy and speed: hence, easier-to-solve recipes are welcome.
In what follows, we will consider the conditional reconstruction method (hereby, CReM) induced by the Hamiltonian
67 |
in case of undirected networks, it induces a conditional probability distribution reading
68 |
where, for consistency, and . The meaning of these relationships is the following: given any two nodes i and j, the absence of a link, i.e. , admits the only possibility ; on the other hand, the presence of a link, i.e. , rules out the possibility that a null weight among the same vertices is observed.
In general, the functional form of depends on the domain of the weights. In all cases considered in19,43, weights are assumed to be continuous; since the continuous distribution that maximizes Shannon entropy while constrained to reproduce first-order moments is the exponential one, the following functional form
69 |
(for any undirected pair of nodes) remains naturally induced. As shown in43, the problem (14) has to be slightly generalized; still, its argument for the specific network becomes
70 |
where the quantity represents the expected value of over the ensemble of binary configurations defining the binary model taken as input (i.e. the marginal probability of an edge existing between nodes i and j). It follows that the CReM first-order optimality conditions read
71 |
Resolution of the CReM Newton’s and the quasi-Newton method can still be implemented via the recipe defined in Eq. (18) (see “Appendix A” for the definition of the CReM Hessian).
As for the UECM and the DECM, the fixed-point recipe for solving the system of equations embodying the CReM transforms the set of consistency equations
72 |
into an iterative recipe of the usual form, i.e. by considering the parameters at the left hand side and at the right hand side, respectively at the n-th and at the -th iteration. Although a reduced recipe can, in principle, be defined, an analogous observation to the one concerning the UECM and the DECM holds: the mathematical nature of the strengths (now, real numbers) increases their heterogeneity, in turn causing the CReM algorithm to be reducible even less than the ‘mixed’ models defined by discrete weights.
The initialization of the iterative recipe for solving the CReM has been implemented in the usual threefold way. The first set of initial values reads , ; the second one is a variant of the position above, reading ; the third one, instead, prescribes to randomly draw the value of each parameter from the uniform distribution defined on the unit interval, i.e. , .
When considering directed networks, the conditional probability distribution defining the CReM reads
73 |
for any two nodes i and j such that ; the set of Eq. (73) can be generalized as follows
74 |
and analogously for the sets of values initializing them.
Rescaling the CReM algorithm. Although the equations defining the CReM algorithm cannot be effectively reduced, they can be opportunely rescaled. To this aim, let us consider directed configurations and the system
75 |
where the sufficient statistics has been divided by an opportunely defined factor (in this case, ) and the symbols , , and stress that the solution we are searching for is a function of the parameter itself. In fact, a solution of the system above reads
76 |
77 |
as it can be proven upon substituting it back into Eq. (76) and noticing that and are solutions of the system of equations defined in (76). As our likelihood maximization problem admits a unique, global maximum, the prescription above allows us to easily identify it. Rescaling will be tested in order to find out if our algorithms are enhanced by it under some respect (e.g. accuracy or speed).
Performance testing Before commenting on the performance of the three algorithms in solving the system of equations defining the CReM, let us stress once more that the formulas presented so far are perfectly general, working for any binary recipe one may want to employ. In what follows, we will test the CReM by posing and .
To test the effectiveness of our algorithms in solving the CReM on undirected networks we have considered the synaptic network of the worm C. Elegans28 and the eight daily snapshots of the Bitcoin Lightning Network32; the directed version of the CReM has, instead, been solved on the Electronic Italian Interbank Market (e-MID) during the decade 2000-201042. Before commenting on the results of our numerical exercises, let us, first, describe how the latter ones have been carried out.
As for the discrete ‘mixed’ models, the accuracy of each algorithm in reproducing the constraints defining the CReM has been quantified via the Maximum Relative Degree Error and the Maximum Relative Strength Error metrics, whose definition is provided by Eqs. (57), (58) and (66), (67) for the undirected and the directed case, respectively. Analogously, the three ‘stop criteria’ for each algorithm are the same ones that we have adopted for the other models (and consist in a condition on the Euclidean norm of the gradient of the likelihood function, i.e. , a condition on the Euclidean norm of the vector of differences between the values of the parameters at subsequent iterations, i.e. , and a condition on the maximum number of iterations, i.e. 10,000 steps).
The results about the performance of our three algorithms are reported in Tables 6 and 7. Let us start by commenting the results reported in Table 6 and concerning undirected networks. Generally speaking, Newton’s method is the most accurate one (its largest maximum errors span intervals, across all configurations, that amount at and ) although it scales very badly with the size of the network on which it is tested (the amount of time, measured in seconds, required by it to achieve convergence spans an interval, across all configurations, that amounts at .
Table 6.
Newton | Quasi-Newton | Fixed-point | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
MRDE | MASE | MRSE | Time (s) | MRDE | MASE | MRSE | Time (s) | MRDE | MASE | MRSE | Time (s) | |
The results on accuracy and speed indicate that Newton’s and the fixed-point method compete, outperforming the quasi-Newton one. Only the results corresponding to the best choice of initial conditions are reported.
Table 7.
N | L | Newton | Quasi-Newton | Fixed-point | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MRDE | MRSE | Time (s) | MRDE | MRSE | Time (s) | MRDE | MRSE | Time (s) | |||
e-MID 00 | 196 | 10618 | |||||||||
e-MID 01 | 185 | 8951 | |||||||||
e-MID 02 | 177 | 7252 | |||||||||
e-MID 03 | 179 | 6814 | |||||||||
e-MID 04 | 180 | 6136 | |||||||||
e-MID 05 | 176 | 6203 | |||||||||
e-MID 06 | 177 | 6132 | |||||||||
e-MID 07 | 178 | 6330 | |||||||||
e-MID 08 | 173 | 4767 | |||||||||
e-MID 09 | 156 | 2961 | |||||||||
e-MID 10 | 135 | 2743 |
For what concerns accuracy, the two most accurate methods are Newton’s and the quasi-Newton one; for what concerns speed, the fastest method is the fixed-point one. Only the results corresponding to the best choice of initial conditions are reported.
The quasi-Newton method, on the other hand, is very accurate on the degrees (as already observed in the UBCM case) but not so accurate in reproducing the weighted constraints (its largest maximum errors span intervals, across all configurations, that amount at and ). Moreover, it scales even worse than Newton’s method with the size of the network on which it is tested (the amount of time, measured in seconds, required by it to achieve convergence spans an interval, across all configurations, that amounts at ).
The performance of the fixed-point recipe is, somehow, intermediate between that of Newton’s and the quasi-Newton method. For what concerns accuracy, it is more accurate in reproducing the binary constraints than in reproducing the weighted ones (its largest maximum errors span intervals, across all configurations, that amount at and ) although it outperforms Newton’s method, sometimes. For what concerns scalability, the fixed-point method is the less sensitive one to the growing size of the considered configurations: hence, it is also the fastest one (the amount of time, measured in seconds, required by it to achieve convergence spans an interval, across all configurations, that amounts at ).
Moreover, while Newton’s and the fixed-point method stop because the condition on the norm of the likelihood is satisfied, the quasi-Newton method is often found to satisfy the limit condition on the number of steps (i.e. it runs for 10000 steps and, then, stops).
Interestingly, the fact that the CReM cannot be reduced (at least not to a comparable extent with the one characterizing purely binary models) reveals a dependence on the network size of Newton’s and the quasi-Newton algorithms. The reason may lie in the evidence that both Newton’s and the quasi-Newton method require (some proxy of) the Hessian matrix of the system of equations defining the CReM to update the value of the parameters: as already observed, the order of the latter - which is for Newton’s method and O(N) for the quasi-Newton one - can make its calculation (very) time demanding.
Let us now move to comment on the performance of our algorithms when applied to solve the directed version of the CReM (see Table 7). Overall, all methods perform much better than in the undirected case, stopping because the condition on the norm of the likelihood is satisfied.
In fact, all of them are very accurate in reproducing the purely binary constraints, their largest maximum errors spanning intervals, across all configurations, that amount at , and ; for what concerns the weighted constraints, instead, the two most accurate methods are Newton’s and the quasi-Newton one, their largest maximum errors spanning intervals, across all configurations, that amount at and (the fixed-point method performs worse than them, since ).
For what concerns speed, the amount of time, measured in seconds, required by Newton’s, the quasi-Newton and the fixed-point algorithms to achieve convergence spans an interval, across all configurations, that amounts at , and , respectively. Hence, all methods are also very fast - the fixed-point being systematically the fastest one.
As already stressed above, the fact that the e-MID number of nodes remains approximately constant throughout the considered time interval masks the strong dependence of the performance of Newton’s and the quasi-Newton method on the network size.
Lastly, while rescaling the system of equations defining the CReM improves neither the accuracy nor the speed of any of the three algorithms considered here, differences in their speed of convergence, caused by the choice of a particular set of initial conditions, are observable: the ‘uniform’ prescription outperforms the other ones (for both the undirected and the directed version of the CReM).
As usual, let us comment on the algorithm to sample the CReM ensemble - for the sake of simplicity, on the undirected cae. As for the UECM it can be compactly achieved by implementing a two-step procedure, the only difference lying in the functional form of the distribution from which weights are sampled. Given a specific pair of vertices i, j (with ), the first link can be drawn from a Bernoulli distribution with probability while the remaining ones can be drawn from an exponential distribution whose parameter reads . The computational complexity of the sampling process is, again, and the pseudo-code for explicitly sampling the CReM ensemble is summed up by Algorithm 6.
Discussion
The exercises carried out so far have highlighted a number of (stylized) facts concerning the performance of the three algorithms tested: in what follows, we will briefly sum them up.
Newton’s method Overall, Newton’s method is very accurate - often, the most accurate one - in reproducing both the binary and the weighted constraints; moreover, it represent the only viable alternative when the most complicated models are considered (i.e. the UECM and the DECM, respectively defined by a system of 2N and 4N coupled, non-linear equations). However, the time required to run Newton’s method on a given model seems to be quite dependent on the network size, especially whenever the corresponding system of equations cannot be reduced - see the case of the undirected CReM, run on the Bitcoin Lightning Network. Since one of the reasons affecting the bad scaling of Newton’s method with the network size is the evaluation of the Hessian matrix defining a given model, this algorithm has to be preferred for largely reducible networks.
Quasi-Newton method For all the networks considered here, the quasi-Newton method we have implemented is nothing else than the diagonal version of the traditional Newton’s method. Even if this choice greatly reduces the number of entries of the Hessian matrix which are needed (i.e. just N elements for the undirected version of the CReM, 2N elements for the UECM and the directed version of the CReM and 4N elements for the DECM) dimensionality may still represent an issue to achieve fast convergence. Moreover, since the diagonal approximation of the Hessian matrix is not necessarily always a good one, the quasi-Newton method may require more time than Newton’s one to achieve the same level of accuracy in reproducing the constraints. However, when such an approximation is a good one, the ‘regime’ in which the quasi-Newton method outperforms the competitors seems to be the one of small, non-reducible networks (e.g. see the results concerning the DBCM run on the WTW) - althogh, in cases like these, Newton’s method may still be a strong competitor.
Fixed-point method From a purely theoretical point of view, the fixed-point recipe is the fastest one, since the time required to evaluate the generic n-th step is (only) due to the evaluation of the model-specific map at the -th iteration. Strictly speaking, however, this holds true for a single step: if the number of steps required for convergence is large, in fact, the total amount of time required by the fixed-point method can be large as well. Overall, however, this algorithm has to be preferred for large, non-reducible networks: this is the case of the (undirected version of the) CReM, run on the 8-th snapshot of the Bitcoin Lightning Network (i.e. day 17-07-19) and requiring a little more than one minute to achieve an accuracy of and ; naturally, the method is not as accurate as Newton’s one, for which and but is much faster as Newton’s algorithm requires seconds to converge.
The ‘NEMTROPY’ Python package As an additional result, we release a comprehensive package, coded in Python, that implements the three aforementioned algorithms on all the ERGMs considered in the present work. Its name is ‘NEMTROPY’, an acronym standing for ‘Network Entropy Maximization: a Toolbox Running On Python’, and is freely downloadable at the following URL: https://pypi.org/project/NEMtropy/.
Alternative techniques to improve accuracy and speed have been tested as well, as the one of coupling two of the algorithms considered above. In particular, we have tried to solve the (undirected version of the) CReM by running the fixed-point algorithm and using the solution of the latter as input for the quasi-Newton method. The results are reported in Table 8: as they clearly show, the coupled algorithm is indeed more accurate that the single methods composing it and much faster than the quasi-Newton one (for some snapshots, more accurate and even faster than Newton’s method). Techniques like these are, in general, useful to individuate better initial conditions than the completely random ones: a first run of the fastest method may be, in fact, useful to direct the most accurate algorithm towards the (best) solution. This is indeed the case, upon considering that the quasi-Newton method, now, stops because the condition is satisfied - and not for having reached the limit of 10000 steps.
Table 8.
Fixed-point + Quasi-Newton | ||||
---|---|---|---|---|
MRDE | MADE | MRSE | Time (s) | |
BLN 24-01-18 | ||||
BLN 25-02-18 | ||||
BLN 30-03-18 | ||||
BLN 13-07-18 | ||||
BLN 19-12-18 | ||||
BLN 30-01-19 | ||||
BLN 01-03-19 | ||||
BLN 17-07-19 |
As the results reveal, it is more accurate that the single methods composing it and much faster than the quasi-Newton one - for some snapshots, more accurate and even faster than Newton’s method. Only the results corresponding to the best choice of initial conditions are reported.
We would like to end the discussion about the results presented in this contribution by explicitly mentioning a circumstance that is frequently met when studying economic and financial networks. When considering systems like these, the information about the number of neighbours of each node is typically not accessible: as a consequence, the models constraining both binary and weighted information cannot be employed as they have presented in this contribution.
Alternatives exist and rest upon the existence of some kind of relationship between binary and weighted constraints. In the case of undirected networks, such a relationship is usually written as
78 |
and establishes that the Lagrange multipliers controlling for the degrees are linearly proportional to the strengths. If this is the case (or a valid reason exists for this to be the case), the expression for the probability that any two nodes are connected becomes
79 |
the acronym standing for degree-corrected Gravity Model44. The (only) unknown parameter z must be numerically estimated by employing some kind of topological information; this is usually represented by (a proxy of) the network link density, used to instantiate the (only) likelihood condition
80 |
once the equation above has been solved, the set of coefficients can be either employed 1) to, first, estimate the degrees and, then, solve the UECM45 or 2) within the CReM framework, via the identification , to estimate the parameters controlling for the weighted constraints.
Conclusions
The definition and correct implementation of null models is a crucial issue in network analysis: the present contribution focuses on (a subset of) the ones constituting the so-called ERG framework - a choice driven by the evidence that they are the most commonly employed ones for tasks as different as network reconstruction, pattern detection, graph enumeration. The optimization of the likelihood function associated to them is, however, still problematic since it involves the resolution of large systems of coupled, non-linear equations.
Here, we have implemented and compared three algorithms for numerical optimization, with the aim of finding the one performing best (i.e. being both accurate and fast) for each model. What emerges from our results is that there is no a unique method which is both accurate and fast for all models on all configurations: under this respect, performance is just a trade-off between accuracy and speed. However, some general conclusions can still be drawn.
Newton’s method is the one requiring the largest amount of information per step (in fact, the entire Hessian matrix has to be evaluated at each iteration): hence, it is the most accurate one but, for the same reason, often the one characterized by the slowest performance. A major drawback of Newton’s method is that of scaling very badly with the network size.
At the opposite extreme lies the fixed-point algorithm, theoretically the fastest one but, often, among the least accurate ones (at least, for what concerns the weighted constraints); the performance if the quasi-Newton method often lies in-between the performances of the two methods above, by achieving an accuracy that is larger than the one achieved by the fixed-point algorithm, requiring less time that the one needed by Newton’s method.
Overall, while Newton’s method seems to perform best on either relatively small or greatly reducible networks, the fixed-point method must be preferred for large, non-reducible configurations. Deviations from this (over simplified) picture are, however, clearly visible.
Future work concerns the application of the aforementioned three numerical recipes to the models that have not found place here. For what concerns the set of purely binary constraints, the ones defining the Reciprocal Binary Configuration Model (RBCM)15 deserve to be mentioned.
For what concerns the ‘mixed’ constraints, instead, the CReM framework is versatile enough to accommodate a quite large number of variants. In the present work, we have ‘limited’ ourselves to combine the UBCM and the DBCM with (conditional) distributions of continuous weights: a first, obvious, generalization is that of considering the discrete versions of such models, defined by the positions
81 |
with and
82 |
with ; a second one concerns the continuous versions of the UECM and of the DECM, respectively defined by the positions19
83 |
and
84 |
Supplementary Information
Acknowledgements
FS and TS acknowledge support from the European project SoBigData++ (GA. 871042). GC and MZ acknowledge support from the PAI project ORCS (‘Optimized Reconstruction of Complex networkS’), funded by the IMT School for Advanced Studies Lucca. FS also acknowledges support from the Italian ‘Programma di Attività Integrata’ (PAI) project ‘TOol for Fighting FakEs’ (TOFFE), funded by IMT School for Advanced Studies Lucca.
Appendix A: computing the Hessian matrix
As we showed in the main text, the Hessian matrix of our likelihood function is ‘minus’ the covariance matrix of the constraints, i.e.
85 |
interestingly, a variety of alternative methods exists to explicitly calculate the generic entry , i.e. 1) taking the second derivatives of the likelihood function characterizing the method under analysis, 2) taking the first derivatives of the expectation values of the constraints characterizing the method under analysis, 3) calculating the moments of the pair-specific probability distributions characterizing each method.
UBCM: binary undirected graphs with given degree sequence
The Hessian matrix for the UBCM is an symmetric table with entries reading
86 |
where . Notice that .
DBCM: binary directed graphs with given in-degree and out-degree sequences
The Hessian matrix for the DBCM is a symmetric table that can be further subdivided into four blocks whose entries read
87 |
while and .
Notice that the Hessian matrix of the BiCM mimicks the DBCM one, the only difference being that the probability coefficients are now indexed by i and : for example, in the BiCM case, one has that , .
UECM: weighted undirected graphs with given strengths and degrees
The Hessian matrix for the UECM is a symmetric table that can be further subdivided into four blocks (each of which with dimensions ). In order to save space, the expressions indexed by the single subscript i will be assumed as being valid , while the ones indexed by a double subscript i, j will be assumed as being valid . The entries of the diagonal blocks read
88 |
and
89 |
where . On the other hand, the entries of the off-diagonal blocks read
90 |
with .
DECM: weighted directed graphs with given strengths and degrees
The Hessian matrix for the DECM is a symmetric table that can be further subdivided into four blocks (each of which with dimensions ). As for the UECM, in order to save space, the expressions indexed by the single subscript i will be assumed as being valid , while the ones indexed by a double subscript i, j will be assumed as being valid . The entries of the diagonal blocks read
91 |
and
92 |
and
93 |
and
94 |
where . On the other hand, the entries of the off-diagonal blocks read
95 |
and
96 |
and
97 |
and
98 |
and
99 |
and
100 |
with .
Two-step models for undirected and directed networks
The Hessian matrix for the undirected two-step model considered here is an symmetric table reading
101 |
where is given. In the directed case, instead, the Hessian matrix for the two-step model considered here is a symmetric table that can be further subdivided into four blocks whose entries read
102 |
while and is given.
Appendix B: a note on the change of variables
In all methods we will considered in the present work, the variable appears in the optimality conditions only through negative exponential functions: it is therefore tempting to perform the change of variable . Although this is often performed in the literature, one cannot guarantee that the new optimization problem remains convex: in fact, simple examples can be provided for which convexity is lost. This has several consequences, e.g. (1) convergence to the global maximum is no longer guaranteed (since the existence of a global maximum is no longer guaranteed as well), (2) extra-care is needed to guarantee that the Hessian matrix employed in our algorithms is negative definite. While problem (2) introduces additional complexity only for Newton’s method, problem (1) is more serious from a theoretical point of view.
Let us now address problem (1) in more detail. First, it is possible to prove that any stationary point for satisfies the optimality conditions for as well. In fact, the application of the ‘chain rule’ leads to recover the set of relationships
103 |
notice that requiring leads to require that either or . As the second eventuality precisely identifies isolated nodes (i.e. the nodes for which the constraint , controlled by the multiplier , is 0), one can get rid of it by explicitly removing the corresponding addenda from the likelihood function.
For what concerns convexity, let us explicitly calculate the Hessian matrix for the set of variables . In formulas,
104 |
according to the ‘chain rule’ for second-order derivatives. More compactly,
105 |
where is the identity matrix, the generic entry of the matrix reads , and the symbol ‘’ indicates the Hadamard (i.e. element-wise) product of matrices. In general, the expression above defines an indefinite matrix, i.e. a neither positive nor negative (semi)definite one.
Appendix C: fixed point method in the multivariate case
Equation (21) can be written as
106 |
for the sake of illustration, let us discuss it for the UBCM case. In this particular case, the set of equations above can be rewritten as
107 |
Since all components of the map are continuous on , the map itself is continuous on . Hence, a fixed point exists. Let us now consider its Jacobian matrix and check the magnitude of its elements. In the UBCM case, one finds that
108 |
and
109 |
Let us notice that (1) each element of the Jacobian matrix is a continuous function and that (2) the following relationships hold
110 |
unfortunately, however, when multivariate functions are considered, the set of conditions above is not enough to ensure convergence to the fixed point for any choice of the initial value of the parameters. What is needed to be checked is the condition , with J indicating the Jacobian of the map (i.e. the matrix of the first, partial derivatives above) and ||.|| any natural matrix norm: the validity of such a condition has been numerically verified case by case.
Author contributions
F.S., T.S., G.C., M.Z. developed the methods and designed the research. N.V., E.M., M.B., G.T. performed the analysis (N.V.: DBCM, DECM, RBCM; E.M.: UBCM, UECM, CReM; M.B.: BiCM; G.T.: preliminary version of the BiCM). F.S., T.S., G.C., M.Z. wrote the manuscript. All authors reviewed and approved the manuscript.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
The online version contains supplementary material available at 10.1038/s41598-021-93830-4.
References
- 1.Newman MEJ. Networks: An Introduction. Oxford University Press; 2010. [Google Scholar]
- 2.Colizza V, Barrat A, Barthelemy M, Vespignani A. The role of the airline transportation network in the prediction and predictability of global epidemics. Proc. Natl. Acad. Sci. 2006;103(7):2015–2020. doi: 10.1073/pnas.0510525103. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Barrat A, Barthlemy M, Vespignani A. Dynamical Processes on Complex Networks. Cambridge University Press; 2008. [Google Scholar]
- 4.Pastor-Satorras R, Castellano C, Van Mieghem P, Vespignani A. Epidemic processes in complex networks. Rev. Mod. Phys. 2015;87:925. doi: 10.1103/RevModPhys.87.925. [DOI] [Google Scholar]
- 5.Castellano C, Fortunato S, Loreto V. Statistical physics of social dynamics. Rev. Mod. Phys. 2009;81:591. doi: 10.1103/RevModPhys.81.591. [DOI] [Google Scholar]
- 6.Squartini T, van Lelyveld I, Garlaschelli D. Early-warning signals of topological collapse in interbank networks. Sci. Rep. 2013;3:3357. doi: 10.1038/srep03357. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Cimini G, Squartini T, Saracco F, Garlaschelli D, Gabrielli A, Caldarelli G. The statistical physics of real-world networks. Nat. Rev. Phys. 2019;1(1):58–71. doi: 10.1038/s42254-018-0002-6. [DOI] [Google Scholar]
- 8.Maslov S, Sneppen K. Specificity and stability in topology of protein networks. Science. 2002;296(5569):910–913. doi: 10.1126/science.1065103. [DOI] [PubMed] [Google Scholar]
- 9.Coolen ACC, De Martino A, Annibale A. Constrained Markovian dynamics of random graphs. J. Stat. Phys. 2009;136:1035–1067. doi: 10.1007/s10955-009-9821-2. [DOI] [Google Scholar]
- 10.Roberts ES, Coolen ACC. Unbiased degree-preserving randomization of directed binary networks. Phys. Rev. E. 2012;85(4):046103. doi: 10.1103/PhysRevE.85.046103. [DOI] [PubMed] [Google Scholar]
- 11.Artzy-Randrup Y, Stone L. Generating uniformly distributed random networks. Phys. Rev. E. 2005;72(5):056708. doi: 10.1103/PhysRevE.72.056708. [DOI] [PubMed] [Google Scholar]
- 12.Del Genio CI, Kim H, Toroczkai Z, Bassler KE, Del Genio CI, Kim H, Toroczkai Z, Bassler KE. PLoS One. 2010;5(4):e10012. doi: 10.1371/journal.pone.0010012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Kim H, Del Genio CI, Bassler KE, Toroczkai Z. Constructing and sampling directed graphs with given degree sequences. New J. Phys. 2012;14:023012. doi: 10.1088/1367-2630/14/2/023012. [DOI] [Google Scholar]
- 14.Blitzstein J, Diaconis P. A sequential importance sampling algorithm for generating random graphs with prescribed degrees. Internet Math. 2011;6(4):489–522. doi: 10.1080/15427951.2010.557277. [DOI] [Google Scholar]
- 15.Squartini T, Garlaschelli D. Analytical maximum-likelihood method to detect patterns in real networks. New. J. Phys. 2011;13:083001. doi: 10.1088/1367-2630/13/8/083001. [DOI] [Google Scholar]
- 16.Park J, Newman MEJ. Statistical mechanics of networks. Phys. Rev. E. 2004;70(6):066117. doi: 10.1103/PhysRevE.70.066117. [DOI] [PubMed] [Google Scholar]
- 17.Bianconi G. The entropy of randomized network ensembles. Europhys. Lett. 2007;81(2):28005. doi: 10.1209/0295-5075/81/28005. [DOI] [Google Scholar]
- 18.Fronczak A, Fronczak P, Holyst JA. Fluctuation-dissipation relations in complex networks. Phys. Rev. E. 2006;73(1):016108. doi: 10.1103/PhysRevE.73.016108. [DOI] [PubMed] [Google Scholar]
- 19.Gabrielli A, Mastrandrea R, Caldarelli G, Cimini G. Grand canonical ensemble of weighted networks. Phys. Rev. E. 2019;99(3):030301(R). doi: 10.1103/PhysRevE.99.030301. [DOI] [PubMed] [Google Scholar]
- 20.Fronczak Agata. Exponential random graph models. In: Reda Alhajj, Jon Rokne., editors. Encyclopedia of Social Network Analysis and Mining. 2014. New York: Springer-Verlag; 2014. [Google Scholar]
- 21.Jaynes ET. Information theory and statistical mechanics. Phys. Rev. 1957;106(4):620–630. doi: 10.1103/PhysRev.106.620. [DOI] [Google Scholar]
- 22.Dianati, N. A maximum entropy approach to separating noise from signal in bimodal affiliation networks, arXiv:1607.01735 (2016).
- 23.Vallarano Nicolò, Tessone Claudio J., Squartini Tiziano. Bitcoin Transaction Networks: an overview of recent results. Frontiers in Physics. 2020;8:286. doi: 10.3389/fphy.2020.00286. [DOI] [Google Scholar]
- 24.Garlaschelli D, Loffredo MI. Maximum likelihood: extracting unbiased information from complex networks. Phys. Rev. E. 2008;78(1):015101(R). doi: 10.1103/PhysRevE.78.015101. [DOI] [PubMed] [Google Scholar]
- 25.Nocedal J, Wright SJ. Numerical Optimization. Springer; 2006. [Google Scholar]
- 26.Boyd S, Vandenberghe L. Convex Optimization. Cambridge University Press; 2004. [Google Scholar]
- 27.Chung F, Lu L. Connected components in random graphs with given expected degree sequences. Ann. Combinatorics. 2002;6:125–145. doi: 10.1007/PL00012580. [DOI] [Google Scholar]
- 28.Oshio, K., Iwasaki, Y., Morita, S., Osana, Y., Gomi, S., Akiyama, E., Omata, K., Oka, K. & Kawamura, K. Database of Synaptic Connectivity of C. elegans, Technical Report of CCeP, Keio Future3, (Keio University, 2003).
- 29.Colizza V, Pastor-Satorras R, Vespignani A. Reaction-diffusion processes and metapopulation models in heterogeneous networks. Nat. Phys. 2007;3:276–282. doi: 10.1038/nphys560. [DOI] [Google Scholar]
- 30.Database of Interacting Proteins and can be found at the following URL: http://dip.doe-mbi.ucla.edu/dip/Main.cgi
- 31.Colizza V, Flammini A, Serrano MA, Vespignani A. Detecting rich-club ordering in complex networks. Nat. Phys. 2006;2:110–115. doi: 10.1038/nphys209. [DOI] [Google Scholar]
- 32.Lin J-H, Primicerio K, Squartini T, Decker C, Tessone CJ. Lightning Network: a second path towards centralisation of the Bitcoin economy. New J. Phys. 2020;22:083022. doi: 10.1088/1367-2630/aba062. [DOI] [Google Scholar]
- 33.Miller, J. C. & Hagberg, A. Efficient generation of networks with given expected degrees, LNCS 6732. (eds Frieze, A., Horn, P. & Pralat P.) 115–126 (Springer, 2011).
- 34.Squartini T, Fagiolo G, Garlaschelli D. Randomizing world trade. I. A binary network analysis. Phys. Rev. E. 2011;84:046117. doi: 10.1103/PhysRevE.84.046117. [DOI] [PubMed] [Google Scholar]
- 35.Bovet, A., Campajola, C., Mottes, F., Restocchi, V., Vallarano, N., Squartini, T. & Tessone, C. J.The evolving liaisons between the transaction networks of Bitcoin and its price dynamics, arXiv:1907.03577 (2019).
- 36.Caldarelli Guido, De Nicola Rocco, Petrocchi Marinella, Pratelli Manuel, Saracco Fabio. Flow of online misinformation during the peak of the COVID-19 pandemic in Italy. EPJ Data Science. 2020 doi: 10.1140/epjds/s13688-021-00289-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Saracco F, Di Clemente R, Gabrielli A, Squartini T. Randomizing bipartite networks: the case of the World Trade Web. Sci. Rep. 2015;5:10595. doi: 10.1038/srep10595. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Mastrandrea R, Squartini T, Fagiolo G, Garlaschelli D. Intensive and extensive biases in economic networks: reconstructing world trade. New J. Phys. 2014;16:043022. doi: 10.1088/1367-2630/16/4/043022. [DOI] [PubMed] [Google Scholar]
- 39.Garlaschelli D, Loffredo MI. Generalized bose-fermi statistics and structural correlations in weighted networks. Phys. Rev. Lett. 2009;102(3):038701. doi: 10.1103/PhysRevLett.102.038701. [DOI] [PubMed] [Google Scholar]
- 40.Mastrandrea R, Squartini T, Fagiolo G, Garlaschelli D. Reconstructing the world trade multiplex: the role of intensive and extensive biases. Phys. Rev. E. 2014;90(6):062804. doi: 10.1103/PhysRevE.90.062804. [DOI] [PubMed] [Google Scholar]
- 41.Gleditsch K. Expanded trade and GDP data. J. Conflict Resol. 2002;46:712–24. doi: 10.1177/0022002702046005006. [DOI] [Google Scholar]
- 42.Iori G, De Masi G, Precup OV, Gabbi G, Caldarelli G. A network analysis of the Italian overnight money market. J. Econ. Dyn. Control. 2006;32(1):259–278. doi: 10.1016/j.jedc.2007.01.032. [DOI] [Google Scholar]
- 43.Parisi F, Squartini T, Garlaschelli D. A faster horse on a safer trail: generalized inference for the efficient reconstruction of weighted networks. New J. Phys. 2020;22:053053. doi: 10.1088/1367-2630/ab74a7. [DOI] [Google Scholar]
- 44.Cimini G, Squartini T, Gabrielli A, Garlaschelli D. Estimating topological properties of weighted networks from limited information. Phys. Rev. E. 2015;92:040802. doi: 10.1103/PhysRevE.92.040802. [DOI] [PubMed] [Google Scholar]
- 45.Cimini G, Squartini T, Gabrielli A, Garlaschelli D. Systemic risk analysis on reconstructed economic and financial networks. Sci. Rep. 2015;5:15758. doi: 10.1038/srep15758. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.