Hyperbolic mapping of human proximity networks

Human proximity networks are temporal networks representing the close-range proximity among humans in a physical space. They have been extensively studied in the past 15 years as they are critical for understanding the spreading of diseases and information among humans. Here we address the problem of mapping human proximity networks into hyperbolic spaces. Each snapshot of these networks is often very sparse, consisting of a small number of interacting (i.e., non-zero degree) nodes. Yet, we show that the time-aggregated representation of such systems over sufficiently large periods can be meaningfully embedded into the hyperbolic space, using methods developed for traditional (non-mobile) complex networks. We justify this compatibility theoretically and validate it experimentally. We produce hyperbolic maps of six different real systems, and show that the maps can be used to identify communities, facilitate efficient greedy routing on the temporal network, and predict future links with significant precision. Further, we show that epidemic arrival times are positively correlated with the hyperbolic distance from the infection sources in the maps. Thus, hyperbolic embedding could also provide a new perspective for understanding and predicting the behavior of epidemic spreading in human proximity systems.


I. INTRODUCTION
Understanding the time-varying proximity patterns among humans in a physical space is crucial for better understanding the transmission of airborne diseases, the efficiency of information dissemination, social behavior, and influence [1][2][3][4][5][6][7][8].To this end, human proximity networks have been captured in different environments over days, weeks or months [5,[7][8][9][10][11][12][13].In each snapshot of these networks nodes are people and an edge between two nodes signifies that they are within proximity range.At the finest resolution, each snapshot spans 20 s and the proximity range is 1.5 m.Such networks have been captured in closed settings such as hospitals, schools, scientific conferences and workplaces, and correspond to face-to-face interactions [9][10][11][12][13].At a coarser resolution, each snapshot spans several minutes and proximity range can be up to 10 m or more.Such networks have been captured in university dormitories, residential communities and university campuses [7,8,14].
Irrespective of the context, measurement period and measurement method, different human proximity networks have been shown to exhibit similar structural and dynamical properties [1,15].Examples of such properties include the broad distributions of contact and intercontact durations [4][5][6]15], and the repeated formation of groups that consist of the same people [16,17].Interestingly, these and other properties of human proximity systems can be well reproduced by simple models of mobile interacting agents [17,18].Specifically, in the recently developed force-directed motion model [17] similarities among agents act as forces that direct the agents' motion toward other agents in the physical space and determine the duration of their interactions.The probability that two nodes are connected in a snapshot generated by the model resembles the connection probability in the popular S 1 model of traditional (nonmobile) complex networks, which is equivalent to random hyperbolic graphs [19][20][21].Based on this observation, the dynamic-S 1 model has been recently suggested as a minimal latent-space model for human proximity networks [19].The model forgoes the motion component and assumes that each network snapshot is a realization of the S 1 model.The dynamic-S 1 reproduces many of the observed characteristics of human proximity networks, while being mathematically tractable.Several of the model's properties have been proven in Ref. [19].
Our approach to map human proximity networks into hyperbolic spaces is founded on the dynamic-S 1 model.Specifically, given that the dynamic-S 1 can generate synthetic temporal networks that resemble human proximity networks across a wide range of structural and dynamical characteristics, can we reverse the synthesis and map (embed) human proximity networks into the hyperbolic space, in a way congruent with the model?Would the results of such mapping be meaningful?And could the obtained maps facilitate applications, such as community detection, routing on the temporal network, and prediction of future links?
Here we provide the affirmative answers to these questions.Our approach is based on embedding the time-aggregated network of human proximity systems over an adequately large observation period, using methods developed for traditional complex networks that are based on the S 1 model [22].In the time-aggregated network, two nodes are connected if they are connected in at least one network snapshot during the observation period.We justify this We consider the following face-to-face interaction networks from SocioPatterns [23].(i) A hospital ward in Lyon [9], which corresponds to interactions involving patients and healthcare workers during five observation days.(ii) A primary school in Lyon [10], which corresponds to interactions involving children and teachers of ten different classes during two days.(iii) A scientific conference in Turin [13], which corresponds to interactions among conference attendees during two and a half days.(iv) A high school in Marseilles [11], which corresponds to interactions among students of nine different classes during five days.And (v) an office building in Saint Maurice [24], which corresponds to interactions among employees of 12 different departments during ten days.Each snapshot of these networks corresponds to an observation interval (time slot) of 20 s, while proximity was recorded if participants were within 1.5 m in front of each other.
We also consider the Friends & Family Bluetooth-based proximity network [8].This network corresponds to the proximities among residents of a community adjacent to a major research university in the US during several observation months.We consider the data recorded in March 2011.Each snapshot corresponds to an observation interval of 5 min, while proximity was recorded if participants were within a radius of 10 m from each other.Thus proximity in this network does not imply face-to-face interaction.I. Overview of the considered real networks.N is the number of nodes, τ is the total number of time slots (snapshots), n is the average number of interacting (i.e., non-zero degree) nodes per snapshot, k is the average node degree per snapshot, k is the average degree in the time-aggregated network formed over the full observation duration τ , and parameter T is the network temperature used in the dynamic-S 1 model to generate synthetic counterparts of the real systems (see Appendix A).The table also shows the number of observation days for each network.

