Quantifying efficient information exchange in real network flows

Network science enables the effective analysis of real interconnected systems, characterized by a complex interplay between topology and interconnections strength. It is well-known that the topology of a network affects its resilience to failures or attacks, as well as its functions. Exchanging information is crucial for many real systems: the internet, transportation networks and the brain are key examples. Despite the introduction of measures of efficiency to analyze network flows, i.e. topologies characterized by weighted connectivity, here we show that they fail to capture combined information of link existence and link weight. In this letter we propose a physically-grounded estimator of flow efficiency which can be computed for every weighted network, regardless from the scale and nature of weights and from any (missing) metadata. Remarkably, results show that our estimator captures the heterogeneity of flows along with topological differences and its complement information obtained from percolation analysis of several empirical systems, including transportation, trade, migrations, and brain networks. We show that cutting the heaviest connections may increase the average communication efficiency of the system and hence, counterintuively, a sparser network is not necessarily less efficient. Remarkably, our estimator enables the comparison of communication efficiency of networks arising from different fields, without the possible pitfalls deriving from the scale of flow.


Introduction
Complex systems store energy, process and, very often, efficiently exchange information to perform complex tasks. The universal mechanisms behind this behavior are unknown, although pioneering works have shown that the robustness of this type of systems to random failures or targeted attacks 1 might emerge from the trade-off between the cost of exchanging information and the importance of guaranteeing communication dynamics for functioning [2][3][4] . Therefore, it is crucial for units in a complex network to route information through shortest paths, broadcasting or according to some dynamics between these two extremes 5 , as it happens for instance in the Internet 6 . For several applications of interest, even the inverse problem, of identifying either the origin or the destination of the flow from the observation of pathways, is relevant 7,8 . This framework enables the description of a wide variety of systems, from cell signaling to individuals exchanging information in social/socio-technical systems such as human flows through different parts of a city by public or private transportation means. In the following we focus our attention on flow networks, systems characterized by the exchange of flows -e.g., number of streets between different parts of the city or human movements within a city, migration between different geographic areas, goods traded among countries, packets routed among servers, electricity in a power grid -through edges [9][10][11][12] . System's units and their connections have a limited capacity and, in absence of sources and sinks, the sum of the overall incoming and outgoing flows is constant. One widely accepted measure of efficiency in information flow is the global communication efficiency, that has been used to highlight the possible designing principles responsible for neural, man-made communication, and transportation systems 3 .
Here we show that a normalized descriptor of global efficiency can be computed without any knowledge on the system, but its weighted network representation. In fact, for a wide class of weighted systems 13 which are not embedded in space or for which metadata about the underlying geometry (nodes coordinates) are not available, the classical global efficiency might be biased. To overcome this issue, we demonstrate how to define a suitable "physical distance" between system's units in terms of the flow they exchange across least resistance pathways. We also show that the quantification of system efficiency might vary dramatically if flows are not adequately accounted for.

