2020 has been a year marked by the irruption of COVID-19, the worst pandemic humanity has suffered since the Spanish Flu in 1918. From the first case reported in Wuhan on December 8 [1] , as of October 1, 2020, the disease has left more than 32 million confirmed cases causing nearly 1 million deaths worldwide [2] . The lack of antiviral prophylaxis, therapeutics, or vaccines to treat or prevent COVID-19 has put social, economic, and health systems under unprecedented strain by engaging in prolonged lockdowns all over the world. Although confinement measures have been successful in bending the epidemic trajectory [3] [4] [5] [6] , countries face the challenge of keeping the virus transmission under control while maintaining the usual socioeconomic activity [7] .
The impact of the different control policies on the spread of transmissible diseases becomes evident from the expression of the effective reproductive number, R(t), that measures the average number of contagions that an agent, infected at time t, makes during its infectious period [8, 9] . This number depends on diverse epidemiological, demographical and social aspects of the particular population but, in general grounds, it can be expressed as the combination of four contributions:
(1) * Electronic address: alexandre.arenas@urv.cat † Electronic address: gardenes@unizar.es namely; the average duration τ of the infectious period, the average number of contacts per unit time k, the probability of infection per contact β, and the fraction of susceptible individuals in the population at time t, ρ S (t). When this number takes values larger than 1 the number of new infections will grow in time, whereas when R(t) < 1 the disease is on decline and, keeping this trend in time, the number of new infections will decrease until vanishing. Thus, one of the major goals when facing an epidemic outbreak is to decrease the initial reproductive number to values below the epidemic threshold R(t) < 1 via either pharmaceutical or nonpharmaceutical interventions.
The existence of pharmaceutical measures such as a vaccine will reach the goal by reducing the fraction of susceptibles to a number below (τ · k · β) −1 . However, in the absence of this possibility, non-pharmaceutical interventions must come into play. This way, social-distancing [10, 11] and the use of prophylactic measures [12, 13] (such as face masks and hands hygiene) aim to reduce, the social contacts k and the disease transmissibility β , respectively, to reach R(t) < 1. The degree of social distancing, and consequently the reduction of our social contacts depend on the epidemic scenario. It can range from strict closures when the incidence threatens the capacity of health systems, thus requiring R(t) 1 values to bend the epidemic curve, to moderate restrictions (such as banning social gatherings) when incidence is small and social activity coexists with a controlled transmission (R(t) 1).
The application of social distancing when trying to recover the usual socioeconomic activity involves a delicate tradeoff between increasing our sociality, k, while controlling the The epidemiological compartments are: susceptible (S), exposed (E), presyntomatic (P ), infected asymptomatic (IA), infected symptomatic (IS), detected (D) and recovered (R). Arrows represent the possible transitions between the different states.
transmission of a virus that takes advantage of our interactions to spread. For this reason, pro-active control measures such as Test-Treat-Track (TTT) are mandatory to reach the former balance and avoid future epidemic waves [14, 15] . This strategy is based on the detection of symptomatic individuals, isolating them, and, more importantly, trace the contacts that these individuals have had in the recent past as they represent potential infections before the index case has been detected. A successful contact tracing stops the spread of the virus caused by these secondary cases and hence reduces the average infectious period, τ , in Eq. (1) leading to a decrease of R(t).
A successful contact tracing requires a personalized and exhaustive search of the contacts of each detected case, taking into account the complex and heterogeneous nature of human relationships [16] [17] [18] [19] . This arduous task, however, becomes critical when, as in the case of SARS-CoV-2, presymptomatic and asymptomatic infections are abundant [20] [21] [22] [23] [24] [25] [26] . Under these conditions, the symptomatic cases that are detected have already infected some of their contacts and, in addition, it is possible that a large fraction of their known infectees do not present symptoms during the entire infectious period.
The essential characteristics of contact tracing (termed CT hereafter) can be captured by modeling it as a contagion process in which the infectious agents detected spread the possible identification of other positive cases through their social network. This process competes with the spread of the pathogen itself and aims to suppress the transmission of the virus by eliminating the active spreaders whose infection is related to the identified case. Unlike other competing processes in which different viruses spread simultaneously in a population and interfere with the transmission of others [27] [28] [29] [30] [31] [32] [33] [34] , here the cascade of CT identifications can only be activated by the presence of the pathogen.
To incorporate the CT dynamics into a framework captur-ing the transmission of SARS-CoV-2 we first construct an epidemic model including 7 compartments (states): Susceptible (S), Exposed (E), Presymptomatic (P ), Infectious asymptomatic (I A ), Infectious symptomatic (I S ), Detected (D), and Removed (R). The transitions between these states are shown in Fig.1 and explained as follows. Susceptible (S) agents are healthy individuals who can be infected by direct contact with Asymptomatic and Symptomatic Infectious agents with probability β A and β S respectively. When an S agent is infected, she converts into Exposed (E) in which the individual displays no symptoms and is not contagious. This state lasts for an average period of η −1 days. After being in E, agents pass to the Presymptomatic state (P ). In this state, no symptoms are observed but the individual is already contagious, with contagion probability per contact of β A . At this P stage, and without detection, the individual lasts an average of α −1 days.
After the P stage, individuals can continue being asymptomatic (I A ) with some probability (1 − p) that is given by the fraction of fully asymptomatic infections. Individuals in this compartment share the same characteristics regarding infectivity and detectability as P . Without detection, an individual lasts an average of µ −1 days in this compartment before entering the Removed state (R). The rest (a fraction p) of P agents pass to be Symptomatic Infectious (I S ). This compartment is characterized by an infectivity β S when contacting an S agent and, as in the case of the I A compartment, and (average) of µ −1 days before passing to R, if not detected before.
With the former ingredients, the model (SEP I S I A R) can be viewed as a refined variant of the SEIR class in which compartment I is splitted in three infectious states, P , I S and I A to accommodate the specific contagion forms observed for the dynamics of SARS-CoV-2 [41, 42] . This model can be used as a framework for studying the spreading of SARS-CoV-2 and to assess the impact of contention measures such as social-distancing, prophylactic behavior or strict quarantines. However, to study the influence that detection of symptomatic cases has on the transmission dynamics and, more importantly, to incorporate the possibility of tracing those infectious contacts of symptomatic individuals, a further, and fundamental, compartment capturing those infectious agents detected (D) is needed.
As shown in Fig. 1 , compartment D can be reached by agents in P , I S and I A states. First, those symptomatic infectious can be directly detected as they display symptoms, this happens with probability δ, that is related to the average time spanned from the onset of symptoms to the availability of the test (e.g. 2 days would correspond to δ = 0.5). Once a symptomatic agent is detected, CT is activated. However, the possibility of tracing recent contacts is subject to the availability of information about the social activity of those detected. Here we consider that a fraction f of subjects are equipped with an application that record those acquaintances that have installed it as well. Thus, those contacts of D individuals that are in the P , I A , and I S states can transit to state D by means of an infection-like process in which the infection probability is equal to f 2 , i.e. the probability that the detected individual and any of its infectious contacts are equipped with the track- ing application. Finally, any individual entering in D transits to Removed (R) with a probability γ, i.e., the CT contagionlike process has an effective infectious period of γ −1 days. In the following we will set γ = 1 considering that, once an agent is detected, the corresponding infectious contacts are immediately identified.
The complete model has 6 epidemiological parameters (those of the SEP I S I A R model) and 3 additional ones, δ, f , and γ, that characterize the CT contagion process triggered by symptomatic detection. The values of the epidemiological parameters are presented in Table I with the exception of β S and β A that are assumed to be equal, β S = β A , and whose value is taken so that the attack rate in the absence of detection, R ∞ , is the same in all the networks analyzed. Having fixed the epidemiological parameters, those corresponding to detection are used to analyze the impact of CT on epidemics.
The dynamical evolution of the compartmental model can be studied under a microscopic Markovian time-discrete formulation [38] [39] [40] . In this framework, the dynamical state of a node i at time t is given by the probability of being suscep-
The evolution of these probabilities is then given by:
where we have omitted the equation for ρ S i (t) due to the normalization condition:
(t) account for the probabilities that an individual passes from Susceptible to Exposed, from Presymptomatic to Detected, from Infectious asymptomatic to Detected, and from Infectious symptomatic to Detected respectively. Considering the adjacency matrix A capturing the contacts between the nodes (A ij = 1 if i and j are connected and A ij = 0 otherwise), these probabilities read:
Although the equations above only give information about the probability that a node i is in the Detected compartment at each time, it is possible to construct the probability that a given node i is detected at time t, either after showing symptoms, D S i (t), or via contact tracing, D CT i (t). Thus, the expected number of symptomatic detections at time t is:
and the expected number of detections via CT at time t is:
This last expression captures the effects of network topology on the success of CT strategies.
The solution of the former Markovian equations allows to explore the performance of CT on any particular social network characterized by its adjacency matrix A in a fast and accurate way. In Appendix A, we show the validity of these equations by comparing with the results obtained through mechanistic stochastic simulations of the compartmental dynamics. In the following, we will focus on three real proximity networks with different populations and social structures in which data were obtained by means of face-to-face sensors that capture interactions with a temporal resolution of 20 s. In Table II we report the main structural descriptors of these proximity networks. Although these networks can be represented as time-varying or weighted graphs, we created the static unweighted network for each case. Particularly, for the school network, we set a temporal window of 5 minutes as the minimum interaction time to define a link between individuals and focus our analysis on its giant component.
Once the contact networks are constructed from proximity data we implement the compartmental model equipped with the symptomatic and CT detection to unveil the effects of these mechanisms on the spreading dynamics. In Fig. 2 .ac we show the diagrams R ∞ (δ, f ) for the three proximity networks analyzed. In all the plots it becomes clear that the sole implementation of symptomatic detection (f = 0) does not lead to a dramatic decrease of the final attack rate. On the contrary, even with a poor symptomatic detection (e.g. δ = 0.2), the addition of CT with a moderate penetration (e.g. f = 0.5) yields much lower attack rates than the case with perfect symptomatic detection and no CT (i.e. δ = 1 and f = 0).
We analyze the combined impact of CT and symptomatic detection in panels (d)-(f) of the same Fig. 2 TABLE II: Characterictics of the three proximity networks. For each network we show the number of nodes N , the average degree of the nodes k , and the assortatitivity measured as the Pearson correlation between the degrees of adjacent nodes r. We also report the reference were these networks where presented and analyzed.
number of infectious cases identified:
.
In these plots we highlight the curve (orange) corresponding to those values of δ and f that yield F CT = 0.5. Although the partition between CT and symptomatic detections depends on the precise network architecture, from the panels it becomes clear that CT alone is not responsible of the large decrease in the attack rate produced for large values of δ and f , but is the combination of both mechanisms what allows the efficient suppression of transmission chains.
The last result is quite expected since CT cannot show up alone, since it is triggered by symptomatic detections. However, from the panels (a)-(c) in Fig. 2 it is clear that symptomatic detection alone does not allow a significant decrease of the epidemic impact but it needs the addition of CT policies. It is thus the combination of these two policies what makes detection effective. However, although the number of detections made with each of the two mechanisms is roughly similar when reaching the maximum decrease of the attack rate R ∞ , not all the identified cases are equally useful to stop the advance of the disease as we show below.
To shed light on the mechanisms behind the effectiveness of CT we analyze the connectivity pattern of those cases detected by CT and symptomatic detection. To this aim, we construct the probability that a node of degree k has been detected during the course of an epidemic by symptomatic and CT detection:
where N k is the total number of nodes with degree k. In Fig. 3 we plot the functions SD(k) and CT (k) when δ = 0.5 and f varies in the range f ∈ [0, 1], i.e., from no CT to a situation in which CT is always possible. From panel (a) it is clear that when no CT is at work (f = 0) the function SD(k) is an increasing function of the degree, i.e. the largest the connectivity of a node the more probable that it is detected. This is clearly due to the high risk of infections of those nodes with a large connectivity that, consequently, have more probability of being at compartment I S and hence being detected. However, as f increases the probability SD(k) becomes a non-monotonous function of k and displays a maximum at some degree class k . The reason behind this behavior is the action of CT , that shows [see panel (b)] an increasing pattern for CT (k) for any value of f > 0. As f increases the identification of those infected nodes with the largest degrees, i.e. the super-spreaders, is progressively replaced by CT in detriment of symptomatic detection. In fact, by comparing with the function SD(k) for f = 0, we notice that for f = 0.2 CT already outperforms the ability of symptomatic detection in the identification of super-spreaders. Moreover, when f > 0.5 the probability that a super-spreader is detected via CT is close to 1, pinpointing that the effectiveness of CT is rooted on the identification and isolation of super-spreaders that have been in contact with those symptomatic cases previously detected.
An early identification of super-spreaders is key to achieve an effective control of an outbreak. Super-spreaders can be identified by symptomatic detection in the first stages of an epidemic as they are usually exposed to a number of potential infections due to their large connectivity. However, symptomatic detection restricts its identification to those that display symptoms and, moreover, their identification always happens once after they have transited the P compartment, thus provoking contagions in a number of neighbors prior to detection. On the contrary, CT allows catching super-spreaders at any infectious compartment, specially those in P , thus providing with an early suppression of super-spreading events. The earliness of CT with respect to symptomatic detection is manifested in the progressive replacement in the identification of large degree nodes as f increases observed in In Fig. 3 . The early identification of super-spreaders provided by CT is more evident when analyzing the time evolution of the epidemic curve when subjected either to symptomatic detection or to CT. To monitor the effects that both detection mechanisms have on the the epidemic trajectory we monitor in panels (a) and (b) of Fig. 4 the time evolution of the number of new contagions when symptomatic detection and CT are the only detection mechanisms repectively. The number of new contagions that occur at a given time t, C(t), can be readily computed from the Markovian dynamics as:
The first set of curves, panel (a), shows how symptomatic detection changes the epidemic curve as δ varies from 0 to 1. This plot shows that the sole action of symptomatic detection causes the so-called flattening of the epidemic curve in which the peak of the epidemic curve is delayed and decreased. This flattening becomes more pronounced as δ increases, thus reducing progressively the final attack rate. On the other hand the effect of CT, see panel (b), yields a qualitative different scenario. In this case we set a very small degree of symptomatic detection δ = 0.05 to trigger the CT cascade, and vary f from 0 to 1. The result is that the epidemic curve is no longer flattened but bent, i.e. CT is able to reverse the increas-ing tendency of the curve corresponding to f = 0. This bending occurs the sooner the larger the fraction f of individuals adopting the CT application. To illustrate the bending action of CT we show (blue impulses) the evolution of the number of CT detections, D CT (t) [Eq. (12) ], for the case f = 1. It is clear that as soon as CT is triggered the increasing trend of the epidemic curve is reversed leading to a successful mitigation.
To shed more light on the qualitative differences between CT and symptomatic detection, we can monitor the effective case-reproductive number R c (t) to analyze their respective impact on the evolution of the infective power of nodes in the network. R c (t) is defined as the average number of secondary cases that a case infected at time step t will eventually infect during her infectious period [46] . Here, an agent can transit three infectious states, namely P and I S and I A , thus, in general, the effective case-reproduction number would be:
where R c (t) is the average number of infections made by an agent infected at time t when staying at compartment . However, when CT is active, the time window associated to each infectious compartment does depend on the instant state of the system, and the former partition is not straightforward. In this case, the calculation of R c (t) should be performed starting from its general definition:
where I i (t) is the number of infections caused by agent i provided she has been infected at precise time t.
To calculate I i (t) in a general way, we introduce the join probabilities P(τ E , τ P , τ A |t) and P(τ E , τ P , τ S |t) that account for the probabilities that an agent infected at time t stays a time τ E in the exposed compartment, a time τ P in the presymptomatic stage, and a time τ A or τ S in the infectious asymptomatic or symptomatic stages respectively. Note that these two probabilities does not depend on t and factorize,
when the time interval in each compartment does not depend on the state of the system, as it is the case when f = 0. The general form of these conditional probabilities for any value of δ and f probabilities is derived in Appendix B. Once known probabilities P(τ E , τ P , τ S |t) and P(τ E , τ P , τ A |t), the average infections made by an individual i can be written as: 
and the evolution of R c (t) can be computed to illustrate the qualitative differences between symptomatic detection and CT.
In the bottom panels, (c) and (d), of Fig. 4 we show the evolution of R c (t) for the different epidemic curves shown in panels (a) and (b). The evolution of R c (t) when symptomatic detection is at work shows the fingerprint of the flattening effect observed in panel (a), i.e., the effective reproduction number, while being smaller in the beginning of the epidemic, slows down the decreasing trend as δ increases, thus reaching R c (t) = 1 at larger times. On the contrary, from panel (d) we observe that the action of CT is the opposite: as f increases the decreasing trend of R c (t) is accelerated, thus achieving R c (t) = 1 much sooner than in the case without detection. It is also remarkable that, in the case of large values of f , the long term values of the effective reproductive number remain R c (t)
1. This explains the situation shown in panel (b) in which an almost-steady small number of new contagions are observed after the epidemic curve is bent, thus providing a large and slow discharge of new cases. This way, CT places the system in a kind of critical equilibrium that lasts as long as there is a large enough fraction of susceptible individuals to be infected.
To round off, we can use the expression for R c (t) to monitor the impact on the reproduction number of each degree class. To this aim, we can define the case effective reproduction number of the nodes of degree k, R c k (t), as:
Computing this expression for each degree class, we show in Fig. 5 the evolution of R c k (t) when symptomatic detection (δ = 1, f = 0) and CT (δ = 0.05, f = 1) are at work in panels (a) and (b) respectively. From these two plots it becomes clear the fast drop of the infective potential of super-spreaders under the action of CT compared to the case of symptomatic detection. 
The recent outbreaks of COVID-19 in many countries that had already controlled the first epidemic wave during the first months of 2020 show the need of efficient control measures. These measures should allow the development of normal socioeconomic activity, while avoiding the deployment of epidemic waves that threaten the sustainability of health systems. To achieve this balance, actions aimed at eliminating local transmission chains should be implemented without jeopardizing the functionality of societies. To this purpose, the tracking of suspicious contacts of identified cases is key.
Here we have analyzed the effectiveness of CT by formulating its functioning as a secondary contagion dynamics that is triggered by the identification of symptomatic individuals and propagates as a detection wave. This way CT competes with the spread of the pathogen eliminating potential transmission chains. The compartmental model has been analyzed under a Markovian framework that allow a systematic study of particular network architectures such as the proximity networks and the analysis of microscopic dynamical patterns. Under this approach, we have also derived the effective case reproductive number, an indicator that allows to monitor both the spread of diseases and the quality of contention strategies.
Our results identify the importance of implementing CT in addition to symptomatic detection. The most important indicator of the effectiveness of CT is its capacity to sharply reverse the increasing tendency of the original epidemic curve, causing its bending. In contrast, the implementation of symp-tomatic detection, yields a softer modification to the epidemic trajectory, known as flattening, in which the epidemic peak is delayed and lowered.
The qualitative differences in the performance of CT and symptomatic detection are rooted microscopically. We have shown that CT allows an early detection of large degree infectious nodes, well before than symptomatic detection does. This early identification of super-spreaders in the presymptomatic or asymptomatic stages of their contagious cycle is fundamental to advance the spread of the virus, cut the newest transmission channels, and cause the bending of the epidemic trajectory rather than its flattening.
Apart from these findings the formalism presented here allows to understand and quantify the impact of CT strategies in particular proximity networks that are critical to protect. Examples of these networks include companies, hospitals and schools to name a few. It also allows the possibility of designing modifications of these social structures in order to both decrease the impact of potential virus transmission and enhance the efficiency of CT strategies.
The stylized nature of the model has allowed to analyze the importance of CT and the qualitative changes with respect to symptomatic detection. However, the compartmental dynamics and the social structure can be expanded in order to address the performance of CT on realistic scenarios. For instance, here we assume that CT is implemented by means of an application whose penetration is characterized by f . Instead, direct contacts such as those within the household or close acquaintances at workplaces can be directly tracked without the need of digital tracing. This duality can be captured with the use of multiplex social structures in which usual contacts are distinguished from casual ones. Also, here we have not considered the waiting times associated to detection. However, in many practical situations tests cannot be done immediately and thus the waiting time cooperates with the infectious period of infectious acquaintances, since they are not identified until the symptomatic case is confirmed. In addition, once confirmed, all the contacts of the detected agent are, in principle, suspects of being infectious. In those situations all the individuals are quarantined so that also Susceptible and Exposed neighbors are also removed from the population together with those Presymptomatic, Asymptomatic and Symptomatic. These and other variations should be considered as extensions of the model presented here.
Catalunya ICREA Academia, and the James S. McDonnell Foundation (grant #220020325). C.G. acknowledges financial support from Juan de la Cierva-Formación (Ministerio de Ciencia, Innovación y Universidades). B.S. acknowledges financial support from the European Union's Horizon 2020 research and innovation program under the Marie Skłodowska-Curie grant agreement No. 713679 and from the Universitat Rovira i Virgili (URV).
To confirm the validity of the Markovian equations we have compared the results obtained from these equations with mechanistic stochastic simulations. In these simulations we start by assigning the CT application randomly to a fraction f of the agents. As initial condition we set a small fraction (1%) of individuals in the E compartment while the rest of the population is S. Then the stochastic dynamics is iterated following, at each time step, the transition rules described in Fig. 1 . For each value of f and δ we make 10 3 realizations to calculate the corresponding averages.
In Fig. 6 we compare the time evolution of the occupation of each compartment given by the iteration of the Markovian equations with the average evolution given by the different realizations of the stochastic dynamics of the compartmental model for δ = 0.1 and f = 0.4. We also plot, for each evolution, the 95% CI obtained from the pool of stochastic simulations. In all the cases the Markovian equation reproduces well the trajectories obtained from mechanistic simulations, showing the accuracy of the Markovian framework used along the manuscript.
Here we complete the derivation of the effective reproduction number R c (t) from the Markovian equations. To this aim we show the calculation of the probability that an individual infected at time t spend times τ E , τ P , and τ S or τ A in compartments E, P , and I A or I A respectively. Considering the Markovian equations the probability for those transiting the symptomatic phase is:
while for those asymptomatic reads:
where τ T is defined as the total duration of the infectious period of the infected agent, i.e. τ T = τ E + τ P + τ S for symptomatic individuals and τ T = τ E + τ P + τ A for asymptomatic patients. In both expressions Π CT i (t) is the probability of being detected through CT and is equal to Π P →D i (t) and Π I A →D i (t) as written in Eq. (9).
Computing Eqs. (23) and (24) requires to save the time evolution along the epidemic trajectory of the following quantities: Π CT i (t) and ρ S i (t) for all the nodes (i = 1,...,N ). These two sets of quantities, together with the evolution of the infection probabilities of each node Π S→E i (t), allow us to obtain the effective case-reproduction number, R c (t) in Eq. (22) .
To illustrate the validity of the former expressions, lets suppose that CT is absent, so that Π CT i (t) = 0 ∀ t and i. Then: and
where the factorization of the joint probabilities and their time independence becomes clear.