B. S 1 and dynamic-S 1 models
We first provide an overview of the S 1 and dynamic-S 1 models.In the next section we show that the connection probability in the time-aggregated network in the latter resembles the connection probability in the former.Based on this equivalence, we then map the time-aggregated networks of the considered real data to the hyperbolic space using a recently developed method that is based on the S 1 model.

S 1 model
The S 1 model [20,21] can generate synthetic network snapshots that possess many of the common structural properties of real networks, including heterogeneous or homogeneous degree distributions, strong clustering, and the small-world property.In the model, each node has latent (or hidden) variables κ, θ.The latent variable κ is proportional to the node's expected degree in the resulting network.The latent variable θ is the angular similarity coordinate of the node on a circle of radius R = N/2π, where N is the total number of nodes.To construct a network with the model that has size N , average node degree k, and temperature T ∈ (0, 1), we perform the following steps.First, for each node i = 1, 2, . . ., N , we sample its angular coordinate θ i uniformly at random from [0, 2π], and its degree variable κ i from a probability density function ρ(κ).Then, we connect every pair of nodes i, j with the Fermi-Dirac connection probability In the last expression, χ ij is the effective distance between nodes i and j, where ∆θ ij = π − |π − |θ i − θ j || is the similarity distance between nodes i and j.Parameter µ in ( 2) is derived from the condition that the expected degree in the network is indeed k, yielding where κ = κρ(κ)dκ.
The degree distribution P (k) in the resulting network has a similar functional form as ρ(κ).Thus, the model can generate networks with any degree distribution depending on ρ(κ).Smaller values of the temperature T favor connections at smaller effective distances and increase the average clustering in the network [20].The S 1 model is equivalent to random hyperbolic graphs, i.e., to the hyperbolic H 2 model [20], after transforming the degree variables κ i to radial coordinates r i via where κ 0 is the smallest κ i and R = 2 ln [N/(πµκ 2 0 )] is the radius of the hyperbolic disk where all nodes reside.After this change of variables, the effective distance in (2) becomes ) is approximately the hyperbolic distance between nodes i and j [20].Therefore, we can refer to the degree variables κ i as "coordinates" and use terms effective distance and hyperbolic distance interchangeably.

dynamic-S 1 model
The dynamic-S 1 model is based on the S 1 model and has been shown to reproduce many of the observed structural and dynamical properties of human proximity networks [19].The dynamic-S 1 models a sequence of network snapshots, G t , t = 1, . . ., τ .Each snapshot is a realization of the S 1 model.Therefore, there are N nodes that are assigned latent coordinates κ, θ as in the S 1 model, which remain fixed.The temperature T is also fixed, while each snapshot G t is allowed to have a different average degree kt , t = 1, . . ., τ .The snapshots are generated according to the following simple rules: (1) at each time step t = 1, . . ., τ , snapshot G t starts with N disconnected nodes, while k in (3) is set equal to kt ; (2) each pair of nodes i, j connects with probability given by (1); (3) at time t + 1, all the edges in snapshot G t are deleted and the process starts over again to generate snapshot G t+1 .
As shown in Ref. [19], temperature T plays a central role in network dynamics in the model, dictating the distributions of contact and intercontact durations, the time-aggregated node degrees, and the formation of unique and recurrent components.
C. Hyperbolic mapping of human proximity networks

