A message-passing approach to epidemic tracing and mitigation with apps
Ginestra Bianconi, Hanlin Sun, Giacomo Rapisardi, Alex Arenas
AA message-passing approach to epidemic tracing and mitigation with apps
Ginestra Bianconi
School of Mathematical Sciences, Queen Mary University of London, London, E1 4NS, United Kingdom andThe Alan Turing Institute, 96 Euston Rd, London NW1 2DB, United Kingdom
Hanlin Sun
School of Mathematical Sciences, Queen Mary University of London, London, E1 4NS, United Kingdom
Giacomo Rapisardi and Alex Arenas
Departament d’Enginyeria Inform`atica i Matem`atiques,Universitat Rovira i Virgili, 43007 Tarragona – Spain
With the hit of new pandemic threats, scientific frameworks are needed to understand the unfold-ing of the epidemic. At the mitigation stage of the epidemics in which several countries are now,the use of mobile apps that are able to trace contacts is of utmost importance in order to controlnew infected cases and contain further propagation. Here we present a theoretical approach usingboth percolation and message–passing techniques, to the role of contact tracing, in mitigating anepidemic wave. We show how the increase of the app adoption level raises the value of the epidemicthreshold, which is eventually maximized when high-degree nodes are preferentially targeted. An-alytical results are compared with extensive Monte Carlo simulations showing good agreement forboth homogeneous and heterogeneous networks. These results are important to quantify the levelof adoption needed for contact-tracing apps to be effective in mitigating an epidemic.
Percolation theory [1–5] constitutes a subject of majorrelevance in the field of complex networks. It providesa simple mathematical framework which naturallyapplies to both networks’ structural properties, (suchas resilience under random damage) [6–8], and criticaldiffusion, (such as epidemic spreading in heterogeneousstructures) [9, 10]. As a matter of fact, even thoughthere exists several epidemiological models with differentflavors of complexity, the arguably most popular one, i.e. the SIR model, was found [9, 10] to be mappableto a static link-percolation problem, which allowed tofind analytical expressions for the epidemic thresholddepending on the underlying network topology. Theseresults, even if they might be only an approximationof observed features in real epidemics, still constitutea fundamental theoretical cornerstone in the field ofepidemic processes. Recently there has been an in-creasing interest in studying the effectiveness of trackand tracing policies as a measure to contain epidemicspreading [11–14]: for instance, in [14] the authors showhow an effective contact tracing strategy in scale-freenetworks can reduce the probability of superspreadingevents, while in [11] it is claimed that a widely usedcontact-tracing app, combined with additional measuressuch as social distancing might be sufficient to stop anepidemic diffusion.There are several mathematical arguments proposedin the contemporary literature to justify the above-mentioned effects, however a solid percolation approachhas not been proposed so far. In this work, we take a stepforward in filling this gap by proposing a stylized modelfor epidemic spreading with contact-tracing and testing policies based on link percolation.In particular, we first consider each individual i , ofa given contact network, to be assigned a binary vari-able T i representing whether or not the individual hasthe tracing app. Then, we propose a modified versionof the popular message-passing (MP) equations [15–19]which takes into account the following rationale. Everyinfected individual with probability p , called the trans-missibility of the epidemic, transmits the disease to a sus-ceptible neighbour. An individual who has got the app,will know almost instantaneously (this is an hypothesisfar from reality, but simplifies the analysis) if has beenin contact with an infected individual also having theapp, an she/he immediately self-isolates stopping propa-gation. However, if infected from an individual still nothaving the app, she/he will not know until symptomsappear. This can be formulated as follows: individualswith the app ( T i = 1) can infect only if previously in-fected by individuals without the app ( T i = 0), whileindividuals without the app can infect regardless the T i value of their infector. By doing so we are able to derivea modified non-backtracking matrix [16, 20, 21] whoselargest eigenvalue determines the epidemic threshold p c .Furthermore, for the case of uncorrelated networks, weare also able to derive an analytical expression for p c asa function of the average distribution of the tracing app,namely T ( k ). Our results show that in general the morethe app is diffused among the population the higher isthe value of p c , meaning that the endemic state is lesslikely to be achieved. Moreover we show that given afixed app coverage, the optimal T ( k ) which maximizes p c corresponds to a hub-targeting strategy. Basic model of spreading with app-
Let us assume a a r X i v : . [ phy s i c s . s o c - ph ] J u l FIG. 1: (Color online) Sketch of the infection pathways thatleads to the epidemic spreading in a population in which thereare individuals that have adopted the app and individual thathave not adopted the app. contact network G ( V, E ) formed by | V | = N individuals i = 1 , , . . . N , each individual i ∈ V is assigned a vari-able T i indicating whether the individual has got the app T i = 1 or not T i = 0. Assuming the contact tracing apphas immediate effect on quarantining suspicious cases, aperson with the app can infect only if it is infected by aperson without the app, while a person without the appcan infect regardless if he has got the infection from a per-son with the app or without the app (see Figure 1). Now,we propose a stochastic infection model as follows: forevery link ( i, j ) we draw a random variable x ij ∈ { , } indicating whether the eventual contact between one in-fected and one susceptible node, found at the two endsof the link, leads to the infection. We parametrize thisdynamic by taking (cid:104) x ij (cid:105) = p , where p indicates the trans-missibility of the epidemic.We can simulate the stationary state of this spread-ing process on networks of arbitrary topology, i.e. in-cluding spatial networks with high clustering coefficient,by implementing the following Monte Carlo algorithmwhich takes advantage of the mapping between epidemicspreading and percolation. We name T − T the links con-necting two individuals adopting the app. These linksdo not contribute to the propagation of the infectionto nodes other than the two connected nodes. In or-der words the causal chains of infection stop when theyinvolve a T − T link. Therefore we first consider the gi-ant component of the link percolation process in whichall the T − T links are removed and all the other links areretained only if x ij = 1. To calculate the total fractionof infected individuals in addition to the nodes in thisgiant component we include also the nodes with the appinfected by nodes with the app. (see SM [22] for details). Message-passing approach-
To analytically predict thepropagation of the epidemics on a network we use thepowerful MP approach [16–18]. Although this approachis proven to give exact results only on locally tree-likenetworks, it is also well known to be very robust in thecase of networks with loops, when the underlying MPalgorithm converges [23]. In this work we adopt the MPapproach and we use it to predict the phase diagram of the spreading process on network ensembles as a functionof the level of adoption of the app in the population.The considered spreading model is stochastic and hasdifferent sources of randomness that can be taken intoaccount by different MP algorithms in which we averagedifferent level of information [17]. The simplest messageMP can be derived assuming to know everything aboutthe spreading dynamics. This would entail first to knowthe contact network, secondly to know which individu-als have the app, i.e. the configuration { T i } i ∈ V , andfinally to know which links have led to an actual infec-tion, i.e. { x ij } ( i,j ) ∈ E (see SM [22] for details). One canthen relax the hypothesis of perfect knowledge about theepidemic process and we can consider the message pass-ing processes in which we average over the distributionof { x ij } ( i,j ) ∈ E . In this situation the outcome of the epi-demic spreading is dictated by the following MP equa-tions. A node i spread the virus to node j only withprobability σ i → j ∈ [0 ,
1] where this message is found bythe MP equation σ i → j = pT i − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − (1 − T (cid:96) ) σ (cid:96) → i ) + p (1 − T i ) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − σ (cid:96) → i ) , (1)where N ( i ) indicates the neighbours of node i . Theseequations directly implement the model as described inFig. 1. Moreover a node i is infected with probability σ i ∈ [0 ,
1] with σ i = − (cid:89) (cid:96) ∈ N ( i ) (1 − σ (cid:96) → i ) . (2)Therefore the expected fraction S of infected individualsis given by S = 1 N N (cid:88) i =1 σ i . (3)This process has an epidemic threshold achieved whenthe maximum eigenvalue Λ( B ) of the modified non-backtracking matrix B is equal to one, i.e.Λ( B ) = 1 . (4)The modified non-backtracking matrix B for this algo-rithm is defined in terms of the non-backtracking matrix A of the network as B (cid:96)i → ij = p (1 − T i T (cid:96) ) A (cid:96)i → ij . (5)Here A [16] has elements A (cid:96)i → ij = a (cid:96)i a ij (1 − δ (cid:96)j ) , (6)where a is the adjacency matrix of the network and δ rs is the Kronecker delta. This equation clearly shows thatthe epidemic threshold is dictated essentially by the non-backtracking matrix of the network where we have re-moved all the T − T links.We can also average over the probability distributionof { T i } i ∈ V . Specifically we can assume that T i (the . . . indicates the average over the probability distributionof { T i } i ∈ V ) is only a function of the node degree, i.e. T i = T ( k i ). This is a reasonable assumption, however wenote that the adoption of the app might depend on anadditional social contagion process of awareness behav-ior in a scenario close to the one proposed in Ref. [24].For formulating the MP algorithm in the case in whichwe assume to known only the function T ( k ), the trasmis-sibility p , and the actual contact network, we considerfor every ordered pair of linked nodes ( i, j ) the two mes-sages indicating the probability that node i infects node j given that node i has adopted (ˆ σ Ti → j ) or not adopted(ˆ σ Ni → j ) the app. These two messages are given byˆ σ Ti → j = T i σ i → j , ˆ σ Ni → j = (1 − T i ) σ i → j . (7)The MP equations for these messages can be obtainedby averaging the MP Eqs.(1) over all the configuration { T i } i ∈ V and readˆ σ Ni → j = p (1 − T ( k i )) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − ˆ σ N(cid:96) → i − ˆ σ T(cid:96) → i ) . ˆ σ Ti → j = pT ( k i ) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − ˆ σ N(cid:96) → i ) (8)The probability that node i is infected σ i is given by σ i = − (cid:89) (cid:96) ∈ N ( i ) (1 − ˆ σ N(cid:96) → i − ˆ σ T(cid:96) → i ) , (9)while the expected fraction S of infected nodes is given byEq. (3). In this case the relevant matrix B determiningthe epidemic threshold given by Eq. (4) is (see SM [22]for details) B (cid:96) (cid:48) (cid:96) → ij = p [1 − T ( k i )] δ (cid:96)i A (cid:96) (cid:48) i → ij + p [1 − T ( k i )] T ( k (cid:96) ) A (cid:96) (cid:48) (cid:96) → (cid:96)i A (cid:96)i → ij . (10)Finally we assume that we do not have perfect knowl-edge about the network itself and can perform the aver-age over an uncorrelated network ensemble. In this casewe have two equations one for S (cid:48) N and one for S (cid:48) T indi-cating the probability that by following a link we reachan infected individual without the app or with the apprespectively. These equations (see SM [22] for details of the derivation) read, S (cid:48) N = p (cid:88) k kP ( k ) (cid:104) k (cid:105) (1 − T ( k )) (cid:2) − (1 − S (cid:48) N − S (cid:48) T ) k − (cid:3) ,S (cid:48) T = p (cid:88) k kP ( k ) (cid:104) k (cid:105) ( T ( k )) (cid:2) − (1 − S (cid:48) N ) k − (cid:3) . (11)Here T ( k ) indicates the probability that a node of degree k gets the app. The probability that a random node getsthe infection is given by S = (cid:88) k P ( k ) (cid:2) − (1 − S (cid:48) T − S (cid:48) N ) k (cid:3) , (12)The transition is achieved for p c = min (cid:18) , κ T (cid:20) − (cid:114) κ T κ N (cid:21)(cid:19) . (13)where κ N = (cid:104) k ( k − − T ( k )) (cid:105)(cid:104) k (cid:105) .κ T = (cid:104) k ( k − T ( k ) (cid:105)(cid:104) k (cid:105) . (14) Optimization -
The formula for p c , provided by Eq. (13),is an increasing function of κ T so in order to maximize p c we need to maximize κ T . Under the L norm (cid:88) k P ( k ) T ( k ) = T . (15)This optimization problem gives the discrete Heavisidestep function ˜ T ( k ) = θ ( k − k c , α ) (16)taking the value 0 ≤ α = T − (cid:80) k>k c P ( k ) < k = k c .Therefore the optimal solution is to have all nodes of de-gree k > k c with 100% app adoption and the node withexactly k = k c with the maximal adoption allowed bythe constraint in Eq. (15). For this choice of T ( k ) wehave checked the validity of the proposed message pass-ing theory by comparing the results obtained by a directimplementation of the Monte Carlo algorithm predict-ing the fraction of nodes affected by the epidemics withthe results of the MP algorithm defined in Eq. (8), (9)finding an excellent agreement in the case of a Poissonnetwork (see Figure 2). We have checked that the agree-ment remains excellent also for scale-free networks (seeSM [22]). Improvement on p c - Equation (16) tells us that givena fixed app coverage T , the best strategy in order tomaximally delay the percolation transition is given bytargeting the hubs. In order to verify the optimality ofEq. (16) when compared to different strategies, we con-sidered the more general form of T ( k ) given by: T ( k ) = ρ + (1 − ρ ) θ ( k − k c , ˜ α ) , (17) p S Monte Carlo, k c = 4MP, k c = 4Monte Carlo, k c = K MP, k c = K FIG. 2: (Color online) The fraction of infected nodes S isplotted versus p for a Poisson network with N = 5 × nodes and average degree λ = 4. The results obtained byaveraging the Monte Carlo simulations over 200 realizationsof the configuration { T i } i ∈ V and { x ij } ( i,j ) ∈ E ) are comparedwith the results of the MP algorithm defined by Eqs. (8) andEq. (9). Here T ( k ) is given by Eq. (16) with α = 0 and k c = K where K is the maximum degree of the network and k c = 4. where θ ( k − k c ) is the discrete Heaviside step functiontaking the value ˜ α at k = k c , and ρ ∈ [0 ,
1] denotes auniform fraction of individuals adopting the app. Thanksto Eq. (17) we are able to interpolate between a purelyrandom strategy obtained by taking the limit k c → ∞ and the optimal strategy given in the limit ρ →
0. Itis straightforward to check that under the constraint de-fined in Eq. (15) we have respectively lim k c →∞ T ( k ) = T and lim ρ → T ( k ) = ˜ T ( k ).We have used Eq. (13) to investigate the phase di-agram (characterized by the epidemic threshold p c ) ofdifferent network ensembles (a Poisson network and anuncorrelated scale-free network) as a function of ρ and k c (see Figure 3). We observe that a significant adoptionof the app can significantly increase p c .To show, in a particular example, the increase of p c dueto the adoption of the app, we consider the real datasetLivemocha social-network [25]. As we can see from Fig. 4the random adoption strategy, achieved when k c = k max ,yields a very small increase in the value of p c compared tothe optimal distribution, corresponding to ρ = 0. There-fore in a scenario of limited resources, represented by theconstraint defined in Eq. (15), the optimal strategy cor-responds to distribute the app from higher-degree nodesto lower-degree ones until the resources are exhausted.The resulting increase in p c computed according to Eq.(13) is quite dramatic and non trivial, for instance fromFig. 4 we read that if the app is optimally distributedamong ∼
40% of the population the increase of p c is ∼ ∼ Conclusions-
In this work we provide a message-passing theory able to predict the epidemic thresholdof disease spreading among a population which has theoption of adopting a tracing app. For simplicity weassumed that the tracing app is perfect, however themodeling framework can be relaxed and allow also forimperfect tracing and isolation. The proposed stylizedmathematical framework can be useful to assess theexpected impact of contact-tracing apps in the courseof an epidemics. The compartmental epidemic modelused is the classical SIR, and do not pretend to be amodel fitted for the current pandemic of COVID-19,however the physical intuition we grasp from the pre-sented analysis may prove fundamental to prescribe thebest targeting strategy for app adoption, as well as itcaptures the highly non-linear effect on the reduction ofthe incidence provided by a certain fraction of adoption.Our preliminary results show both numerically andtheoretically that the adoption of the app by a largefraction of the population increases the value of theepidemic threshold. In case of uncorrelated networkswe are able to derive a closed analytic expression for p c which depends on both the network degree-distribution P ( k ) and the average app distribution T ( k ). Thanks tothis expression we finally prove that in a constrained-resources scenario the value of p c is maximized whenhigh-degree nodes are preferentially targeted. Ourresults show that an optimal targeting gives rise to adramatic increase in the value of p c when compared to astrategy in which a fraction of the resources is randomlydistributed. The more randomly the app is diffusedamong the population the less is the increase in thepercolation threshold, or equivalently, the less the apphas the power of mitigating the epidemics. Overall ourresults show that even if the adoption of a tracing apphas the effect of mitigating an epidemic, the same levelof adoption can be optimally distributed to obtain amitigation effect which is significantly higher.AA acknowledges support by Ministerio de Econom´ıay Competitividad (grant FIS2015-71582-C2-1), Gener-alitat de Catalunya (grant 2017SGR-896), and Uni-versitat Rovira i Virgili (grant 2017PFR-URV-B2-41),ICREA Academia and the James S. McDonnell Foun-dation (grant [1] A.-L. Barab´asi, Network Science (Cambridge UniversityPress, 2016).[2] M. Newman,
Networks: An introduction (Oxford Univer-sity Press, 2018).[3] S. N. Dorogovtsev, A. V. Goltsev, and J. F. Mendes,Reviews of Modern Physics , 1275 (2008). a) b) FIG. 3: (Color online) The phase diagram of the epidemic model mitigated by the adoption of the app is shown for a Poissonnetwork with average degree λ = 4 (panel (a)) and for an uncorrelated scale-free network with γ = 2 . T ( k )is given by Eq. (17) with ˜ α = 0. The epidemic threshold p c is plotted as a function of ρ for different values of the cutoff k c .Both networks ensembles have N = 10 nodes. k c p c / p c FIG. 4: (Color online) Relative increase of p c computed fromEq. (13) on the Livemocha social-network ( N ∼ × nodes, E ∼ × edges) [25], where T ( k ) is given by Eq. (17)under the constraint (15), and p c = (cid:104) k (cid:105) / (cid:104) k ( k − (cid:105) representsthe value of the percolation threshold in the absence of appcoverage (which can be obtained from Eq. (13) in the limit κ T → p c = 0 . T = 0 . T ( k ) with k c =20 and ˜ α = 1. The plot shows that for this particular valueof T , corresponding to ∼
40% of the nodes having the app,the optimal distribution is reached at ρ = 0 and correspondsto a ∼ p c , whereas in the case of a purelyrandom strategy, obtained at ρ = T , the increase of p c is ∼ Complex networks: structure,robustness and function (Cambridge University Press,2010).[5] A. Barrat, M. Barthelemy, and A. Vespignani,
Dynami-cal processes on complex networks (Cambridge UniversityPress, 2008).[6] R. Albert, H. Jeong, and A.-L. Barab´asi, Nature , 378 (2000).[7] R. Cohen, K. Erez, D. ben Avraham, and S. Havlin,Phys. Rev. Lett. , 4626 (2000).[8] S. N. Dorogovtsev, J. F. F. Mendes, and A. N. Samukhin,Phys. Rev. Lett. , 4633 (2000).[9] M. E. J. Newman, Phys. Rev. E , 016128 (2002).[10] R. Pastor-Satorras, C. Castellano, P. Van Mieghem, andA. Vespignani, Rev. Mod. Phys. , 925 (2015).[11] L. Ferretti, C. Wymant, M. Kendall, L. Zhao, A. Nurtay,L. Abeler-D¨orner, M. Parker, D. Bonsall, and C. Fraser,Science (2020), 10.1126/science.abb6936.[12] M. Chinazzi, J. T. Davis, M. Ajelli, C. Gioannini,M. Litvinova, S. Merler, A. Pastore y Piontti, K. Mu,L. Rossi, K. Sun, C. Viboud, X. Xiong, H. Yu, M. E.Halloran, I. M. Longini, and A. Vespignani, Science ,395 (2020).[13] C. Fraser, S. Riley, R. M. Anderson, and N. M. Ferguson,Proceedings of the National Academy of Sciences ,6146 (2004).[14] S. Kojaku, L. Hebert-Dufresne, and Y.-Y. Ahn, “The ef-fectiveness of contact tracing in heterogeneous networks,”(2020), arXiv:2005.02362 [q-bio.PE] .[15] B. Karrer and M. E. J. Newman, Phys. Rev. E , 016101(2010).[16] B. Karrer, M. E. Newman, and L. Zdeborov´a, PhysicalReview Letters , 208702 (2014).[17] G. Bianconi, Multilayer networks: structure and function (Oxford University Press, 2018).[18] F. Radicchi and G. Bianconi, Physical Review X ,011013 (2017).[19] G. T. Cantwell and M. E. J. Newman, Proceedings ofthe National Academy of Sciences , 052808 (2014).[22] See Supplemental Material.[23] S. Melnik, A. Hackett, M. A. Porter, P. J. Mucha, and J. P. Gleeson, Physical Review E , 036112 (2011).[24] C. Granell, S. G´omez, and A. Arenas, Physical reviewE , 012808 (2014). [25] R. Zafarani and H. Liu, “Social computing data reposi-tory at ASU,” (2009). SUPPLEMENTAL MATERIAL
MAPPING OF EPIDEMIC SPREADING TO PERCOLATION PROBLEM
We assume that the network G = ( V, E ) of contacts is formed by N = | V | individuals i = 1 , , . . . N . Each individualis assigned a variable T i indicating whether the individual has adopted the app ( T i = 1) or not ( T i = 0). Assumingthat the track and tracing has immediate effect, a person with the app can infect only if its is infected by a personwithout the app, whereas a person without the app can infect regardless if he has got the infection from a personwith the app or without the app. For every link ( i, j ) ∈ E we draw a random binary variable x ij ∈ { , } indicatingwhether ( x ij = 1) or not ( x ij = 0), the eventual contact between one infected an one susceptible node find at the twoends of the link leads to the infection. Here we assume that the average of (cid:104) x ij (cid:105) is given by the transmissibility p , i.e. (cid:104) x ij (cid:105) = p .In order to find which are the nodes infected in this epidemic outbreak we adopt the following algorithm that usesthe mapping of the stationary state of epidemic to percolation [9]. • Pre-processing of the connections-
We call T − T the links connecting two individuals both adopting the app.These links do not contribute to the propagation of the infection to nodes other than the two connected nodes.Therefore we initially remove from the network all T − T links. Specifically we associate to each link ( i, j ) thevariable y ij ∈ { , } defined as y ij = x ij (1 − T i T j ) , (S-1)and indicating whether the link contributes or not the the spread of the disease in the network (excluding thetwo nodes ( i, j ) of the link). • Percolation process-
We find the nodes in the giant component of the resulting percolation problem. We assignto each node the indicator variable m i ∈ { , } indicating if node i belongs or not to the giant component ofthe network with links according to the indicator function y ij . The nodes with m i are nodes that are infectedby chain of contacts in which there we can never find two consecutive infected nodes with the app. • Calculation of the fraction of infected individuals-
In order to calculate the total fraction of infected individualwe need to include in addition to the nodes with m i = 1 also the nodes with the app infected by nodes with theapp. Therefore we define an indicator function σ i which will indicate for each individual if it is infected ( σ i = 1)or not ( σ i = 0). The value of σ i can be evaluated according to the boolean rule σ i = m i + (1 − m i ) − (cid:89) j ∈ N ( i ) (1 − m j T j T i x ij ) , (S-2) MESSAGE PASSING ALGORITHMS FOR EPIDEMIC SPREADING IN A POPULATION PARTIALLYADOPTING THE APP
In this section we discuss the message passing algorithms [16, 17] that can be used to predict the outcome of theepidemic spreading studied in this work. We will first assume to have full knowledge about the configuration { T i } i ∈ V and { x ij } ( i,j ) ∈ E . Subsequently we will relax this strong assumption by assuming to known only the value of thetransmissibility p by fixing the expectation value (cid:104) x ij (cid:105) = p . Finally we will relax further our assumptions and we willconsider the case in which the configuration { T i } i ∈ V is also not known exactly and only the expectations T i = T ( k i )(where k i is the degree of the generic node i ) are known.In the first case in which the exact configurations { T i } and { x ij } are known, the message passing algorithm on alocally tree-like network predicts that a node i spreads the virus to node j only if ˜ σ i → j = 1. If node i has the app,i.e. T i = 1, we have ˜ σ i → j = 1 if node i has been infected by at least a neighbor node without the app and x ij = 1,otherwise ˜ σ i → j = 0. On the other hand if node i does not have the app, i.e. T i = 0, we have ˜ σ i → j = 1 if node i hasbeen infected by at least a neighbour node and x ij = 1, otherwise ˜ σ i → j = 0. Therefore the message passing algorithmreads ˜ σ i → j = x ij T i − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − (1 − T (cid:96) )˜ σ (cid:96) → i ) + x ij (1 − T i ) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − ˜ σ (cid:96) → i ) , where N ( i ) indicates the neighbours of node i . Moreover the function σ i indicating whether a node is infected (˜ σ i = 1)or not (˜ σ i = 0) is given by ˜ σ i = − (cid:89) (cid:96) ∈ N ( i ) (1 − ˜ σ (cid:96) → i ) . (S-3)If follows that the epidemic threshold is determined by the equationΛ( B ) = 1 . (S-4)Here Λ( B ) is the maximum eigenvalue of the corrected non-backtracking matrix B of elements B (cid:96)i → ij = x ij (1 − T i T (cid:96) ) A (cid:96)i → ij , (S-5)where A is defined in terms of the adjacency matrix of the network a as A (cid:96)i → ij = a (cid:96)i a ij (1 − δ (cid:96)j ) . (S-6)This algorithm should be modified if we do not have access to the full configuration of { x ij } ( i,j ) ∈ E . In this case weassume to know only the transmissibility of the disease p = (cid:104) x ij (cid:105) , therefore the messages are real values σ i → j ∈ [0 , i infects node j . By averaging the message passing equations over all possibleconfiguration { x ij } at fixed value of the transmissibility of the infection p we obtain the message passing algorithm σ i → j = pT i − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − (1 − T (cid:96) ) σ (cid:96) → i ) + p (1 − T i ) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − σ (cid:96) → i ) , (S-7)where N ( i ) indicates the neighbours of node i . Moreover a node i is infected with probability σ i given by σ i = − (cid:89) (cid:96) ∈ N ( i ) (1 − σ (cid:96) → i ) . (S-8)The epidemic threshold is always determined by Eq.(S-4) with B taking the expression B (cid:96)i → ij = p (1 − T i T (cid:96) ) A (cid:96)i → ij . (S-9)In order to model different scenarios corresponding to different adoption patterns of the app we might also assumethat the configuration { T i } i ∈ V is not known exactly and we have only access to the probability that a node adopt theapp. Assuming that this probability is a function of the degree of the nodes, we have T i = T ( k i ) with T ( k ) describingthe probability that a node of degree k adopts the app. In order to formulate the message passing algorithm in thiscase we consider for every ordered pair of linked nodes ( i, j ) the two messagesˆ σ Ti → j = T i σ i → j , ˆ σ Ni → j = (1 − T i ) σ i → j , (S-10)indicating the probability that node i infects node j given that node i has adopted ˆ σ Ti → j or not adopted ˆ σ Ni → j the app.Here . . . indicates the averaged over the probability distribution of { T i } i ∈ V . The message passing equations for thesemessages can be obtained averaging the message passing Eqs.(S-7) over all the configuration { T i } i ∈ V and readˆ σ Ti → j = pT ( k i ) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − ˆ σ N(cid:96) → i ) ˆ σ Ni → j = p (1 − T ( k i )) − (cid:89) (cid:96) ∈ N ( i ) \ j (1 − ˆ σ N(cid:96) → i − ˆ σ T(cid:96) → i ) . (S-11)The probability that node i is infected ˜ σ i is given by˜ σ i = − (cid:89) (cid:96) ∈ N ( i ) (1 − ˆ σ N(cid:96) → i − ˆ σ T(cid:96) → i ) . (S-12)The critical threshold is obtained by linearising the message passing Eqs. (S-11), which yieldsˆ σ Ti → j = pT ( k i ) (cid:88) (cid:96) ∈ N ( i ) A (cid:96)i → ij ˆ σ N(cid:96) → i , ˆ σ Ni → j = p (1 − T ( k i )) (cid:88) (cid:96) ∈ N ( i ) A (cid:96)i → ij (ˆ σ N(cid:96) → i + ˆ σ T(cid:96) → i ) . (S-13)In this way by solving this linear system of equations we getˆ σ T(cid:96) → i = pT ( k (cid:96) ) (cid:88) (cid:96) (cid:48) ∈ N ( (cid:96) ) A (cid:96) (cid:48) (cid:96) → (cid:96)i ˆ σ N(cid:96) (cid:48) → (cid:96) , ˆ σ Ni → j = p (1 − T ( k i )) (cid:88) (cid:96) ∈ N ( i ) A (cid:96)i → ij ˆ σ N(cid:96) → i + pT ( k (cid:96) ) (cid:88) (cid:96) (cid:48) ∈ N ( (cid:96) ) A (cid:96) (cid:48) (cid:96) → (cid:96)i p (1 − T ( k i )) (cid:88) (cid:96) ∈ N ( i ) A (cid:96)i → ij ˆ σ N(cid:96) (cid:48) → (cid:96) . (S-14)Therefore we obtain that the critical point is characterized the Eq.(S-4) where B is given by B (cid:96) (cid:48) (cid:96) → ij = pδ (cid:96),i A (cid:96) (cid:48) i → ij (1 − T k i ) + p A (cid:96) (cid:48) (cid:96) → (cid:96)i T k (cid:96) A (cid:96)i → ij (1 − T k i ) . (S-15) ENSEMBLE APPROACH
In this section we show the derivation of the epidemic threshold p c in the case in which we do not know exactly thestructure of the contact network, i.e. we only known that the network is a random uncorrelated network with a givendegree distribution P ( k ) and we know only the statistical properties of the configurations { T i } i ∈ V and { x ij } ( i,j ) ∈ E .We consider the variables S (cid:48) T and S (cid:48) N indicating the probability that by following a link we reach an infected individualwith app or without app respectively. By averaging the message passing Eqs. (S-11) over the network ensemble weget S (cid:48) T = p (cid:88) k kP ( k ) (cid:104) k (cid:105) ( T ( k )) (cid:2) − (1 − S (cid:48) N ) k − (cid:3) S (cid:48) N = p (cid:88) k kP ( k ) (cid:104) k (cid:105) (1 − T ( k )) (cid:2) − (1 − S (cid:48) N − S (cid:48) T ) k − (cid:3) . (S-16)where T ( k ) indicates the probability that a node of degree k adopt the app. The probability that a random node getsthe infection is given by S = (cid:88) k P ( k ) (cid:2) − (1 − S (cid:48) T − S (cid:48) N ) k (cid:3) , (S-17)The system of Eqs. (S-16) can be written as S (cid:48) T − p (cid:88) k kP ( k ) (cid:104) k (cid:105) ( T ( k )) (cid:2) − (1 − S (cid:48) N ) k − (cid:3) = 0 ,S (cid:48) N − p (cid:88) k kP ( k ) (cid:104) k (cid:105) (1 − T ( k )) (cid:2) − (1 − S (cid:48) N − S (cid:48) T ) k − (cid:3) = 0 . (S-18)The Jacobian of this system of equations is given by J = (cid:18) − pκ T − pκ N − pκ N (cid:19) , (S-19) FIG. S-1: (Color online) The phase diagram of the epidemic model is shown by plotting the fraction S of infected individuals S obtained using the three different message passings in the plane ( p, ρ ) for a N = 10 -node Poisson network with λ = 4.Panel (a) shows the results obtained with the message passing algorithm using the exact known configuration { T i } and { x ij } (Eq.(S-11)), panel (b) shows the results obtained with the message passing algorithm using exact known configuration { x ij } and transmissibility p = (cid:104) x ij (cid:105) (Eq. (S-7)); finally panel (c) shows the results obtained with the message passing algorithm usingtransmissibility p = (cid:104) x ij (cid:105) and probability of adopting the app T ( k ) (Eq. (S-3)). The solid (red) lines indicate the epidemicthreshold predicted by Eq. (S-21). where κ N = (cid:104) k ( k − − T ( k )) (cid:105)(cid:104) k (cid:105) ,κ T = (cid:104) k ( k − T ( k ) (cid:105)(cid:104) k (cid:105) . (S-20)Imposing that the determinant of the Jacobian is zero we obtain that the transition is achieved for p c = min (cid:18) , κ T (cid:20) − (cid:114) κ T κ N (cid:21)(cid:19) . (S-21) NUMERICAL VALIDATION OF THE THEORETICAL PREDICTIONS
We have validated the proposed message passing framework by conducting extensive numerical simulations usingthe three message passing algorithms and the Monte Carlo simulations. We considered the choice T ( k ) = ρ + (1 − ρ ) θ ( k − k c , ˜ α ) , (S-22)where θ ( k − k c , ˜ α ) is the discrete Heaviside step function taking the value ˜ α at k = k c , and ρ ∈ [0 ,
1] denotes a uniformfraction of individuals adopting the app.The phase diagrams obtained using the three different message passing algorithm are consistent. In particular whenthese algorithms are applied to a network drawn from a network ensemble they give results whose differences vanishesin the large network limit. To show evidence of this result, in Figure S − λ = 4 and N = 10 nodes.In the main text of this Letter we have shown the perfect agreement between the message passing algorithm definedin Eq. (S-11) and Eq. (S-12) and the Monte Carlo simulations averaged over the distribution of { x i,j } ( i,j ) ∈ E and thedistribution of { T i } i ∈ V in the case of a Poisson network. In Figure S − S − k c can significantly increase the epidemic threshold p c well captured by Eq. (S-21).0 p S MP k c =50MP k c =3Monte Carlo k c =50Monte Carlo k c =3 FIG. S-2: (Color online) The fraction of infected nodes S is plotted versus p for a uncorrelated scale-free network with N = 5 × nodes and power-law exponent γ = 2 .
5. The results obtained by averaging the Monte Carlo simulations over over200 realization of the configuration { T i } i ∈ V and { x ij } ( i,j ) ∈ E ) are compared with the results of the MP algorithm defined byEqs. (S-11) and Eq. (S-12). Here T ( k ) is given by Eq. (S-22) with ρ = 0,˜ α = 0 and k c = 50 , FIG. S-3: (Color online) The phase diagram of the epidemic model is shown by plotting the fraction S of infected individualsobtained using the Monte Carlo algorithm in the plane ( p, ρ ) for a N = 10 -node networks and T ( k ) given by Eq.(S-22) with˜ α = 0. The data are averaged 20 times. The different panels correspond to different network topologies and different cutoffs k c : Poisson network with λ = 4 and k c = 10 (panel (a)) and k c = 5 (panel (d); uncorrelated scale-free network with γ = 2 . k c = 10 (panel (b)) and k c = 3 (panel (e)); BA network with m = 2 and k c = 10 (panel (c)), k cc