Michele Starnini
email: michele.starnini@gmail.com

Bruno Lepri
email: lepri@fbk.eu

Andrea Baronchelli
email: andrea.baronchelli.1@city.ac.uk

Alain Barrat
email: alain.barrat@cpt.univ-mrs.fr

Ciro Cattuto
email: ciro.cattuto@isi.it

Romualdo Pastor-Satorras
email: romualdo.pastor@upc.edu

Robust modeling of human contact networks across different scales and proximity-sensing techniques

Keywords: Social Computing, Computational Social Science, Social Network Analysis, Mobile Sensing, Mathematical Modeling, Wearable Sensors

The problem of mapping human close-range proximity networks has been tackled using a variety of technical approaches. Wearable electronic devices, in particular, have proven to be particularly successful in a variety of settings relevant for research in social science, complex networks and infectious diseases dynamics. Each device and technology used for proximity sensing (e.g., RFIDs, Bluetooth, low-power radio or infrared communication, etc.) comes with specific biases on the closerange relations it records. Hence it is important to assess which statistical features of the empirical proximity networks are robust across different measurement techniques, and which modeling frameworks generalize well across empirical data. Here we compare time-resolved proximity networks recorded in different experimental settings and show that some important statistical features are robust across all settings considered. The observed universality calls for a simplified modeling approach. We show that one such simple model is indeed able to reproduce the main statistical distributions characterizing the empirical temporal networks.

Introduction

Being social animals by nature, most of our daily activities involve face-toface and proximity interactions with others. Although technological advances have enabled remote forms of communication such as calls, video-conferences, e-mails, etc., several studies [START_REF] Whittaker | Informal workplace communication: What is it like and how might we support it?[END_REF][START_REF] Nardi | The place of face to face communication in distributed work[END_REF] and the constant increase in business traveling, provide evidence that co-presence and face-to-face interactions still represent the richest communication channel for informal coordination [START_REF] Kraut | Informal communication in organizations: Form, function, and technology[END_REF], socialization and creation of social bonds [START_REF] Kendon | Organization of Behavior in Face-to-Face Interaction[END_REF][START_REF] Storper | Buzz: Face-to-face contact and the urban economy[END_REF], and the exchange of ideas and information [START_REF] Doherty-Sneddon | Face-to-face and video-mediated communication: A comparison of dialogue structure and task performance[END_REF][START_REF] Nohria | Face-to-face: Making network organizations work[END_REF][START_REF] Wright | The associations between young adults' face-to-face prosocial behaviorsand their online prosocial behaviors[END_REF]. At the same time, close-range physical proximity and face-to-face interactions are known determinants for the transmission of some pathogens such as airborne ones [START_REF] Liljeros | The web of human sexual contacts[END_REF][START_REF] Salathé | A high-resolution human contact network for infectious disease transmission[END_REF]. A quantitative understanding of human dynamics in social gatherings is therefore important not only to understand human behavior, creation of social bonds and flow of ideas, but also to design effective containment strategies and contrast epidemic spreading [START_REF] Starnini | Immunization strategies for epidemic processes in time-varying contact networks[END_REF][START_REF] Smieszek | A low-cost method to assess the epidemiological importance of individuals in controlling infectious disease outbreaks[END_REF][START_REF] Gemmetto | Mitigation of infectious disease at school: targeted class closure vs school closure[END_REF].

Hence, face-to-face and proximity interactions have long been the focus of major attention in social sciences and epidemiology [START_REF] Bales | Interaction process analysis: A method for the study of small groups[END_REF][START_REF] Arrow | Small groups as complex systems: Formation, coordination, development, and adaptation[END_REF][START_REF] Bion | Experiences in groups and other papers[END_REF][START_REF] Eames | Six challenges in measuring contact networks for use in modelling[END_REF] and recently various research groups have developed sensing devices and approaches to automatically measure these interaction networks [START_REF] Eagle | Reality mining: sensing complex social systems[END_REF][START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF][START_REF] Salathé | A high-resolution human contact network for infectious disease transmission[END_REF][START_REF] Madan | Social sensing for epidemiological behavior change[END_REF][START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF][START_REF] Lepri | The SocioMetric badges corpus: A multilevel behavioral dataset for social behavior in complex organizations[END_REF][START_REF] Stopczynski | Measuring large-scale social networks with high resolution[END_REF][START_REF] Toth | The role of heterogeneity in contact timing and duration in network models of influenza spread in schools[END_REF]. Reality Mining (RM) [START_REF] Eagle | Reality mining: sensing complex social systems[END_REF], a study conducted in 2004 by the MIT Media Lab, was the first one to collect data from mobile phones to track the dynamics of a community of 100 business school students over a nine-month period. Following this seminal project, the Social Evolution study [START_REF] Madan | Social sensing for epidemiological behavior change[END_REF][START_REF] Madan | Sensing the "health state" of a community[END_REF] tracked the everyday life of a whole undergraduate dormitory for almost 8 months using mobile phones (i.e. call logs, location data, and proximity interactions). This study was specifically designed to model the adoption of political opinions, the spreading of epidemics, the effect of social interactions on depression and stress, and the eating and physical exercise habits. More recently, in the Friends and Family study 130 graduate students and their partners, sharing the same dormitory, carried smartphones running a mobile sensing platform for 15 months [START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF]. Additional data were also collected from Facebook, credit card statements, surveys including questions about personality traits, group affiliations, daily mood states and sleep quality, etc.

Along similar lines, the SocioPatterns (SP) initiative [START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF][START_REF] Isella | Close encounters in a pediatric ward: Measuring face-to-face proximity and mixing patterns with wearable sensors[END_REF] and the Sociometric Badges projects [START_REF] Olguín Olguín | Sensible organizations: Technology and methodology for automatically measuring organizational behavior[END_REF][START_REF] Lepri | The SocioMetric badges corpus: A multilevel behavioral dataset for social behavior in complex organizations[END_REF][START_REF] Onnela | Using sociometers to quantify social interaction patterns[END_REF] have been studying since several years the proximity patterns of human gatherings, in different social contexts, such as scientific conferences [START_REF] Stehlé | Simulation of an SEIR infectious disease model on the dynamic contact network of conference attendees[END_REF], museums [START_REF] Van Den Broeck | The making of sixty-nine days of close encounters at the science gallery[END_REF], schools [START_REF] Stehlé | High-resolution measurements of face-to-face contact patterns in a primary school[END_REF][START_REF] Fournet | Contact patterns among high school students[END_REF], hospitals [START_REF] Isella | Close encounters in a pediatric ward: Measuring face-to-face proximity and mixing patterns with wearable sensors[END_REF] and research institutions [START_REF] Lepri | The SocioMetric badges corpus: A multilevel behavioral dataset for social behavior in complex organizations[END_REF] by endowing participants with active RFID badges (SocioPatterns initiative) or with devices equipped with accelerometers, microphones, Bluetooth and Infrared sensors (Sociometric Badges projects) which capture body movements, prosodic speech features, proximity, and face-to-face interactions respectively.

However, the different technologies (e.g., RFID, Bluetooth, Infrared sensors) employed in these studies might imply potentially relevant differences in measuring contact networks. Interaction range and the angular width for detecting contacts, for instance, vary in a significant way, from less than 1 meter using Infrared sensors to more than 10 meters using Bluetooth sensors, and from 15 degrees using Infrared sensors to 360 degrees using Bluetooth sensors. In many cases, data cleaning and post-processing is based on calibrated power thresholds, temporal smoothing, and other assumptions that introduce their own biases. Finally, experiments themselves are diverse in terms of venue (from conferences to offices), size (from N 50 to N 500 individuals), duration (from a single day to several months) and temporal resolution. The full extent to which the measured proximity networks depends on experimental and data-processing techniques is challenging to assess, as no studies, to the best of our knowledge, have tackled a systematic comparison of different proximity-sensing techniques based on wearable devices.

Here we tackle this task, showing that empirical proximity networks measured in a variety of social gatherings by means of different measurement systems yield consistent statistical patterns of human dynamics, so we can assume that such regularities capture intrinsic properties of human contact networks. The presence of such apparently universal behavior, independent of the measurement framework and details, calls, within a statistical physics perspective, for an explanatory model, based on simple assumptions on human behavior. Indeed, we show that a simple multi-agent model [START_REF] Starnini | Modeling human dynamics of face-to-face interaction networks[END_REF][START_REF] Starnini | Model reproduces individual, group and collective dynamics of human contact networks[END_REF] accurately reproduces the statistical regularities observed across different social contexts.

Related Work

