G Cencetti

G Santin

A Longa

E Pigani

A Barrat

C Cattuto

S Lehmann

M Salathé

B Lepri
email: lepri@fbk.eu

Digital proximity tracing on empirical contact networks for pandemic control

Digital contact tracing is a relevant tool to control infectious disease outbreaks, including the COVID-19 epidemic. Early work evaluating digital contact tracing omitted important features and heterogeneities of real-world contact patterns influencing contagion dynamics. We fill this gap with a modeling framework informed by empirical high-resolution contact data to analyze the impact of digital contact tracing in the COVID-19 pandemic. We investigate how well contact tracing apps, coupled with the quarantine of identified contacts, can mitigate the spread in real environments. We find that restrictive policies are more effective in containing the epidemic but come at the cost of unnecessary large-scale quarantines. Policy evaluation through their efficiency and cost results in optimized solutions which only consider contacts longer than 15-20 minutes and closer than 2-3 meters to be at risk. Our results show that isolation and tracing can help control re-emerging outbreaks when some conditions are met: (i) a reduction of the reproductive number through masks and physical distance; (ii) a low-delay isolation of infected individuals; (iii) a high compliance. Finally, we observe the inefficacy of a less privacy-preserving tracing involving second order contacts.

Our results may inform digital contact tracing efforts currently being implemented across several countries worldwide.

Introduction

As of mid-January 2021, the COVID-19 pandemic has resulted in over 85 millions detected cases worldwide, 1 overwhelming the healthcare capacities of many countries and thus presenting extraordinary challenges for governments and societies. 2,3 Rigorous restrictions such as lockdowns and quarantine have proven to be effective in many countries as a measure to curb the spread of COVID-19, limit contagions and reduce the effective reproductive number. 2,[4][5][6][7][8][9][10][11][12] Many areas slowly started to lift the restrictions, but new outbreaks appeared again, arriving in waves as anticipated by several early models. 13,14 An effective and affordable long-term plan is required, since the fraction of the population that has been infected is still far too low to provide herd immunity. 3 Despite their efficacy, large-scale quarantine and lockdown strategies carry large costs. 5 Moreover, in a situation where most of the population is not infected, population-wide lockdowns are far from optimal, and interventions at smaller scale, selectively targeting individuals at higher risk of spreading the disease, are more desirable.

While the testing and isolation of symptomatic cases is crucial, it is insufficient in the case of COVID-19, since there is clear evidence of presymptomatic and asymptomatic transmission. [15][16][17][18][19] Thus, the identification and isolation of infected cases must be coupled with a strategy for tracing their contacts and preventively quarantining them. 17,[20][21][22] Traditional manual contact tracing, besides being slow and labor intensive, [23][24][25] is not able to entirely reconstruct close proximity contacts. 26,27 Thus, technologies based on digital sensors have been developed to complement manual tracing. The idea is to leverage the widespread dissemination of smartphones to develop proximity-sensing apps based on the exchange of Bluetooth radio packets between them, 17,[28][29][30][31][32][33] within a privacy-preserving contact tracing framework. 28 The efficacy of digital contact tracing (DCT) [20][21][22][34][35][36][37][38][39][40][41] has been discussed in several recent papers.

We draw inspiration from the work by Fraser et al., 42 recently adapted to the case of COVID-19 by Ferretti et al. 17 This work models the pandemic evolution using recursive equations describing the number of infected individuals in a homogeneously mixed population, taking into account the evolving infectiousness of the infected individuals. The analysis is based on two effective parameters, ε I and ε T , to represent the ability to identify and isolate infected individuals, and to correctly trace their contacts, respectively. Assuming an exponential growth for the number of infected individuals (applicable in early phases of an uncontrolled epidemic outbreak) the authors studied how the growth rate depends on these intervention parameters.

Here, to better understand the effectiveness of real-world contact tracing, we expand this approach.

First, we restructure and generalize the mathematical framework to allow us to completely avoid assumptions regarding the functional form of the epidemic growth. This development makes the setting applicable to any possible evolution shape and any phase of the epidemic. Moreover, we modify the epidemiological aspects of the model according to recent literature on COVID-19, [43][44][45] to properly consider asymptomatic cases and the delay in isolating individuals after they are identified as infected. We consider different values of R 0 , reduced with respect to the one assigned to the free pandemic, to take into account the widely implemented additional containment strategies, e.g., physical distancing and wearing mask (Supplementary Note 2).

Second, we provide a realistic quantification of the tracing ability ε T by performing simulations of contact tracing strategies on real-world data sets collected across different social settings (i.e., a university campus, a workplace, a high school). [46][47][48] Hence, the tracing ability ε T , defined by Ferretti et al. 17 as a free parameter, becomes here an empirically estimated quantity, which directly depends on the contact network. The impact of the tracing procedure on the spread can then be evaluated by inserting ε T into the mathematical model. Third, we assume that the probability of a contagion event occurring during an interaction between a susceptible and an infected individual also depends on the duration and on the degree of proximity of the contact 49,50 (along with other epidemiological variables such as the infectiousness of the individual). This can be simulated on real contact data sets, in particular on the Copenhagen Networks Study (CNS) data set 46 that provides proximity information, via the strength of Bluetooth radio packets exchanged between their smartphones.

Finally, we investigate in detail the contact tracing procedure, designing appropriate policies in terms of the definition of the most risky contacts. We thus implement a system where tracing does not necessarily imply a massive preventive quarantine of the population. We define duration and proximity thresholds to discriminate between "risky" contacts and contacts that instead correspond to a low contagion probability. Note that, as contagion events are stochastic in nature, not all contacts that we consider at risk lead to infection events. This leads to "false positives", i.e., non-infected individuals who will be quarantined. Similarly, among the contacts considered as "non-risky" by the contact tracing, some might actually have led to a contagion event ("false negatives"). Quantifying these outcomes represents crucial information to calibrate the policies for contact tracing apps. Quarantine too few and omit many potential spreaders. Quarantine too many and incur unnecessarily high social cost.

Overall, our approach allows to evaluate the effect of different contact tracing policies, not only on the disease spread but also in terms of their impact on the population, as quantified by the fraction of quarantined individuals.

Results

A modeling framework for digital contact tracing on empirical contact networks

In this section we introduce our model for contact tracing. The tracing procedure allows to identify individuals who are considered to be at highest infection risk, and to quarantine them without necessarily isolating a large fraction of the population. This allows devising ad-hoc strategies to control the epidemic.

We consider a population within which a virus is spreading, and the spread is determined by the contacts between individuals. As we do not consider geography nor large-scale mobility, our modeling can be considered as referring to a limited geographical area or community, similar to previous modeling efforts. 17,21 The spreading process is designed in order to mimic the COVID-19 epidemic, thus characterized by values of R 0 , viral load and fraction of asymptomatic individuals that are typical of SARS-CoV-2. We assume that two types of non-pharmaceutical interventions are at play: isolation and contact tracing. Infected individuals are isolated when they self-report as symptomatic or if they are identified through randomized testing. Isolated individuals do not have contacts with other individuals, thus can not infect anyone else once they have been identified.

In other words, they are removed from the system. Individuals who have had a potentially contagious contact with identified infected individuals are traced and can be warned through a privacy preserving app on their smartphone, 28 and they quarantine preemptively.

The only difference between isolation and quarantine is that the latter is only precautionary: if quarantined individuals show symptoms before the end of quarantine they immediately become isolated and their past contacts (before quarantine) are traced, otherwise they are released at the end of the quarantine.

A natural baseline for the work we present here is the model by Fraser et al., 42 recently adapted to the COVID-19 case in Ferretti et al. 17 The mathematical model is based on recursive equations designed to quantify the number of newly infected individuals at time intervals, given a characterization of the disease in terms of infectiousness and manifestation of symptoms. The model is designed to consider the two interventions described above, whose effectiveness are quantified by two parameters ε I , ε T varying from 0 to 1, where ε I = 0 means "no isolation" and ε I = 1 represents a perfectly successful identification and isolation of all infected individuals; analogously, ε T quantifies the efficacy of contact tracing.

Here we use this model as a stepping stone in order to define a more general approach. The generalization of the equations of Fraser et al. 42 is derived in detail in the Supplementary Information and resolves an important limitation. Indeed, it identifies a solution at finite time t, while the original model only shows the asymptotic behavior, for t going to infinity. The equation models the number Λ(t, τ ) of people who are infected at time t by people that have been in turn infected for a time τ ≤ t. In the equation, R 0 is the reproductive number of the disease, ω(τ ) is the infectiousness of individuals at time τ after being infected, and s(τ ) is the probability of symptom onset at time τ after infection. The details of each of these quantities are discussed in Supplementary Note 1.1.

The equation reads

Λ(t, τ ) = R 0 ω(τ ) (1 -ε I s(τ )) t-τ 0 1 -ε T s(ρ + τ ) -s(ρ) 1 -s(ρ) Λ(t -τ, ρ)dρ , (1)
where the integration variable ρ spans the time range between 0 and tτ , meaning that the contagion at time t from people infected at time tτ is in turn affected by contagion at time ρ before tτ .

For ε I = 0 and ε T = 0 we obtain a free spreading without control. The quantity of interest, which can be derived by numerically solving the above equations, is the incidence λ(t) := t 0 Λ(t, τ )dτ of newly infected individuals at time t. We use the model to predict the evolution of λ(t) up to time t = 50 days, which is sufficient for the numerical solutions to reach a stationary growth or decline regime (constant growth or decline rate of λ(t)), and we consider the average growth or decline in the last 10 days as an indicator of the long-term behavior of the epidemic. A negative number indicates that the epidemic is declining, while a positive one corresponds to growth (uncontained epidemic).

An important feature of the model is given by the probability s(τ ). The ideal case in which all infected individuals can eventually be identified because they exhibit symptoms (s(τ ) approaching 1 for large times) is reported in Fig. 1a: this represents the best case scenario, considered in the previous studies of this model. 17,42 Next, we assume instead that 40% of infected individuals are asymptomatic 17-19, 51, 52 and that only symptomatic individuals can be identified: no randomized testing is performed. This represents our worst case scenario. We represent the presence of asymptomatic individuals by considering that the probability of an infected individual to display symptoms is a growing function of time, which however never reaches 1. In this case, the model predicts epidemic containment for the upper half of the range of values of the parameters ε I and ε T (Fig. 1c).

In the following, we assume an alternative scenario where 50% of the asymptomatic individuals are identified by a policy of randomized testing. 11 These, added to the symptomatic individuals, result in a detection of 80% of the total infected cases. We remark that this scenario is equivalent to assuming that asymptomatic individuals account for only 20% of the infected population. [START_REF] Bi | Epidemiology and transmission of covid-19 in 391 cases and 1286 of their close contacts in shenzhen, china: a retrospective cohort study[END_REF][START_REF] Mizumoto | Estimating the asymptomatic proportion of coronavirus disease 2019 (covid-19) cases on board the diamond princess cruise ship, yokohama, japan[END_REF] Indeed, there is still no agreement in the scientific community about the fraction of asymptomatic infections for COVID-19, and different possible scenarios should be considered 11 (Supplementary Note 1).This is our baseline for the following investigations and the resulting model predictions are plotted in Fig. 1b.

Note also that we take into account in all settings a delay of 2 days between the detection of an infected individual and the time when this person is actually isolated and contact tracing is implemented. A delay of 3 days is considered in Supplementary Note 3.2. assuming either that all the infected people can eventually be identified and isolated (Fig. 1a); or that only symptomatic people can be isolated with 20% of asymptomatic infected individuals (Fig. 1b); or that only symptomatic people can be isolated with 40% of asymptomatic infected individuals (Fig. 1c). Infection rates are reported as a function of the isolation efficiency ε I and the tracing efficiency ε T . In all the three settings the cases are reported with a delay of 2 days.

Tracing efficiency based on empirical contact data