Theoretical considerations
Assuming that a sequence of network snapshots G t , t = 1, . . ., τ , has been generated by the dynamic-S1 model, we show below that we can accurately infer the nodes' latent coordinates κ, θ from the time-aggregated network, using existing methods that are based on the S 1 model.This is justified by the fact that the connection probability in the time-aggregated network of the dynamic-S 1 resembles the connection probability in the S 1 .Indeed, in the time-aggregated network two nodes are connected if they are connected in at least one of the snapshots.Assuming for simplicity that each snapshot has the same average degree kt = k, the connection probability in the time-aggregated network of the dynamic-S 1 , is where p(χ ij ) is given by (1).Further, as shown in Ref. [19], the expected degree of a node in the time-aggregated network, κ, is related to the node's latent degree κ, via where α = τ T /Γ(1 + T ) for τ 1, and Γ is the gamma function.Eq. ( 6) is derived in the thermodynamic limit (N → ∞), where there are no cutoffs imposed to node degrees by the network size.We can therefore rewrite (5) as where is the effective distance between nodes i and j in the time-aggregated network, while μ = µ/α.The exponential approximation in (9) holds for sufficiently large τ .At large distances, χij Γ(1 + T ) 1 , we can use the approximation e −x ≈ 1 − x in (9), to write where p(x) is given by (1), while C = Γ(1 + T ) 1/T , 0.56 < C < 1.At small distances, χij Γ(1 + T ), the exponential in (9) is much smaller than one, and we can write P ( χij ) ≈ 1 ≈ p( χij ).In other words, at both small and large effective distances χij , the connection probability in the time-aggregated network resembles the Fermi-Dirac connection probability in the S 1 model.Fig. 1 illustrates this effect in the time-aggregated networks of synthetic counterparts of real systems, whose snapshots can also have different average degrees kt , t = 1, . . ., τ (Appendix A).
Given this equivalence, in Fig. 2 we apply Mercator, a recently developed embedding method based on the S 1 model [22], to the time-aggregated network of the synthetic counterparts of the hospital and primary school.Mercator infers the nodes' coordinates (κ, θ) from the time-aggregated network (see Appendix B), and from κ we estimate κ using (6).We also modified Mercator to use the connection probability in (7) instead of the connection probability in (1) (see Appendix H).Fig. 2 shows that the two versions of Mercator perform similarly, inferring the nodes' latent coordinates remarkably well.Similar results hold for the synthetic counterparts of the rest of the real systems (Appendix D).In the rest of the paper, we use the original version of Mercator as its implementation is simpler and does not require knowledge of parameter τ .

c
Friends & Family  For each node, κ inferred is estimated as κ inferred = κ/α, where κ is the node's inferred latent degree in the time-aggregated network, while α = τ T /Γ(1 + T ), with τ as in Table I and T as inferred by each version of Mercator.(c and f ) Connection probability as a function of the effective distance χ in the time-aggregated network computed using the inferred coordinates (κ, θ).The solid grey and dashed black lines correspond to (1) with temperature T as inferred by each version of Mercator.For the two networks, the original version estimates T = 0.57, the modified version estimates T = 0.78 and 0.77, while the actual values are T = 0.84 and 0.72.In general, the modified version estimates values of T closer to the actual values.However, both versions of Mercator perform remarkably well at estimating the nodes' latent coordinates (κ, θ).We note that due to rotational symmetry of the model, the inferred angles can be globally shifted compared to the real angles by any value in [0, 2π].

Aggregation interval
As the aggregation interval τ increases, the time-aggregated network becomes denser, eventually turning into a fully connected network.This can be seen in (5), where irrespective of network size, at τ → ∞, P (χ ij ) → 1, ∀i, j.Further, at τ → ∞, α → ∞, and by (10) χij → 0, ∀i, j.Clearly, no meaningful inference can be made in a fully connected network as all nodes "look the same".Thus for an accurate inference of the nodes' coordinates the interval τ has to be sufficiently small such that the corresponding time-aggregated network is not too dense.On the other hand, for intervals τ that are not sufficiently large there may not be enough data to allow accurate inference, as network snapshots are often very sparse in human proximity systems, consisting of only a fraction of nodes (Table I).This effect is illustrated in Fig. 3, where we quantify the difference between real and inferred coordinates as a function of τ in a synthetic counterpart of the primary school.We see in Fig. 3 that there is a wide range of adequately large τ values, e.g., 500 < τ < 10000, where the accuracy of inference for both κ and θ is simultaneously high, while as τ becomes too large or too small accuracy deteriorates.In this work, we embed the time-aggregated networks of the considered real systems formed over the full observation durations τ in Table I, as well as corresponding time-aggregated networks formed over individual observation days, obtaining in both cases meaningful results.

Hyperbolic maps of real systems
In Fig. 4 we apply Mercator to the time-aggregated network of the real networks in Table I and visualize the obtained hyperbolic maps and the corresponding connection probabilities.We see that the embeddings are meaningful, as we can identify in them actual node communities that correspond to groups of nodes located close to each other in the angular similarity space.These communities reflect the organization of students and teachers into classes (Figs.4b  and 4c), employees into departments (Fig. 4d), while no communities can be identified in the hospital (Fig. 4a).In all cases, we see a good match between empirical and theoretical connection probabilities (Figs.4e-h).Next, we turn our attention to greedy routing.