The present study takes inspiration from the emerging body of work investigating the possibilities of analyzing proximity and face-to-face interactions using different kinds of wearable sensors. At present, mobile phones allow the collection of data on specific structural and temporal aspects of social interactions, offering ways to approximate social interactions as spatial proximity or as the co-location of mobile devices, e.g., by means of Bluetooth hits [START_REF] Madan | Social sensing for epidemiological behavior change[END_REF][START_REF] Dong | Modeling the co-evolution of behaviors and social relationships using mobile phone data[END_REF][START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF][START_REF] Madan | Sensing the "health state" of a community[END_REF][START_REF] Stopczynski | Measuring large-scale social networks with high resolution[END_REF]. For example, Do and Gatica Perez have proposed several topic models for capturing group interaction patterns from Bluetooth proximity networks [START_REF] Do | Human interaction discovery in smartphone proximity networks[END_REF][START_REF] Do | Inferring social activities with mobile sensor networks[END_REF]. However, this approach does not always yield good proxies to the social interactions occurring between the individuals carrying the devices.

Mobile phone traces suffer a similar problem: They can be used to model human mobility [START_REF] Gonzaléz | Understanding individual human mobility patterns[END_REF][START_REF] Blondel | A survey of results on mobile phone datasets analysis[END_REF] with the great advantage of easily scaling up to millions of individuals; they too, however, offer only coarse localization and therefore provide only rough co-location information, yielding thus only very limited insights into the social interactions of individuals.

An alternative strategy for collecting data on social interactions is to resort to image and video processing based on cameras placed in the environment [START_REF] Cristani | Social interaction discovery by statistical analysis of F-formations[END_REF][START_REF] Staiano | Salsa: A novel dataset for multimodal group behavior analysis[END_REF]. This approach provides very rich data sets that are, in turn, computationally very complex: They require line-of-sight access to the monitored spaces and people, specific effort for equipping the relevant physical spaces, and can hardly cope with large scale data.

Since 2010, Cattuto et al. [START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF] have used a technique for monitoring social interactions that reconciles scalability and resolution by means of proximitysensing systems based on active RFID devices. These devices are capable of sensing spatial proximity over different length scales and even close face-to-face interactions of individuals (1 to 2m), with tunable temporal resolution. The So-cioPatterns initiative has collected and analyzed face-to-face interaction data in many different contexts. These analyses have shown strong heterogeneities in the contact duration of individuals, the robustness of these statistics across contexts, and have revealed highly non-trivial mixing patterns of individuals in schools, hospitals or offices as well as their robustness across various timescales [START_REF] Stehlé | High-resolution measurements of face-to-face contact patterns in a primary school[END_REF][START_REF] Isella | Close encounters in a pediatric ward: Measuring face-to-face proximity and mixing patterns with wearable sensors[END_REF][START_REF] Isella | What's in a crowd? Analysis of face-to-face behavioral networks[END_REF][START_REF] Fournet | Contact patterns among high school students[END_REF][START_REF] Gnois | Data on face-to-face contacts in an office building suggest a low-cost vaccination strategy based on community linkers[END_REF]. These data have been used in data-driven simulations of epidemic spreading phenomena, including the design and validation of containment measures [START_REF] Gemmetto | Mitigation of infectious disease at school: targeted class closure vs school closure[END_REF].

Along a similar line, Olguin Olguin et al. [START_REF] Olguín Olguín | Sensible organizations: Technology and methodology for automatically measuring organizational behavior[END_REF] have designed and employed Sociometric Badges, platforms equipped with accelerometers, microphones, Bluetooth and Infrared sensors which capture body movements, prosodic speech features, proximity and face-to-face interactions respectively. Some previous studies based on Sociometric Badges revealed important insights into human dynamics and organizational processes, such as the impact of electronic communications on the business performance of teams [START_REF] Olguín Olguín | Sensible organizations: Technology and methodology for automatically measuring organizational behavior[END_REF], the relationship between several behavioral features captured by Sociometric Badges, employee' self-perceptions (from surveys) and productivity [START_REF] Olguín Olguín | Sensible organizations: Technology and methodology for automatically measuring organizational behavior[END_REF], the spreading of personality and emotional states [START_REF] Alshamsi | Beyond contagion: Reality mining reveals complex patterns of social influence[END_REF].

Empirical data

In this section, we describe datasets gathered by five different studies: The "Lyon hospital" and "SFHH" conference datasets from the SocioPatterns (SP) initiative [START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF], the Trento Sociometric Badges (SB) dataset [START_REF] Lepri | The SocioMetric badges corpus: A multilevel behavioral dataset for social behavior in complex organizations[END_REF], the Social Evolution (SE) dataset [START_REF] Madan | Social sensing for epidemiological behavior change[END_REF][START_REF] Madan | Sensing the "health state" of a community[END_REF], the Friends and Family (FF) [START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF] dataset, and two datasets (Elem and Mid) collected using wireless ranging enabled nodes (WRENs) [START_REF] Toth | The role of heterogeneity in contact timing and duration in network models of influenza spread in schools[END_REF]. The main statistical properties of datasets under consideration are summarized in Table 1, while the settings of the studies are described in detail in the following subsections.

SocioPatterns (SP)

The measurement infrastructure set up by the SP initiative is based on wireless devices embedded in badges, worn by the participants on their chests. Devices exchange radio packets and use them to monitor for proximity of individuals (RFID). Information is sent to receivers installed in the environment, logging contact data. They are tuned so that the face-to-face proximity of two individuals wearing the badges are sensed only when they are facing each other at close range (about 1 to 1.5m). The time resolution is set to 20 seconds, meaning that a contact between two individuals is considered established if their badges exchange at least one packet during such interval, and lasts as long as there is at least one packet exchanged over subsequent 20-second time windows. More details on the experimental setup can be found in Ref. [START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF] Here we consider the dataset "Hospital", gathered by the SP initiative at a Lyon Hospital, during 4 workdays, and the dataset "SFHH", gathered by the SP initiative at the congress of the Société Francaise d'Hygiène Hospitaliére, where the experiment was conducted during the first day of a two-days conference. See Ref. [START_REF] Stehlé | Simulation of an SEIR infectious disease model on the dynamic contact network of conference attendees[END_REF] for a detailed description.

Sociometric Badges (SB)

The Sociometric Badges data [START_REF] Lepri | The SocioMetric badges corpus: A multilevel behavioral dataset for social behavior in complex organizations[END_REF] has been collected in a research institute for over a six week consecutive period, involving a population of 54 subjects, during their working hours. The Sociometric Badges, employed for this study, are equipped with accelerometers, microphones, Bluetooth and Infrared sensors which capture body movements, prosodic speech features, co-location and faceto-face interactions respectively [START_REF] Olguín Olguín | Sensible organizations: Technology and methodology for automatically measuring organizational behavior[END_REF]. For the purposes of our study we have exploited the data provided from the Bluetooth and Infrared sensors.

Infrared Data Infrared (IR) transmissions are used to detect face-to-face interactions between people. In order for a badge to be detected by an IR sensor, two individuals must have a direct line of sight and the receiving badge's sensor must be within the transmitting badge's IR signal cone of height h ≤ 1 meter and a radius of r ≤ h tan θ, where θ = ±15 o degrees. The infrared transmission rate (T R ir ) was set to 1Hz.

Bluetooth Data Bluetooth (BT) detections can be used as a coarse indicator of proximity between devices. Radio signal strength indicator (RSSI) is a measure of the signal strength between transmitting and receiving devices. The range of RSSI values for the radio transceiver in the badge is (-128 dBm, 127 dBm). The Sociometric Badges broadcast their ID every five seconds using a 2.4 GHz transceiver (T R radio = 12 transmissions per minute).

Social Evolution (SE)

The Social Evolution dataset was collected as part of a longitudinal study with 74 undergraduate students uniformly distributed among all four academic years (freshmen, sophomores, juniors, seniors). Participants in the study represents 80% of the residents of a dormitory at the campus of a major university in North America. The study participants were equipped with a smartphone (i.e. a Windows Mobile device) incorporating a sensing platform designed for collecting call logs, location and proximity data. Specifically, the software scanned for Bluetooth wireless devices in proximity every six minutes, a compromise between short-term social interactions and battery life [START_REF] Eagle | Inferring friendship network structure by using mobile phone data[END_REF]. With this approach, the BT log of a given smartphone would contain the list of devices in its proximity, sampled every six minutes.

Participants used the Windows Mobile smartphones as their primary phones, with their existing voice plans. Students had also online data access with these phones due to pervasive Wi-Fi on the university campus and in the metropolitan area. As compensation for their participation, students were allowed to keep the smartphones at the end of the experiment. Although relevant academic and extra-curricular activities might have not been covered either because the mobile phones may not be permanently on (e.g., during classes), or because of contacts with people not taking part to the study, the dormitory may still represent the preferential place where students live, cook, and sleep. Additional information on the SE study is available in Madan et al. [START_REF] Madan | Social sensing for epidemiological behavior change[END_REF][START_REF] Madan | Sensing the "health state" of a community[END_REF].

Friends and Family (FF)

The Friends and Family dataset was collected during a longitudinal study capturing the lives of 117 subjects living in a married graduate student residency of a major US university [START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF]. The sample of subjects has a large variety in terms of provenance and cultural background. During the study period, each participant was equipped with an Android-based mobile phone incorporating a sensing software explicitly designed for collecting mobile data. Such software runs in a passive manner and does not interfere with the every day usage of the phone.