The proposed mathematical framework makes it possible to address our main goal: characterizing the efficiency of contact tracing. This can be quantified by ε T , which instead of being a free parameter can be estimated numerically, by observing how well the implemented policies enable to find the infected individuals. More precisely, we assume that a fraction ε I of infected individuals is identified at each time step. Their recent contacts are then traced and, according to the nature of their interaction, as we explain in detail in the next sections, some of them will be classified as "at risk and thus possibly contagious". Tracing is therefore strongly dependent on the ability to identify those primary infected individuals that caused the secondary infections, and we thus assume that ε T is proportional to ε I . Moreover, it is influenced by the actual ability to find the secondary cases, given the primary infected. This in turn depends on multiple factors, involving the spreading model, the definition of a risky contact, the app adoption, the compliance to quarantine and clearly the quantity and nature of contacts in the population. For this reason we need a numerical model that takes into account all these factors and simulates the spreading, with isolation and tracing, in a population of individuals with realistic contacts. To this end, we make use of three different data sets of empirical contacts involving large groups of people, in a high school, in a university campus and in an office building. The variable ε T will be computed by counting, for each primary infection, the fraction of the corresponding secondary cases that are actually quarantined according to some contact tracing strategy, see Section "Aggregation and parameter estimation" for the details on the derivation of ε T . The data that we use have been collected using wearable devices in different populations of individuals and contain time-resolved information on their pairwise close-range proximity interactions. In each case, we simulate an epidemic spread starting from a single random individual. The epidemic propagates from person to person via their interactions and we assume that the recent contacts of each individual are stored in their mobile phones. Each infected individual has a probability of being identified equal to ε I . When this happens, all the identified people are isolated, i.e. removed from the simulation, and their recent stored contacts are automatically traced (i.e., warned by the app). In order to avoid quarantining a large portion of the population we define specific criteria to determine which contacts are at risk, and only the corresponding individuals go into quarantine. As the definition of risky contacts is made a priori, and as infection events occur stochastically, quarantines will not only concern individuals who have been infected, but also some who have been in contact but were not infected (false positives), while some other individuals who have been infected although their contact was not considered at risk, will not receive any warning by the app and thus remain outside quarantines (false negatives). Note also that individuals who did not adopt the app cannot be notified nor quarantined, and contribute both to the true and false negatives. This is schematically explained in Fig. 2. Different policies to define the risky contacts will be delineated in Section "Design of appropriate policies" and their efficiency will be quantified by not only observing their ability in controlling the epidemic but also by their efficiency in minimizing the number of false positives, i.e. unnecessary quarantines.

In the following we will mainly rely, for the numerical evaluations of tracing, on the Copenhagen Networks Study (CNS) data set. 46 These data describe the interactions of 706 students, as reg-istered by the exchange of Bluetooth radio packets between smartphones, for a period of one month. From the complete data set we extract the proximity measures in the form of Bluetooth signal strength. We therefore have access to two important properties of contacts: their duration and the proximity of the two individuals at the time of the interaction. We are hence able to refine the spreading model by including the dependence on these variables too, as explained in the next section. Moreover, the risk assessment in the tracing procedure will be based on contacts proximity and duration thresholds, corresponding to different policies which will be discussed in Section "Design of appropriate policies".

In the Supplementary Information we also show simulations performed using two other data sets collected by the SocioPatterns collaboration in two environments: a high school 48 and an office building. 47 It is important to emphasize that these simulations are specifically used to evaluate the impact of isolation and tracing in different contexts and under different policies and to extract the resulting values of isolation and tracing efficiencies. On the other hand, the epidemic model we use to understand which policies are efficient is the theoretical one described by Equation 1 and is thus not restricted to any specific setting.

How infectiousness depends on duration and proximity

In the theoretical model (1), infectiousness is simply given by the curve ω(τ ) multiplied by R 0 ; on the other hand, as stated above, the numerical simulations make it possible to take into account several crucial factors, like duration and proximity of contacts.

We thus multiply ω(τ ) by two independent factors, ω exposure (e) and ω dist (s s ). They represent the probability for an infected individual to transmit the disease respectively given the duration e of a contact and given the signal strength s s of a contact. Here, the Bluetooth received signal strength can be considered as a proxy for the distance between two individuals, where signal attenuations (in dBm) with smaller absolute value tend to correspond to smaller distances. [START_REF] Sekara | The strength of friendship ties in proximity sensor data[END_REF] We refer to Supplementary Note 1.2 for a detailed discussion on the functional shapes of ω exposure (e) and ω dist (s s ).

In particular, as both are parametric functions, it is possible to tune their parameters by imposing some physical constraints regarding duration, distance and R 0 . The reproductive number of COVID-19 can be extracted from the literature as being close to R 0 = 3, 45 while there is little evidence for the dependence on proximity and duration; we thus consider multiple possible infection curves corresponding to different combinations of ω exposure (e) and ω dist (s s ), keeping R 0 = 3 fixed.

To this aim, we elaborate a procedure aimed at choosing the function parameters starting from physical constraints so as to always consider meaningful infectiousness curves. The procedure is explained in details in Supplementary Note 1.2, where we characterize three different possible curves. The constraint given by R 0 requires to find a good balance between the two functions ω exposure (e) and ω dist (s s ). If for instance we suppose that infectiousness is high even at long distances we should thus set ω exposure such that contacts are contagious only for long durations in order not to have a huge R 0 (e.g., the pink curves in Supplementary Figure 1). Vice versa, if ω dist is adjusted such that only close proximity contacts are contagious, we should give more importance to duration and suppose that also short durations are at risk (e.g., the blue curves in Supplementary Figure 1). In Supplementary Note 1.2, we show the results of simulations in these different cases. We observe that for the controllability of the epidemics, the different types of infectiousness do not lead to significant differences. However, from the point of view of cost versus effectiveness of the restrictive measures, different curves lead to different results. We discuss this point in Supplementary Note 2.1.

Here, we choose for definiteness one of the obtained pairs of curves (ω exposure (e), ω dist (s s )) compatible with R 0 = 3, and we assume in the following that infectiousness is governed by these. They correspond to an ω exposure (e) which reaches 90% infectiousness after 2 hours of contact, and to an ω dist such that the contagion probability drops by 50% at a distance of 2.5 meters, and by 99% at 7.0 meters. Finally, in the numerical model we rescale the curves of infectiousness of a factor r R 0 , which plays a pivotal role. Indeed, the procedure described above for parameter setting is aimed at reconstructing a scenario without restrictions, where the epidemic of COVID-19 is free to spread and is characterized by a reproductive number equal to 3. However, in this work we analyze the effect of isolation and tracing in the context of reemerging epidemics where a number of protective measures are in place, such as face masks and physical distancing. Such measures contribute to mitigate the spreading and enter in our model as an overall reduction of R 0 , in a range suggested by recent literature. [START_REF] Chu | Physical distancing, face masks, and eye protection to prevent person-to-person transmission of sars-cov-2 and covid-19: a systematic review and meta-analysis[END_REF][START_REF] Rader | Mask-wearing and control of sars-cov-2 transmission in the usa: a cross-sectional study[END_REF][START_REF] Klompas | Universal masking in hospitals in the covid-19 era[END_REF][START_REF] Greenhalgh | Face masks for the public during the covid-19 crisis[END_REF] This can be obtained by setting the reduction factor r R 0 to specific values, reported in Supplementary Table 5 in the Supplementary Information.

Design of appropriate policies

As mentioned above, the empirical CNS data set provides us with the opportunity to devise policies for tracing in order to avoid a massive preventive quarantine of the population.

We can classify contacts at low and high probability of contagion on the basis of thresholds of duration and proximity: only contacts with duration above a threshold T d and Bluetooth signal strength above a threshold T p are considered as at risk and thus stored in the individual's devices (when both individuals in contact have adopted the app). Assuming that the dependence of infectiousness from duration and proximity is unknown, we consider several possible values for the thresholds T d and T p , thus defining multiple possible policies, reported in Fig. 3, from the least to the most restrictive. We also consider two additional policies in Supplementary Note 3.5, corresponding to either close range but short exposure interactions or long range but long exposure interactions.

We remark that the policies implement distance detection directly as a measure of the Received Signal Strength Indicator (RSSI) values, since a precise and reliable conversion to an actual distance is a notoriously difficult task [START_REF] Sekara | The strength of friendship ties in proximity sensor data[END_REF][START_REF] Mones | Optimizing targeted vaccination across cyber-physical networks: an empirically based mathematical simulation study[END_REF] that would only add a layer of uncertainty to our analysis, without any gain in terms of accuracy. It is in general true that weak signal strengths correspond to large distances between users and vice versa but the link between RSSI and actual distance is affected by multiple factors, from the smartphone brand to the presence of obstacles between devices, and more. [START_REF] Sekara | The strength of friendship ties in proximity sensor data[END_REF][START_REF] Mones | Optimizing targeted vaccination across cyber-physical networks: an empirically based mathematical simulation study[END_REF] In substance, we simulate the epidemic and at the same time implement the contact tracing, supposing that we do not know which individuals are infected. We then compare the set of quarantined individuals with the set of people who have actually been infected in the spreading simulation, and measure the performances of each tracing policy (i.e. of each definition of thresholds T p and T d ).

The performance of a policy is quantified first of all by its ability to find the infected individuals, and consequently by its ability to contain the epidemic according to our mathematical model; in addition, we will measure the efficacy of a policy in quarantining only infected individuals (i.e. in limiting the number of false positives), in order to limit the social and economic damage to society. Figure 4 shows the distributions of RSSI and contact durations of the interactions contained in the CNS data set. Most contacts have short duration and low signal strength, but long lasting durations are also observed, with overall a broad distribution of contact durations as is typical for data on human interactions. [START_REF] Sekara | The strength of friendship ties in proximity sensor data[END_REF][START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF] The thresholds defined by the tracing policies determine the fraction of these contacts that can be traced by the app. Even slight variations in the tracing policy thresholds may strongly influence the capacity to identify the contacts corresponding to the highest risks of infection, as shown in Fig. 4 by comparing the RSSI and contact duration distributions with the infectiousness curves.

In line with many privacy preserving contact tracing apps, we additionally assume that each individual device stores the anonymous IDs received from other devices only for a limited time, such that every device does not keep track of all its past contacts but only those of the last n days. This is already implemented in apps used by most countries, applying the privacy-preserving DCT model. 28 We assume n = 7 days, and we show in the Supplementary Information (Supplementary Note 3.1) alternative results for shorter and longer tracing memories.

Digital tracing enables containment for moderate reproductive numbers