D. Human-to-human greedy routing
A problem of significant interest in mobile networking is how to efficiently route data in opportunistic networks, like human proximity systems, where the mobility of nodes creates contact opportunities among nodes that can be used to connect parts of the network that are otherwise disconnected [4][5][6]35].Motivated by this problem, and by the remarkable efficiency of hyperbolic greedy routing in traditional complex networks [25,32,34], we investigate here if hyperbolic greedy routing can facilitate navigation in human proximity systems.To this end, we consider the following simplest greedy routing process, which performs routing on the temporal network using the coordinates inferred from the time-aggregated network.
Human-to-human greedy routing (H2H-GR).In H2H-GR, a node's address is its coordinates (κ, θ), and each node knows its own address, the addresses of its neighbors (nodes currently within proximity range), and the destination address written in the packet.A node holding the packet (carrier) forwards the packet to its neighbor with the smallest effective distance to the destination, but only if that distance is smaller than the distance between the carrier and the destination.Otherwise, or if the carrier currently has no neighbors, the carrier keeps the packet.Clearly, there are no routing loops in H2H-GR, i.e., no node receives the same packet twice.For each network in Table I, we simulate this process in one of its observation days.We consider the following two cases: i) H2H-GR that uses the nodes' coordinates inferred from the time-aggregated network of the considered day (current coordinates); and ii) H2H-GR that uses the nodes' coordinates inferred from the time-aggregated network of the previous day (previous coordinates).In the time-aggregated network of a day, two nodes are connected if they are connected in at least one network snapshot in the day.We compare these two cases to a baseline random routing strategy (H2H-RR), where the carrier first determines the set of its neighbors that have never received the packet before, and then forwards the packet to one of these neighbors at random.The carrier keeps the packet if it currently has no neighbors, or if all of its neighbors have received the packet before.Thus, there are no routing loops in H2H-RR either.
Performance metrics.We evaluate the performance of the algorithms according to the following two metrics: i) the  I.The nodes are positioned according to their inferred hyperbolic coordinates (r, θ) in the time-aggregated network [the radial coordinates r are computed using (4)].The nodes are colored according to group membership information available in the metadata of each network.In the hospital, the nodes are administrative staff (Admin), medical doctors (Med), nurses and nurses' aides (Paramed), and patients (Patient).In the primary school, the nodes are teachers and students of the following classes: 1st grade (1A, 1B), 2nd grade (2A, 2B), 3rd grade (3A, 3B), 4th grade (4A, 4B), and 5th grade (5A, 5B).In the high school, the nodes are students of nine different classes with the following specializations: biology (2BIO1, 2BIO2, 2BIO3), mathematics and physics (MP, MP*1, MP*2), physics and chemistry (PC, PC*), and engineering studies (PSI*).In the office building, the nodes are employees working in different departments such as scientific direction (DISQ), chronic diseases and traumatisms (DMCT), department of health and environment (DSE), human resources (SRH), and logistics (SFLE).(e-h) Corresponding empirical connection probabilities as a function of the effective distance χ.The pink dashed lines correspond to (1) with temperatures T as inferred by Mercator, T = 0.99, 0.47, 0.40 and 0.64, respectively.The maps for the conference and Friends & Family can be found in Appendix E. Daily hyperbolic maps for each real system can be found in Appendix G.
percentage of successful paths, p s , which is the proportion of paths that reach their destinations by the end of the considered day; and ii) the average stretch over the successful paths, s.We define the stretch as the ratio of the hop-lengths of the paths found by the algorithms to the corresponding shortest time-respecting paths [36] in the network.
The results are shown in Table II.We see that H2H-GR that uses the current coordinates significantly outperforms H2H-RR in both success ratio and stretch.The improvement can be quite significant.For instance, in the primary school the success ratio increases from 34% to 82%, while the average stretch decreases from 24.9 to 3.9.Similarly, TABLE II.Success ratio ps and average stretch s of H2H-GR and H2H-RR in real networks.H2H-GR uses the coordinates inferred either from the time-aggregated network of the considered day where routing is performed (current coordinates); or from the time-aggregated network of the previous day (previous coordinates).The considered days in the hospital, primary school, conference, high school and office building are observation days 5, 2, 3, 5 and 10, respectively.In Friends & Family, the considered day is the 31 st of March 2011.For a fair comparison with H2H-GR that uses the previous coordinates, we ignore during all routing processes the nodes that exist in the considered day but not in the previous day, since for such nodes we cannot infer their coordinates from the previous day.The percentage of such nodes is 17%, 3%, 7%, 6%, 14% and 3% for the hospital, primary school, conference, high school, office building and Friends & Family, respectively.In all cases, routing is performed among all possible source-destination pairs in the considered day that also exist in the previous day.in the hospital the success ratio increases from 38% to 80%, while the average stretch decreases from 7 to 2.2.These results show that hyperbolic greedy routing can significantly improve navigation.However, the success ratio decreases considerably if H2H-GR uses the previous coordinates.This suggests that the node coordinates change to a considerable extend from one day to the next.In Appendix G, we verify that this is indeed the case.Nevertheless, H2H-GR that uses the previous coordinates still outperforms H2H-RR with respect to success ratio, while achieving significantly lower stretch similar to the stretch with the current coordinates (Table II).
Table III shows the same results for the synthetic counterparts of the real systems, where we can make qualitatively similar observations.Further, we see that H2H-GR achieves higher success ratios using the inferred coordinates in the counterparts compared to the real systems.This is not surprising as the counterparts are by construction maximally congruent with the assumed geometric model (dynamic-S 1 ).Also, H2H-GR that uses the previous coordinates maintains high success ratios in the counterparts.This is expected, as the coordinates in the counterparts do not change over time.Thus the coordinates inferred from the time-aggregated network of the previous day are quite similar (but not exactly the same) to the ones inferred from the time-aggregated network of the day where routing is performed (see Appendix G).
The metrics in Tables II and III are computed across all source-destination pairs.In Figs. 5 and 6 we also compute these metrics as a function of the effective distance between the source-destination pairs.We see that H2H-GR that uses the current coordinates achieves high success ratios, approaching 100%, as the effective distance between the pairs decreases.As the effective distance between the pairs increases, the success ratio decreases.The average stretch for successful H2H-GR paths is always low.
H2H-RR also achieves considerably high success ratios for pairs separated by small distances (Fig. 5).This is because, even though packets in H2H-RR are forwarded to neighbors at random, the neighbors are not random nodes but nodes closer to the carriers in the hyperbolic space.Thus, packets between pairs separated by smaller distances have higher chances of finding their destinations.However, the stretch of successful paths in H2H-RR is quite high (Fig. 6).Further, we see that in real networks the success ratio of H2H-GR that uses the previous coordinates resembles in most cases the one of H2H-RR (Figs. 5a-c and Figs.12a-c).However, the stretch in H2H-GR is always significantly lower than in H2H-RR (Figs. 6a-c and Figs.13a-c).
Taken altogether, these results show that hyperbolic greedy routing can facilitate efficient navigation in human The top row corresponds to the results of the hospital, primary school and conference in Table II, while the bottom row to the results of their synthetic counterparts in Table III.The success ratio for H2H-RR and H2H-GR that uses the previous coordinates is shown as a function of the effective distance between the pairs in the previous day.Similar results hold for the other real networks and their synthetic counterparts (Appendix F).