Proximity interactions were derived from Bluetooth data in a manner similar to previous studies such as [START_REF] Eagle | Reality mining: sensing complex social systems[END_REF][START_REF] Madan | Social sensing for epidemiological behavior change[END_REF]. Specifically, the Funf phone sensing platform was used to detect Bluetooth devices in the participant's proximity. The Bluetooth scan was performed periodically, every five minutes in order to keep from draining the battery while achieving a high enough resolution for social interactions. With this approach, the BT log of a given smartphone would contain the list of devices in its proximity, sampled every 5 minutes. See Ref. [START_REF] Aharony | Social fmri: Investigating and shaping social mechanisms in the real world[END_REF] for a detailed description of the study.

Toth et al. datasets (Toth et al.)

The datasets, publicly available, were collected by Toth et al. [START_REF] Toth | The role of heterogeneity in contact timing and duration in network models of influenza spread in schools[END_REF] deploying wireless ranging enabled nodes (WRENs) [START_REF] Forys | Wrenmining: large-scale data collection for human contact network research[END_REF] to students in Utah schools. Each WREN was worn by a student and collected time-stamped data from other WRENs in proximity at intervals of approximately 20 seconds. Each recording included a measure of signal strength, which depends on the distance between and relative orientation of the pair of individuals wearing each WREN. More specifically, Toth et al. [START_REF] Toth | The role of heterogeneity in contact timing and duration in network models of influenza spread in schools[END_REF] have applied signal strength criteria such that each retained data point was most likely to represent a pair of students, with face-toface orientation, located 1 meter from each other.

In the current paper, we resort to the data collected from two schools in Utah: One middle school (Mid), an urban public school with 679 students (age range 1214); and one elementary school (Elem), a suburban public school with 476 students, (age range 512). The contact data were captured during school 1. Some average properties of the datasets under consideration. SP-hosp = "SocioPatterns Lyon hospital", SP-sfhh = "SocioPatterns SFHH conference", SB = "Sociometric Badges", SE = "Social Evolution", FF = "Friends and Family", Elem = "Toth's Elementary school", Mid = "Toth's Middle school" hours of two consecutive school days in autumn 2012 from 591 students (87% coverage) at Mid and in winter 2013 from 339 students (71% coverage) at Elem.

Temporal network formalism

Proximity patterns can be naturally analyzed in terms of temporally evolving graphs [START_REF] Holme | Temporal networks[END_REF][START_REF] Holme | Modern temporal network theory: a colloquium[END_REF], whose nodes are defined by the individuals, and whose links represent interactions between pairs of individuals. Interactions need to be aggregated over an elementary time interval ∆t 0 in order to build a temporal network [START_REF] Ribeiro | Quantifying the effect of temporal resolution on time-varying networks[END_REF]. This elementary time step represents the temporal resolution of data, and all the interactions established within this time interval are considered as simultaneous. Taken together, these interactions constitute an "instantaneous" network, formed by isolated nodes and small groups of interacting individuals (not necessarily forming cliques). The sequence of such instantaneous networks forms a temporal, or time-varying, network. The elementary time step ∆t 0 is set to ∆t 0 = 20 seconds in the case of SP data, ∆t 0 = 60 seconds for SMBC data, ∆t 0 = 300 seconds for SE and FF data, and ∆t 0 = 20 seconds for Toth et al. datasets. Note that temporal networks are built by including only non-empty instantaneous graphs, i.e. graphs in which at least a pair of nodes are connected.

Each data set is thus represented by a temporal network with a number N of different interacting individuals, and a total duration of T elementary time steps. Temporal networks can be described in terms of a characteristic function χ(i, j, t) taking the value 1 when individuals i and j are connected at time t, and zero otherwise [START_REF] Starnini | Random walks on temporal networks[END_REF]. Integrating the information of the time-varying network over a given time window T produces an aggregated weighted network, where the weight w ij between nodes i and j represents the total temporal duration of the contacts between agents i and j, w ij = t χ(i, j, t), and the strength s i of a node i, s i = j w ij , represents the cumulated time spent in interactions by individual i. In Table 1 we summarize a number of significant statistical properties, such as the size N , the total duration T in units of elementary time steps ∆t 0 , and the average fraction of individuals interacting at each time step, p. We also report the average degree, k , defined as the average number of interactions per individual, and average strength, s = N -1 i s i , of the aggregated networks, integrated over the whole sequence. One can note that the data sets under consideration are highly heterogeneous in terms of the reported statistical properties. Aggregated network representations preserve such heteogeneity, even though it is important to remark that aggregated properties are sensitive to the time-aggreagating interval [START_REF] Ribeiro | Quantifying the effect of temporal resolution on time-varying networks[END_REF] and therefore to the specificity of data collection and preprocessing.

Comparison among the different datasets

In this section we perform a comparison of several statistical properties of the temporal networks, as defined above, representing the different datasets under consideration.

The temporal pattern of the agents' contacts is probably the most distinctive feature of proximity interaction networks. We therefore start by considering the distribution of the durations ∆t of the contacts between pairs of agents, P (∆t), and the distribution of gap times τ between two consecutive proximity events involving a given individual, P (τ ). The bursty dynamics of human inter- Fig. 2. Probability distribution of the gap times τ between consecutive contacts of pairs of agents, P (τ ), for the different datasets under consideration, compared with numerical simulations of the attractiveness model. A power law form, P (τ ) ∼ τ -γτ , with γτ = 2.1, is plotted as a reference in dashed line.

actions [START_REF] Barabasi | The origin of bursts and heavy tails in human dynamics[END_REF] is revealed by the long-tailed form of these two distributions, which can be described in terms of a power-law function. Figures 1 and2 show the distribution of the contacts duration P (∆t) and gap times P (τ ) for the various sets of empirical data. In both cases, all dataset shows a broad-tailed behavior, that can be loosely described by a power law distribution. In Figures 1 and2 we plot, as a guide for the eye, power-law forms P (∆t) ∼ ∆t -γ ∆t , with exponent γ ∆t ∼ 2.5, and P (τ ) ∼ τ -γτ , with exponent γ τ ∼ 2.1, respectively.

The probability distributions of strength, P (s), and weight, P (w), are a signature of the topological structure of the corresponding aggregated, weighted networks. Since the duration T of the datasets under consideration is quite heterogeneous, see Table 1, we do not reconstruct the aggregated networks by integrating over the whole duration T , but we integrate each temporal network over a time window of fixed length, ∆T = 1000 elementary time steps. That is, we consider a random starting time T 0 (provided that T 0 < T -∆T ), and reconstruct an aggregated network by integrating the temporal network from T 0 to T 0 + ∆T . We average our results by sampling 100 different starting times. Note that, since the elementary time step ∆t 0 is different across different experiments, the real duration of the time window considered is different across different datasets.

Figs. 3 and4 show the weight and strength distributions, P (w) and P (s), of the aggregated networks over ∆T , for the considered datasets. Again, all datasets display a similar heavy tailed weight distribution, roughly compatible with a power-law form, meaning that the heterogeneity shown in the broad-tailed form of the contact duration distribution, P (∆t), persists also over longer time scales. Data sets SB-BT, SE and FF present deviations with respect to the other data sets. The strength distribution P (s) is also broad tailed and quite similar for all data sets considered, but in this case it is not compatible with a power law.

Finally, Fig. 5 shows the average strength as a function of the degree, s(k), in the aggregated networks integrated over an interval ∆T . One can see that if the strength is rescaled by the total strength of the network in the considered time window, s = N -1 T0+∆T t=T0 ij χ(i, j, t), the different data sets show a similar correlation between strength and degree. In particular, Fig. 5 shows that all data sets considered present a slightly superlinear correlation between strength and degree, s(k) ∼ k γ with γ > 1, as highlighted by the linear correlation plotted as a dashed line.

Modeling human contact networks

In the previous Section, we have shown that the temporal networks representing different datasets, highly heterogeneous in terms of size, duration, proximitysensing techniques, and social contexts, are characterized by very similar statistical properties. Here we show that a simple model, in which individuals are endowed with different social attractiveness, is able to reproduce the empirical distributions.

Model definition

The social contexts in which the data were collected can be modeled by a set of N mobile agents free to move in a closed environment, who interact when they are close enough (within the exchange range of the devices) [START_REF] Starnini | Modeling human dynamics of face-to-face interaction networks[END_REF]. The simplifying assumption of the model proposed in [START_REF] Starnini | Modeling human dynamics of face-to-face interaction networks[END_REF] is that the agents perform a random walk in a box of linear size L with periodic boundary conditions (the average density is ρ = N/L 2 ). Whenever two agents are within distance d (with d << L), they start to interact. The key ingredient of the model is that each agent is characterized by an "attractiveness", a i , a quenched random number, extracted from a distribution η(a), representing her power to raise interest in the others, which can be thought of as a proxy for social status or the role played in the considered social gathering. Attractiveness rules the interactions between agents in a natural way: Whenever an individual is involved in an interaction with other peers, she will continue to interact with them with a probability proportional to the attractiveness of her most interesting neighbor, or move away otherwise. Finally, the model incorporates the empirical evidence that not all agents are simultaneously present in system: Individuals can be either in an active state, where they can move and establish interactions, or in an inactive one representing absence from the premises. Thus, at each time step, every active individual becomes inactive with a constant probability r, while inactive individuals can go back to the active state with the complementary probabillty 1-r. See Refs. [START_REF] Starnini | Modeling human dynamics of face-to-face interaction networks[END_REF][START_REF] Starnini | Model reproduces individual, group and collective dynamics of human contact networks[END_REF] for a detailed description of the model.