In this section we show the results provided by the combination of numerical simulations on empirical data and the theoretical model. The five policies described in Fig. 3 are tested in different scenarios corresponding to different levels of app adoption and different values of R 0 . Only individuals adopting the app participate to contact tracing; the remaining individuals are outside the reach of the tracing and quarantining policies, but they are still isolated whenever detected because symptomatic or through random testing. We consider as possible levels of app adoption: 20%, 40%, 60%. These levels constitute realistic cases, as the fraction of population that owns a smartphone rarely reaches larger levels (64% for instance for the French population 40,[START_REF]Le Conseil Général de l'Economie, de l'Industrie, de l'Energie et des Technologies (CGE)[END_REF] ), and a certain level of non-compliance should be also considered (from the point of view of the app, non-compliance or non-adoption can be considered as equivalent). As of mid-October 2020, for example adopters represent 24% of the population in Germany, [START_REF] Statista | [END_REF][START_REF] Cellan | Coronavirus: The great contact-tracing apps mystery[END_REF] 32% in the U.K., [START_REF]How the NHS COVID-19 app is making the most of cuttingedge global technology[END_REF] and 20% in Italy. [START_REF]The numbers of immuni[END_REF][START_REF] Naous | Towards Mass Adoption of Contact Tracing Apps-Learning from Users' Preferences to Improve App Design[END_REF] In addition, each policy is tested with the isolation efficiency values ε I = 0.2, 0.5, 0.8, 1, which encode isolation capacities ranging from rather poor to perfect isolation of any symptomatic or tested positive person.

The results are shown in Fig. 5. We observe that if R 0 = 2, practically none of the policies is able to stop the spreading, even with high app adoption. However, this pessimistic scenario changes under the hypothesis of R 0 = 1.5 (second line of panels in Fig. 5), where a larger portion of the phase space implies that the spread can be controlled. An app adoption above 40% is then sufficient to obtain good results: all policies manage to contain the spread for ε I = 0.8 (except Policy 1 for 40% adoption), and all of them for ε I = 1. The situation is even better with R 0 = 1.2, as all policies are effective as soon as the isolation efficacy is at least 0.5, even in the case of an app adoption of only 20% (bottom left panel in Fig. 5).

We notice that the tracing efficiency ε T varies considerably with different levels of app adoption, but does practically not depend on R 0 . Indeed, ε T only accounts for the fraction of secondary infections that are correctly traced, independently on the spread of the virus and the amount of infected individuals in the population.

The different scenarios explored above draw a framework where R 0 is limited by implementing several primary containment measures. DCT is added on top of them and its effect is observed as a component of a broader general effort. While in the absence of DCT a value of R 0 larger than one may rapidly lead to a new exponential outbreak and thus to renewed (possibly local) lockdown measures, we have shown here the possible improvement that can be obtained thanks to the deployment of a contact tracing app. The results however highlight that DCT should be accompanied by additional measures and by a sufficient app adoption in order to be effective.

Any effective containment comes at a cost

Behind the scenes of the results of the previous section, there is a complex dynamic deserving further investigation. Contact tracing produces in some cases the desirable effect of containing the spread, but side effects emerge as well. Indeed, some of the "at risk" contacts do not actually correspond to a contagion event, while contacts classified as not risky might, as discussed above.

It is thus important to quantify the ability of each policy to discriminate between contacts on which the disease actually propagated and the others, in terms of false positives (quarantined individuals who were not infected) and false negatives (non-quarantined infected individuals). To visualize this behavior, we focus on the setting with R 0 = 1.5 and ε I = 0.8, with an app adoption of 40%, since it is representative of a situation in which some policies are effective in containing the spread and others are not (see Fig. 5, center). The corresponding time evolution of the average percentages of false negatives and of false positives over the population for each policy are shown in Fig. 6.

In terms of epidemic containment, the best policies are those that can rapidly reduce the number of active infected, i.e., of false negatives. In the case of Policy 1, this number remains quite high for the entire simulation time, whereas for all other policies the number of false negatives remains lower.

These policies lead overall to a larger value of the tracing effectiveness ε T (see Section "Methods"), thus leading to a better epidemic containment.

The smaller number of false negatives for the effective policies comes however at the cost of an increased number of false positives, as shown in Fig. 6b. In other words, as a policy becomes more effective in tracing actually infected individuals, it also leads to the quarantine of individuals that have not been infected but that had a contact classified as risky by the tracing policy. The maximal number of false positives is very sensitive to the specific policy, contrarily to the number of false negatives. In particular, it appears from the analysis of Section "Digital tracing enables containment for moderate reproductive numbers" that Policies 2, 3, 4 and 5 have a similar effectiveness to contain the epidemic and Fig. 6a shows that they yield similar numbers of false negatives, but their undesired side costs are different, as the broader definition of risky contacts produces a larger number of false positives. This highlights once more the importance of the fine-tuning of the chosen policy. Since balancing between these two effects may be non trivial, we plot in Fig. 6c the effectiveness vs. cost for each policy, showing that Policy 2 is favorable in that it achieves an almost maximal effectivity (small number of false negatives) at a very low cost (small number of quarantines). The table reports the average percentage of the population that had to quarantine in the simulations (increasing from policy 1 to 5) and the percentage of those were actually infected (decreasing from policy 1 to 5).

To further facilitate the challenge of choosing the right policy, in Supplementary Note 3 we test the behavior of the model under extended scenarios to precisely quantify the sensitivity of the outcomes with respect to changes of our fundamental assumptions. The model robustness is assessed by changing the tracing memory (longer and shorter) in Supplementary Note 3.1, the reporting delay in Supplementary Note 3.2, the ability to trace second order contacts in Supplementary Note 3.3, the fraction of asymptomatics infected in Supplementary Note 3.4, the adoption of modified policy thresholds in Supplementary Note 3.5, and a different response of the population to the request of multiple quarantines in Supplementary Note 3.6.

Discussion

Policies for digital contact tracing: implications and constraints

In the modeling of contact tracing, considering several scenarios of isolation efficiency, app adoption and R 0 values is of foremost importance in order to account for the complex and heterogeneous issues connected with concrete policy implementations.

These issues should be clear to any policy maker having to decide on containment measures, in order to understand that contact tracing is a viable containment strategy for COVID-19 only in conjunction with complementary policies, as the results of the previous sections show.

These considerations enter our modeling approach in several ways. On the one hand, some parameters are related to the healthcare system capacity and to the socioeconomic condition of the population. These include the isolation efficiency ε I and the delay in the case reporting, that should account for potential heterogeneities in the access to tests and in the possibility of a person • 4% 9%

• 6% 7%

• 8% 6%

• 9% 6%

(d) to isolate. This last involves in particular both the access to appropriate spaces and the economic feasibility of a temporary cessation of the working activity. Since each country has a different level of capacity to isolate individuals we considered several levels of ε I instead of prescribing a fixed setting. The delays in turn depend on factors of different nature such as the delay in reporting, the availability and response of the call centers and of the health authorities, the app-and appbackend-related delays, etc. The analyses reported here take into account a delay of 2 days in isolating infected cases (thus in tracing and quarantining their contacts). This realistic delay does not prevent the proposed policies from keeping the epidemic under control, which is possible under some conditions. However, we observe that a larger delay, even of only one additional day, leads to a completely different scenario (reported in Supplementary Note 3.2) where, assuming R 0 = 1.5

and 40% app adoption, none of the proposed policies proves able to contain the epidemic, even for maximal isolation efficiency, and despite the higher numbers of quarantines, false positives and false negatives.

Moreover, we have analyzed the effect of the app within epidemic scenarios of limited reproductive numbers (R 0 = 1.2, 1.5, 2.0), which are the result of the implementation of complementary policies in addition to DCT. Such measures include traditional manual tracing, mask use and physical distancing.

Our model also includes the level of app adoption as an explicit parameter and we consider 20%, 40%, and 60%. It should be taken into account that factors like the limited access to supported smartphones for different age and income brackets, but also the willingness to adopt the app (strongly dependent on people's trust in DCT and health system), are crucial elements that contribute to these values.

All these parameters should be set with some care. The design of our model allows us to treat them as tunable inputs and in particular no unrealistic or idealized assumption on these parameter needs to be made.

Privacy issues raised by digital tracing are also of great importance, and they have been extensively discussed. 35,[START_REF] Morley | Ethical guidelines for covid-19 tracing apps[END_REF][START_REF] Douglas | Coronavirus contact tracing app privacy: What data is shared by the singapore opentrace app?[END_REF][START_REF] Douglas | Contact tracing app privacy: What data is shared by europe's gaen contact tracing apps[END_REF] For these matters we refer to the decentralized models that have been developed such as the Decentralized Privacy-Preserving Proximity Tracing (DP-3T), 28 and to the discussion therein. In particular, we adopt a tracing scheme that does not need to access the complete network of contacts at any time but is based only on decentralized exchange of anonymized keys.

Digital contact tracing: insights and limitations

The general model that we developed for studying the effect of isolation and contact tracing on controlling the COVID-19 epidemic is inspired from the work of Fraser et al. 42 The main distinctive characteristics that we have introduced are the following: (i) a general mathematical model that allows to evaluate the evolution of an epidemic in the presence of isolation and DCT at finite time;

(ii) the evaluation of tracing efficiency by means of a numerical simulation on real contact data, and no more as an arbitrary parameter of the model; (iii) the dependence of infectiousness on the actual duration and physical proximity of contacts; and (iv) consequently, the design of appropriate policies.

The functional shape of the infectiousness that we devised is composed by three dependencies: the time since primary infection ω(τ ), the duration of a contact ω exposure (e), and its proximity ω dist (s s ). The first is originally suggested by Ferretti et al., 17 while the other two were introduced in this work. We have shown that the implemented model is robust to changes of all three contributions, see Supplementary Note 1.2 and Supplementary Note 1.3.

Our results suggest that an insufficient app adoption may render any digital tracing effort helpless on its own, if the reproductive number is too high. In view of these results, bridging the gap between a realistic app adoption and the larger tracing capability required to contain the disease appears crucial. This goal can only be reached with a joint effort of policy makers and health authorities in organizing an effective manual tracing, and of individual citizens in adopting the app. We therefore tested different levels of app adoption and a range of possible values of R 0 , reduced from its original value by other restrictive measures, like masks wearing and physical distancing.

Moreover, we found that the set of parameters that allow containment of the spread is strongly influenced by the fraction of asymptomatic cases. By first assuming an ideal setting where any pair of parameters ε I , ε T is possible, we showed (Fig. 1) that the area of the phase space representing the setting where it is possible to control the epidemic is reduced when considering 20% or, worst case scenario, 40% of asymptomatic individuals in the population.

We tested five policies to define risky contacts that should be traced (Fig. 3), with different restriction levels. Our results highlight how isolation and tracing come at a price, and allow us to quantify this cost using real data: the policies that are able to contain the pandemic have the drawback that healthy persons are unnecessarily quarantined. In other words, achieving a rapid containment and a low number of false negatives requires accepting a high number of false positives. This stresses the importance of a fine tuning of the tracing and isolation policies, in terms of the definition of what represents a risky contact, to contain the social cost of quarantines. Let us observe that this last could be mitigated by testing the quarantined population and revealing the false negatives, thus translating the social cost in an economical burden due to swabs. Among the tested policies, those that appear to provide the best balance between effectiveness and cost are Policies 2 and 3, corresponding to considering as risky a contact longer than, respectively, 20 and 15 minutes, with distance shorter than, respectively, around 2 and around 3 meters. This is in agreement with the European guidelines for high-risk contacts. [START_REF]Contact tracing: Public health management of persons, including healthcare workers, having had contact with covid-19 cases in the european union[END_REF] We modelled the tracing procedure assuming that contacts are stored in each user's app for 7 days. Such tracing memory seems a good balance between the too short 2 days, which fails in containing the epidemic, and the too long 15 days, expensive in terms of quarantines and not leading to strong improvements in the spread containment (Supplementary Note 3.1).

We also included in our model a delay of 2 days in isolating the infected individuals. This delay might however increase when the number of infected cases grows. For this reason we tested a delay of 3 days too, revealing a much worse scenario (Supplementary Note 3.2). This highlights the importance of readiness in implementing the testing and isolation procedure, as increased delays might neutralize the beneficial effects of the app.

Another important result concerns the issue of privacy: we numerically tested a second order tracing, where also contacts of contacts of an infected individual are quarantined. Such procedure leads to a strongly enhanced risk in terms of privacy, but we found that it determines a useless massive quarantine while failing to bring any clear beneficial effect on controlling the epidemic (Supplementary Note 3.3).

Finally, we tested the possibility that people reduce their compliance if they are notified multiple times and asked to quarantine despite not being infected. This might indeed lead to some mistrust in the DCT procedure and in the healthcare and government institutions. The results that we obtain are very similar to those found with the standard procedure, where the level of compliance is set at the beginning and does not depend on the multiplicity of quarantines. This further confirms the robustness of our general model and of our results (Supplementary Note 3.6).

Our study comes with a number of limitations. First, we have considered data corresponding to a few limited social environments (a university campus, a high school and a workplace) and we cannot provide an overall general study that includes multiple and differentiated contexts and their mutual interplay. Moreover in each data set, only people involved in the experiment have been tracked, neglecting other contacts occurring outside their school, university campus or workplace.

Hence, the complete data sets only provide access to part of the interactions of the involved individuals, which is useful to analyze contact tracing in specific environments but does not provide a full picture of a society, e.g. an entire city. This limitation is due to the current lack of larger data sets involving people belonging to different environments, which would represent the general interactions within the population of a city or a larger geographical area. In addition, the implemented policies have been necessarily tailored to the specific CNS data set, depending on the available values of RSSI supported by the used smartphones. Those might differ in actual implementations of DCT apps currently in use in different countries, probably relying on a more advanced technology. Nevertheless, we emphasize that even if we used the simulations performed on these data sets to obtain a realistic quantification of the tracing ability, the controllability of the disease is itself assessed by the general mathematical framework. The results that we present are hence general, not bounded by specific data sets, but only numerically supported by real data to have a realistic implementation of tracing.

Moreover, our study is limited by the current knowledge of the contagion modalities of the SARS-CoV-2 virus, in particular concerning its dependence on physical distance among people and the duration of their contacts. The curve of infectiousness has been designed based on previous contagion studies and on reasonable assumptions (also considering a reduced transmissibility of asymptomatic people). Additional refinements of the transmission dynamic could be obtained by accounting for aerosol transmission, adding a dependence from the environment characteristics, such as being indoors or outdoors, and the presence or not of ventilation. This factor could in principle be modeled by considering information on the (co-)location of the individuals, which is available for some SocioPatterns data sets. 47 Should new insights emerge in the way the virus spreads, these could be easily incorporated into our model.

Finally, we model delays in the case reporting and thus in the isolation process, but assume that the quarantine notification of the traced contacts is instantaneous. This is reasonable and it is one of the advantages of relying on DCT, but two factors may introduce a delay: the app may check for at-risk exposures only 3-4 times a day, and the backend servers that distribute "infected" keys to the app often batches them before notification. The combination of these factors introduces an average delay of several hours (4-5 hours) and a worst-case delay of half a day.

Despite these limitations, the presented model represents an important contribution to the discussion about DCT, proposing a refined approach that allows to investigate a number of features that are unattainable with other recent models (see Supplementary Note 6 for a discussion of the state of the art models of DCT).

In conclusion, this combination of a well-established epidemic model with state-of-the-art, empirical interaction data collected via radio-based proximity-sensing methods, allows us to understand the role played by intrinsic limitations of digital tracing efforts, affording a viewpoint on the ambition of achieving containment with digital interventions. Namely, we are able to test and quantify the role that a real contact network plays both for the infectiousness of a contact and for the ability of a policy to detect it and to respond optimally.

Methods

The algorithm modelling the spreading and containment of the virus is implemented on the real contact network and coupled with the mathematical model.

This simulation is used in two ways. First, it produces results which are averaged over the network and then aggregated into a quantity, ε T , that can be plugged into the mathematical model. In this step, the network simulation is used as an estimator of a real-world parameter value. We remark in particular that the prediction of the outcome of the policies (epidemic containment or exponential contagion) is obtained solely from the mathematical model, informed with these realworld parameters.

On the other hand, the simulation on the network goes beyond the mathematical model in that it captures complex and non-uniform events and the heterogeneity of individual behaviors. The simulations thus give also access to several fine-grained quantities of interest that provide a complementary view on the epidemic. In particular, we can measure the number and time evolution of false and true positives, offering a quantification of the cost of the quarantine measures.

In the following we detail the implementation of the numerical simulations (Section "Spreading and tracing on the real network") and the methods used to extract the aggregated parameters (Section "Aggregation and parameter estimation").

Spreading and tracing on the real network

The contact data set is represented as a temporal sequence of undirected and weighted graphs.

The nodes of the graphs are the individuals stored via their unique identifiers, and an edge connects two of them if their respective Bluetooth devices have recorded each other. The weight of each edge is the pair of the signal strength and the duration of this contact. These two values are obtained by aggregating the continuous measures of the data set on successive time windows of duration 300s.

The simulation keeps track of the status of each node, which is updated depending on the spread of the infection (which is a stochastic phenomenon regulated by the infection probability ω data ) and on the enforcement of the tracing and isolation policy (which is again stochastic, and dependent on the definition of the policy's thresholds).

The simulation is parametrized by two types of inputs: disease-dependent parameters, which are discussed in Section "A modeling framework for digital contact tracing on empirical contact networks" and Supplementary Table 2, and tracing-dependent parameters, which are the isolation efficiency ε I ∈ [0, 1], the memory length of the contact tracing, the duration of the quarantine, and the fraction of app adopters in the population.

Once these parameters are set the algorithm works as follows:

Setup. A fraction of the nodes, extracted uniformly at random, is set to non-adopters, i.e., not using the app. They will contribute to the spread of the virus and they can be isolated, but their contacts cannot be traced and they cannot be quarantined. Observe that we make the simplifying assumption that the app influences only the quarantining of individuals, but not the isolation policy. Namely, we assume to be able to detect and thus isolate an infected individual independently of the app, while we are able to trace the contacts only between pairs of app adopters.

Initialization.

A randomly extracted node from the first graph of the sequence is set to infected. It is assigned a time since infection chosen uniformly at random in [0, 10] days.

Time evolution.

For each temporal step the following steps are repeated:

Update contacts. The list of contacts of each app adopter node is updated by adding the contacts of other app adopters at the current time, if they fall within the policy's thresholds. Each list stores the contacts for a fixed maximum number of days (which is set to 7 days in the main simulations).

Update quarantined. The list of quarantined nodes is scanned. Nodes who completed the quarantine time (10 days in the main simulations) are just removed from the list if healthy, or removed and added to the list of isolated if they developed symptoms.

Update infected. The list of infected nodes is scanned. Those who became symptomatic or are tested positive, depending on the probability onset_time(•) (see Section "A modeling framework for digital contact tracing on empirical contact networks" and Supplementary Table 2) are added to the list of infected identified by the health authority. Then, the list of identified infected is scanned, and each of its nodes is isolated with a probability ε I . For each successfully isolated node who is an app adopter, the tracing policy is enforced on its contacts, i.e. all the nodes registered as contacts are quarantined.

All the other infected nodes instead can spread the infection: each of their neighbors is infected independently with a probability modeled by ω data (Supplementary Note 1.2).

Check quarantined. The list of quarantined is scanned again to find symptomatic nodes.

If a symptomatic node is found, it is isolated and the tracing policy is enforced on its contacts who are app adopters.

Observe that the contacts taken into account for the contact tracing are defined according to a given policy's thresholds (distance and duration), i.e. only those interactions with sufficient duration and small enough distance are stored in the contact lists. However, the spreading process can a priori occur between an infected node and any of its neighbors, the probability of a contagion event being

given by ω data .

Moreover, the simulation assumes that each individual that is required to quarantine is willing to do so. We consider in Supplementary Note 3.6 the situation where individuals have a decreasing acceptance to comply, based on the number of times that they are asked to quarantine. On the other hand, the compliance to isolation is already modelled by the user-defined parameter ε I , which represents the effective fraction of identified infected who successfully isolate, where the value of this fraction may depend on the health system capacity, but also on the nodes' compliance and possibility to isolate.

Aggregation and parameter estimation

During the simulation, whenever the tracing and quarantine policy is enforced a quarantine error e T is computed to score its success. This value is defined for each isolated node as the ratio between the number of its secondary infections (i.e. the nodes that it infected) that did not quarantine, and the total number of its secondary infections.

The list of values e T (one for each isolated individual) is collected and averaged over the entire simulation to obtain a mean score e T . This value encodes the contributions of the chosen policy, of the adoption rate, of the duration of the memory of contacts and in general of the heterogeneity of the network dynamics.

This allows to assign to each policy a tracing efficiency ε T observed over the simulation as a function of its inputs and of the network dynamics. We define it as the product of two independent factors modelling the efficiency of the isolation (individuals who are not isolated are automatically excluded from the contact tracing, so their contacts do not quarantine) and the effect of the quarantine error, as:

ε T = ε I (1 -e T ) . (2)
A perfect efficiency of the tracing policy (ε T = 1) is possible only under perfect isolation (ε

I = 1)
and zero quarantine error ( e T = 0).

Considering ε I as a free parameter allows us to explore different scenarios, thus providing a full range of predictions. This choice accounts for the fact that in a realistic scenario the ability to identify and consequently isolate an infected individual is set by the number of tests that are implemented and by their accuracy, features whose identification is out of the scope of this work. We mention that the adoption of an app might have a positive effect on this quantity if the possibility of self-reporting when symptoms appear is implemented in the device. Probability for an infected individual to be detected exactly at time τ .

s(τ ) time τ (days) Cumulative distribution of onset_time(τ ).

Probability for an infected individual to be detected within time τ . Supplementary Table 2: Characteristic parameters of the disease that are used in the continuous model. R 0 is estimated by computing an empirical value R data 0 . This is obtained by numerically simulating the epidemic spreading, assuming one random individual initially infected, and counting the number of secondary infections caused by this patient zero [8]. The average of this value over multiple independent runs is the estimated value R data 0 . The infectiousness function is thus defined as:

ω data (τ, e, s s ) = r R 0 • p R 0 • ω(τ ) • ω exposure (e) • ω dist (s s ) (1)
where ω(τ ) is the probability for an infected individual to transmit the disease at time τ after its own infection, ω exposure (e) is the probability to transmit the disease given the duration e of a contact, and ω dist (s s ) is the probability as a function of the signal strength s s of the contact. The constant r R 0 is a reduction factor that can be tuned to obtain the desired value of R 0 , and p R 0 is a scaling factor. Using two distinct scaling factors allows us to decouple the estimate of the parameters to obtain the target value of R 0 = 3, and the computation of the reduction factor needed to obtain a smaller value. Considering everything fixed except for ω exposure (e) and ω dist (s s ) we can play with the free parameters of these functions so as to explore different scenarios while keeping a balance between time and space dependencies corresponding to an R 0 around 3 (with r R 0 = 1).

The shape of ω exposure has been inspired by the literature [9, 8, 10]:

ω exposure (e) = (1 -β 0 ) e/dt , (2)
where dt is a time step and β 0 a free parameter. The value of β 0 can be set by requiring that a specific probability σ for an infected individual to transmit the disease is reached

Infectiousness t =1 h t =2 h t =4 h
Supplementary Figure 1: Infectiousness as a function of distance (left panel) or duration (right panel) of the contact, for three different parameters configurations. By combining the two curves corresponding to each color we obtain R 0 = 3 in each case. The blue configuration implies an infectiousness increasing rapidly with duration but decreasing fast with distance. On the contrary, the pink curves correspond to an infectiousness that increases slowly with contact duration but has a broader spatial range. All the simulation results in the manuscript are obtained assuming the infectiousness to be ruled by the intermediate orange configuration.

of the pink curve (triangular symbols) would lead to a more optimized balance between cost and effectiveness, with lower numbers of both false negatives and total quarantined for each policy. This strengthens the idea that a better knowledge of infectiousness as a function of duration and proximity of contacts would be fundamental to devise appropriate policies to fight the pandemic. It is worth mentioning the two constant factors p R 0 and r R 0 that appear in Eq. ( 1). The first one is just a scaling factor, that we fix to the same constant value in all settings. The second one instead plays a pivotal role. Indeed, the procedure described above for parameters' setting is aimed to reconstruct a scenario without restrictions, where the epidemic of COVID-19 is free to spread with R 0 = 3. In this work, we analyze the effect of isolation and tracing in a context where other protective measures contribute to mitigate the spreading. These general precautions are described in our model as an overall reduction of R 0 , obtained by using the reduction factor r R 0 ∈ [0, 1], with values reported in Supplementary Table 5. The chosen reduced values of R 0 take into account the combined effect of all the alternative measures in a range suggested by recent literature [4, 5, 6, 7].

Let us notice that the two functions ω exposure and ω dist are in principle defined as two independent functions reflecting respectively the dependency from duration and proximity. We however chose to set their free parameters simultaneously combining these two effects so as to explore how their mutual contributions change in shaping the contagions, while keeping p R 0 fixed. follows

Y (t, 0, τ ) = β(τ ) (1 -ε I (τ )s(τ )) t τ 1 -ε T (τ ) s(τ ) -s(τ -τ ) 1 -s(τ -τ ) Y (t, τ, τ )dτ = β(τ ) (1 -ε I (τ )s(τ )) t-τ 0 1 -ε T (τ ) s(ρ + τ ) -s(ρ) 1 -s(ρ) Y (t, τ, ρ + τ )dρ = β(τ ) (1 -ε I (τ )s(τ )) t-τ 0 1 -ε T (τ ) s(ρ + τ ) -s(ρ) 1 -s(ρ) Y (t -τ, 0, ρ)dρ,
where we changed the integration variable to ρ := ττ , and we used the translational invariance of Y . In the variable Λ, this reads as

Λ(t, τ ) = β(τ ) (1 -ε I (τ )s(τ )) t-τ 0 1 -ε T (τ ) s(ρ + τ ) -s(ρ) 1 -s(ρ) Λ(t -τ, ρ)dρ. ( 9
)
Observe that this is an evolution equation that requires to define an initial number of infected individuals, i.e. we assume that the quantity Λ(0, 0) := Λ 0 is a given number.

The quantity of interest is then the total number λ(t) := t 0 Λ(t, τ )dτ of newly infected individuals at time t.

We remark that this equation is a forward-in-time system, meaning that the computation of the values of Λ(τ, t) is obtained using only values of Λ for previous time steps, which have thus already been computed. This is in contrast with the case of Fraser et al. [19] and Ferretti et al. [1], where an eigenvalue equation has to be solved, and only the asymptotic state can be estimated.

Moreover, we can use Λ to compute

λ(τ k ) = k-1 i=0 Λ(τ k , τ i ), 1 ≤ k ≤ n. (10)
We remark that equation (1) in the main text uses versions of ε I , ε T that are constant in time.

Supplementary Note 2.3 Derivation of the discretization

As said above, we fix a value T > 0 as the maximal simulation time and take n + 1 points in [0, T ] i.e. τ i := i T n , 0 ≤ i ≤ n. The points will be used also to approximate integrals via a right-rectangle quadrature rule, i.e.

τ i 0 f (τ )dτ ≈ T n i-1 j=0 f (τ j ), 1 ≤ i ≤ n. (11)
The goal is to approximate the values of Λ(τ k , τ i ) for k = 1, . . . , n and i = 0, . . . , k -1, while, according to Fraser et al. [19], we set Λ(τ k , τ i ) = 0 for all i ≥ k. Moreover, we assume that the value Λ(τ 1 , τ 0 ) is given.

For 1 ≤ k ≤ n we first evaluate (9) at the points, first in the variable t for 1 ≤ k ≤ n, i.e.

Λ(τ k , τ ) = β(τ ) (1 -ε I (τ )s(τ )) τ k -τ 0 1 -ε T (ρ) s(ρ + τ ) -s(ρ) 1 -s(ρ) Λ(τ k -τ, ρ)dρ,
and then in the variable τ for τ < t, that is for 0 ≤ i < k ≤ n, i.e.

Λ(τ k , τ i ) = β(τ i ) (1 -ε I (τ i )s(τ i )) τ k -τ i 0 1 -ε T (ρ) s(ρ + τ i ) -s(ρ) 1 -s(ρ) Λ(τ k -τ i , ρ)dρ.
Now observe that for 0 ≤ i < k ≤ n we have contacts. This obviously means an enhanced risk in terms of preserving the privacy of individuals, and hence the major open question regarding this kind of policies is whether or not the increased intrusiveness into an individual's social network provides a tangible improvement of the virus containment efforts.

τ k -τ i = T k n -T i n = T k -i n = τ k-i , 0
A complete study of this scenario is beyond the scope of this paper for a specific reason: the continuous model (see Supplementary Notes Supplementary Note 2) does not take into consideration this kind of tracing, and there is thus no way to use the information provided by the study of the data set in this framework.

Nevertheless, we find meaningful to report here the results of this additional experiment. We simulated the epidemic on the CNS data set, considering R 0 = 1.5, a delay of 2 days in isolating infected individuals and an app adoption of 40%. The numerical results are shown in Supplementary Fig. 9. We immediately notice that such intrusive tracing policy does not provide a significantly beneficial effect. Indeed, comparing Supplementary Fig. 9a and 9b with respectively Fig. 6a and 6b in the main text, which are the corresponding results for first order tracing, we notice that the levels reached by both false negatives and false positives are slightly reduced with second order tracing but not of a large amount. This appears clear also observing Supplementary Fig. 9c andthe table, where the values of both total false negative and total quarantines are similar to those obtained with first order tracing (see Fig. 6c of the main text), with a slightly higher cost (larger percentages of quarantines) and a slightly larger effectiveness (lower false negatives).

This preliminary study seems to suggest that such a high level of tracing, which implies privacy issues (possibly even leading to lower adoption and compliance levels [20]), does not seem to be worth it since it is not going to provide meaningful improvements to the tracing system. We however remark once more that the reliability of this result is limited, being linked to a specific data set and not to a general theory. For this reason we observe that the concept of second-order tracing, a topic of recent discussions, deserves further investigation and may possibly be expanded in future works. decreased at each round and was measured for 10 rounds in total. We consider that the same reduction in trust can be applied to the willingness to quarantine if notified. In a broad sense, these two settings are indeed similar: in the prisoner's dilemma each person can choose to cooperate, which they know would be the best option for everybody, but they do it at their own expenses, while in alternative they can choose an egoistic strategy, putting the others at risk. In case of notification from the contact tracing app, people would undergo a sort of "quarantine dilemma". Indeed there are two possible choices: the compliant one (for the social benefit, but possibly in detriment of their own social and economic life) and the egoistic one where a person decides not to quarantine, putting at risk all the others. We therefore consider that the first time that people are traced and identified as possible infected they quarantine with probability 1. The second time it happens, if the person did not develop symptoms during the first quarantine, the probability drops to 0.86. The third time to 0.6, and so on, according to the values in Supplementary Table 7 The second row reports the probabilities of compliance to quarantine if notified by the app, given that the same person has already been quarantined, even if not infected, a number of times reported in the first row. The level of compliance have been chosen according to Ref. [26].

We simulated this setting on an extended version of the CNS data set, containing contacts for a period of three months instead of one, in order to be able to catch all the repeated notifications (see SI Supplementary Note 1.4 for a description of the extended time period).

Notice that this modification can be inserted into the mathematical model if we consider that the ε T , that we compute as explained in Section 4.2 of the main text, changes its meaning. In this case it does not represent the ability to trace people but the possibility to quarantine them, since traced individuals could refuse to quarantine. Only for this case we thus rename ε T into ε Q . The controllability of the epidemic is depicted in Supplementary Fig. 13a, while in Supplementary Fig. 13b we report the number of people who have been requested to quarantine as a function of the number of repetitions of these requests, for the five different policies. The time evolution of false negatives is depicted in Supplementary Fig. 13c. In general, in Supplementary Fig. 13 we observe a similar behavior to the one obtained in the original setting (Fig. 5 central panel and Fig. 6 in the main text), with a slightly general reduction of the efficacy of containment. Indeed, only few people are asked to quarantine multiple times, as shown by Supplementary Fig. 13b. We can therefore assume that the original setting that we chose -and used in all other simulations -depicts a scenario which is not far from the one that we obtain with this possibility to observe the phenomenon of growth and decrease of the active infected, which after one month and a half dampen down, almost extinguishing the epidemic. The false negative peak is followed by the false positive and unjustified quarantines are reduced to almost zero in a couple of months (see Supplementary Fig. 13d). students, corresponding to different numbers of clusters, from 3 to 53. We then simulate our model of contagion with isolation and tracing. Taking into account a sample of fifty simulations, we count how many contagions in average take place intra-and inter-cluster for each of the chosen partitions of the network. The numbers of contagions are normalized with the numbers of existing contacts respectively intra-and inter-cluster, and we define the ratio: c = fraction of intra-cluster contagions fraction of inter-cluster contagions (14) which quantifies the tendency of contagions to take place inside a cluster rather than among different clusters. For all the possible partitions based on duration of contacts we find c > 1, as reported in Supplementary Fig. 14.

We then observe the time evolution of the fraction of infected individuals belonging to each different cluster. In Supplementary Fig. 15 this is depicted for two different possible partitions and two different policies. In the first chosen partition the sample of students is divided into seven clusters. We observe that, even if the levels of infections are different for the two policies, being Policy 5 far more restrictive and thus effective than Policy 1, the curves present a similar behavior (see panels (a) and (b)). In particular, there is one group, identified by label 3, which is statistically more at risk, since it is observed that contagions diffuse faster than in the other groups. Let us point out that such cluster is not the most numerous one, as shown from the bottom left table in Supplementary Fig. 15. The rapid growth of the curve of infections in the "front-runner" cluster is immediately followed by four other groups, which evolve roughly together. The slower ones, with very few contagions, are the less numerous clusters, which have few contacts with the rest of the population. The second partition that we take into account is composed by fifteen clusters. Again, we observe that different groups show similar behaviors with the exception of one group with a faster spreading and the small clusters, which tend to be preserved.

The study of contagions within and among socially connected clusters of individuals and how the general epidemic depend on the organization of the network in these substructures represents a rich and fascinating field of analysis [28]. Moreover, differentiated policies could take into account this particular social structure, as proposed by Block et al. [29]. Nevertheless a deeper analysis on this topic is out of the scope of the present manuscript and a future study will possibly be devoted to it. by the SocioPatterns collaboration1 , based on wearable proximity sensors that exchange radio packets, detecting close proximity (≤ 1.5m) of individuals wearing the devices [32].

These data do not contain information on the signal strength, but simply give a list of contacts between individuals with a resolution of 20 seconds. Both simulations and policies are thus redefined only as a function of contact durations.

In order to study the effectiveness of the policies and the spreading of the virus, and given the timescales involved, we need data extending on more than 15 days. As the SocioPatterns data have a high temporal resolution (20 seconds) but were collected for shorter overall durations, we artificially extend the length of each data set by replicating it (copying and pasting the entire data set so as to concatenate it multiple times). Supplementary Table 8 gives the number of nodes, the length of the data set (in days) and the duration of the replicated data. For both these data sets, similarly to the CNS data set, most contacts happen before the infectiousness reaches its peak (Supplementary Fig. 16), even if contacts are present for all possible durations. Nevertheless, these are sufficient to spread the infection. network that is not possible to capture effectively by averaging over the entire population.

individuals, the authors study how the growth rate depends on the intervention parameters. This inspiring approach represents the baseline of our model, which, not only enriches the work of Ferretti et al., but goes beyond the original analyses opening a wider scenario allowing policy evaluation. First, the assumption of full homogeneous mixing represents a limitation in epidemic modeling [48, 49, 10, 50], while realistic social network architectures might be particularly relevant for contact tracing [39]. We overcome this problem by obtaining contact tracing efficiency from numerical simulations on real-world contacts, thus capturing complex interaction structures that are necessary for a realistic quantification of this parameter. Second, in the work of Fraser et al. the mathematical framework is limited to exponential growth, and we devised a modified version of the equations where the time evolution is not constrained to any specific form. Third, we considered the parameter ε T to be dependent from ε I , since tracing is a direct consequence of isolation: we would not have tracing without first identifying and isolate the primary cases. Moreover, for what concerns the epidemiological aspect, it is true that the infectiousness rate in the work of Fraser et al. is accurately designed based on literature and data, including contributions of asymptomatics too, however the symptom onset rate is defined such that everyone sooner or later gets symptoms. This implies that every individual can possibly be isolated, altering the reliability of the isolation procedure. We corrected this detail too, requiring that the curve in Supplementary Fig. 4 of the main text goes to 0.8 at large times. In general, we have slightly modified the epidemiological aspect of the model, using recent literature on COVID-19 [14, 51, 13], to consider asymptomatic cases and the delay in isolating individuals after they are identified as infected (Supplementary Note 2). Finally, as previously highlighted, the distinctive characteristic of our work is the evaluation of tracing efficiency on real contact data captured by Bluetooth sensors, and no more on an arbitrary parameter of the model. In particular, our work focuses on investigating how much the efficiency of DCT is influenced by the definition of different thresholds on the duration of exposure time and on the physical distance of detected contacts. This allows to devise appropriate policies and to evaluate which of them are more suitable after a study of efficiency and cost.

Figure 1 :

 1 Figure 1: Infection rate scenarios. Growth or decrease rate of the number of newly infected individuals,

Figure 2 :

 2 Figure 2: Contagion, tracing and quarantines. The contacts among users of the contact tracing app are registered via the app. When individuals are identified as infected they are isolated, and the tracing and quarantine policy is implemented. Depending on the policy design, the number of false positives and false negatives may vary significantly.

Figure 3 :

 3 Figure 3: Policies based on distance and duration. In Table3athe signal strength threshold T p and the duration threshold T d defining the policies are reported. Contacts with duration larger than T d and signal strength larger than T p are considered at risk. The last column gives the fraction of the total number of interactions of the CNS data set that they correspond to. A larger value of the magnitude of the signal strength tends to correspond to a larger distance, such that in the second column the thresholds go from the least to the most restrictive policy. The policies are sketched in Fig.3b.

Figure 4 :

 4 Figure 4: Contacts in CNS data set: signal strength, exposure and inter-contact time. Fig.4ashows a scatterplot of signal strength vs. duration for all contact events in the CNS data set, and displays the thresholds defining the various policies (T p for signal strength and T d for duration): the contacts identified as "at risk" are those situated above and to the right of the dashed colored lines. Fig.4band Fig.4cseparately depict the distributions of signal strength and duration, together with the infectiousness functions ω dist and ω exposure , respectively (black curves), see Supplementary Note 1.2 for their analytical form. Fig.4dshows the distribution of time elapsed between the infection of an individual and their successive contacts, obtained with ε I = 0.8 and for Policy 5 in the CNS data set. The black curve shows the normalized infectiousness ω(τ ) as a function of time, and the purple dashed line is the cumulative probability s(τ ) to identify an infected individual.

Figure 5 :

 5 Figure 5: Tracing policy efficiency. Growth or decrease rate of the number of newly infected individuals assuming that symptomatic individuals can be isolated and that an additional 50% of asymptomatics can be identified via randomized testing. The points correspond to the parameter pairs such that the isolation efficiency ε I is an input and the tracing efficiency ε T an output of the simulations on CNS contact data, for the five policies. The different scenarios are defined by an app adoption level of 20%, 40%, or 60% (from left to right), and by a value of the reproductive number R 0 equal to 2, 1.5, or 1.2 (from top to bottom). All the points have been obtained as mean values over n = 200 simulations and the error bars represent the standard error.

Figure 6 :

 6 Figure6: Quarantines, false positives and negatives, with 40% app adoption and R 0 = 1.5. Temporal evolution of percentages of false negatives (Fig.6a), i.e. infected individuals not quarantined, and false positives (Fig.6b), i.e. not infected individuals quarantined, over the population for the five different policies, assuming an isolation efficiency of ε I = 0.8. The graphs depict the mean and standard error over 200 independent runs. Fig.6cshows the effectiveness (low number of false negatives) vs. cost (total quarantines) of the policies. Table6dreports the percentage of distinct individuals who have been quarantined over the entire population and the percentage of them who were actually infected (true positive).

* 2

 2 by the ANR project DATAREDUX (ANR-19-CE46-0008-01) to AB. CC acknowledges partial support from the Lagrange Project of ISI Foundation funded by CRT Foundation, and from the EU Horizon 2020 grants EPIPOSE (SC1-PHE-CORONAVIRUS-2020) and PERISCOPE (SC1-PHE-Reproductive number. onset_time(τ ) time τ (days) Lognormal distribution with µ = 1.54, σ = 0.47, shifted by the delay of 2 days, and scaled in [0, 0.8].

Supplementary Figure 6 :Supplementary Figure 7 :Supplementary Figure 8 :

 678 Tracing policy efficiency with longer contact memory: 15 (instead of 7) days. 6a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 6b: Cross plot of the cost (number of quarantines) versus the effectiveness (low number of false negatives) for each policy. 6c and 6d: Temporal evolution of respectively the percentages of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error. Tracing policy efficiency with shorter contact memory: 2 (instead of 7) days. 7a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 6b: Cross plot of the cost (number of quarantines) versus the effectiveness (low number of false negatives) for each policy. 7c and 7d: Temporal evolution of respectively the numbers of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error. Tracing policy efficiency with a longer reporting delay: 3 (instead of 2) days. 8a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 6b: Cross plot of the cost (number of quarantines) versus the effectiveness (low number of false negatives) for each policy. 8c and 8d: Temporal evolution of respectively the percentages of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error.

Supplementary Figure 15 :

 15 Infected individuals in network clusters The two graphs above depict two possible partitions of the aggregated network of interactions for the CNS data set. The number of nodes in each cluster is reported in the legend. Panels (a) and (b) show the time evolution of the percentage of infected individuals in each of the seven clusters of the first partition, respectively applying Policy 1 and Policy 5. Panels (c) and (d) analogously represent infections in the fifteen clusters of the second partition, respectively for Policy 1 and Policy 5. The curves have obtained as mean values over 100 independent simulations and the curve shadings represent the standard error.

Supplementary Figure 16 :Supplementary Figure 18 :

 1618 Infectiousness and contact distribution in a high school and in an office. Distribution of the time since infection of the people having contacts, probability distribution ω(τ ) (black line) determining the infectiousness as a function of time, and distribution s(τ ) determining the cumulative probability to detect an infected person (purple line). The two plots are obtained with ε I = 0.8 and Policy 5 for the InVS15 (Supplementary Fig.16a) and the HighSchool13 data sets (Supplementary Fig.16b). Tracing policy efficiency in an office building. 18a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 18b: Cross plot of the cost (number of quarantines) versus the effectiveness (number of false negatives). 18c and 18d: Temporal evolution of respectively the percentages of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error.

Table 7 :

 7 .

	Previous quar. 0 Compliance 1 0.86 0.60 0.57 0.49 0.46 0.43 0.41 0.40 0.29 1 2 3 4 5 6 7 8 9
	Supplementary

Table 8 :

 8 Number of days and extended days for each SocioPatterns data set.

	# of nodes Days Extended Days	InVS15 HighSchool13 211 327 11.5 4.2 46 16.8
	Supplementary

http://www.sociopatterns.org/

Acknowledgements: The authors would like to thank Esteban Moro, Alex Sandy Pentland, and Fabio Pianesi for early discussions and useful comments, Stefano Merler for the feedback on the design of the infectiousness parameters for COVID-19, and Valentina Marziano, Lorenzo Lucchini and Luisa Andreis for the discussion and general support. This study was partially supported

Data Availability The data that support the findings of this study are publicly available.

The CNS data can be found at https://doi.org/10.6084/m9.figshare.7267433 and the SocioPatterns data at http://www.sociopatterns.org

*

Code Availability We are pleased to make available the source-code accompanying this research. [START_REF] Cencetti | Digital proximity tracing on empirical contact networks for pandemic control[END_REF] The code uses Python (version 3.8.3), Numpy (version 1.18.5), Scipy (version 1.2.0), Networkx (version 2.5), Matplotlib (version 3.0.2).

Data Availability

The data that support the findings of this study are publicly available. The CNS data can be found at https://doi.org/10.6084/m9.figshare.7267433 and the SocioPatterns data at http://www.sociopatterns.org

Code Availability

We are pleased to make available the source-code accompanying this research [52]. The code uses Python (version 3.8.3), Numpy (version 1.18.5), Scipy (version 1.2.0), Networkx 36 (version 2.5), Matplotlib (version 3.0.2).

Supplementary Information for

Digital proximity tracing on empirical contact networks for pandemic control G. Cencetti 1, † , G. Santin 1, † , A. Longa 1,2 , E. Pigani 1,3 , A. Barrat 4,5 , C. Cattuto 9 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland † These authors contributed equally to this work.

Corresponding author: lepri@fbk.eu

Supplementary Note 1 Characteristic parameters of the disease

In this section we provide details on the various parameters that represent the epidemic spread in both the continuous model and the network model. Moreover, we demonstrate that the model is robust with respect to the choice of the infectiousness probability as a function of the time since infection.

Supplementary Note 1.1 Infectiousness parameters in the continuous model

The choice of the infectiousness function and the epidemic parameters that describe the COVID-19 spreading in the continuous model follow the work of Ferretti et al. [1], with some modifications that we describe here and summarize in Supplementary Table 2.

The infectiousness ω(τ ) is a function of the days since infection, proposed by Ferretti et al. [1]. It takes into account four different contributions: asymptomatic, pre-symptomatic and symptomatic infectiousness, plus environmental transmission representing the indirect 1 contagion occurring for instance via contaminated surfaces. The symptomatic infectiousness has been obtained by Ferretti et al. by making use of generation time data. The pre-symptomatic infectiousness is assumed to be equal to the symptomatic one, while the asymptomatic individuals are considered to have only 10% of the infection potential, according to the recent literature [2, 3]. An alternative shape of the curve ω(τ ) is discussed in Supplementary Note 1.3. The infectiousness is a probability distribution and as such it is normalized to one. It appears in the model equation (1) in the main text multiplied by R 0 , that we consider equal to 3 when no measure is implemented. All the analyses are however performed using reduced values, R 0 = 1.2, 1.5, 2.0, which take into account the combined effect of all the alternative measures (masks, physical distancing, etc.) in a range suggested by recent literature [4, 5, 6, 7].

For the cumulative distribution s(τ ) of onset times (i.e. time between infection and appearance of symptoms), we adopt the assumptions of Ferretti et al. [1] with two modifications. This function actually gives the fraction of the infected population that becomes known as infected by the health authorities, and does not distinguish between symptomatic individuals and asymptomatics identified by randomized testing. This is the same assumption as in Ferretti et al. [1], and it is motivated by the fact that the tracing and quarantining policy is activated independently of the source of knowledge of the infected status. The first modification to the onset time is that we rescale the function s so that its cumulative probability s(τ ) reaches p = 0.8 at large times instead of 1. This models our assumption that even at infinite time only 80% of the infected population is detected, instead of 100%. This describes a situation in which 60% of infected are symptomatic, and additionally 50% of asymptomatics are identified by randomized testing, or equivalently to a situation with 80% symptomatics and no randomized testing. The second modification is that we shift the symptom onset forward in time by 2 days, modelling a delay in the functioning of the testing and reporting policy. Different assumptions on this delay are discussed in Supplementary Note 3.2.

Supplementary Note 1.2 Parameter tuning to validate the infection probabilities

As mentioned in the main text in Section 2.1.2, the CNS data set provides us with the opportunity to explore the dependence of the infectiousness from duration and proximity, a question to which the literature is not yet able to express a specific answer. We rely on some simplifying assumptions by supposing that in occasion of a contact between an infected and a susceptible person the contagion probability depends only on their proximity, on the duration of the contact and on the time since the infectious individual has been infected. We moreover assume that those probabilities are independent from each other and require that, if simulated on the CNS data set without any restriction, the resulting reproductive number is equal to R 0 = 3, in agreement with recent literature on the COVID-19. Given a choice of the infectiousness parameters, the corresponding value of for a given contact duration e σ :

The parameter β 0 can thus be expressed as a function of e σ and σ as:

Supplementary Table 3 reports some examples. For instance, to obtain a 90% probability of infection for contacts of 1 hour, the parameter β 0 needs to be set equal to 0.038.

Supplementary Table 3: Numerical values for β 0 for three different sets of physical scenarios (e σ , σ). The value of β 0 highlighted in bold is the one chosen for the simulations reported in all the other sections.

The term ω dist (s s ) instead depends on the Bluetooth signal strength (RSSI), expressed in dBm, which is considered as a proxy for the distance between individuals. We thus define the function ω(x) = ω dist (s s (x)), where x indicates distances in meters. We emphasize here again that the relationship between RSSI and distance is far from trivial [11, 12], so in the main text we will rely on signal strength as a proxy for distance. To our knowledge, the literature on COVID- 19 has not yet produced some evidence regarding the probability of contagion as a function of the distance between an infected individual and a susceptible one. We make the realistic assumption that infectiousness is large when the individuals are in close proximity and that it decreases with distance. In particular we hypothesize that it follows a sigmoid function:

where s and b are free parameters. As we have two parameters, we need to specify two physical conditions to find their values. We then require that the probability for an infected individual to transmit the disease to a contact within a distance x i (i = 1, 2) should be w i (i = 1, 2):

Computing explicitly the integrals using Eq. ( 5), we obtain

which is a transcendental system, that can be numerically solved once we have set the two couples (x i , w i ) i=1,2 . Some examples are reported in Supplementary Table 4.

• 1.7 0.5 6.0 0.99 1.16 3.65 • 2.5 0.5 7.0 0.99 1.34 6.67 • 4.0 0.5 10.0 0.99 1. 16 9.31 Supplementary Table 4: Numerical solutions (s, b) for the system (7) for three different sets of physical requests (x i , w i ) i=1,2 . The values of s and b highlighted in bold are the ones chosen for the simulations reported in all the other sections.

The three curves that we obtain using the values in Supplementary Table 3 and Supplementary Table 4 are shown in Supplementary Fig. 1.

While the reproductive number of COVID-19 is estimated to be around 3 [13], there is small evidence for the dependence on proximity and duration. Therefore, we combine the two functions ω exposure (e) and ωdist (x) and choose the parameters β 0 , b and s to obtain R 0 = 3 in each combination. In particular, given a possible choice for (β 0 , b, s), we run a set of 800 simulations on the CNS data set without any restrictive policy, i.e. with ε I = 0 and one initial infected. We then count the number of secondary infections caused by this first individual and average this number on all the 800 simulations to obtain an estimate of R 0 . The constraint R 0 = 3 requires to find a balance between ω exposure and ωdist and combine the parameters accordingly. If for instance we suppose that infectiousness decreases slowly even at long distances (like in the last row of Supplementary Table 4) we should set β 0 such that the infectiousness of contacts has a slow increase with duration (like in the last row of Supplementary Table 3), in order not to have a huge R 0 , and we obtain the pink curves in Supplementary Fig. 1. Vice-versa, if ωdist is adjusted such that only close contacts are contagious, we should give more importance to duration and suppose that also short durations are at risk (e.g. blue curves in Supplementary Fig. 1).

In the numerical simulations discussed in the main text, we use the intermediate curves in Figure 1 (in orange) as infectiousness functions. We report in Supplementary Fig. 2 some results obtained by using in the simulations the two other sets of curves. The left and central panels represent the growth or decrease of the epidemic with the different policies assuming respectively the pink curves (thus assuming that contagion can take place even at long distance but only for long contact duration) and the blue ones (assuming contagion even for short durations but only at close proximity). We observe that for what concerns the controllability of the epidemics the two choices of proximity-duration dependence of infectiousness do not bring significantly different results. Nevertheless, the right panel in Supplementary Fig. 2 shows effectiveness and cost of each policy for the three proposed curves of infectiousness, and we notice that circles and diamonds have a similar trend (respectively corresponding to orange and blue curves in Supplementary Fig. 1), the choice 34 pink 33 blue Supplementary Figure 2: Left and central panels: Growth or decrease rate of the number of newly infected individuals for each policy, assuming respectively that the dependence of infectiousness from duration and proximity follows the pink curves and the blues curves of Supplementary Fig. 1. The reducing factor r R 0 is set to have R 0 = 1.5 and we assume 40% app adoption. All the points have been obtained as mean values over n = 200 simulations and the error bars represent the standard error. Right panel: corresponding average values of false negatives vs total quarantines for the different policies assuming for infectiousness the curves in pink (triangles), in orange (circles), and in blue (diamonds) of Supplementary Fig. 1. R 0 3.0 2.0 1.5 1.2 r R 0 1.0 0.53 0.39 0.26 Supplementary Table 5: In the first row the desired values of R 0 are reported, while the second row shows the corresponding values of the reduction factor r R 0 needed to obtain them, with a scaling factor p R 0 = 60.

Supplementary Note 1.3 Robustness of the model with respect to the definition of the infectiousness probability

We consider here another infectiousness curve that has been derived in the recent literature by He et al. [14] . We follow here the author-correction version [15], that followed a critic and correction suggestion [16] on the first version. We show that, although this curve is different from the curve ω that we use in this paper, the predictions of the model do not change significantly, showing their robustness with respect to changes in the infectiousness curve.

In the cited works the infectiousness is defined by means of two probability density functions (PDFs): The incubation time g(t) (probability of symptom onset as a function of the time t since infection), and the infectiousness probability f (t), which is a function of the time t elapsed since the symptom onset (t can take negative values because of pre-symptomatic infectiousness). In more details, the function g is in turn taken from Li et al. [17], and it is a lognormal distribution with mean 1.434065 and std 0.6612. The function f is instead estimated by He et al. [15]: it is assumed to be a gamma distribution, and via a max-likelihood approach it is estimated to have shape 20.516508 and scale 1.592124, and to be shifted by an offset 12.272481. A numerical PDF of the two distributions, computed over 10 5 samples, and the analytical expression of the two PDFs are shown in Supplementary Fig. 3a.

From these g, f , we can reconstruct a PDF ω He (τ ) to be used in our model. This can be done simply by sampling two values from g and f and adding them (the total time from infection to secondary infection is simply split into two intervals separated by the time of symptoms onset). A numerical PDF of this distribution ω He , computed over the same 10 5 samples, is in Supplementary Fig. 3b. This function ω He may also be obtained analytically by convolution as

using the analytically known f and g. The discretized convolution is also shown in Supplementary Fig. 3b, and it coincides indeed with the numerical values of ω He .

Observe that this distribution assigns a positive probability (6.01%, see below) also to infectiousness at negative times (i.e. an individual may infect another one before being itself infected). We assume that this is due to the fact that the two distributions f and g are estimated from two different populations [15], and thus statistical errors may be present. For our aims this is not a limitation, as it just mean that the (cumulative) probability of infection at zero is strictly positive. Supplementary Fig. 3b shows also the PDF ω that we used in the paper. Both distributions peak roughly at the same time (ω at 5 days, while ω He at 4 days). On the other hand, ω He has a wider support and a larger right tail, meaning that it models a non negligible probability of secondary infection also several days after the infection of the spreader.

To have an analytical expression of ω He we try to fit shifted lognormal, gamma, and Weibull distributions to ω He by least-squares minimization over the PDF obtained by convolution. The best results are obtained with a gamma distribution with density h(τ ) = p p 1 2 Γ(p 1 ) τ p 1 -1 e -p 2 τ with parameters p 1 = 5.73, p 2 = 0.55, and shifted by 4.67, which is plotted in Supplementary Fig. 3c. This allows also to derive an explicit cumulative density function CDF He of ω He , which gives an estimate of CDF He (0) = 0.0601 (the fraction of negative-time infections).

We can now use this modified infectiousness ω He in our model and compare the results with the ones of Fig. 5 of the main text. First, we estimate again the reduction parameter defining ω data (see Section 2.1.2 of the main text), and we get r R 0 = 0.35.

Using this functional form of ω He in the model, we obtain the results of Supplementary Fig. 4 (see central panel in Fig. 5 Supplementary Figure 3: Visualization and estimation of the infectiousness probability density function (PDF) ω He . PDFs f and g (Supplementary Fig. 3a); estimated PDF ω He , and PDF ω He (Supplementary Fig. 3b); fit of ω He with a gamma distribution (Supplementary Fig. 3c).

ε I = 0.8 move from being ineffective (Fig. 5, main text) to being effective. We can thus conclude that no significant change in our conclusions would be introduced by adopting this alternative infectiousness function in place of the current one. In particular, the predictions using ω appear to be less optimistic in the prediction of the policies' effectiveness, since they estimate that not all policies are successful for ε I = 0.8.

Supplementary Note 1.4 Contact patterns in the CNS data set

To further guarantee the reproducibility of the results of this paper, we provide additional details on the CNS data set.

As mentioned before, the CNS data set [18] contains one month of data that is used here as it is. Thus, for any detail we refer to the cited paper, and we only visualize in Supplementary Fig. 5a the temporal distribution of the total number of contacts contained in the data set. It is immediate to observe that the number of contacts has a periodical behavior that reflects the day/night periods and the days of the week. Moreover, a certain uniformity is present between different weeks.

For the simulations discussed in SI Supplementary Note 3.6 we need to use a longer time period, that is extracted from data that are not publicly shared in the CNS data set [18]. We extract the period from the 1st of September to the 30th of November 2013, and remove the week between 7th and 13th of October, since it corresponds to a holiday week with very few contacts. In this way, the whole timespan used for the simulations has an amount of contacts that remains on average homogeneous in time. Supplementary Fig. 5b shows the distribution of contacts in this case.

Supplementary Note 2 The continuous model and its discretization

The epidemic model form [19, 1] (to which we refer for a precise derivation) provides a quantification of the number Y (t, τ, τ ) of people at time t that have been infected at time tτ by people who have in turn been infected at time tτ . The model characterizes Y as a function of s(τ ) and β(τ ) (see Supplementary Note 1). Observe that both are quantities in [0, 1], and that s(τ ) is non decreasing. The model then states that Y (t, 0, t) is a given initial value and that for 0 ≤ τ < t it holds

The values of ε I , ε T ∈ [0, 1] are fixed in the original model, while we assume from now on that may depend on τ . This dependence on the time is anyhow not used in the scenarios considered in this paper.

Observe that in the absence of containment policies (i.e. ε I = ε T = 0) the model predicts a behavior

i.e. the new infected individuals are just given by the cumulative number of people who have been infected at previous times, weighted by the infectiousness of the disease. In other words, every previously infected person is a possible agent of new infection, and in this scenario an exponential growth is observed. The isolation and tracing measures, on the other hand, act as discounts on the number of available spreaders of the epidemic.

Supplementary Note 2.1 A more convenient form of the equations

As mentioned before, the model was analyzed in Fraser et al. [19], Ferretti et al. [1] by considering its asymptotic behavior as t grows to infinity. We instead need a finite-time model that allows a flexible treatment of real data. To this end, it is convenient to use the variable Λ(t, τ ) := Y (t, 0, τ ) (as in Fraser et al. [19]) which represents the number of people which are infected at time t by people who have been infected for time τ ≤ t.

With straightforward manipulations, equation ( 8) can be rewritten for 0 ≤ τ < t as

Supplementary Note 2.2 Discretization

We fix a value T > 0 as the maximal simulation time and take n + 1 points in [0, T ] i.e., τ i := i T n , 0 ≤ i ≤ n. We will approximate the values of Λ(τ k , τ i ) for k = 1, . . . , n and i = 0, . . . , k -1, while, according to Fraser et al. [19], we set Λ(τ k , τ i ) = 0 for all i ≥ k. Moreover, we assume that the value Λ(τ 1 , τ 0 ) is given.

Observe that this discretization is equivalent to assume that the number of new cases is measured only at equal discrete times (e.g. at the end of each day) rather than measured continuously.

We show in the next section that the continuous model ( 9) can be approximated by defining a suitable value for Λ(τ 1 , τ 0 ), and then iteratively computing the values of Λ(τ k , τ i ) by applying the simple formula

where the matrix

which ranges between τ k for i = 0 and τ 1 for i = k -1. The last equation becomes for

We can then use the quadrature rule (11) to discretize the integral and to obtain

Observe that the upper limit in the sum has a value

Moreover, in this case we have for 0 ≤ j ≤ ki -1 that

which ranges between τ i and τ k-1 . Inserting this into the last equation we get for

We can define the matrix A ε I ,ε T ∈ R n×n whose entries are defined for 0 ≤ i, j ≤ n -1 as

which has a triangular structure (the first row is nonzero, in the second row the last element is zero, ..., in the last row only the first element is nonzero).

With this matrix we can rewrite (12) as

which is a recursive equation that determines the evolution of Λ(t, τ ) once an initial condition is given.

Assuming for now that these initial conditions are given, we can compute Λ(τ k , τ i ) forward in k and backward in i. That is, after we computed Λ(τ , τ i ) for all = 1, . . . , k -1, and for 0 ≤ i < , we can use (13) to compute Λ(τ k , τ i ) for 1 ≤ i < k, since in this case the right hand side contains values Λ(τ k-i , τ j ) which have already been computed since

The only remaining case is i = 0, and in this case the formula (13) gives instead

where

and thus

This term is positive if and only if

Since the left hand side is at most β(τ 0 ), it is sufficient to require that n/T > β(τ 0 ), or n > β(τ 0 ) • T .

In this way we defined Λ(τ k , τ i ) for all values 1 ≤ k ≤ n and 0 ≤ i < k. It remains to assign the value Λ(τ 1 , τ 0 ), which can be fixed to the initial value Λ 0 .

Supplementary Note 3 Evaluation of additional containment measures and refined policies

Supplementary Note 3.1 Longer and shorter tracing memory

We explore here how the outcomes of the different policies depend on the memory length of the contact history, which has been set to 7 days in the previous simulations (see Supplementary Notes 2.1.3 of the main text). First, to understand whether or not an increased memory would improve the effectiveness of each policy, we repeat the experiments assuming that the contacts of each individual are recorded for 15 days in the past, and report the results in Supplementary Fig. 6. When comparing Supplementary Fig. 6a with the original setting (central panel of Fig. 5 in the main text), it is clear that the increased memory brings a negligible advantage. This is confirmed by the total number of false negatives in Supplementary Fig. 6b if compared with Fig. 6c of the main text, and this is at the price of increased storage requirements, see total quarantines. Second, it is worth investigating if a shorter tracing memory would give improvements in terms of the numbers of false positives. We thus repeat the simulations assuming that the memory is reduced to 2 days (still including the 2 days delay in the case reporting as in all other settings). Supplementary Fig. 7 shows that the shorter memory reduces the effectiveness of the policies of a significant amount, none of them crossing the black line for ε I = 0.8. Apparently, storing only 2 days of contacts reduces too much the number of quarantined individuals (see Supplementary Fig. 7b), affecting the effectiveness.

Supplementary Note 3.2 Longer delay

The implemented model, for the sake of realism, includes a variable delay between the instant when a person is recognized as infected and the instant when that person is isolated. We set the delay to 2 days in all the other simulations and we test here the effect of a longer delay: 3 days, which is a good estimate for a system which is over-burdened but not close to collapse. From Supplementary Fig. 8a we observe that even one additional day of delay has a strong impact on the behavior of the epidemic, with none of the proposed policies able to cross the threshold of controllability, even for maximal isolation efficiency. Moreover Supplementary Fig. 8b shows that high levels of false negatives are reached for each policy, around twice those obtained with only two days of delay (see Fig. 6c in the main text) even if the total number of people in quarantine is slightly higher. This highlights how rapid interventions are fundamental in containment policies based on contact tracing.

Supplementary Note 3.3 Second order tracing

We additionally explore the possibility to keep track of contacts in a recursive way. Namely, when an individual is isolated, not only its contacts are quarantined, but also its contacts'

Supplementary Note 3.4 Variations in the number of asymptomatic individuals

In order to additionally verify the robustness of our predictions with respect to the epidemiological modelling, we assume here that the number of asymptomatic individuals is 20%, and additionally that a randomized testing policy that covers 25% of the asymptomatic population is in place. In this case, little changes in the predictions of the model (Supplementary Fig. 10a) with respect to the case of 40% asymptomatics that was analyzed in the main text, since all the policies are effective for ε I = 1, while Policy 1 is the only one that fails to contain the epidemic for ε I = 0.8. No policy is effective for lower isolation efficiency. Similarly, the quarantine dynamics (false negative and false positive, Supplementary Fig. 10c and10d) appear to have a similar behavior as in the basic setting. Despite these seemingly small changes in the success of the policies and in their cost, the cross visualization of Supplementary Fig. 10b shows that in this scenario it is harder to find a clear tradeoff between cost and effectiveness, since the two scores change smoothly between the five

Total quarantined

Quarantined individuals

% of quarantined % of infected over over the entire the quarantined population population

• 11% 4%

Supplementary Figure 9: Numerical simulations with second order tracing. 9a and 9b: Temporal evolution of percentages of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, assuming an isolation efficiency of ε I = 0.8. 9c: plot of the effectiveness (low number of false negatives) vs. cost (total quarantines) of the policies. The parameters are set so as to have R 0 = 1.5 and 40% app adoption. The table reports the percentage of distinct individuals who have been quarantined over the entire population and the percentage of them who were actually infected (true positive). The curves in the first two panels and the points in the third have been obtained as mean values over 100 independent simulations, the corresponding curve shadings and error bars represent the standard error.

False positive [%]

(d)

Supplementary Figure 10: Tracing policy efficiency with 20% and 25% random testing. 10a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies, assuming that symptomatic people account for the 80% of the infected individuals, that they can be isolated and that an additional 25% of asymptomatics can be identified via randomized testing. 10b: Cross plot of the cost (number of quarantines) versus the effectiveness (low number of false negatives) for each policy. 10d and 10d: Temporal evolution of respectively the percentages of false positives, i.e. not infected individuals quarantined, and false negatives, i.e. infected individuals not quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error.

policies.

Supplementary Note 3.5 Close-range short-exposure vs long-range long-exposure interactions

We test here two additional policies obtained by mixing a low space resolution and a high time resolution, and viceversa. The policies are defined in Supplementary Fig. Supplementary Fig. 11, in analogy with Supplementary Fig. 4 of the main text, shows the new policies overlaid to the histograms of duration and signal strength of the CNS data set contacts.

The values of the parameters (ε I , ε T ) characterizing the numerical simulations for the new policies with R 0 = 1.5 are shown in Supplementary Fig. 12a (see Fig. 5 in the main text, central panel, for a comparison with the policies in Fig. 3, main text), and it is clear that Policy 7 is as effective as the most restrictive policies (Policy 2 to Policy 5), while Policy 6 fails to contain the virus for an isolation efficiency smaller than 1. As for the policies of Fig. 3, this effectiveness comes at the cost of a larger number of quarantines (Supplementary Fig. 12c and Supplementary 12d). However, Supplementary Fig. 12b shows that the cost of Policy 7 is in larger than the ones of Policy 2 and Policy 3, but smaller than the ones of Policy 4 and Policy 5, while achieving a similar effectiveness.

We deduce that the ability to control the contagion seems to be more sensitive to duration of contacts than to their spatial distance. Indeed, policies which capture close range but short exposure interactions happen to be less performative in quarantining people than those signaling long range interactions with long exposure. In other words, quarantining individuals who have had a short interaction with an infected one, even if at close-range, is unnecessary. On the other hand, it appears to be important to track contacts with a high spatial resolution, including the ones that happens at a rather long distance, if their duration is significant.

However, we remark once more that these results are depending on the infectiousness model that we have defined here, and that they could possibly change in a different setting. 6.

Supplementary Note 3.6 Compliance to quarantine decreases if notified multiple times

In the main text we consider compliance as encoding the compliance to all parts of the contact tracing and quarantine procedure. In other words, if some of the participants install the app but then do not quarantine if notified, then they should be counted among the non-compliant individuals since the effect would be the same than that of not adopting the app at all. The non-compliance (or impossibility) to quarantine is therefore already considered when choosing the percentage of app adoption. However, despite the fact that people who adopt the app are aware that they could be required to quarantine even if not infected, they may underestimate the possibility to be notified multiple times. A repeated quarantine could represent a relevant problem under social and economical aspects for many people, especially if unjustified. For this reason we decided to run an additional set of simulations where adoption of the app does not necessarily coincide with compliance to quarantine, and in particular it decreases if the same person is wrongly notified multiple times.

In particular we assume that compliance to quarantine can drop due to repeated notifications because the trust in healthcare and government institutions would drop too [

False positive [%]

(d)

Supplementary Figure 12: Tracing policy efficiency with additional policies. 12a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 12b: Cross plot of the cost (number of quarantines) versus the effectiveness (low number of false negatives) for each policy. 12c and 12d: Temporal evolution of respectively the percentages of false positives, i.e. not infected individuals quarantined, and false negatives, i.e. infected individuals not quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error. 22, 23]. Therefore the progressive decrease can be roughly estimated by considering the most classical game based on trust: the prisoner's dilemma [24, 25]. We focus in particular on an experiment of repeated game [26] where people were asked to play multiple rounds, each one with a different person. The experiment showed that willingness to cooperate additional characteristic making the system more realistic, thus confirming the robustness of our model. The possibility to run the code on the extended data set provides in addition the Supplementary Note 4 Contagion heterogeneity due to social structure

Each social context can be described by a temporal network of connections characterized by a complex and unique topology which reflects the structure and organization of the specific slice of society under study. Societies are usually organized in clustered structures and it is often possible to divide people in subgroups, or clusters of individuals who are more connected among each other than with individuals of other groups.

Supplementary Figure 14: Intra-and inter-cluster contagion. The ratio c, quantifying the tendency of contagions to take place inside a cluster rather than among different clusters, is reported for different possible choices of partitions corresponding to different numbers of clusters.

In this section we explore the clustering structure of the CNS data set and how contagion events are related to it. We use the Louvain algorithm for community detection [27], able to rapidly extract the community structure even for large networks. We apply it to the aggregated graph of CNS, which is obtained by transforming the temporal graph in a static one by considering at the same time all the connections among students and weighting them according to their intrinsic characteristics: duration and proximity. In particular, we define the aggregated graph by assigning to the edges with a proximity below the threshold of -90 dBm a unitary weight, while for all the contacts characterized by a closer proximity we label each edge with the total duration of contacts between the corresponding pair of nodes. By modifying the resolution of the algorithm we achieve different possible partitions of the

Supplementary Note 5 Extended results on SocioPatterns data sets

In this section we present the results of simulations performed on two different data sets: (i) HighSchool13 [30], collected in a French high school, and (ii) InVS15 [31], collected in a French workplace. Both data sets have been collected using the sensing platform developed

We further run the simulations on the network for the five policies of Fig. 3 in the main text (recall that only distances are taken into account). To this end, the scaling factors of the infectiousness (Supplementary Note 1.2) require first a calibration. We thus first recompute the factors p R 0 to obtain R 0 = 3, and then we compute r R 0 as reported in Supplementary Table 9.

Supplementary Table 9: Reduction factors for the SocioPatterns data sets.

Supplementary Note 5.1 SocioPatterns data: High School

In this case no policy is able to reach containment for ε I = 0.8 (Supplementary Fig. 17a), even if Policy 5 is essentially on the boundary of no epidemic growth. For ε I = 1, instead, all the policies are successful. The uniform lack of success of the five policies reflected by a similar time evolution of the curves of the number of false negatives (Supplementary Fig. 17c). Still, the policies are uneven regarding their quarantine cost (Supplementary Fig. 17d), since Policy 5 wrongly quarantines a substantially larger number of people than the other ones. In this case, the cost to effectiveness plot (Supplementary Fig. 17b) does not identify a best policy. This is to be expected, since none of them achieve the goal, and thus side costs play a little role in the ranking of the policies.

Supplementary Note 5.2 SocioPatterns data: Workplace

In the workplace environment, Policy 5 is successful for ε I = 0.8 (Supplementary Fig. 18a), and for ε I = 1 all policies except for Policy 1 are successful.

The higher effectivity of Policy 5 is reflected in a higher cost in terms of false positives (Supplementary Fig. 18d), but in this case this information is not particularly meaningful since there is no other successful policy to compare with. This is also the case of the cost to effectivity comparison (Supplementary Fig. 18b).

We also remark that in the numerical simulation the number of false negatives is in fact rapidly dropping to zero for all policies (Supplementary Fig. 18c), and this might suggest that the epidemic spread is kept under control. It is a peculiar case, since that the data set contains very little contacts, so the epidemic is spreading on few people (often 2-3) without propagating further. On the other hand, missing just one of the infected from tracing results into a very high ratio of unsuccessful tracing, thus in a small value of ε T . This

Time[days]

False positive [%]

(d) Supplementary Figure 17: Tracing policy efficiency in a high school. 17a: Growth or decrease rate of the number of newly infected individuals and efficiency of the containment policies. 17b: Cross plot of the cost (number of quarantines) versus the effectiveness (number of false negatives). 17c and 17d: Temporal evolution of respectively the percentages of false negatives, i.e. infected individuals not quarantined, and false positives, i.e. not infected individuals quarantined, over the entire population, assuming an isolation efficiency of ε I = 0.8, a reproductive number R 0 = 1.5, and 40% app adoption. The points in the first two panels and the curves in the last two have been obtained as mean values over 200 independent simulations, the corresponding error bars and the curve shadings represent the standard error.

value, when inserted into the mathematical model, predicts the no-containment outcome observed before (Supplementary Fig. 18a). This seemingly contradictory behavior is in fact only revealing the fact that the mathematical model works on aggregated quantities, assuming homogeneous contacts, and in this case the spreading is a rare event in the Supplementary Note 6 Other models of digital contact tracing

Multiple recent modeling studies have shown that contact tracing may reduce epidemic spreading, and that the efficacy of its realization -contact identification and timingplays a pivotal role for mitigation. Some theoretical models of contact tracing date back to 2003-2004 and were originally developed for fighting smallpox [33, 34], proving that isolation and tracing are useful to slow down contagions. These works however have a slightly different approach where contact tracing is limited to small communities, which would be useless with a large-scale epidemic like that of COVID-19. Multiple alternative procedures have been proposed in the last months. For instance, the works of Hellewell et al. [35] and of Kretzschman et al. [36]. The first one assumes that contacts are traced with a fixed probability ρ, while the second one includes a distinction between contacts within a household and outside -these last not affected by physical distancing. Gorji et al. [37] instead propose a model where contact tracing is combined with a mass testing becoming "smart testing", suggesting that it would avoid numerous quarantines. A further work by Fraser et al. [38] explores the difference between centralized and decentralized tracing and the relative privacy issue. Backward and forward (predictive) tracing is introduced by Kojaku et al. [39], claiming that it could prevent a significant fraction of further transmissions. Very few studies make use of realworld contacts. A comprehensive study on isolation and tracing simulated on a real-world social network is provided by Firth et al. [40]. This study is however limited by the fact that the absence of targeted policies implies a large portion of the population being quarantined, with diffused local lockdowns. Refined policies are instead proposed by Lorch et al. [41], based on the risk of exposure of each individual in the specific sites they visit, making use of mobility data and crowding. A further numerical analysis is devised by Barrat et al. [42], applied to different social contexts. Another way to simulate spreading and tracing on realistic scenarios is represented by the use of data to generate synthetic contact networks. This approach has been devised by Kucharski et al. [43], Lopez et al. [44], Hinch et al. [45], and Abueg et al. [46]. Some of the works cited above are summarized in Ref. [47].

We claim that a complete analysis of contact tracing needs real or realistic data and at the same time should be based on a solid mathematical model. This model should be general enough in order to provide a framework that can be applied in multiple contexts. We also claim that specific and targeted policies should be implemented in order to control such a large-scale epidemic without implying a total or partial lockdown.

The mathematical framework that we chose to implement in our strategy, as previously mentioned, is that proposed by Fraser et al. [19] and its adaptation to the COVID-19 pandemic (Ferretti et al. [1]). This work describes the evolution of an epidemic in a homogeneously mixed population. It uses recursive equations that have been adapted to include the parameters ε I and ε T and, assuming an exponential growth for the number of infected