Results
Flow exchange in complex topologies. Let us consider a complex network G = (V, E), whose weighted adjacency matrix W = {w ij } i,j∈V characterizes both its topologyw ij = 0 if i, j are not adjacent-and flows.
The architecture of a complex network influences the information exchange among its units and is responsible for a rich repertoire of interaction patterns. For instance, neurons exchange electro-chemical signals and their communication dynamics is relevant for the functional organization of the brain. Similarly, human flows through different geographic areas shape the functional organization of a city, and its neighborhood, or email among individuals in an organization generate a flow of messages determining how information reaches different teams. The trade-off between communication efficiency and its cost characterizes complex systems and their robustness to perturbation in communication dynamics 14,15 .
Even more importantly, many empirical systems are characterized by connections with heterogeneous intensities and different correlations among weighted and purely topological network descriptors are ubiquitous 13 , from the human brain 4, 16-18 to transportation networks 19 . Therefore, it is essential to account for these underlying weighted architectures to gain real insights about the hidden construction principles and mechanisms used to transform, process and exchange 3 information 20 .
The efficiency ij in the communication between two nodes i = j ∈ V is assumed to be inversely proportional to their distance d ij 3 . It follows that if i and j belong to different connected components, i.e., d ij = ∞, ij = 0. The global communication efficiency of the network G is the average over pairwise efficiencies The natural metric on unweighted networks is the shortest-path distance. In this case d −1 ij ≤ 1, implying 0 ≤ E(G) ≤ 1, with equality holding when G is a clique and, since each pairwise communication is direct, information propagates the most efficiently. In case of weighted networks, distances should also account for weights and for what they stand for 21 . Furthermore, weighted distances are real valued so that, in general, E(G) ∈ [0, ∞[ and depends on the scale of the weights. For this reason, a global indicator of efficiency should be re-scaled in [0, 1] considering an idealized proxy of G, G ideal , having maximum efficiency. In 3, 20 the authors propose to build G ideal based on pairwise physical distances ij , which are supposed (i)"to be known even if in the graph there is no edge between i and j", i.e. ij > 0, (ii) should fulfill the constraint ij ≤ d ij for all i, j ∈ V and (iii) should be considered along with topological information in the computation of weighted shortest-path distances d ij . Then, -which is henceforth denoted by GCE(G) -is correctly normalized. For some spatial networks -e.g. transportation systems like the railway or infrastructures such as the power grid -the physical distances are well-defined by the underlying geometry, for others -among which power stations and water resources -it might be difficult to calculate physical distances because of the lack of direct information about spatial coordinates of units. For non-spatial systemssuch as social and socio-technical systems -{ ij } ij can be found as ad hoc transformations of link strengths (weights) into connection costs. For instance, ij could be the inverse velocity of chemical reactions along a direct connection in a biological network 3 , or the minimum between 1 and the inverse number of edges between i and j in network with multiple unweighted edges 20 . Unfortunately, this apparently straightforward procedure hides several issues, e.g. if there is no direct connection between two bio-chemical units in a connected network, their physical distance is infinite, according to the previous definition, while their weighted shortest-path distance will be some positive real number, violating (ii). Furthermore, in case of real positive weight w ij ∈ R + one cannot take ij = min{1, 1 w ij }, since this introduces a cut-off on weights smaller than 1. Another widely used option [22][23][24][25][26] , consists in re-scaling the weights into [0, 1], transforming them to costs, applying Dijkstra's algorithm for distances and then computing the efficiency by Eq. (6), without any further comparison with a G ideal . For instance, let us mention the max-normalization max{w ij } and will be used for comparison in the rest of this study. It follows that, in a broad spectrum of scenarios of practical interest for applications, there is no general recipe to compute E(G ideal ). See the Supplementary Materials (SM) for details.
Rethinking efficiency of information flow in weighted architectures. To overcome the above issues, we build G ideal from the weighted graph G in such a way that physical distances are not necessarily calculated from metadata or accessible spatial information (see Fig.1).
We assume hereafter that edge weights are non-negative and represent the strength of connections. Recall that a path is the sequence of vertices in a non-intersecting walk across the network; the length of the path is the number of edges in -or the sum of weights along -that path. Weighted shortest-path distances are then computed minimizing the sum of the reciprocals of weights 27,28 , which can be seen as costs, over all paths between node pairs 1 . Let us denote by SP (i, j) a weighted and directed shortest-path from i to j; its length, d ij = n,m∈SP (i,j) path distance between i and j, while φ ij = n,m∈SP (i,j) w nm is the total flow along SP (i, j).
The matrix Φ = {φ ij } i,j∈V represents an artificial connectivity made of shortcuts, where total flows along shortest-paths are delivered in one topological step. G ideal is then obtained averaging 6 between the true structure W and the artificial connectivity, i.e., W ideal = Φ+W 2 2 . We finally define When G is connected, G ideal is completely connected and ij is finite ∀i = j. If otherwise G is not connected, G ideal will be disconnected as well. If there is no path between i, j both ij = d ij = ∞ and their pairwise efficiency contribute neither to E(G) nor to E(G ideal ). Note that in this case we are computing the average communication efficiency, a global indicator, of disconnected sub-networks, which may not be meaningful. Finally, it is possible to prove (using the Cauchy-Schwarz inequality, see SM) that the constraint ij ≤ d ij ∀i = j is always satisfied, hence { ij } ij are well-defined physical distances that can be calculated for any weighted systems.
Having defined the mathematical tools, we now analyze some synthetic networks with a tunable structure. This enables us to separate the effects of topology and flows on the global efficiency of the network.
Global efficiency of synthetic networks. We generate two ensembles of networks with the same topology -cliques with 30 nodes -and edge weights sampled from different probability distribution families. The topological efficiency E T , i.e., Eq. (6) computed ignoring weights, is 1 for all networks, since they are cliques. We therefore focus on the weighted descriptors E LM , E MN and GCE. The trivial case, w ij = w > 0 constant, leads to GCE = 1. We impose more realistic homogeneous flows sampling from a Poisson distribution P(λ) with varying λ - Fig.2(left). Since zero belongs to the support of the distribution, we add one to each sample to keep the complete connectedness of the network. The heterogeneity in the weighted structure is instead modeled with w ij following power-laws(α) with a lower bound x min = 5 29 - Fig.2(right). In panel a) we show some probability mass (resp. density) functions as the free parameters λ and α increase: the variance increases for the Poisson and decreases for the power-law. Another index of heterogeneity is the 2 Another (stronger) option would be W ideal = Φ, see SM. We next study the interplay between weights heterogeneity and topology through bond percolation 26,30 . By removing edges in decreasing weight order, we trim the tail of the weights distributions, reducing their heterogeneity. In Fig.2 c) we plot the four efficiency quantifiers as functions of the fraction f of removed edges and averaged over 30 random realizations of each model. Shaded areas indicate the standard deviation from the mean. We denote by G f the damaged network obtained from G removing f % of its heavier links. G 0 is, topologically, a clique, so Global efficiency of real interconnected systems. We use our framework to study the efficiency of four real systems (see Tab. 1). Figure 3 shows the curves corresponding to E T (G f ) and GCE(G f ).
From the FAO worldwide food trade network we selected the layers of cocoa, coffee, tea, and tobacco. From the migration dataset we selected internal migration flows inside three Asian regions: India, China and Vietnam. From the worldwide air traffic network we extracted the traffic in and between Europe and Africa. Finally, we consider the structural connectivity of human brain -quantified through diffusion tensor imaging (DTI) and fiber tractography methods.
These real networks have different properties, among which edge density and weight distri- bution. Independently from the system, ignoring the network flows leads to an overestimation of the average efficiency, especially when flows are highly heterogeneous. The network of internal migration, is the most efficient, but it also has the highest cost being a clique. The tea trade network is the most inefficient. Finally the brain and the airports network have similar GCEs until the first 25% of their edges are removed, with the brain remaining afterwards more efficient w.r.t the reduced flows. Observe that the total flow could be restored, while keeping a specific efficiency value, re-distributing the removed flow on the remaining links. In general, removing those edges monopolizing shortest-paths forces their reallocation inducing an increase of the global weighted efficiency.