Model validation

Here we contrast the results obtained by the numerical simulation of the model against empirical data sets. We average our results over 100 runs with parameters N = 100, L = 50, T = 5000. The results of numerical experiments are reported in Figs. 1 to 5, for the corresponding quantities considered, represented by a continuous, blue line.

In the case of the contact duration distribution, P (∆t), Fig. 1, numerical and experimental data show a remarkable match, with some deviations for the SB-BT and FF datasets. Numerical data also show a close behavior to the mentioned power-law distribution with exponent γ ∆t = 2.5. Also in the case of the gap times distribution, P (τ ), Fig. 2, the distribution obtained by numerical simulations of the model is very close to the experimental ones, spanning the same orders of magnitude. The weight distribution P (w) of the model presents a very good fit to the empirical data, see Fig. 3, with the exception of data sets SB-BT, SE and FF, as mentioned above. The strength distribution P (s), Fig. 4, is, as we have commented above, quite noisy, especially for the datasets of smallest size. It follows however a similar trend across the different datasets that is well matched by numerical simulations of the model. Finally, in the case of the average strength of individuals of degree k, s(k), Fig. 5, the most striking feature, namely the superlinear behavior as a function of k, is correctly captured by the numerical simulations of the model.

Discussion

All datasets under consideration show similar statistical properties of the individuals' contacts. The distribution of the contact durations, P (∆t), and the inter-event time distribution, P (τ ), are heavy tailed and compatible with power law forms, and the attractiveness model is able to quantitavely reproduce such behavior. The weight distribution of the aggregated networks, P (w), is also heavy tailed for all datasets and for the attractiveness model, even though some datasets show deviations. The strength distribution P (s) and the correlation between strength and degree, s(k), present a quite noisy behavior, especially for smaller datasets. However, all datasets show a long tailed form of P (s) and a superlinear correlation of the s(k), correctly reproduced by the attractiveness model.

Previous work [START_REF] Cattuto | Dynamics of person-to-person interactions from distributed RFID sensor networks[END_REF][START_REF] Isella | What's in a crowd? Analysis of face-to-face behavioral networks[END_REF][START_REF] Fournet | Contact patterns among high school students[END_REF] have shown that the functional shapes of contact and inter-contact durations' distributions were very robust across contexts, for data collected by the SocioPatterns infrastructure as well as by similar RFID sensors. Our results show that this robustness extends in fact to proximity data collected through different types of sensors (e.g., Bluetooth, Infrared, WREN, RFID). This is of particular relevance in the context of modeling human behavior and building data-driven models depending on human interaction data, such as models for the spread of infectious diseases, from two points of view. On the one hand, the robust broadness of these distributions implies that different contacts might play very different roles in a transmission process: Under the common assumption that the transmission probability between two individuals depends on their time in contact, the longer contacts, which are orders of magnitude longer than average, could play a crucial role in disease dynamics. The heterogeneity of contact patterns is also relevant at the individual level, as revealed by broad distributions of strengths and the superlinear behavior of s(k), and is known to have a strong impact on spreading dynamics. In particular, it highlights the existence of "super-contactors", i.e. individuals who account for an important proportion of the overall contact durations and may therefore become super-spreaders in the case of an outbreak On the other hand, the robustness of the distributions found in different contexts represents an important information and asset for modelers: It means that these distributions can be assumed to depend negligibly on the specifics of the situation being modeled and thus directly plugged into the models to create for instance synthetic populations of interacting agents. From another modeling point of view, they also represent a validation benchmark for microscopic models of interactions, which should correctly reproduce such robust features. In fact, as we have shown, a simple model based on mobile agents, and on the concept of social appealing or attractiveness, is able to reproduce most of the main statistical properties of human contact temporal networks. The good fit of this model hints towards the fact that the temporal patterns of human contacts at different time scales can be explained in terms of simple physical processes, without assuming any cognitive processes at work.

It would be of interest to measure and compare several other properties of the contact networks, such as the evolution of the integrated degree distribution P T (k) and of the aggregated average degree in k(T ), or the rate at which the contact neighborhoods of individuals change. Unfortunately, these quantities are difficult to measure in some cases due to the small sizes of the datasets.

Fig.

  Fig. Probability distribution of the duration ∆t of the contacts between pairs of agents, P (∆t), for the different datasets under consideration, compared with numerical simulations of the attractiveness model. A power law form, P (∆t) ∼ ∆t -γ ∆t , with γ∆t = 2.5, is plotted as a reference in dashed line.

Fig. 3 .

 3 Fig. 3. Weight distribution P (w), for the different datasets under consideration, compared with numerical simulations of the attractiveness model.

Fig. 4 .

 4 Fig. 4. Strength distribution P (s), for the different datasets under consideration, compared with numerical simulations of the attractiveness model.

Fig. 5 .

 5 Fig. 5. Strength as a function of the degree, s(k), for the different datasets under consideration, compared with numerical simulations of the attractiveness model. A linear correlation s(k) ∼ k is plotted in dashed line, to highlight the superlinear correlation observed in data and model.

Acknowledgments

M.S. acknowledges financial support from the James S. McDonnell Foundation. R.P.-S. acknowledges financial support from the Spanish MINECO, under projects FIS2013-47282-C2-2 and FIS2016-76830-C2-1-P, and additional financial support from ICREA Academia, funded by the Generalitat de Catalunya. C.C. acknowledges support from the Lagrange Laboratory of the ISI Foundation funded by the CRT Foundation.


Antoine Moinet

Romualdo Pastor-Satorras

Alain Barrat

Effect of

come

I. INTRODUCTION

The propagation patterns of an infectious disease depend on many factors, including the number and properties of the different stages of the disease, the transmission and recovery mechanisms and rates, and the hosts' behavior (e.g., their contacts and mobility) [START_REF] Keeling | Modeling Infectious Diseases in Humans and Animals[END_REF][START_REF] Anderson | Infectious diseases of humans: dynamics and control[END_REF]. Given the inherent complexity of a microscopic description taking into account all details, simple models are typically used as basic mathematical frameworks aiming at capturing the main characteristics of the epidemic spreading process and in particular at understanding if and how strategies such as quarantine or immunization can help contain it. Such models have been developed with increasing levels of sophistication and detail in the description of both the disease evolution and the behaviour of the host population [START_REF] Keeling | Modeling Infectious Diseases in Humans and Animals[END_REF][START_REF] Anderson | Infectious diseases of humans: dynamics and control[END_REF].

The most widely used assumption concerning the disease evolution within each host consists in discretizing the possible health status of individuals [START_REF] Keeling | Modeling Infectious Diseases in Humans and Animals[END_REF][START_REF] Anderson | Infectious diseases of humans: dynamics and control[END_REF]. For instance, in the Susceptible-Infectious-Susceptible (SIS) model, each individual is considered either healthy and susceptible (S) or infectious (I). Susceptible individuals can become infectious through contact with an infectious individual, and recover spontaneously afterwards, becoming susceptible again. In the Susceptible-Infectious-Recovered (SIR) case, recovered individuals are considered as immunized and cannot become infectious again. The rate of infection during a contact is assumed to be the same for all individuals, as well as the rate of recovery.

Obviously, the diffusion of the disease in the host population depends crucially on the patterns of contacts between hosts. The simplest homogeneous mixing assump-tion, which makes many analytical results achievable, considers that individuals are identical and that each has a uniform probability of being in contact with any other individual [START_REF] Keeling | Modeling Infectious Diseases in Humans and Animals[END_REF][START_REF] Anderson | Infectious diseases of humans: dynamics and control[END_REF]. Even within this crude approximation, it is possible to highlight fundamental aspects of epidemic spreading, such as the epidemic threshold, signaling a non-equilibrium phase transition that separates an epidemic-free phase from a phase in which a finite fraction of the population is affected [START_REF] Keeling | Modeling Infectious Diseases in Humans and Animals[END_REF]. However, this approach neglects any non-trivial structure of the contacts effectively occurring within a population, while advances in network science [START_REF] Newman | Networks: An Introduction[END_REF] have shown that a large number of networks of interest have in common important features such as a strong heterogeneity in the number of connections, a large number of triads, a community structure, and a low average shortest path length between two individuals [START_REF] Newman | Networks: An Introduction[END_REF][START_REF] Caldarelli | Scale-Free Networks: Complex Webs in Nature and Technology[END_REF]. Spreading models have thus been adapted to complex networks, and studies have unveiled the important role of each of these properties [START_REF] Pastor-Satorras | [END_REF][START_REF] Barrat | Dynamical processes on complex networks[END_REF][START_REF] Pastor-Satorras | [END_REF]. More recently, a number of studies have also considered spreading processes on time-varying networks [8][9][10][11][12][13], to take into account the fact that contact networks evolve on various timescales and present non-trivial temporal properties such as broad distribution of contact durations [14,15] and burstiness [8,16] (i.e., the timeline of social interactions of a given individual exhibits periods of time with intense activity separated by long quiescent periods with no interactions).