H2H-GR (current coords) H2H-GR (previous coords)
H2H-RR 10 -2 10 -1 10 0 10 1 10 2 10 3 proximity networks.The success ratio for pairs separated by large effective distances can be low (Fig. 5).However, it is possible that more sophisticated algorithms than the one considered here could improve the success ratio for such pairs without significantly sacrificing stretch [37].Further, using coordinates from past embeddings decreases the success ratio.Even though the average stretch remains low, this observation suggests that the evolution of the nodes' coordinates should also be taken into account.Such investigations are left for future work.Finally, we note that in Appendix F, we consider H2H-GR that uses only the angular similarity distances among the nodes, and find that it performs worse than H2H-GR that uses the effective distances.This means that in addition to node similarities, node expected degrees (or popularities [30]) also matter in H2H-GR, even though the distribution of node degrees in human proximity systems is quite homogeneous [19].

E. Link prediction
In this section, we turn our attention to link prediction.We want to see how well we can predict if two nodes are connected in the time-aggregated network of a day, if we know the effective distances among the nodes in the previous day.To this end, for each pair of nodes i, j in the previous day that is also present in the day of interest, we assign a score s ij = 1/ χij , where χij is the inferred effective distance between i and j in the time-aggregated network of the previous day.The higher the s ij , the higher is the likelihood that i and j are connected in the day of interest.We call this approach geometric.To quantify the quality of link prediction, we use two standard metrics: (i) the Area Under the Receiver Operating Characteristic curve (AUROC); and (ii) the Area Under the Precision-Recall curve (AUPR) [38].These metrics are described below.
The AUROC represents the probability that a randomly selected connected pair of nodes is given a higher score than a randomly selected disconnected pair of nodes in the day of interest.The degree to which the AUROC exceeds 0.5 indicates how much better the method performs than pure chance.As the name suggests, the AUROC is equal to the total area under the Receiver Operating Characteristic (ROC) curve.To compute the ROC curve, we order the pairs of nodes in the descending order of their scores, from the largest s ij to the smallest s ij , and consider each score to be a threshold.Then, for each threshold we calculate the fraction of connected pairs that are above the threshold (i.e., the True Positive Rate TPR) and the fraction of disconnected pairs that are above the threshold (i.e., the False Positive Rate FPR).Each point on the ROC curve gives the TPR and FPR for the corresponding threshold.When representing the TPR in front of the FPR, a totally random guess would result in a straight line along the diagonal y = x, while the degree by which the ROC curve lies above the diagonal indicates how much better the algorithm performs than pure chance.AUROC = 1 means a perfect classification (ordering) of the pairs, where the connected pairs are placed in the top of the ordered list.
The AUPR represents how accurately the method can classify pairs of nodes as connected and disconnected based on their scores.It is equal to the total area under the Precision-Recall (PR) curve.To compute the PR curve, we again order the pairs of nodes in the descending order of their scores, and consider each score to be a threshold.Then, for each threshold we calculate the TPR, which is called Recall, and the Precision, which is the fraction of pairs above the threshold that are connected.Each point on the PR curve gives the Precision and Recall for the corresponding threshold.A random guess corresponds to a straight line parallel to the Recall axis at the level where Precision equals the ratio of the number of connected pairs to the total number of pairs.The higher the AUPR the better the method is, while a perfect classifier yields AUPR = 1.
The results for the considered real networks and their synthetic counterparts are shown in Table IV.The corresponding ROC and PR curves are shown in Fig. 7.We see that geometric link prediction significantly outperforms chance in all cases.These results constitute another validation that the embeddings are meaningful, and illustrate that they have significant predictive power.As can be seen in Table IV and Fig. 7, link prediction is more accurate in the synthetic counterparts.This is again expected since the counterparts are by construction maximally congruent with the underlying geometric space, while the node coordinates in them do not change over time.
We also compute the same metrics as in Table IV but for a simple heuristic, where the score s ij between two nodes i and j is the number of common neighbors they have in the time-aggregated network of the previous day (CN approach).The results are shown in Table V.Interestingly, we see that the performance of the geometric and CN approaches is quite similar in real networks, suggesting that the latter is a good heuristic for link prediction in human proximity systems.The performance of the two approaches is also positively correlated in the synthetic counterparts (Tables IV and V).This is expected since the smaller the effective distance between two nodes the larger is the expected number of common neighbors the nodes have.However, as can be seen in Tables IV and V, in the counterparts the geometric approach performs better than the CN approach.This suggests that the performance of the former could be further improved in real systems, if more accurate predictions of the node coordinates in the period of interest could be made.IV.The dashed black lines correspond to link prediction based on chance; these lines in (g-l) correspond to the AUPR chance values in Table IV