Discussion
Exchanging information is one of the main functions and raison d'être of many real complex systems and quantifying how efficiently they perform this task is of great interest for different disciplines. Consequently, the concept of communication and transport efficiency is relevant for a broad range of applications, from public transportation to the human brain and the Internet. Conveniently, our framework works under mild assumptions about the underlying topology and about the ideal and most efficient network, with no metadata, nor additional spatial (e.g., geo-graphic) information on the system, allowing for trustworthy applications to empirical problems.
Remarkably, the framework allows for a complementary view of bond percolation from a functional perspective, allowing us to gain new insights about critical phases of information exchange and network flows in additions to topological ones.

Methods
Mathematical details on the normalizing procedure. We provide the proof of d ij ≥ ij ∀i = j ∈ V G , which is sufficient for the GCE to be correctly normalized in [0, 1]. Recall that SP (i, j) denotes a weighted (directed) shortest-path from i to j and d ij = n,m∈SP (i,j) w −1 nm . Observe also that, if the shortest-path between i, j coincides with their link (i, j) the number of vertices in the sequence is |SP (i, j)| = 2 and their shortest-path distance is d(i, j) = 1 w ij . The total flow between i and j through the shortest-path SP (i, j) is defined as φ ij = n,m∈SP (i,j) w nm .
Before proving our main statements we write an inequality, which will be extensively used in the following proofs. The Cauchy-Schwarz inequality for vectors u, v in an inner product space Eq.
(2) states that for non-negative real numbers x 1 , . . . , x n the inverse of their sum is smaller or equal to the sum of their reciprocals.
Since we have assumed edges weights to be positive we can apply the inequality, which leads us to Observe that |SP (i, j)| ≥ 2 if G is connected, therefore the first inequality is actually strict.
From Eq. (3) we can derive useful inequalities involving w ij , φ ij , d ij and ij : note that if w ij = 0, it also holds d ij ≤ 1 w ij .
It is also possible to prove that φ ij ≥ w ij , ∀i, j ∈ V G . Indeed, if i, j are not adjacent then w ij = 0 but, since G is connected, there is a path between them with φ ij > 0. If instead, they are adjacent, either φ ij = w ij meaning that the weighted shortest-path coincides with the edge (i, j), or there is a shortest-path going through other vertices, such that d ij = n,m∈SP (i,j) w −1 nm < 1 w ij and the claim follows from Eq. (4).
Starting from the definition of physical distances ij , using simple inequalities and Eq. (3) Again, for a connected network G the strict inequality ij < d ij holds.
Finally, φ ij = 0 if and only if i, j lie in disconnected components and the ideal network will be disconnected as the original one. In this case both d ij = 1 φ ij = ∞ and the missing links among disconnected components will not produce an under-estimation of the efficiencies of the subgraphs. Of course, if the network is very fragmented the GCE, a global descriptor, will not be very informative. Below, we propose a variant of the GCE, which is most appropriate in this case and in percolation simulations in general, see Suppl. Material.
Comparisons with other weighted efficiency measures.. In this work we introduced existing measures of topological and weighted efficiency, more specifically, E T the topological efficiency defined in 3 , E LM defined by Latora and Marchiori in 20 , E MN obtained evaluating the efficiency on the network with max-normalized weights.
Let us recall the definition of efficiency 3 where we have the parallel sum of pairwise distances The main difficulty arising in the definition of a weighted efficiency descriptor, have to do with the diversity of information that can be encoded as edge weights in a network. Usually weights represent connection strengths and connection costs are obtained as a function (e.g., inverse) of weights. Given the connection costs one can compute weighted shortest-path distances 21,27,28,36 , which vary in [0, +∞] and therefore E(G) ∈ [0, +∞) and needs to be re-scaled (or normalized) in order to be comparable among different systems.
E MN , which has been used, for instance, in 22,[24][25][26] is the simplest generalization of E T to the weighted case: re-scaling the weights to [0, 1] implies that shortest-path distances d ij ≥ 1, since weighted shortest-paths are those paths minimizing the sum of edge costs, that is, inverse weights.
Consequently, being d ij ≥ 1, Eq. (6) results to be normalized. Different re-scaling transformations of weights are possible, the most common is the max-normalization (from which the superscript is Eq. (6) calculated on weighted geodesic distances without the max-normalization of weights. Let w max be the maximum weight over all edges of a weighted network G = (V, E) and let SP (i, j) be a weighted shortest path between i, j ∈ V . Observe that the max-normalization of weights does not affect the shortest path, but it does affect the sp-distancẽ Finally, Of course, not only the max-normalization and inverse are available, for instance, in 23 weights are wavelet correlation coefficient between regions in the brain and the cost of the connection between regions i and j is defined as c ij = 1 − w ij .
Observing that a sufficient condition for Eq. (7) is 0 ≤ ij ≤ d ij for all i, j, ∈ V , defining G ideal reduces to building the matrix { ij } i,j . They called ij physical distances, in contrast to shortestpath distances, highlighting that the latter are computed using "the information contained both in the binary adjacency matrix and in { ij } i,j ". Observe that the matrix the matrix { ij } i,j is, in every respect, a matrix of connection costs. In 20 (Sec. 3) the authors give some examples to ij from edge weights. For instance, if weights w ij ≥ 1 one can define ij = min 1, 1 w ij , which is the transformation adopted in this work to compute E LM .
We refer to the Suppl. Material (S1 and S2) for the full plot corresponding to Fig.2 b) of this study. The GCE converges faster to 1 as the weight distributions become less heterogeneous (in terms of kurtosis). We claim that the maximum of the GCE is obtained not only for full networks with constant edge weight distribution, but it is sufficient to have a uniform edge betweenness, as shown in S2.
Finally, the panel c) of Fig. 2, without the cut on the range of y−values is reported in Fig. S3.
The percolation simulation consists in removing edges from an undirected weighted full network G, in decreasing weight order. We indicate by f the fraction of edges removed from G and by Our normalization procedure can also be used to build a slightly modified version of the GCE that plays the role of a weighted integrity descriptor for percolation analysis. Let G ideal 0 be the idealized network corresponding to G 0 build as described in our study. Then is normalized in [0, 1] and it is a monotone decreasing function w.r.t. f . This variant of the GCE will be evaluated for real networks in the last section of the SM.
On artificial flows. We choose to build the artificial flows integrating weights over paths, but this is not the only possibility, provided that constraint ij ≤ d ij is satisfied. Now, using the same definitions and notation adopted in this study, So both the minimum (or maximum) weight over the path are valid choices, as well as, the sum (our choice) and the maximum over all edges (the already discussed max-normalization). Now, when using the sum fo flows over paths, we can combine the two sources of information W and Φ through the arithmetic mean, while this strategy is not possible if we define φ * ij = min{w nm : n, m ∈ SP (i, j)} (resp. max) because we cannot prove that ij = 2 φ * ij +w ij ≤ d ij , so we should drop W and simply define W ideal = Φ * . We implemented these other choices and show the results on our synthetic networks ensembles in Fig. S5. The two variants, called here GCE min , GCE max , converge faster to 1, since both minimizations Eq. (9)-Eq. (10) are less strict than ours (the sum).
Taking the minimum Eq. (9), in particular, may result in values of efficiency spanning a narrow range, near 1, with a consequent difficulty in distinguishing networks on the basis of efficiency.
Furthermore, in the bottom panel of Fig. S5 we can see a decreasing-increasing behavior of GCE min which is, from our point of view, not desirable. GCE max displays, in general, a larger variability.
We opt for the sum, since it has a physical meaning in terms of total flow of a sub-graph (a path SP (i, j)), it allows us to average the artificial flows matrix with the original flows given by W and, last but not least, it is easily worked with in mathematical terms (simplifies rigorous proofs).
On the normalized weighted efficiency of Latora and Marchiori 20 . Let us take G as the subgraph consisting of vertices q, r, v of Fig. 1 and suppose that the weights are the result of the aggregation of multiple binary connections. Its weighted adjacency matrix is We can compute physical distances ij following the suggestions in 20 and shortest-path distances minimizing the sum of costs (i.e. inverse weights) The global communication efficiency defined in 20 is given by Observe that the condition (which is sufficient for is not satisfied for i = 1, j = 3 and this causes GCE = E(G) E(G ideal ) = 22 This counter-example on the statement Eq. (11) is not a pathological case: Eq. (11) is violated whenever the weighted shortest-path between adjacent nodes i, j does not traverse the direct link e ij , i.e. d ij < 1 w ij and it may often happen in real networks with large heterogeneous weights.
Trying to reproduce the results in 20 , we considered the neural network of the C. elegans  Mathematical details on the normalizing procedure.-We provide the proof of d ij ≥ ij ∀i = j ∈ V G , which is sufficient for the GCE to be correctly normalized in [0,1]. Recall that SP (i, j) denotes a weighted (directed) shortest-path from i to j and d ij = n,m∈SP (i,j) Observe also that, if the shortest-path between i, j coincides with their link (i, j) the number of vertices in the sequence is |SP (i, j)| = 2 and their shortest-path distance is d(i, j) = 1 wij . The total flow between i and j through the shortest-path SP (i, j) is defined as Before proving the statements in the Letter we write an inequality, which will be extensively used in the following proofs. The Cauchy-Schwarz inequality for vectors u, v in an inner product space reads | u, v | 2 ≤ u, u · v, v .
(S1) (S1) states that for non-negative real numbers x 1 , . . . , x n the inverse of their sum is smaller or equal to the sum of their reciprocals. Since we have assumed edges weights to be positive we can apply the inequality, which leads us to Observe that |SP (i, j)| ≥ 2 if G is connected, therefore the first inequality is actually strict. From (S2) we can derive useful inequalities involving * Corresponding author: mdedomenico@fbk.eu w ij , φ ij , d ij and ij : note that if w ij = 0, it also holds d ij ≤ 1 wij . It is also possible to prove that φ ij ≥ w ij , ∀i, j ∈ V G . Indeed, if i, j are not adjacent then w ij = 0 but, since G is connected, there is a path between them with φ ij > 0. If instead, they are adjacent, either φ ij = w ij meaning that the weighted shortest-path coincides with the edge (i, j), or there is a shortest-path going through other vertices, such that d ij = n,m∈SP (i,j) w −1 nm < 1 wij and the claim follows from (S3).
Starting from the definition of physical distances ij , using simple inequalities and (S2) Again, for a connected network G the strict inequality ij < d ij holds. Finally, φ ij = 0 if and only if i, j lie in disconnected components and the ideal network will be disconnected as the original one. In this case both d ij = 1 φij = ∞ and the missing links among disconnected components will not produce an under-estimation of the efficiencies of the subgraphs. Of course, if the network is very fragmented the GCE, a global descriptor, will not be very informative. Below, we propose a variant of the GCE, which is most appropriate in this case and in percolation simulations in general, see Fig.S2.
Real interconnected systems, additional results.-Here we report the detailed percolation results for the real network flows discussed in the Letter.  Additionally, we illustrate how to use the normalization procedure to build a slightly modified version of the GCE that plays the role of a weighted integrity descriptor during bond percolation. Let G 0 = G and G f be the network G after the removal of a fraction f of edges and let E(G ideal 0 ) be the idealized network corresponding to G 0 build as described in the Letter. Then is normalized in [0, 1] and it is a monotone decreasing function w.r.t. f . Figure S2 shows the behaviour of GCE * (G) -both topological and weighted -for two of the real networks from Tab.1(main Letter).
Finally, we show the percolation plots for the remaining datasets studied in this work, see Figures S3.
On the normalized weighted efficiency of Latora and Marchiori [1].-Let us take G as the subgraph consisting of vertices q, r, v of verse the direct link e ij , i.e. d ij < 1 wij and it may often happen in real networks with large heterogeneous weights.
Trying to reproduce the results in [1], we considered the neural network of the C. elegans [1,2], with data from http://www-personal.umich.edu/~mejn/ netdata/. Firstly, we aggregate multiple edges, obtaining a simple, directed, weighted network with N = 297 nodes, m = 2345 edges and weights in the range [1,70]. If we consider the network as undirected, we obtain m = 2148 edges and weights in the range [1,72]. The data are not the same used in [1], so we cannot reproduce their results exactly. Let us focus on the undirected network: Fig.S4 shows the distance matrix D evaluated using Dijkstra's algorithm with the reciprocal of edge weights, and the matrix of physical distances L, with ij = min{1, 1 wij }.