All these modeling approaches consider that the propagation of the disease takes place on a substrate (the contacts between individuals) that does not depend on the disease itself. In this framework, standard containment measures consist in the immunization of individuals, in order to effectively remove them from the popu-lation and thus break propagation paths. Immunization can also (in models) be performed in a targeted way, trying to identify the most important (class of) spreaders and to suppress propagation in the most efficient possible way [17,18]. An important point to consider however is that the structure and properties of contacts themselves can in fact be affected by the presence of the disease in the population, as individuals aware of the disease can modify their behaviour in spontaneous reaction in order to adopt self-protecting measures such as vaccination or mask-wearing. A number of studies have considered this issue along several directions (see Ref. [19] for a review). For instance, some works consider an adaptive evolution of the network [20] with probabilistic redirection of links between susceptible and infectious individuals, to mimic the fact that a susceptible individual might be aware of the infectious state of some of his/her neighbors, and therefore try to avoid contact with them.

Other works introduce behavioral classes in the population, depending on the awareness to the disease [21], possibly consider that the awareness of the disease propagates on a different (static) network than the disease itself, and that being aware of the disease implies a certain level of immunity to it [22,23]. Finally, the fact that an individual takes self-protecting measures that decrease his/her probability to be infected (such as wearing a mask or washing hands more frequently) can depend on the fraction of infectious individuals present in the whole population or among the neighbors of an individual. These measures are then modeled by the fact that the probability of a susceptible catching the disease from an infectious neighbor depends on such fractions [24][25][26][27]. Yet these studies mostly consider contacts occurring on a static underlying contact network (see however [25,26] for the case of a temporal network in which awareness has the very strong effect of reducing the activity of individuals and their number of contacts, either because they are infectious or because of a global knowledge of the overall incidence of the disease).

Here, we consider instead the following scenario: First, individuals are connected by a time-varying network of contacts, which is more realistic than a static one; second, we use the scenario of a relatively mild disease, which does not disrupt the patterns of contacts but which leads susceptible individuals who witness the disease in other individuals to take precautionary measures. We do not assume any knowledge of the overall incidence, which is usually very difficult to know in a real epidemic, especially in real time. We consider SIS and SIR models and both empirical and synthetic temporal networks of contacts. We extend the concept of awareness with respect to the state of neighbors from static to temporal networks and perform extensive numerical simulations to uncover the change in the phase diagram (epidemic threshold and fraction of individuals affected by the disease) as the parameters describing the reaction of the individuals are varied.

II. TEMPORAL NETWORKS

We will consider as substrate for epidemic propagation both synthetic and empirical temporal networks of interactions. We describe them succinctly in the following Subsections.

A. Synthetic networks

Activity-driven network model

The activity driven (AD) temporal network model proposed in Ref. [28] considers a population of N individuals (agents), each agent i characterized by an activity potential a i , defined as the probability that he/she engages in a social act/connection with other agents per unit time. The activity of the agents is a (quenched) random variable, extracted from the activity potential distribution F (a), which can take a priori any form. The temporal network is built as follows: at each time step t, we start with N disconnected individuals. Each individual i becomes active with probability a i . Each active agent generates m links (starts m social interactions) that are connected to m other agents selected uniformly at random (among all agents, not only active ones) 1 . The resulting set of N individuals and links defines the instantaneous network G t . At the next time step, all links are deleted and the procedure is iterated. For simplicity, we will here consider m = 1.

In Ref. [28] it was shown that several empirical networks display broad distributions of node activities, with functional shapes close to power-laws for F (a), with exponents between 2 and 3. The aggregation of the activity-driven temporal network over a time-window of length T yields moreover a static network with a longtailed degree distribution of the form P T (k) ∼ F (k/T ) [28,29]. Indeed, the individuals with the highest activity potential tend to form a lot more connections than the others and behave as hubs, which are known to play a crucial role in spreading processes [START_REF] Pastor-Satorras | [END_REF].

Activity-driven network model with memory

A major shortcoming of the activity-driven model lies in the total absence of correlations between the connections built in successive time steps. It is therefore unable to reproduce a number of features observed in empirical data. An extension of the model tackles this issue by introducing a memory effect into the mechanism of link creation [30]. In the resulting activity-driven model with memory (ADM), each individual keeps track of the set of other individuals with whom there has been an interaction in the past. At each time step t we start as in the AD model with N disconnected individuals, and each individual i becomes active with probability a i . For each link created by an active individual i, the link goes with probability p = q i (t)/[q i (t) + 1] to one of the q i (t) individuals previously encountered by i, and with probability 1 -p towards a never encountered one. In this way, contacts with already encountered other individuals have a larger probability to be repeated and are reinforced. As a result, for a power-law distributed activity F (a), the degree distribution of the temporal network aggregated on a time window T becomes narrow, while the distribution of weights (defined as the number of interactions between two individuals) becomes broad [30].

B. Empirical social networks

In addition to the simple models described above, which do not exhibit all the complexity of empirical data, we also consider two datasets gathered by the SocioPatterns collaboration [START_REF]Sociopatterns collaboration[END_REF], which describe close face-to-face contacts between individuals with a temporal resolution of 20 seconds in specific contexts (for further details, see Ref. [14]). We consider first a dataset describing the contacts between students of nine classes of a high school (Lycée Thiers, Marseilles, France), collected during 5 days in Dec. 2012 ("Thiers" dataset) [START_REF]Sociopatterns dataset: High school dynamic contact networks[END_REF][START_REF] Fournet | [END_REF]. We also use another dataset consisting in the temporal network of contacts between the participants of a conference (2009 Annual French Conference on Nosocomial Infections, Nice, France) during one day ("SFHH" dataset) [10]. The SFHH (conference) data correspond to a rather homogeneous contact network, while the Thiers (high school) population is structured in classes of similar sizes and presents contact patterns that are constrained by strict and repetitive school schedules. In Table I We consider the paradigmatic Susceptible-Infectious-Susceptible (SIS) and Susceptible-Infectious-Recovered (SIR) models to describe the spread of a disease in a fixed population of N individuals. In the SIS model, each individual belongs to one of the following compartments: healthy and susceptible (S) or diseased and infectious (I). A susceptible individual in contact with an infectious becomes infectious at a given constant rate, while each infectious recovers from infection at another constant rate. In the SIR case, infectious individuals enter the recovered (R) compartment and cannot become infectious anymore. We consider a discrete time modeling approach, in which the contacts between individuals are given by a temporal network encoded in a time-dependent adjacency matrix A ij (t) taking value 1 if individuals i and j are in contact at time t, and 0 otherwise. At each time step, the probability that a susceptible individual i becomes infectious is thus given by

p i = 1-j [1-λ A ij (t) σ j ],
where λ is the infection probability, and σ j is the state of node j (σ j = 1 if node j is infectious and 0 otherwise). We define µ as the probability that an infectious individual recovers during a time step. The competition between the transmission and recovery mechanisms determines the epidemic threshold. Indeed, if λ is not large enough to compensate the recovery process (λ/µ smaller than a critical value), the epidemic outbreak will not affect a finite portion of the population, dying out rapidly. On the other hand, if λ/µ is large enough, the spread can lead in the SIS model to a non-equilibrium stationary state in which a finite fraction of the population is in the infectious state. For the SIR model, on the other hand, the epidemic threshold is determined by the fact that the fraction r ∞ = R ∞ /N of individuals in the recovered state at the end of the spread becomes finite for λ/µ larger than the threshold.

In order to numerically determine the epidemic threshold of the SIS model, we adapt the method proposed in Refs. [34,35], which consists in measuring the lifetime and the coverage of realizations of spreading events, where the coverage is defined as the fraction of distinct nodes ever infected during the realization. Below the epidemic threshold, realizations have a finite lifetime and the coverage goes to 0 in the thermodynamic limit. Above threshold, the system in the thermodynamic limit has a finite probability to reach an endemic stationary state, with infinite lifetime and coverage going to 1, while realizations that do not reach the stationary state have a finite lifetime. The threshold is therefore found as the value of λ/µ where the average lifetime of non-endemic realizations diverges. For finite systems, one can operationally define an arbitrary maximum coverage C > 0 (for instance C = 0.5) above which a realization is considered endemic, and look for the peak in the average lifetime of non-endemic realizations as a function of λ/µ.

In the SIR model the lifetime of any realization is finite. We thus evaluate the threshold as the location of the peak of the relative variance of the fraction r ∞ of recovered individuals at the end of the process [36], i.e.,

