Introduction

Weighted networks provide meaningful representations of the architecture of a large number of complex systems where interacting entities, represented as nodes in a graph, are connected with links weighted by the strength of their interactions. Weighted networks are ubiquitous in biological1, ecological2, infrastructure3,4,5, social6,7,8,9, information, and economic10,11 systems, just to mention a few. Their analysis has been in focus from the early stages of complex networks research12,13, with several measures14,15,16 and models17,18 introduced. These studies show that link weights in real networks are usually heterogeneous, may be correlated with the network structure6,19, and can even capture signed relationships20. More importantly, weights help to differentiate links of varying importance, influence, and role. On a microscopic level, weights identify the most relevant neighbours of a node21; on a network level, they indicate links with special roles or positions in the system6,19. Such information is crucial for dynamical processes evolving on weighted networks. Examples can be found in epidemiology, where important ties maintained by frequent interactions may enhance the spread of infection locally, while ties with infrequent interactions but located between densely connected parts of the network may suppress diffusion globally19,22. Link weights are also relevant in phenomena like random walks, spin models, synchronisation, evolutionary games, as well as cascading failures. Despite this, weighted networks have been less studied than their unweighted counterparts, especially for threshold driven processes, which play an essential role in systems of self-organised criticality23,24,25, epidemiology26, firing neurons27,28,29, or social contagion6,30.

In threshold driven processes, the state of an entity changes when the concentration of incoming stimuli or cumulating force reaches a certain threshold. Some typical examples are neural systems27,28, earthquakes31, and solar flares32,33, commonly identified as self-organised critical systems driven by integrate-and-fire mechanisms. Thresholds play a role in some epidemic diseases, such as tuberculosis and dysentery26, where infection requires the concentration of pathogens in an individual to overcome a threshold. Moreover, thresholds are associated with social contagion phenomena, where social influence from acquaintances may change the behaviour of an individual after reaching a cognitive limit. Studies of so-called complex contagion date back to Schelling, Axelrod, and Granovetter, but have recently attracted interest thanks to the seminal cascade model by Watts30, and also to the enormous amount of digital data on human behaviour collected to observe, analyse and model social contagion. In threshold models on networks links are usually considered unweighted, such that the stimuli or influence arriving from each neighbour contributes equally to reaching the behavioural threshold. Although this assumption simplifies their modelling, it does not lead to an accurate representation of real world dynamics. For example, in neural systems synaptic connections have weights that quantify the strength of incoming stimuli, and contribute unequally in bringing neurons to an excited state, as recognised recently in models of neural population dynamics34. In social systems link weights are associated with tie strengths that quantify the social influence that individuals have on their peers. Measurement of tie strength is a long standing challenge, but it is generally accepted that social ties are not equal, as some are more influential than others on one’s decision making. Surprisingly, apart from some recent studies35,36,37, weights have been commonly overlooked in models of threshold driven phenomena.

Our aim is to close this gap by exploring the effect of weight heterogeneities on threshold driven contagion processes. We first study a dynamical variant of the Watts cascade model on a simple system, a random regular network with a bimodal weight distribution. We then provide an analytical solution of the dynamics, for arbitrary degrees and weights, together with numerical simulations and combinatorial arguments to show that the speed of spreading depends non-monotonously on the extent of weight heterogeneity and may drastically accelerate or decelerate as compared to the unweighted case, even for fixed thresholds. We also observe this effect under more realistic synthetic scenarios, such as scale-free networks and lognormal weight distributions, as well as in data-driven simulations over large-scale empirical weighted networks. Our contribution is a meaningful step forward in the largely unexplored modelling of dynamical processes with heterogeneous interactions, typical in neural systems and social contagion. Moreover, our results may have broader implications as our methodology is not specific to threshold dynamics and may be easily extended to any binary state process, while our study and conclusions may be useful in accurately modelling other dynamical phenomena over weighted networks.

Results

Threshold model and approximate solutions

