## Introduction

Understanding how the removal of nodes or links affects the functioning of a network is a major topic in science1,2,3,4,5,6. It permits to rank nodes (or links) according to the consequence of their removal on the system. Also, it provides information for increasing the robustness (resilience) of networked systems7,8. In fact, once the most important nodes-links are found, one can increase the network robustness by protecting these key components, for example by directing resources to preserve important internet routers or implementing policies to secure most important bridges (or roads) in transportation networks. For these reasons, many studies analysed the effect of removal (attack) strategies on real-world complex networks in different fields of science1,2,9,10,11,12,13,14,15,16,17.

Yet, recent classic outcomes indicated that many real-world complex networks showed ‘robust yet fragile’ nature, i.e. they are robust to the random removal of nodes but very fragile to the attack of the most connected node components1,13,18,19. Following these outcomes, a plethora of attack strategies have been proposed to determine the sequence of nodes removal that maximise the damage in the networks5,6,12,20,21,22. Most of these analyses consist in measuring the decrease in some indicators of the network integrity (functioning) following empirical removal of nodes-links4,5,6,12,15,20,21,22.

Following the Granovetter main idea, in recent year link removal analyses conducted over economic complex systems showed that weak connections support the overall connectivity of the network significantly more than the strong links24. Similar counterintuitive vulnerability of the network connectivity to weak links removal was found in social networks of human interactions from mobile phone call record25,26 and it was then reproduced in models of complex weighted networks27,28. These analyses outlined the importance of weak links in sustaining the functioning of real-world networks29.

## Methods

• Rand: links are randomly removed. This represents the possibility of links failure (error) in the network3,28,30.

• Strong: links are removed in decreasing order of weight, i.e. links with higher weight are removed first3,28,30 and it represents an attack directed to strong links.

• Weak: links are deleted in increasing order of weight, i.e. links with lower weight are removed first3,28,30.

• BC: links are removed according to their betweenness centrality (BC), i.e. links with higher betweenness centrality are deleted first. The betweenness centrality is based on the shortest paths (also called geodesic path) between a couple of nodes. The shortest path between two nodes is the minimum number of links to travel from a node to the other36. The betweenness centrality of a link accounts the number of shortest paths from any couple of nodes passing along that link36. This version of betweenness centrality is based on the binary shortest path notion, accounting the number of links necessary to travel among nodes only, without any consideration of the weight attached to the links; for this reasons is also called binary betweenness centrality34.

• BCw: links are removed according to their weighted betweenness centrality (BCw), i.e. links with higher BCw are deleted first. The weighted betweenness centrality is computed using the weighted shortest paths that consider the number of links necessary to travel between nodes, but also consider the weight attached to the links. In this procedure, we first compute the inverse of the link weights, then we compute the weighted shortest paths as the minimum sum of the link weights necessary to travel among nodes34,35. The weighted betweenness centrality of a link accounts the number of weighted shortest paths from any couple of nodes (also called weighted geodesic) passing along that links36. The higher is the BCw of a link, the higher is the number of weighted shortest paths passing along the link.

• DP: links are removed according the degree product (DP) of the joined nodes. The degree of the nodes is the number of links to the nodes5,34. Usually the high degree nodes are the so-called hubs1,5,34. The DP pruning strategy can be viewed as a strategy ranking the links reaching information from the topological connectivity of the nodes.

• BP: links are deleted according to the betweenness centrality product (BP) of the end nodes. The betweenness centrality of a node is the number of shortest paths from any couple of nodes passing from that node34,36. The higher is the betweenness centrality of the node, the higher the number of shortest paths passing along the node.

• BPw: links are removed according the weighted betweenness centrality product (BPw) of the joined nodes. The weighted betweenness centrality of a node is the number of weighted shortest paths from any couple of nodes passing from that node34,36. The higher the weighted betweenness centrality of the node, the higher the number of weighted shortest paths passing along the node. The BPw is the weighted counterpart of the BP pruning.

• SP: links are deleted according to the strength product of the ending nodes. The strength of a node is the sum of the weights of the links to that node30,34. SP can be viewed as the weighted counterpart of DP.

• TP: links are deleted according to the transitivity product of the ending nodes. The node transitivity is a notion measuring the probability that the adjacent nodes of a node are connected among them. The adjacent nodes of a node are also called the ‘neighbors’ of that node. The transitivity of a node is the proportion of links between the neighbors of a node divided by the number of links that could possibly exist between them. Equally, we can compute the transitivity considering the ‘triangles’ in the network, i.e. a triangle is a subgraph of three nodes. The transitivity of a node is computed as the ratio of the closed triangles (complete subgraphs of three nodes) connected to the node and all the possible triangles centered on the node. The node transitivity is also called ‘local transitivity’ or ‘node clustering coefficient’34,37. See Supplemental material S1 for a detailed description. In network theory, the node transitivity is a measure of the magnitude to which nodes in a network tend to cluster together. The node transitivity defined here is a topological metric of nodes clustering not including the link weights.

• TPw: links are deleted according to the weighted transitivity product of the ending nodes. We adopted the weighted version of the topological node transitivity proposed by Barrat et al.37 This is also called weighted clustering coefficient of the node and it is a measure of the local cohesiveness that takes into account the importance of the clustered structure on the basis of the amount of interaction intensity found on the local triangles. Indeed, the weighted node transitivity counts for each triangle formed in the neighborhood of the node i, the weight of the two participating links of the node i. Such a measure, evaluates not only the number of closed triangles among the node i neighbors (like in the local binary transitivity above), but also the total relative weight of these triangles with respect to the strength of the node. See Supplemental material S1 for a detailed description. TPw is thus the weighted version of the transitivity product of the node (TP).