σ r = r 2 ∞ -r ∞ 2 r ∞ . (1)

B. Modeling risk perception

To model risk perception, we consider the approach proposed in Ref. [24] for static interaction networks. In this framework, each individual i is assumed to be aware of the fraction of his/her neighbors who are infectious at each time step. This awareness leads the individual to take precautionary measures that decrease its probability to become infectious upon contact. This decrease is modeled by a reduction of the transmission probability by an exponential factor: at each time step, the probability of a susceptible node i in contact with an infectious to become infectious depends on the neighborhood of i and is given by λ i (t) = λ 0 exp(-Jn i (t)/k i ) where k i is the number of neighbors of i, n i (t) the number of these neighbors that are in the infectious state at time t, and J is a parameter tuning the degree of awareness or amount of precautionary measures taken by individuals.

Static networks of interactions are however only a first approximation and real networks of contacts between individuals evolve on multiple timescales [15]. We therefore consider in the present work, more realistically, that the set of neighbors of each individual i changes over time. We need thus to extend the previous concept of neighborhood awareness to take into account the history of the contacts of each individual and his/her previous encounters with infectious individuals. We consider that longer contacts with infectious individuals should have a stronger influence on a susceptible individual's awareness, and that the overall effect on any individual depends on the ratio of the time spent in contact with infectious to the total time spent in contact with other individuals. Indeed, two individuals spending a given amount of time in contact with infectious individuals may react differently depending on whether these contacts represent a large fraction of their total number of contacts or not. We moreover argue that the awareness is influenced only by recent contacts, as having encountered ill individuals in a distant past is less susceptible to lead to a change of behaviour. To model this point in a simple way, we consider that each individual has a finite memory of length ∆T and that only contacts taking place in the time window [t -∆T, t[, in which the present time t is excluded, are relevant.

We thus propose the following risk awareness change of behaviour: The probability for a susceptible individual i, in contact at time t with an infectious one, to become infectious, is given by

λ i (t) = λ 0 exp (-α n I (i) ∆T ) (2)
where n I (i) ∆T is the number of contacts with infectious individuals seen by the susceptible during the interval [t-∆T, t[, divided by the total number of contacts counted by the individual during the same time window (repeated contacts between the same individuals are also counted). α is a parameter gauging the strength of the awareness, and the case α = 0 corresponds to the pure SIS process, in which λ i (t) = λ 0 for all individuals and at all times.

IV. EPIDEMIC SPREADING ON SYNTHETIC NETWORKS

A. SIS dynamics

Analytical approach

On a synthetic temporal network, an infectious individual can propagate the disease only when he/she is in contact with a susceptible. As a result, the spreading results from an interplay between the recovery time scale 1/µ, the propagation probability λ conditioned on the existence of a contact and the multiple time scales of the network as emerging from the distribution of nodes' activity F (a). Analogously to what is done for heterogeneous static networks [START_REF] Barrat | Dynamical processes on complex networks[END_REF][START_REF] Pastor-Satorras | [END_REF], it is possible to describe the spread at a mean-field level by grouping nodes in activity classes: all nodes with the same activity a are in this approximation considered equivalent [28]. The resulting equation for the evolution of the number of infectious nodes in the class of nodes with activity a in the original AD model has been derived in Ref. [28] and reads

I t+1 a = I t a -µ I t a + λ a S t a I t a N da + λ S t a I t a a N da .
(3) where I a and S a are the number of infectious and susceptible nodes with activity a, verifying N a = S a + I a .

From this equation one can show, by means of a linear stability analysis, that there is an endemic non-zero steady state if and only if ( a + a 2 )λ/µ > 1 [28]. Noticing that a + a 2 may be regarded as the highest statistically significant activity rate, the interpretation of this equation becomes clear: the epidemic can propagate to the whole network when the smallest time scale of relevance for the infection process is smaller than the time scale of recovery.

Let us now consider the introduction of risk awareness in the SIS dynamics on AD networks. In general, we can write for a susceptible with activity a n I (a

) ∆T = ∆T i=1 a I t-i a N da + I t-i a a N da (a + a ) ∆T , (4)
where the denominator accounts for the average number of contacts of an individual with activity a in ∆T time steps. In the steady state, where the quantities I a become independent of t, the dependence on ∆T in Eq. ( 4) vanishes, since both the average time in contact with infectious individuals and the average total time in contact are proportional to the time window width. Introducing this expression into Eq. ( 2), we obtain

λ a = λ 0 exp   -α a I a N da + I a a N da a + a    , (5)
which can be inserted into Eq. ( 3). Setting µ = 1 without loss of generality, we obtain the steady state solution

ρ a = λ a (aρ + θ) 1 + λ a (aρ + θ) , (6)
where ρ a = I a /N a and we have defined

ρ = a F (a)ρ a , (7)
θ = a a F (a)ρ a . (8)
Introducing Eqs. ( 5) and ( 6) into Eqs. ( 7) and (8), and expanding at second order in ρ and θ, we obtain after some computations the epidemic threshold

λ c = 1 a + a 2 . (9)
Moreover, setting λ 0 = λ c (1 + ) and expanding at order 1 in we obtain

ρ = 2 Aα + B , (10)
where

A = λ c a 3 a 2 + 3a a 2 + a 2 + 3a 2 a + a (11)
B = λ 2 c a 3 a 2 + 3 a a 2 + 4 a 2 .
This indicates that, at the mean-field level, the epidemic threshold is not affected by the awareness. Nevertheless, the density of infectious individuals in the vicinity of the threshold is reduced as the awareness strength α grows.

In the case of activity driven networks with memory (ADM), no analytical approach is available for the SIS dynamics, even in the absence of awareness. The numerical investigation carried out in Ref. [37] has shown that the memory mechanism, which leads to the repetition of some contacts, reinforcing some links and yielding a broad distribution of weights, has a strong effect in the SIS model. Indeed, the repeating links help the reinfection of nodes that have already spread the disease and make the system more vulnerable to epidemics. As a result, the epidemic threshold is reduced with respect to the memory-less (AD) case. For the SIS dynamics with awareness on ADM networks, we will now resort to numerical simulations.

Numerical simulations

In order to inspect in details the effect of risk awareness on the SIS epidemic process, we perform extensive numerical simulations. Following Refs. [28,37], we consider a distribution of nodes' activities of the form F (a) ∝ a -γ for a ∈ [ , 1], where is a lower activity cut-off introduced to avoid divergences at small activity values. In all simulations we set = 10 -3 and γ = 2. We consider networks up to a size N = 10 5 and a SIS process starting with a fraction I 0 /N = 0.01 of infectious nodes chosen at random in the population. In order to take into account the connectivity of the instantaneous networks, we use as a control parameter the quantity β/µ, where β = 2 a λ 0 is the per capita rate of infection [28]. Notice that the average degree of an instantaneous network is k t = 2 a [29]. With this definition, the critical endemic phase corresponds to

β µ ≥ 2 a a + a 2 . ( 12
)
In Fig. 1 we first explore the effect of the strength of risk awareness, as measured by the parameter α, in the case ∆T = ∞, i.e., when each agent is influenced by the whole history of his/her past contacts, a situation in which awareness effects should be maximal. We plot the steady state average fraction of infectious nodes ρ = a ρ a F (a) as a function of β/µ for three different values of α, and evaluate the position of the effective epidemic threshold, as measured by the peak of the average lifetime of non-endemic realizations, see Sec. III A. Figures 1c) andd) indicate that the effect of awareness in the model (α > 0), with respect to the pure SIS model (α = 0) is to reduce the fraction ρ of infectious individuals for all values of β/µ, and Fig- ures 1a) and b) seem to indicate in addition a shift of the effective epidemic threshold to larger values. This effect is more pronounced for the ADM than for the AD networks. As this shift of the epidemic threshold is in contradiction, at least for the AD case, with the mean-field analysis of the previous paragraphs, we investigate this issue in more details in Fig. 2, where we show, both for the pure SIS model (α = 0) and for a positive value of α, the average lifetime of non-endemic realizations for various system sizes. Strong finite-size effects are observed, especially for the model with awareness (α > 0). Fitting the values of the effective threshold (the position of the lifetime peak) with a law of the form (β/µ) N = (β/µ) ∞ + A N -ν , typical of finite-size scaling analysis [START_REF] Cardy | Finite Size Scaling[END_REF], leads to a threshold in the thermodynamic limit of (β/µ) ∞ = 0.37 [START_REF] Newman | Networks: An Introduction[END_REF] for the pure SIS model on AD networks, (β/µ) ∞ = 0.34(2) for AD with α = 10 (SIS model with awareness), (β/µ) ∞ = 0.29(3) for ADM with α = 0 (pure SIS model) and (β/µ) ∞ = 0.29(2) for ADM with α = 10. We notice here that the extrapolations for α = 0 are less accurate and thus with larger associated errors. Nevertheless, with the evidence at hand, we can conclude that, within error bars, the risk perception has no effect on the epidemic threshold in the thermodynamic limit, in agreement with the result from Eq. ( 12), that gives a theoretical threshold (β/µ) c = 0.366 for the AD case. It is however noteworthy that the effective epidemic threshold measured in finite systems can be quite strongly affected by the awareness mechanism, even for quite large systems, and in a particularly dramatic way for ADM networks.