To study threshold driven dynamical processes over weighted networks we build on the seminal model proposed by Watts30. Following its standard formulation30,38,39,40, we define a monotone binary-state dynamics over a weighted, undirected network of size N. Degrees take discrete values k = 0, …, N − 1 according to a distribution P(k), and edge weights w > 0 are continuous variables with distribution P(w). The edge weight w ij represents the capacity of connected nodes i and j to influence each other. Accordingly, the node strength $${q}_{k}(i)={\sum }_{j=1}^{k}{w}_{ij}$$ is the total influence node i receives from its k neighbours. Like in other conventional models of spreading dynamics41, nodes can be in two mutually exclusive states, susceptible (initially all nodes), or infected (also called adopter in the social contagion literature). A susceptible node can become infected either spontaneously with rate p39,40, or if the influence of its infected neighbours exceeds a given threshold ϕ (0 < ϕ < 1). However, influence may vary from neighbour to neighbour. We implement this idea by defining the partial strength $${q}_{m}(i)={\sum }_{j=1}^{m}{w}_{ij}$$ associated with the influence of the m infected neighbours on node i (where 0 ≤ m ≤ k). If the condition q m  ≥ ϕq k is fulfilled, node i becomes infected and remains so indefinitely. For simplicity we assume that all nodes have the same threshold ϕ, just as in many other studies30,38 (implementation details in Methods).

We explore this model analytically by extending Gleeson’s approximate master equation (AME) formalism for stochastic binary-state dynamics41,42,43,44 over weighted networks. Although we only consider monotone dynamics in detail, our formalism can easily be extended to arbitrary binary state processes (see Supplementary Information [SI]). The original AME formalism considers unweighted networks with an arbitrary degree distribution, which are otherwise maximally random. It assumes that all nodes with degree k and number of infected neighbours m follow the same dynamics, forming a node class (k, m) that can be described by a single pair of rate equations. In order to extend this formalism to weighted networks, we discretise P(w) and assume only n possible weight types w j , such that all distinct weights in the network are contained in the weight vector w = (w1, …, w n )T. Then, a node in class (k, m) has k j links with weight w j and m j  = 0, …, k j infected neighbours across these links, such that $${\rm{k}}={\sum }_{j=1}^{n}{k}_{j}$$ and $$m={\sum }_{j=1}^{n}{m}_{j}$$. Furthermore, we can define a degree vector k = (k1, …, k n )T and a partial degree vector m = (m1, …, m n )T, generalising the strength and partial strength to q k  = k w and q m  = m w, respectively. Nodes in class (k, m) have identical strengths and partial strengths, and follow the same pair of rate equations for the fraction sk,m(t) [ik,m(t)] of k-nodes that are susceptible (infected) at time t and have partial degree vector m (see Methods and SI). Fig. 1a illustrates the case of n = 2, and shows the possible transitions into and out of the class of susceptible nodes with degree vector k = (2, 2) and partial degree vector m = (1, 1).

In threshold driven contagion a susceptible node can become infected in two ways, either spontaneously with rate p, or if its weighted threshold ϕ is reached. As such, the infection rate of susceptible nodes in class (k, m) is