III. CONCLUSION
Individual snapshots of human proximity networks are often very sparse, consisting of a small number of interacting nodes.Nevertheless, we have shown that meaningful hyperbolic embeddings of such systems are still possible.Our approach is based on embedding the time-aggregated network of such systems over an adequately large observation period, using mapping methods developed for traditional complex networks.We have justified this approach by showing that the connection probability in the time-aggregated network is compatible with the Fermi-Dirac connection probability in random hyperbolic graphs, on which existing embedding methods are based.From an applications' perspective, we have shown that the hyperbolic maps of real proximity systems can be used to identify communities, facilitate efficient greedy routing on the temporal network, and predict future links.
Our results indicate that the node coordinates change over time in the hyperbolic spaces of human proximity networks.An interesting yet challenging future work direction is to identify the stochastic differential equations that dictate this motion of nodes.Such equations would allow us to make predictions about the future positions of nodes in their hyperbolic spaces over different timescales.This, in turn, could allow us to improve the performance of tasks such as greedy routing and link prediction.Another problem is to extend existing hyperbolic embedding methods so that they can refine the nodes' coordinates on a snapshot-by-snapshot basis as new snapshots become available, without having to recompute each time a new embedding from scratch.Overall, our work opens the door for a geometric description of human proximity systems.and 16.The nodes are positioned according to their inferred hyperbolic coordinates (r, θ) in the time-aggregated network of the corresponding day.For an easier inspection of how node coordinates change between days, the map of each day is rotated such that it minimizes the sum of the squared distances between the inferred angles in the day and the angles inferred by considering the full duration of the corresponding network (Fig. 4 in the main text and Fig. 11).The nodes are colored according to group membership information available in the metadata of each network as described in Fig. 4 of the main text and in Fig. 11.

Appendix H: Modified Mercator
In the modified version of Mercator we replace the connection probability of the S 1 model [Eq.(1) in the main text] with the connection probability in the time-aggregated network of the dynamic-S 1 model [Eq.(7) in the main text].This modification requires replacing all relations in the original Mercator implementation, which are derived using the original connection probability, with the corresponding relations derived using the new connection probability.Below we list all modifications made in each step of the original Mercator implementation (Ref.[22]).For convenience, we express all new relations in terms of the nodes' latent degrees per snapshot κ.We recall that κ = κ/α, where κ denotes the node's latent degree in the time-aggregated network, while α = τ T /Γ(1 + T ).The modified Mercator takes also as input the value of the duration τ in which the time-aggregated network is computed, while like the original version it infers the value of the temperature parameter T along with the nodes' coordinates (κ, θ).
In the first step, Mercator uses an iterative procedure that adjusts the nodes' latent degrees so that the expected degree of each node as prescribed by the S 1 model matches the node's observed degree in the given network.We adapt this step by replacing the relation for the probability that two nodes with latent degrees κ and κ are connected [Eq.(A1) in Ref. [22]], with