We finally explore in Fig. 3 the effect of a varying memory length ∆T , at fixed risk awareness strength α. In both AD and ADM networks, an increasing awareness temporal window shifts the effective epidemic threshold towards larger values, up to a maximum given by ∆T = ∞, when the whole system history is available. For the ADM networks, this effect is less clear because of the changing height of the maximum of the lifespan when increasing ∆T . For AD networks, this result is apparently at odds with the mean-field analysis in which ∆T is irrelevant in the stationary state. We should notice, however, that for ∆T → ∞, the critical point is unchanged in the thermodynamic limit with respect to the pure SIS dynamics. Given that for ∆T → ∞ the effects of awareness are the strongest, we expect that a finite ∆T will not be able to change the threshold in the infinite network limit. We can thus attribute the shifts observed to pure finite size effects. Note that this effect is also seen in homogeneous AD networks with uniform activity a (data not shown), observation that we can explain as follows: when ∆T is small, the ratio of contacts with infectious n I (i) ∆T recorded by an individual i can differ significantly from the overall ratio recorded in the whole network in the same time window, which is equal to n I (i) ∆T = ρ (for a uniform activity). Mathematically, we have

λ i = λ 0 exp(-α n I (i) ∆T ) ≥ λ 0 exp(-α ρ) (13)
by concavity of the exponential function. Thus, even if locally and temporarily some individuals perceive an overestimated prevalence of the epidemics and reduce their probability of being infected accordingly, on average the reduction in the transmission rate would be larger if the ensemble average were used instead of the temporal one, and thus the epidemics is better contained in the former case. As ∆T increases, the temporal average n I (i) ∆T becomes closer to the ensemble one ρ and the effect of awareness increases. When ∆T is large enough compared to the time scale of variation of the network 1/a, the local time recording becomes equivalent to an ensemble average, and we recover the mean-field situation.

B. SIR dynamics

Analytical approach

Following an approach similar to the case of the SIS model, the SIR model has been studied at the heterogeneous mean field level in AD networks, in terms of a set of equations for the state of nodes with activity a, which takes the form [39]

I t+1 a = I t a -µ I t a + λ a (N a -I t a -R t a ) I t a N da + λ (N a -I t a -R t a ) I t a a N da , (14)
where N a is the total number of nodes with activity a, and I a and R a are the number of nodes with activity a in the infectious and recovered states, respectively. Again, a linear stability analysis shows the presence of a threshold, which takes the same form as in the SIS case:

β µ ≥ 2 a a + a 2 . ( 15
)
The same expression can be obtained by a different approach, based on the mapping of the SIR processes to bond percolation [40].

Since the SIR model lacks a steady state, we cannot apply in the general case the approach followed in the previous section. The effects of risk perception can be however treated theoretically for a homogeneous network (uniform activity) in the limit ∆T → ∞, which is defined by the effective infection probability

λ(t) = λ 0 exp - α t t 0 ρ(τ ) dτ . ( 16
)
Even this case is hard to tackle analytically, so that we consider instead a modified model defined by the infection probability

λ(t) = λ 0 exp -α t 0 ρ(τ ) dτ . (17)
In this definition the fraction of infectious seen by an individual is no longer averaged over the memory length but rather accumulated over the memory timespan, so that we expect stronger effects of the risk perception with respect to Eq. ( 15), if any. The fraction of susceptibles s = S/N and the fraction of recovered r = R/N in the system obey the equations

ds dt = -λ 0 ρ(t) s(t) e -αr(t)/µ ( 18
)
dr dt = µρ(t) (19)
where in the first equation we have used the second equation to replace t 0 ρ(τ ) dτ in λ(t) by (r(t) -r(0))/µ (with the initial conditions r(0) = 0).

Setting µ = 1 without loss of generality, the final average fraction of recovered individuals after the end of an outbreak is given by

r ∞ = 1 -s(0) exp - λ 0 α (1 -e -αr∞ ) . (20)
Close to the threshold, i.e., for r ∞ ∼ 0, performing an expansion up to second order and imposing the initial condition ρ(0) = 1 -s(0) = 0, we obtain the asymptotic solution

r ∞ 2 λ 0 (α + λ 0 ) (λ 0 -1), (21)
which leads to the critical infection rate λ 0 = 1. This means that, as for the SIS case, the risk perception does not affect the epidemic threshold at the mean field level, at least for a homogeneous network. The only effect of awareness is a depression of the order parameter r ∞ with α, as observed also in the SIS case. The same conclusion is expected to hold for the original model of awareness, with an infection rate of the form Eq. ( 16) as in this case the dynamics is affected to a lower extent. In analogy, for the general case of an heterogeneous AD network, with rate infection given by Eq. ( 2), we expect the effects of awareness on the epidemic threshold to be negligible at the mean-field level. On ADM networks, the numerical analysis of the SIR model carried out in Ref. [37] has revealed a picture opposite to the SIS case. In an SIR process indeed, reinfection is not possible; as a result, repeating contacts are not useful for the diffusion of the infection. The spread is thus favoured by the more random patterns occurring in the memory-less (AD) case, which allows infectious nodes to contact a broader range of different individuals and find new susceptible ones. The epidemic threshold for SIR processes is hence higher in the ADM case than in the AD one [37].

Numerical simulations

To study the effects of risk perception on the dynamics of a SIR spreading process in temporal networks we resort again to numerical simulations. In Fig. 4 we compare the effects of the risk perception mechanism given by Eq. ( 2) for AD and ADM networks. The spread starts with a fraction ρ 0 = I 0 /N = 0.01 of infectious nodes chosen at random in the population and the activity distribution is the same as in the SIS case. In the present simulations the memory span ∆T is infinite and we compare the results obtained for two different values of the awareness strenght α. We see that the effective epidemic threshold is increased for the ADM network, whereas it seems unchanged for the AD network and around a value of β/µ = 0.35, an agreement with the theoretical prediction quoted in the previous section.

The SIR phase transition is rigorously defined for a vanishing initial density of infectious, i.e., in the limit ρ(0) → 0 and s(0) → 1, as can be seen at the mean-field level in the derivation of Eq. ( 21). In Fig. 5 we explore the effects of the initial density ρ 0 = I 0 /N of infectious individuals on the effect of awareness on AD networks. For large values of ρ 0 = I 0 /N , the awareness (α > 0) can significantly decrease the final epidemic size, as already observed in Fig. 4. This effect can be understood by the fact that, for large ρ 0 , more individuals are aware already from the start of the spread and have therefore lower probabilities to be infected. At very small initial densities, on the other hand, r ∞ becomes independent of α. This is at odds with the result in Eq. ( 21), which however was obtained within an approximation that in- creases the effects of awareness. The milder form considered in Eq. ( 2) leads instead to an approximately unaltered threshold, and to a prevalence independent of α.

For ADM networks, Fig. 6 shows the variance of the order parameter for two different values of α. As in the SIS case, we see that an apparent shift of the effective epidemic threshold is obtained, but very strong finite size effects are present even at large size, especially for α > 0. The difference between the effective thresholds at α > 0 and α = 0 decreases as the system size increases, but remains quite large, making it difficult to reach a clear conclusion on the infinite size limit.

V. EPIDEMIC SPREADING ON EMPIRICAL SOCIAL NETWORKS

As neither AD nor ADM networks display all the complex multi-scale features of real contact networks, we now turn to numerical simulations of spreading processes with and without awareness on empirical temporal contact networks, using the datasets described in Sec. II B.

A. SIS dynamics

As we saw in Sec. IV A, the susceptibility defined to evaluate the epidemic threshold of the SIS process is subject to strong finite size effects. Since the empirical networks used in the present section are quite small, we choose to focus only on the main observable of physical interest, i.e., the average prevalence ρ in the steady state of the epidemics.

As we are interested in the influence of the structural properties of the network, we choose to skip the nights in the datasets describing the contacts between individuals, as obviously no social activity was recorded then, to avoid undesired extinction of the epidemic during those periods. In order to run simulations of the SIS spreading, we construct from the data arbitrarily long lasting periodic networks, with the period being the recording duration (once the nights have been removed). For both networks we define the average instantaneous degree k = 1 T data i k t where the sum runs over all the time steps of the data, and k t is the average degree of the snapshot network at time t. We then define β/µ = λ k /µ as the parameter of the epidemic. For each run, a random starting time step is chosen, and a single agent in the same time step, if there is any, is defined as the seed of the infection (otherwise a new starting time is chosen).