$${F}_{{\bf{k}},{\bf{m}}}=\{\begin{array}{cc}p & \quad {q}_{{\bf{m}}} < \varphi {q}_{{\bf{k}}}\\ 1 & \quad {q}_{{\bf{m}}}\ge \varphi {q}_{{\bf{k}}}\end{array},\quad k > 0,$$
(1)

with F0,0 = p. The stepwise nature of Fk,m allows us to map the rate equations for sk,m and ik,m to a reduced-dimension system, as has been done previously for the Watts threshold model41,42,44 and unweighted complex contagion39,40. Namely, if we consider as aggregated variables the density ρ(t) of infected nodes and the probability ν j (t) that a randomly chosen neighbour (across a j-type edge) of a susceptible node is infected (for definitions see Methods), then the description of the dynamics can be reduced to the system of n + 1 equations

$${\dot{\nu }}_{j}={g}_{j}({\boldsymbol{\nu }},t)-{\nu }_{j},$$
(2a)
$$\dot{\rho }=h({\boldsymbol{\nu }},t)-\rho ,$$
(2b)

where ν = (ν1, …, ν n )T is the vector of probabilities ν j for all weight types, and g j (ν, t) and h(ν, t) are functions of binomial terms (see Methods and SI).

Regular networks with bimodal weights

To study the dynamics of our model we first consider a simple structure, the configuration-model k-regular network, with k = 7. Edge weights are sampled from a bimodal distribution with n = 2 values, denoted strong (w1) and weak (w2). The weight distribution is characterised by its average μ, standard deviation σ ≥ 0, and the fraction δ of links that are strong. Thus, weights take the values $${w}_{1}=\mu +\sigma \sqrt{\mathrm{(1}-\delta )/\delta }$$ and $${w}_{2}=\mu -\sigma \sqrt{\delta /\mathrm{(1}-\delta )}$$. The parameter δ contributes to the skewness of P(w), initially fixed to the symmetric case δ = 0.5. The parameter σ interpolates weight heterogeneity between the homogeneous case of an unweighted network (σ = 0), and the most heterogeneous case of a diluted network ($$\sigma =\mu \sqrt{\mathrm{(1}-\delta )/\delta }$$), where only strong links have influence and the weak are functionally absent. After fixing the spontaneous infection rate p and skewness δ, our model has only two parameters, σ and ϕ (Fig. 1b). Similar to other dynamical cascade models39,40, contagion initially evolves at a linear rate until the density ρ(t) of infected nodes reaches a critical value, triggering a rapid cascade of infection that spreads through the whole network (sample scenarios in Fig. 1c,d). Thus, to characterise the speed of dynamics we introduce the quantity t a , the time when infection density reaches a set value (ρ = 0.75), called the absolute time of cascade emergence. We measure t a via numerical simulations of the (σ, ϕ)-parameter space (Fig. 1b), which shows unexpected dependencies on both parameters. On one hand, for fixed σ and increasing ϕ the dynamics slows down, since nodes with higher thresholds require more infected neighbours to become infected. On the other, for fixed ϕ the dynamics depends non-monotonously on σ, where cascades may evolve either faster or slower as we increase weight heterogeneity, relative to the unweighted case (σ = 0). Note that similar behaviour is exhibited after setting p = 0 and introducing an initial seed, although in the following we use the dynamic variant of the Watts model, where p > 0.

We concentrate on the σ dependency by calculating $${t}_{r}=[{t}_{a}\mathrm{(0},\varphi )-{t}_{a}(\sigma ,\varphi )]/{t}_{a}\mathrm{(0},\varphi )$$, the time of cascade emergence relative to the unweighted case with the same ϕ value. (Fig. 2a). The relative time t r will be positive if the weighted process evolves faster than the unweighted case, zero if they evolve at the same speed, and negative if slower than the unweighted case. The (σ, ϕ)-parameter space for t r is highly structured and driven by competing effects of key (k,m) classes, which either reduce or enhance the speed of the spreading process as compared to the unweighted case. We also explore the corresponding numerical solution of the AME systems in Eq. 2, as well as an independent combinatorial solution for the boundaries between regions of low and high cascade speed (Fig. 2b,c) (see Methods and SI). Both the AME and combinatorial solutions perfectly recover the parameter space obtained by simulations. To further explore how weight heterogeneities produce slow or fast cascades, we partition the system according to the number m of infected neighbours required for infection, and measure the aggregated infection rate $${F}_{k,m}(t)={\sum }_{{\bf{k}},{\bf{m}}}P({\bf{k}}){F}_{{\bf{k}},{\bf{m}}}{s}_{{\bf{k}},{\bf{m}}}(t)/{\sum }_{{\bf{k}},{\bf{m}}}P({\bf{k}}){s}_{{\bf{k}},{\bf{m}}}(t)$$ and other determinant quantities in several spreading scenarios (Fig. 2d,e).

In the neutral scenario, all (k, m) classes of the weighted network share the same dynamics as the corresponding (k, m) class in an unweighted network, so Fk,m = p or 1 and weights have no impact on contagion, meaning t r  = 0. In a decelerative scenario like ϕ = 0.25 and σ = 0.3 (Fig. 2d), Fk,m for any m is equal to its unweighted counterpart, except for the m = 2 class. Here, the adoption rate is 1 in the unweighted case but strongly suppressed in the weighted case, thus decreasing the overall spreading speed. For an accelerative scenario, like ϕ = 0.25 and σ = 0.7, competing effects from several (k, m) classes combine to determine the overall dynamics (Fig. 2e). The rate Fk,m for m = 2, …, 4 is lower than 1 which is a decelerative effect (as in the previous case), but the rate Fk,1, which is equal to p in the unweighted case, is significantly larger than p here. Since at the early stages of contagion the number of nodes in class m = 1 is larger than in any other class with m > 1, spreading evolves rapidly to an early cascade. It should be noted that competition between the accelerative and decelerative effects of the weight distribution is one of the defining characteristics of threshold driven contagion on weighted networks. It is this competition that leads to the interference patterns evident in Fig. 2a.

Furthermore, an asymmetry is observed to emerge in the fractions of weak and strong links connecting infected [EII(t)] or susceptible and infected [ESI(t)] nodes (see Methods). Since strong ties contribute the most to reaching the threshold of a node, they participate earlier in the contagion and comprise most ties in the infected subgraph. Conversely, weak ties dominate the surface of the cascade by connecting infected and susceptible nodes. This asymmetry in edge types is an essential feature of weighted contagion that is trivially absent in the unweighted case. This asymmetry appears in cases of both accelerated and decelerated spreading, with amplitude dependent on the absolute value of the relative time of contagion. Note that results from simulations (symbols in Fig. 2d and e) and AMEs (lines in Fig. 2d and e) agree very well, for all quantities studied.

Heterogeneous synthetic and real networks

Although regular networks and bimodal weights are useful in characterising the qualitative impact of weights on contagion, they are rather unrealistic since real complex networks commonly appear with broad degree and weight distributions3. Thus, in the following we explore how threshold driven contagion is influenced by weights using simulations in heterogeneous synthetic and real weighted networks (Fig. 4). We expect degree heterogeneities to affect threshold driven processes since thresholds are defined relative to the degree (or strength) of nodes. As a first step we take synthetic scale-free networks from the configuration model with degree distribution $$P(k)\sim {k}^{-\tau }$$ and exponent τ = 2.5, but maintain a bimodal weight distribution with μ = 1 and δ = 0.5 as in the previous section (Fig. 4a). The increased number of (k, m) classes (due to degree heterogeneity) fragments the (σ, ϕ)-parameter space for t r , but its structure still reveals areas of slow and fast cascades and can be explained by the same arguments used for the k-regular case. Real world examples of this synthetic structure are signed social networks, like the network of Wikipedia editors45, where degrees are broadly distributed and edge signs indicate the parity (or binary weight) of a social interaction like trust, intimacy, or influence. We also simulate our threshold model over the Wikipedia social network by associating + and − tie signs with strong (w1) and weak (w2) links, thus obtaining a weighted network with δ = 0.88 and arbitrary σ (Fig. 4d) (see Methods). Despite complex structural correlations potentially present in the real data, the Wikipedia (σ, ϕ)-parameter space is qualitatively similar to the case of a synthetic scale-free degree distribution, although these correlations and the high δ value transform the areas of relative acceleration and deceleration. To further validate these observations, we have also analysed configuration-model random networks and another empirical signed network, the Pardus dataset20 (see SI).

As with degree heterogeneities, weights in empirical networks are broadly distributed and approximated by scale-free or lognormal distributions, which we address by exploring the threshold model on k-regular networks (k = 7) and a lognormal weight distribution with average μ = 1 (Fig. 4b). Even though all nodes have the same degree, diversity of weight values increases the number of (k, m) classes, smoothing out the (σ, ϕ)-parameter space with respect to the bimodal case but qualitatively maintaining its non-monotonous patterns of slow and fast cascades. The standard deviation σ controls the skewness of the weight distribution and determines the temporal evolution of contagion, promoting partial cascades for large σ (Fig. 4c). Finally, we consider threshold driven contagion in a large empirical weighted social network, an aggregated mobile phone call (MPC) network, where weights are proportional to the number of calls between individuals (Fig. 4e) (see Methods). This network has broad degree and weight distributions9, communities, degree correlations and Granovetter-type degree-weight correlations46. Despite this added complexity, the (σ, ϕ)-parameter space of the MPC network is qualitatively similar to previous cases, apart from the magnitude of the decelerative effect when weights are strongly heterogeneous. As before, skewness in the weight distribution temporally inhibits contagion and induces partial cascades (Fig. 4f). Our data-driven simulations show that, even in empirical networks of vastly different origins, threshold driven contagion strongly depends on link weights via simple mechanisms that can be understood by master equations or combinatorial arguments. This dependence may be responsible for the diverse dynamical scenarios of threshold driven contagion observed in nature, like the diffusion of information in techno-social networks, which typically reaches a limited population, but can occasionally unfold globally through slow or fast cascades of adoption.

Discussion

In complex networks, weights quantify the strength of interactions between nodes and distinguish neighbours by their relevance or influence. Threshold driven contagion in empirical settings is particularly sensitive to link weights, since influence between connected nodes may vary enormously, thus changing the temporal pattern of global spreading. Examples of real-world threshold driven processes over weighted networks can be found in epidemiology, where contagion is enabled by direct human interactions that occur at varying frequencies throughout the population26. In the case of social contagion, like the spreading of information, service or product adoption, participation in collective movements, or the adoption of behavioural patterns, heterogeneities in social tie strengths are relevant as they may reflect the strength of influence of people on each other7,19,22,46. In neural systems, the synaptic weight (a function of several variables) may vary heterogeneously between connected neurons and even in time due to synaptic plasticity34,47. Despite this broad set of real-world examples, threshold driven contagion has mostly only been studied over unweighted networks where links are considered equal.

Our aim in this paper has been to address this shortfall by systematically studying a threshold model on synthetic and empirical weighted networks. We explore networks with increasing complexity, from configuration-model networks with bimodal or lognormal weights, to real world networks with broad degree and weight distributions as well as multiple correlations. We show that threshold driven contagion depends non-monotonously on weight heterogeneity, creating slow or fast cascades relative to the equivalent unweighted spreading process. Via numerical simulations, master equations and combinatorial arguments, we find that this effect is the result of competing configurations of degree, weight, and infected neighbours that slow down or speed up contagion. We also observe that an imbalance in the amount of large and small weights leads to partial cascades, and smoother temporal patterns of spreading than those in unweighted networks. By analysing a range of degree and weight configurations, we show that these features are systemic and thus may drive a variety of real world contagion phenomena.

Our contribution opens up directions of research in the largely unexplored area of dynamical processes with heterogeneous interactions. First, the weight-based, master equation formalism described here can be modified to consider any interaction quality like direction and type, thus providing analytical tools to characterise threshold driven contagion in temporal and multiplex networks48,49. The master equation formalism also provides means of studying the cascade-size phase space30, where one might expect a non-monotonic dependence of cascade size on weight heterogeneity, an effect observed in ref.50 due to threshold heterogeneity. In addition, although the effects of initial seed size on the emerging cascades have been addressed earlier51, it has never been studied on weighted structures, and may prove an interesting direction to explore. Second, our methodology may be used to describe any binary-state dynamics and thus a broad class of empirical processes over weighted networks. We expect our results to find meaningful applications in fields where threshold driven contagion is relevant, like computational epidemiology, neural networks, and social contagion. In these fields our modelling framework, which distinguishes the varied roles and influence of links, may lead to advances in the understanding and prediction of specific temporal features of global pandemics, collective neural firing, or the adoption of innovations and behavioural norms.

Methods

Numerical implementation

We implement weighted complex contagion numerically via Monte Carlo simulations of a monotone binary-state dynamics. Node states change from susceptible to infected in asynchronous random order in a series of time steps. Once a node state changes from susceptible to infected, it remains so for the rest of the dynamics, thus ensuring a frozen final state for the finite system where no more state changes take place. Each time step consists of N node updates. In each node update, a randomly selected node becomes spontaneously infected with probability p, or else it adopts only if the weighted threshold rule q m  ≥ ϕq k is satisfied (see Eq. 1). This is the case if the selected node is susceptible; if the node is infected, no action is taken. We assume that nodes with k = 0 receive no influence from the rest of the network (for any value of ϕ), and therefore can only change state spontaneously. Regarding synthetic networks, we only consider configuration-model networks52 with an uncorrelated distribution of edge weights on top of them, i.e. an ensemble of networks specified by the distributions P(k) and P(w), but otherwise maximally random. Thus, the distributions P(k) and P(w) (together with p) determine the average topological state and dynamical evolution of the system.

AMEs in weighted networks

The dynamics of our threshold model evolves in small time intervals dt. Accordingly, the rate equations for the fractions sk,m(t) [ik,m(t)] of k-nodes that are susceptible (infected) at time t and have partial degree vector m are

$$\frac{d}{dt}{s}_{{\bf{k}},{\bf{m}}}=-{F}_{{\bf{k}},{\bf{m}}}{s}_{{\bf{k}},{\bf{m}}}-\sum _{j=1}^{n}{\beta }_{j}^{s}({k}_{j}-{m}_{j}){s}_{{\bf{k}},{\bf{m}}}+\sum _{j=1}^{n}{\beta }_{j}^{s}({k}_{j}-{m}_{j}+\mathrm{1)}{s}_{{\bf{k}},{\bf{m}}-{{\bf{e}}}_{j}},$$
(3a)
$$\frac{d}{dt}{i}_{{\bf{k}},{\bf{m}}}=+{F}_{{\bf{k}},{\bf{m}}}{s}_{{\bf{k}},{\bf{m}}}-\sum _{j=1}^{n}{\beta }_{j}^{i}({k}_{j}-{m}_{j}){i}_{{\bf{k}},{\bf{m}}}+\sum _{j=1}^{n}{\beta }_{j}^{i}({k}_{j}-{m}_{j}+\mathrm{1)}{i}_{{\bf{k}},{\bf{m}}-{{\bf{e}}}_{j}},$$
(3b)

where Fk,m is the rate of infection of susceptible nodes in class (k, m), and the other terms quantify the rates at which susceptible nodes leave and enter the class (k, m) via the infection of susceptible neighbours. The j-th basis vector of dimension n is denoted by e j ($${s}_{{\bf{k}},-{{\bf{e}}}_{j}}\equiv 0$$), while $${\beta }_{j}^{s}(t)$$ [$${\beta }_{j}^{i}(t)$$] is the rate at which a j-type susceptible neighbour of a susceptible (infected) node becomes infected (see Fig. 1a). The AME system (2) applies to all monotone binary-state dynamics over edge-heterogeneous networks, regardless of the form of Fk,m, and its solution provides a very accurate description of the dynamics, even if the number of equations to solve grows rapidly with n. Moreover, variables in Eq. (3) satisfy the normalisation condition

$$\sum _{{\bf{m}}}{i}_{{\bf{k}},{\bf{m}}}+\sum _{{\bf{m}}}{s}_{{\bf{k}},{\bf{m}}}=1.$$
(4)

If k is distributed according to P(k), the probability that a randomly selected node has degree k and degree vector k is P(k)P(k). Then, the rates $${\beta }_{j}^{s}(t)$$ and $${\beta }_{j}^{i}(t)$$ are

$${\beta }_{j}^{s}(t)=\frac{\sum _{k,{\bf{k}},{\bf{m}}}\,P(k)P({\bf{k}})({k}_{j}-{m}_{j}){F}_{{\bf{k}},{\bf{m}}}{s}_{{\bf{k}},{\bf{m}}}(t)}{\sum _{k,{\bf{k}},{\bf{m}}}\,P(k)P({\bf{k}})({k}_{j}-{m}_{j}){s}_{{\bf{k}},{\bf{m}}}(t)}$$
(5a)

and

$${\beta }_{j}^{i}(t)=\frac{\sum _{k,{\bf{k}},{\bf{m}}}\,P(k)P({\bf{k}})({k}_{j}-{m}_{j}){F}_{{\bf{k}},{\bf{m}}}{i}_{{\bf{k}},{\bf{m}}}(t)}{\sum _{k,{\bf{k}},{\bf{m}}}\,P(k)P({\bf{k}})({k}_{j}-{m}_{j}){i}_{{\bf{k}},{\bf{m}}}(t)},$$
(5b)

where the sum over all degrees, strength and partial strength vectors is written explicitly as

$$\sum _{k,{\bf{k}},{\bf{m}}}=\sum _{k={k}_{{\rm{\min }}}}^{{k}_{{\rm{\max }}}}\sum _{{\bf{k}}}\sum _{{m}_{1}=0}^{{k}_{1}}\ldots \sum _{{m}_{n}=0}^{{k}_{n}}\mathrm{.}$$
(6)

The second sum runs over all strength vectors k = (k1, …, k n )T satisfying the constraint $$k={\sum }_{j=1}^{n}{k}_{j}$$.

Aggregated variables and the reduced AMEs

Variables in Eq. (2) are the fraction of infected nodes in the system,

$$\rho (t)=1-\sum _{k,{\bf{k}},{\bf{m}}}P(k)P({\bf{k}}){s}_{{\bf{k}},{\bf{m}}}(t),$$
(7)

and the probability that a randomly chosen neighbour (across a j-type edge) of a susceptible node is infected,

$${\nu }_{j}(t)=\sum _{k,{\bf{k}}}\,P(k)P({\bf{k}})\frac{\sum _{{\bf{m}}}{m}_{j}{s}_{{\bf{k}},{\bf{m}}}(t)}{\sum _{{\bf{m}}}{k}_{j}{s}_{{\bf{k}},{\bf{m}}}(t)}.$$
(8)

Also, Eq. (2) includes the functions of binomial terms

$${g}_{j}({\boldsymbol{\nu }},t)={f}_{t}+\mathrm{(1}-{f}_{t})\,\sum _{k,{\bf{k}}}\frac{{k}_{j}}{{z}_{j}}\,P(k)P({\bf{k}})\sum _{{q}_{{\bf{m}}}\ge \varphi {q}_{{\bf{k}}}}{B}_{{k}_{j}-1,{m}_{j}}({\nu }_{j})\prod _{i\ne j}^{n}{B}_{{k}_{i},{m}_{i}}({\nu }_{i}),$$
(9a)
$$h({\boldsymbol{\nu }},t)={f}_{t}+\mathrm{(1}-{f}_{t})\,\sum _{k,{\bf{k}}}\,P(k)P({\bf{k}})\sum _{{q}_{{\bf{m}}}\ge \varphi {q}_{{\bf{k}}}}\prod _{j=1}^{n}{B}_{{k}_{j},{m}_{j}}({\nu }_{j}),$$
(9b)

with f t  = 1−(1 − p)ept, z j the average number of j-type edges of a node, and $${B}_{{k}_{j},{m}_{j}}=(\genfrac{}{}{0ex}{}{{k}_{j}}{{m}_{j}}){\rho }^{{m}_{j}}{(1-\rho )}^{{k}_{j}-{m}_{j}}$$ the binomial distribution.

Initial conditions

We assume that at time t = 0 there is an infinitesimally small fraction of infected nodes randomly distributed in the network, so the initial condition for Eq. (3) is

$${s}_{{\bf{k}},{\bf{m}}}\mathrm{(0)}=\prod _{j=1}^{n}{B}_{{k}_{j},{m}_{j}}\mathrm{(0).}$$
(10)

In the reduced AMEs, Eq. (10) corresponds to [ν(0), ρ(0)] = (0, 0).

Combinatorial solution of parameter space boundaries

Taking the equality in the threshold rule, Eq. 1, and writing q k , q m explicitly, we obtain ϕ = m w/k w, where w implicitly depends on σ. After solving this equation for a given k and m, we associate the solution with a boundary line of t r values in (σ,ϕ)-parameter space (Fig. 2b,c). These boundaries separate network configurations where the corresponding (k, m) class does or does not satisfy the threshold rule. For example, the boundary k = (3, 4), m = (1,0) (Fig. 2c) separates networks where nodes with k1 = 3 strong links and k2 = 4 weak links may be infected by only m1 = 1 strong infected neighbour. If two networks differ only in the rate of infection of nodes in this (k, m) class (so that one is eligible for infection and not the other), we observe a difference in spreading time (for details see SI).

Bulk and interface of the contagion cluster

We characterise the effect of weights in threshold driven contagion by measuring how many j-type links, 1 ≤ j ≤ n, are on the bulk and at the surface of cascades. Explicitly, we compute the fraction of j-type links per node, connecting two infected nodes (the cascade bulk),

$${E}_{j}^{II}(t)=\frac{\sum _{k,{\bf{k}}{\boldsymbol{,}}{\bf{m}}}\,P(k)P(k){m}_{j}{i}_{{\bf{k}},{\bf{m}}}(t)}{\sum _{k,{\bf{k}}{\boldsymbol{,}}{\bf{m}}}\,P(k)P(k)m{i}_{{\bf{k}},{\bf{m}}}(t)},$$
(11)

and susceptible and infected nodes (cascade surface),

$${E}_{j}^{SI}(t)=\frac{\sum _{k,{\bf{k}}{\boldsymbol{,}}{\bf{m}}}\,P(k)P(k){m}_{j}{s}_{{\bf{k}},{\bf{m}}}(t)}{\sum _{k,{\bf{k}}{\boldsymbol{,}}{\bf{m}}}\,P(k)P(k)m{s}_{{\bf{k}},{\bf{m}}}(t)},$$
(12)

such that ∑ j EII = ∑ j ESI = 1. Now if P(w) is bimodal (n = 2), then $${E}_{1}^{SI}+{E}_{2}^{SI}=1$$, $${E}_{1}^{II}+{E}_{2}^{II}=1$$, and we may remove the index j (Figs 2d,e and 3c). The quantities $${E}_{j}^{II}$$ and $${E}_{j}^{SI}$$ diverge from 1/2 with amplitude dependent on the absolute difference of the speed from the dynamics on unweighted networks (σ = 0) where $${E}_{j}^{II}={E}_{j}^{SI}=1/2$$.

Data description

We perform data-driven simulations of our threshold model in two large-scale, empirical social networks. The first is a network of N = 138,592 English Wikipedia editors contributing to articles about politics. Each of the 740,397 directed links (defining an edit, revert, restore, or vote action in an article) has a sign (±), interpreted as the parity of trust between connected editors (for free access online and details see ref.45). In our study we remove self-loops and assume bidirectional links appear as undirected links with their original sign (if they shared the same sign), while choosing a sign randomly in the case where they appear with different signs (such edges only form 0.96% of the network, so their effect is not significant). Unidirectional links are also regarded as undirected with their original sign. Finally, we associate + and − tie signs to strong (w1) and weak (w2) links. The network has a broad degree distribution, a fraction δ = 0.88 of strong links and average weight μ = 2.7.

The second data set is an aggregated, static social network of N = 6,243,322 individuals connected by 16,783,865 undirected links with weights defined as the number of phone calls between people in an observation period of 6 months (a link exists if people have mutually called each other at least once). All individuals are customers of a single phone provider with 20% market share in an undisclosed European country. Degree and weight distributions are broad and can be approximated by power-law and lognormal distributions, respectively (for details see ref.9). Since for the MPC network P(w) is fixed, we introduce a method to scale σ without changing the shape of the distribution, described as follows. We first assume that the MPC network has a weight set W = {w1, …, w|E|}, where w i is the weight of the i-th edge, and |E| is the number of edges in the network. This set has mean and variance

$$\mu =\frac{1}{|E|}\sum _{i=1}^{|E|}{w}_{i}\quad {\rm{and}}\quad {\sigma }^{2}=\frac{1}{|E|}\sum _{i=1}^{|E|}{({w}_{i}-\mu )}^{2}.$$
(13)

Now we consider a new weight set W′ = {μ + α(w1 − μ), …, μ + α(w|E| − μ)}, where we have applied the transformation $${w}_{i}^{\prime} =\mu +\alpha ({w}_{i}-\mu )$$, i = 1, …, |E|, and 0 ≤ α ≤ 1 is a tuning parameter. The limits of this transformation give a Dirac delta distribution (α = 0) or P(w) (α = 1). Substituting $${w}_{i}^{\prime}$$ into the expression for σ, we see that the mean and standard deviation of the transformed weight set are μ′ = μ and σ′ =ασ. Then, we may obtain a new weight distribution retaining the shape of P(w) by applying the transformation $${w}_{i}\mapsto {w}_{i}^{\prime}$$. If σ′ is the desired standard deviation, the required tuning parameter is α = σ′/σ.

Data availability statement

The Wikipedia network data we used in Fig. 4d is freely available online at45. The mobile call data used in Fig. 4e and f are available from an undisclosed mobile operator but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available. Data may however be available from the authors upon reasonable request and with permission of the provider.