In the case of ties, e.g. links with equal ranking, we randomly sort their sequence. We perform 103 simulations for each link attack strategy.

### The real-world complex networks data set

We test the efficiency of the link removal strategies using six well know real-world complex weighted networks.

1. (i)

US Airports flights transportation network (Air): This is a weighted transportation network obtained by considering the 500 US airports38. Nodes represent US airports and links represent air travel connections among them. The network reports the link weight expressed in terms of the number of available seats on a given connection on a yearly basis.

2. (ii)

The neural network of the nematode C. Elegans (Eleg): This biological network is a weighted representation of the neural network of C. Elegans39. Nodes are neurons and links are neural connections among them. The link weight is the number of connections between couples of neurons.

3. (iii)

Scientific collaboration network (Net): This is a social network representing the co-authorship in science publications40. Nodes are scholars and links depict the co-authorship relationship among them. The link weight indicates the number of co-authored papers by a couple of authors.

4. (iv)

Cargo ships transportation (Cargo): The international transportation network of global cargo ship movements consists of shipping journeys between pairs of major commercial ports in the world in 200741. The link weight represents the number of shipping journeys between couples of nodes-ports.

5. (v)

The Escherichia Coli metabolic network (Coli): this biological network illustrates the common chemical reactions between metabolites in the E. Coli bacteria. Nodes are metabolites and links indicate the presence of common reactions. Link weights in the metabolic network of the bacteria E. Coli consist of the number of different metabolic reactions, in which two metabolites participate42.

6. (vi)

The UK faculty social network (UK): This social network represents the friendship among academic staff in a UK faculty. The personal friendship network of the UK faculty university consists of 81 nodes (individuals) and 817 weighted friendship connections43. The network structure was constructed with a questionnaire, where the staff individuals formed a reliable scale and declared the strength of the friendship with other individuals in the faculty. The links weights are thus representing the strength of the friendship among individuals.

First, we selected this database because it is composed by the real-world weighted networks well known in literature and they are used in yet classic analyses. Second, they describe different realms from different fields of science with a widely different but solid interpretation of link weight. Last, the networks are of different structural properties, such as size (e.g. number of nodes, from N = 81 to N = 1589), number of links (from L = 817 to L = 4349) and connectivity level (average node degree <k > from 3.45 to 20.2). The real-world networks data set description and main structural features are in Table 1.

### The network functioning measures

#### The largest connected cluster (LCC)

The largest connected cluster (LCC) is a widely used measure of the network functioning1,4,5,6. The LCC is also known as the giant component (or giant cluster) and it is the highest number of connected nodes in the network. The LCC can be written:

$$LCC=\,\max ({S}_{j})$$
(1)

where Sj is the size (number of nodes) of the j-th cluster.

Although the wide range of application, the LCC owns important shortcomings, for example by neglecting the other lower size nodes clusters and more important, neglecting the heterogeneity in the link weights30,35,44. The LCC is a simple indicator evaluating the binary-topological connectedness of the network; for this reason we adopt it like a measure of the simple topological connectivity of the network functioning not reflecting the heterogeneity of the link weights.

#### The total flow (TF)

The total flow represents the actual or the potential flowing in the network30 and it is the sum of link weights. Let be the weighted network Gw, it can be represented by a N × N matrix W where the element wij > 0 if there is a link of weight w between nodes i and j,and wij = 0 otherwise.

The total flow is:

$$TF=\mathop{\sum }\limits_{i=1}^{N}\,\mathop{\sum }\limits_{j=1}^{N}{w}_{i,j}$$
(2)

For example, in the US Airports the TF measure represents the actual flows among airports (where ‘actual’ means the flying passengers in a year); also in the transportation Cargo ship network TF represent the actual flow indicating the shipping journeys between ports in a year. Differently, in the C. Elegans real-world complex weighted network, TF indicates the total number of connections realized between pairs of neurons. In other terms, TF can be viewed as the thermodynamics capacity or a quantity influencing the actual flow between nodes pairs in the network but do not uniquely determine it, e.g. the higher is the connection density in the C. Elegans network, the higher can be the information delivered between couple of neurons. The TF is the simplest weighted indicator of the network functioning, only quantifying the weight value of the removed links, neglecting their topological role in the network.

#### The efficiency (Eff)

The concept of efficiency of the network was first introduced by Latora and Marchiori2 with the aim to encompass specific shortcomings associated to the shortest path based measures. In fact, the shortest path based measures, like the characteristic path length or the average geodesic length2,34, can be divergent when the network is not connected. For this reason, these measures based on the paths presents the shortcoming to diverge for disconnected networks making them poorly suited to evaluate network functioning under nodes-links removal. Differently, the network efficiency (Eff) can properly evaluate the functioning of both connected and disconnected networks, and this becomes a highly important property when we have to measure the network functioning under nodes-links attack. After this, the network efficiency can properly work with both binary and weighted structures, being able to consider the difference in link weights in the evaluation of the weighted network functioning. The efficiency of a network is a measure of how efficiently it exchanges information. On a global scale, i.e. considering all the nodes-components of the system, the efficiency quantifies the exchange of information across the whole network where information is concurrently exchanged. The efficiency is a robust and widely used weighted measure of the network functioning adopted in very different fields of science2,30,33,34,35. The average efficiency of the network is defined:

$$Eff=\frac{1}{N\cdot (N-1)}\,\sum _{i\ne j\in G}\frac{1}{d(i,j)}$$
(3)