(H1)
The above relation is derived in Ref. [19]. a κκ is an indicator function, a κκ = 1 if two nodes with latent degrees κ and κ are connected in the time-aggregated network, and a κκ = 0 otherwise, µ = sin(T π)/(2κT π), and 2 F 1 (a, b; c; z) is the Gauss hypergeometric function.
In the second step, Mercator uses an iterative procedure that adjusts the temperature T so that the value of the average clustering coefficient as prescribed by the S 1 model matches the value of the average clustering coefficient in the given network.We adapt this step by replacing the relation for the distribution of the angular distance ∆θ between two connected nodes with latent degrees κ and κ [Eq.(A3) in Ref. [22]], with In the above relation, p(a κκ = 1|∆θ) is the probability that two nodes with latent degrees κ and κ and angular distance ∆θ are connected in the time-aggregated network, ρ(∆θ) = 1/π is the uniform distribution of the angular distances in the model, and p(a κκ = 1) is given by (H1).
In the third step, Mercator adapts Laplacian Eigenmaps (LE) to the S 1 model in order to determine initial angular coordinates for the nodes.We adapt this step by replacing the relation for the expected angular distance between two nodes with latent degrees κ i and κ j conditioned on the fact that they are connected [Eq.(A8) in Ref. [22]], with .In this step, we also replace the probability in the S 1 model of having the observed connection (or disconnection) among each pair of consecutive nodes i and i + 1 on the similarity circle, conditioned on their angular separation gap g i and their latent degrees κ i and κ j [Eq.(A13) in Ref.where a i,i+1 = 1 if the two nodes are connected in the time-aggregated network, and a i,i+1 = 0 otherwise.
In the fourth step, Mercator refines the initial angular coordinates by (approximately) maximizing the likelihood that the given network is produced by the S 1 model.We adapt this step by replacing the local log-likelihood for each node i [Eq.(A20) in Ref. [22]], with where a ij = 1 if nodes i and j are connected in the time-aggregated network, and a ij = 0 otherwise.In the final (optional) step, Mercator re-adjusts the latent degrees of the nodes according to the inferred angular coordinates so that the expected degree of each node indeed matches its observed degree in the given network.We adapt this step by replacing the connection probability of the S 1 model in Eq. (A21) in Ref. [22], with the connection probability in the time-aggregated network of the dynamic-S 1 model [Eq.(7) in the main text].

FIG. 2 .
FIG.2.Inference of latent coordinates (κ, θ) with the original and modified versions of Mercator.The top row corresponds to a synthetic counterpart of the hospital, while the bottom row to a synthetic counterpart of the primary school.Both versions of Mercator are applied to the corresponding time-aggregated network formed over the full duration τ in TableI.(a and d) Inferred versus real θ.(b and e) Inferred versus real κ.For each node, κ inferred is estimated as κ inferred = κ/α, where κ is the node's inferred latent degree in the time-aggregated network, while α = τ T /Γ(1 + T ), with τ as in TableIand T as inferred by each version of Mercator.(c and f ) Connection probability as a function of the effective distance χ in the time-aggregated network computed using the inferred coordinates (κ, θ).The solid grey and dashed black lines correspond to (1) with temperature T as inferred by each version of Mercator.For the two networks, the original version estimates T = 0.57, the modified version estimates T = 0.78 and 0.77, while the actual values are T = 0.84 and 0.72.In general, the modified version estimates values of T closer to the actual values.However, both versions of Mercator perform remarkably well at estimating the nodes' latent coordinates (κ, θ).We note that due to rotational symmetry of the model, the inferred angles can be globally shifted compared to the real angles by any value in [0, 2π].

FIG. 3 .
FIG. 3. Inference accuracy vs. aggregation interval.The results correspond to a synthetic counterpart of the primary school constructed using the dynamic-S 1 model.(a) Average difference between the inferred and real latent degrees as a function of the aggregation interval τ , Dκ(τ ) = N i=1 |κ i inferred − κ i real |/N , where κ i inferred (κ i real ) is the inferred (real) latent degree of node i.(b) Same as in (a) but for the average difference between the inferred and real angular coordinates, D θ (τ ) = N i=1 |θ i inferred − θ i real |/N .Before computing D θ (τ ), the inferred angles are globally shifted such that the sum of the squared distances between real and inferred angles is minimized.(c) Density of the time-aggregated network as a function of τ , d(τ ) = 2L/[N (N − 1)], where L is the number of links in the network.The vertical dashed lines indicate the interval 500 ≤ τ ≤ 10000.In this interval, Dκ(τ ) < 0.2, D θ (τ ) < 0.2, and 0.06 < d(τ ) < 0.33.

FIG. 4 .
FIG.4.Hyperbolic embeddings of human proximity networks.(a-d) Hyperbolic maps of the time-aggregated networks of the hospital, primary school, high school and office building.In each case we consider the time-aggregated network formed over the full observation duration τ shown in TableI.The nodes are positioned according to their inferred hyperbolic coordinates (r, θ) in the time-aggregated network [the radial coordinates r are computed using(4)].The nodes are colored according to group membership information available in the metadata of each network.In the hospital, the nodes are administrative staff (Admin), medical doctors (Med), nurses and nurses' aides (Paramed), and patients (Patient).In the primary school, the nodes are teachers and students of the following classes: 1st grade (1A, 1B), 2nd grade (2A, 2B), 3rd grade (3A, 3B), 4th grade (4A, 4B), and 5th grade (5A, 5B).In the high school, the nodes are students of nine different classes with the following specializations: biology (2BIO1, 2BIO2, 2BIO3), mathematics and physics (MP, MP*1, MP*2), physics and chemistry (PC, PC*), and engineering studies (PSI*).In the office building, the nodes are employees working in different departments such as scientific direction (DISQ), chronic diseases and traumatisms (DMCT), department of health and environment (DSE), human resources (SRH), and logistics (SFLE).(e-h) Corresponding empirical connection probabilities as a function of the effective distance χ.The pink dashed lines correspond to (1) with temperatures T as inferred by Mercator, T = 0.99, 0.47, 0.40 and 0.64, respectively.The maps for the conference and Friends & Family can be found in Appendix E. Daily hyperbolic maps for each real system can be found in Appendix G.

FIG. 5 .
FIG.5.Success ratio ps of H2H-GR and H2H-RR as a function of the effective distance χ between source-destination pairs.The top row corresponds to the results of the hospital, primary school and conference in TableII, while the bottom row to the results of their synthetic counterparts in TableIII.The success ratio for H2H-RR and H2H-GR that uses the previous coordinates is shown as a function of the effective distance between the pairs in the previous day.Similar results hold for the other real networks and their synthetic counterparts (Appendix F).

FIG. 6 .
FIG.6.Same as in Fig.5but for the average stretch s.Similar results hold for the other real networks and their synthetic counterparts (Appendix F).

l
FIG.7.ROC and PR curves for geometric link prediction in real networks and their synthetic counterparts.(a-f ) show the ROC curves, while (g-l) the PR curves, corresponding to the results in TableIV.The dashed black lines correspond to link prediction based on chance; these lines in (g-l) correspond to the AUPR chance values in TableIV.

FIG. 10 .FIG. 13 .
FIG.10.Inference of latent coordinates (κ, θ) with the original and modified versions of Mercator.Same as in Fig.2in the main text but for the synthetic counterparts of the high school, conference, office building and Friends & Family.For the four networks, the original version estimates T = 0.52, 0.72, 0.64 and 0.4, the modified version estimates T = 0.61, 0.86, 0.75 and 0.48, while the actual values are T = 0.61, 0.85, 0.74 and 0.48, respectively.

FIG. 14 .FIG. 15 .FIG. 16 .FIG. 17 .
FIG. 14. Inferred node coordinates (κ, θ) from the time-aggregated network of different observation days.The results correspond to real networks, and the considered days are as in Table II in the main text.(a) Inferred angles in day 4 versus inferred angles in day 5 in the hospital.The numbers of time slots for days 4 and 5 are τ = 3889 and 2177, respectively, while Mercator's inferred temperature for the time-aggregated network is T = 0.99 for both days.(b) Inferred angles in day 1 versus inferred angles in day 2 in the primary school.For days 1, 2, τ = 1555, 1545 and = 0.43, 0.36.(c) Inferred angles in day 2 versus inferred angles in day 3 in the conference.For days 2, 3, τ = 3216, 1946 and T = 0.99, 0.98.(d-f ) Same as in (a-c) but for the inferred latent degrees κ.For each node, κ is estimated as κ = κ/α, where κ is the node's inferred latent degree in the time-aggregated network of the corresponding day, while α = τ T /Γ(1 + T ).Due to rotational symmetry of the model, the inferred angles in a day can be globally shifted compared to the inferred angles in another day by any value in [0, 2π].
The values of parameters T and τ in each case are as shown in TableI, while α = τ T /Γ(1 + T ).Similar results hold for the counterparts of the rest of the real systems (see Appendix C).

TABLE III .
Same as in TableIIbut for the synthetic counterparts of the real systems constructed with the dynamic-S 1 model.The results in each case correspond to one temporal network realization, while H2H-GR uses inferred coordinates as in TableII.

TABLE IV .
AUROC and AUPR for geometric link prediction in real networks and their synthetic counterparts.The day of interest is day 3 in the hospital and day 2 in the rest of the networks.Geometric link prediction uses the effective distances among the nodes inferred from the time-aggregated network of the previous day."AUPR chance" corresponds to link prediction based on pure chance in the real networks.It equals the ratio of the number of connected pairs to the total number of pairs in the time-aggregated network of the day of interest.AUPR chance values for the synthetic counterparts are similar as in the real networks and not shown for brevity.

TABLE V .
. Same as in TableIVbut for the CN approach.

TABLE VI .
Success ratio ps and average stretch s of H2H-GR that uses only the angular (similarity) distances in real networks.Same as in TableIIin the main text but when using only the inferred angular coordinates (current and previous) in H2H-GR.

TABLE VII .
Same as inTable VI but for the synthetic counterparts of the real systems.
14ily hyperbolic maps of the considered real systems.The maps correspond to the days considered in Figs.14 FIG. 18.