In Fig. 7, we compare the curves of the prevalence ρ of the epidemics in the stationary state on both empirical networks, and for increasing values of the memory length ∆T . We can see that an important reduction of the prevalence is occurring even for ∆T = 1. This is due to the presence of many contacts of duration longer than ∆T (contrarily to the AD case): the awareness mechanism decreases the probability of contagion of all these contacts (and in particular of the contacts with very long duration, which have an important role in the propagation) as soon as ∆T > 1, leading to a strong effect even in this case. At large values of the control parameter β/µ, the effect of the awareness is stronger for increasing values of the memory length ∆T , as was observed in Sec. IV A. At small values of β/µ on the contrary, the awareness is optimum for a finite value of ∆T , and the knowledge of the whole contact history is not the best way to contain the epidemics. While a detailed investigation of this effect lies beyond the scope of our work, preliminary work (not shown) seem to indicate that it is linked to the use of the periodicity introduced in the data through the repetition of the dataset.

B. SIR

In this section we study the impact of the awareness on the SIR spreading process running on the empirical networks. In particular, we study the effect of self protection on the fraction of recovered individuals r ∞ in the final state, and on the effective threshold evaluated as the peak of the relative variance of r ∞ defined in Eq. ( 1). In Fig. 8 and9 we plot σ r and r ∞ for different mem- ory length ∆T , for the SFHH conference and the Thiers highschool data respectively. We first notice that a notable effect appears already for ∆T = 1, similarly to the SIS process. However, we see that r ∞ is monotonously reduced as ∆T grows and that the effective threshold is shifted to higher values of β/µ, also monotonously. It is worth noticing that the timescale of the SIR process is much smaller than the one studied in the SIS process because the final state is an absorbing state free of infectious agents. The lifetime of the epidemic in this case is of the order of magnitude of the data duration, so that the periodicity introduced by the repetition of the dataset is not relevant anymore. Overall, we observe for both networks an important reduction of outbreak size when people adopt a self protecting behaviour, as well as a significant shift of the effective epidemic threshold.

VI. CONCLUSION

The implementation of immunization strategies to contain the propagation of epidemic outbreaks in social networks is a task of paramount importance. In this work, we have considered the effects of taking protective measures to avoid infection in the context of social temporal networks, a more faithful representation of the patterns of social contacts than often considered static structures. In this context, we have implemented a model including awareness to the propagating disease in a temporal network, extending previous approaches defined for static frameworks. In our model, susceptible individuals have a local perception of the overall disease prevalence measured as the ratio of the number of previous contacts with infectious individuals on a training window of width ∆T . An increased level of awareness induces a reduction in the probability that a susceptible individual contracts the disease via a contact with an infectious individual.

To explore the effects of disease awareness we have considered the paradigmatic SIS and SIR spreading models on both synthetic temporal networks, based in the activity driven (AD) model paradigm, and empirical faceto-face contact networks collected by the SocioPatterns collaboration. In the case of network models, we consider the original AD model, and a variation, the AD model with memory (ADM), in which a memory kernel mimics some of the non-Markovian effects observed in real social networks.

In the case of synthetic networks, analytical and numerical results hint that in AD networks without memory, the epidemic threshold on both SIS and SIR models is not changed by the presence of awareness, while the epidemic prevalence is diminished for increasing values of the parameter α gauging the strength of awareness. In the case of the ADM model (temporal network with memory effects) on the other hand, awareness seems to be able to shift the threshold to an increased value, but very strong finite size effects are present: our results are compatible with an absence of change of the epidemic threshold in the infinite size limit, while, as for the AD case, the epidemic prevalence is decreased.

In the case of empirical contact networks, we observe in all cases a strong reduction of the prevalence for different values of α and ∆T , and an apparent shift of the effective epidemic threshold. These empirical networks differ from the network models from two crucial points of view. On the one hand, they have a relatively small size. Given that important finite size effects are observed in the models, especially in the one with memory effects, one might also expect stronger effective shifts in such populations of limited size. On the other hand, AD and ADM networks lack numerous realistic features observed in real social systems. On AD and ADM networks, contacts are established with random nodes (even in the ADM case) so that the perception of the density of infectious by any node is quite homogeneous, at least in the hypothesis of a sufficiently large number of contacts recorded (i.e., at large enough times, for a∆T 1). This is not the case for the empirical networks, which exhibits complex patterns such as community structures, as well as broad distributions of contact and inter-contact durations, specific time-scales (e.g., lunch breaks), correlated activity patterns, etc. [41]. This rich topological and temporal structure can lead to strong heterogeneities in the local perception of the disease. In this respect, it would be interesting to investigate the effect of awareness in more realistic temporal network models.

Notably, the awareness mechanism, even if only local and not assuming any global knowledge of the unfolding of the epidemics, leads to a strong decrease of the prevalence and to shifts in the effective epidemic threshold even at quite large size, in systems as diverse as simple models and empirical data. Moreover, some features of empirical contact networks, such as the broad distribution of contact durations, seem to enhance this effect even for short-term memory awareness. Overall, our results indicate that it would be important to take into account awareness effects as much as possible in data-driven simulations of epidemic spread, to study the relative role of the complex properties of contact networks on these effects, and we hope this will stimulate more research into this crucial topic.

FIG. 1 .

 1 FIG. 1. Effect of the strength of risk awareness on the SIS spreading on AD and ADM networks with ∆T = ∞. (a): average lifetime of non-endemic runs for AD network, (b): average lifetime of non-endemic runs for ADM networks, (c): Steady state fraction of infectious for AD, (d): Steady state fraction of infectious for ADM. Vertical lines in subplots (a) and (b) indicate the position of the maximum of the average lifetime. Model parameters: µ = 0.015, γ = 2, = 10 -3 , ∆T = ∞ and network size N = 10 5 . Results are averaged over 1000 realizations.

FIG. 2 .

 2 FIG. 2. Analysis of finite-size effects. We plot the average lifetime of non-endemic realizations of the SIS process, for different system sizes and 2 different values of α. (a): ADM networks and α = 0. (b): ADM networks with α = 10. (c): AD networks. Vertical lines indicate the position of the maximum of the average lifetime. Model parameters: µ = 0.015, γ = 2, = 10 -3 and ∆T = ∞. Results are averaged over 1000 realizations.

FIG. 3 .

 3 FIG. 3. Effect of the local risk perception with increasing memory span ∆T for the SIS spreading on AD and ADM network. (top): AD network. (bottom): ADM network. Vertical lines indicate the position of the maximum of the average lifetime. Model parameters: α = 10, µ = 0.015, γ = 2, = 10 -3 and network size N = 10 4 . Results are averaged over 1000 realizations.

FIG. 4 .

 4 FIG.[START_REF] Caldarelli | Scale-Free Networks: Complex Webs in Nature and Technology[END_REF]. Effect of the local risk perception on the SIR spreading on AD networks and ADM networks. We plot r∞ and σr/σ max r

FIG. 5 .FIG. 6 .

 56 FIG. 5. Effect of the initial density of infectious on the SIR model on AD networks for different values of the awareness strength α and the initial density of infectious individuals ρ0. Model parameters: ∆T = ∞, µ = 0.015, γ = 2, = 10 -3 and network size N = 10 5 . Results are averaged over 1000 realizations.

ρρFIG. 7 .

 7 FIG. 7. Steady state fraction of infectious for the SIS process on both empirical networks, for 2 values of α and different values of ∆T . Model parameters: µ = 0.001 for Thiers and µ = 0.005 for SFHH. Results are averaged over 1000 realizations.

FIG. 8 .

 8 FIG. 8. Effect of the risk perception for different values of ∆T on the SIR spreading on SFHH network. (top): normalized standard deviation σr/σ max r . (bottom): order parameter r∞. Model parameters: µ = 0.005. α = 200. Results are averaged over 10 4 realizations.

FIG. 9 .

 9 FIG. 9. Effect of the risk perception for different values of ∆T on the SIR spreading on the Thiers network. (top): normalized standard deviation σr/σ max r . (bottom): order parameter r∞. Model parameters: µ = 0.001. α = 200. Results are averaged over 10 4 realizations.

we pro- vide a brief summary of the main properties of these two datasets.

							III. MODELLING EPIDEMIC SPREAD IN
							TEMPORAL NETWORKS
							A. Epidemic models and epidemic threshold
	Dataset	N	T	p	∆t	k	s
	Thiers	180	14026	5.67	2.28	24.66	500.5
	SFHH	403	3801	26.14	2.69	47.47	348.7
	TABLE I. Some properties of the SocioPatterns datasets un-
	der consideration: N , number of different individuals engaged
	in interactions; T , total duration of the contact sequence, in
	units of the elementary time interval t0 = 20 seconds; p, aver-
	age number of individuals interacting at each time step; ∆t ,
	average duration of a contact; k and s : average degree and
	average strength of the nodes in the network aggregated over
	the whole time sequence.

Note that with such a definition, an agent may both receive and emit a link to the same other agent. However, we consider here an unweighted and undirected graph, thus in such a case, a single link is considered. Moreover, in the limit of large N , the probability of such an event goes to 0.

ACKNOWLEDGMENTS R.P.-S. acknowledgs financial support from the Spanish Government's MINECO, under projects FIS2013-47282-C2-2 and FIS2016-76830-C2-1-P, from ICREA Academia, funded by the Generalitat de Catalunya regional authorities.