Social fluidity mobilizes contagion in human and animal populations
Abstract
Humans and other groupliving animals tend to distribute their social effort disproportionately. Individuals predominantly interact with a small number of close companions while maintaining weaker social bonds with less familiar group members. By incorporating this behavior into a mathematical model, we find that a single parameter, which we refer to as social fluidity, controls the rate of social mixing within the group. Large values of social fluidity correspond to gregarious behavior, whereas small values signify the existence of persistent bonds between individuals. We compare the social fluidity of 13 species by applying the model to empirical human and animal social interaction data. To investigate how social behavior influences the likelihood of an epidemic outbreak, we derive an analytical expression of the relationship between social fluidity and the basic reproductive number of an infectious disease. For species that form more stable social bonds, the model describes frequencydependent transmission that is sensitive to changes in social fluidity. As social fluidity increases, animaldisease systems become increasingly densitydependent. Finally, we demonstrate that social fluidity is a stronger predictor of disease outcomes than both group size and connectivity, and it provides an integrated framework for both densitydependent and frequencydependent transmission.
Introduction
Social behavior is fundamental to the survival of many species. It allows the formation of social groups providing fitness advantages from greater access to resources and better protection from predators (Krause and Ruxton, 2002). Structure within these groups can be found in the way individuals communicate across space, cooperate in sexual or parental behavior, or clash in territorial or mating conflicts (Hinde, 1976). While animal societies are usually studied independently of each other, studying how they differ in these regards has potential to reveal new insights into the nature of social living (Sah et al., 2018; Dunbar and Shultz, 2010).
When social interaction requires shared physical space it can also be a conduit for the transmission of infectious disease (Altizer et al., 2003). In a typical infectious disease model, if the disease spreads through the environment then the transmission rate is assumed to scale proportionally to the local population density (de Jong et al., 1995; Hopkins et al., 2020). Alternatively, if transmission requires close proximity encounters that only occur between bonded individuals then we expect social connectivity to determine the outcome. These two paradigms are known in the literature as densitydependence and frequencydependence (Silk et al., 2017).
The problem, however, is that real diseases are not so easy to categorize (Patterson and Ruckstuhl, 2013). For example, as social groups grow in size, new bonds must be created to maintain cohesiveness (Lehmann et al., 2007). To manage the time and cognitive effort required to create these bonds, individuals tend to interact mostly with a small number of close companions while maintaining cohesion with the wider group through less frequent contact (Silk, 2007; Sueur et al., 2011; Dakin and Ryder, 2020). For an infectious disease, this creates fewer transmission opportunities than we would expect to see in a group with highly fluid social dynamics. The extent to which group size amplifies the transmission rate therefore depends on how individuals choose to distribute their social effort between strong and weak ties (Karsai et al., 2014).
While transmission rate has been observed to scale nonlinearly with group size for a number of disease systems (Cross et al., 2013; Smith et al., 2009; Silk et al., 2017), it remains unclear how much this dependency is related to the internal social structure of the group; few studies observe social dynamics at sufficient detail while simultaneously monitoring the disease status of each individual. In the absence of direct observations, our contribution to this discussion centers around modeling; incorporating empirical social data with computational simulations. We address two specific questions. Firstly, can we quantify the variability in how individuals choose to distribute their social effort within a group, and secondly, what will this tell us about the effect that population density has on disease transmission?
In the first part of this paper, we introduce a mathematical model founded on the concept of social fluidity which we define as variability in the amount of social effort the individual invests in each member of their social group. Using openly available data, we estimate the social fluidity of 57 human and animal social systems. In the second part, we derive an expression for the basic reproductive number of an infectious disease in the social fluidity model and demonstrate its accuracy in predicting simulated outcomes. Furthermore, social fluidity emerges as a coherent mathematical framework providing the smooth connection between densitydependent and frequencydependent disease systems.
Characterizing social behavior
Our first objective is to measure social behavior in a range of human and animal populations. We start by introducing a model that captures a hidden element of social dynamics: how individual group members distribute their social effort. We mathematically describe the relationships between social variables that are routinely found in studies of animal behavior, the number of social ties and the number of interactions observed, and apply the model to empirical data to reveal behavioral differences between several species.
Social behavior model
Consider a closed system of $N$ individuals and a set of interactions between pairs of individuals that were recorded during some observation period. These observations can be represented as a network: each individual, $i$, is a node; an edge exists between two nodes $i$ and $j$ if at least one interaction was observed between them; the edge weight, ${w}_{i,j}$, denotes the number of times this interaction was observed. The total number of interactions of $i$ is denoted strength, ${s}_{i}={\sum}_{j}{w}_{i,j}$, and the number of nodes with whom $i$ is observed interacting is its degree, k_{i }(Barrat et al., 2004).
We define ${x}_{ji}$ to be the probability that an interaction involving $i$ will also involve node $j$. Therefore, the probability that at least one of these interactions is with $j$ is $1{(1{x}_{ji})}^{{s}_{i}}$. The main assumption of the model is that the values of ${x}_{ji}$ over all $i,j$ pairs are distributed according to a probability distribution, $\rho (x)$. Thus, if a node interacts $s$ times, the marginal probability that an edge exists between that node and any other given node in the network is
Technically, $\rho (x)$ is the distribution of marginal $x}_{ij$ values of the joint probability distribution $\rho (x)$ where $\mathrm{X}$ is a matrix whose $\mathrm{i}\mathrm{,}\mathrm{j}$ entry is 1 if $i=j$ and ${x}_{ji}$ otherwise. While the values of ${x}_{ji}$ are subject to network interdependencies, specifically $\mathrm{A}\mathsf{}\mathrm{X}\mathrm{=}{\mathrm{X}}^{\mathrm{T}}\mathsf{}\mathrm{A}$ and $\mathbf{1}=\mathbf{0}$, where $\mathrm{A}$ is any diagonal matrix with positive entries, and $\mathbf{1}$ and $\mathbf{0}$ are column vectors of length $\mathrm{N}$ containing only 0 and 1, we do not take these constraints into account when estimating $\rho$.
Our goal is to find a form of ρ that accurately reproduces network structure observed in real social systems. Motivated by our exploration of empirical interaction patterns from a variety of species, we propose that ρ has a powerlaw form:
where $\varphi $ controls the variability in the values of $x$, and $\u03f5$ simply truncates the distribution to avoid divergence. The form of $\rho (x)$ was chosen for its analytical tractability but other heavytailed distributions produce a similar result (Figure 1—figure supplement 1 ). Combining (1) and (2) we find
where the notation ${}_{2}F_{1}$ refers to the Gauss hypergeometric function (Abramowitz and Stegun, 1975). It follows from ${\sum}_{j}{x}_{ji}=1$ that
which can be solved numerically to find $\u03f5$ for given values of $N$ and $\varphi $. The expectation of the degree is $\kappa (s,\varphi ,N)=(N1)\mathrm{\Psi}(s,\varphi ,\u03f5)$.
Figure 1 illustrates how the value of $\varphi $ can produce different types of social behavior. As $\varphi $ is the main determinant of social behavior in our model, we use the term social fluidity to refer to this quantity. Low social fluidity ($\varphi \ll 1$) produces what we might describe as ‘allegiant’ behavior: interactions with the same partner are frequently repeated at the expense of interactions with unfamiliar individuals. As $\varphi $ increases, the model produces more ‘gregarious’ behavior: interactions are repeated less frequently and the number of partners grows faster. While names like ‘social strategy’ and ‘loyalty’ have been applied to similar concepts (Valdano et al., 2015; Miritello et al., 2013), fluidity, as a property of matter, is a useful metaphor for communicating the main idea behind this model.
Estimating social fluidity in empirical networks
To understand the results of the model in the context of real systems, we estimate $\varphi $ in 57 networks from 20 studies of human and animal social behavior (further details in the supplement) (Isella et al., 2011; Stehlé et al., 2011a; Mastrandrea et al., 2015; Vanhems et al., 2013; Modlmeier et al., 2019; Blonder and Dornhaus, 2011; Génois et al., 2015; Carter and Wilkinson, 2013; Grant, 1973; Levin et al., 2016; Sailer and Gaulin, 1984; Mourier et al., 2017; Massen and Sterck, 2013; Sade, 1972; Butovskaya et al., 1994; Takahata, 1991; Hass, 1991; Lott, 1979; Schein and Fohrman, 1955; Hobson and DeDeo, 2015; Gernat et al., 2018), focusing our attention to those interactions which are capable of disease transmission (i.e. those that, at the least, require close spatial proximity). The advantage of using this model over more detailed network descriptions is that we obtain a single parameter estimate, $\varphi $ that is easily compared across animal species and environments.
Each dataset provides the number of interactions that were observed between pairs of individuals. We assume that the system is closed, and that the total network size ($N$) is equal to the number of individuals observed in at least one interaction. To estimate social fluidity, we find the value of $\varphi $ that minimizes ${\sum}_{i}{[{k}_{i}\kappa ({s}_{i},\varphi ,N)]}^{2}$; the total squared squared error between the observed degrees and their expectation given by the model. Uncertainty is displayed using the 2.5th and 97.5th percentile of the distribution of $\varphi $ computed on a set of 1000 ‘bootstrap’ samples, created by sampling $N$ data points, $\{{k}_{i},{s}_{i}\}$, with replacement, from the observed data. Being estimated from the relationship between strength and degree, and not their absolute values, social fluidity is a good candidate for comparing social behavior across different systems as it is independent of the distributions of s_{i} or k_{i}, and of the timescale of interactions.
Figure 2 shows the estimated values of $\varphi $ for all networks in our study. We organize the measurements of social fluidity by interaction type. Aggressive interactions have the highest fluidity (which implies that most interactions are rarely repeated between the same individuals), while grooming and other forms of social bonding have the lowest (which implies frequent repeated interactions between the same individuals). Social fluidity also appears to be related to species: ant systems cluster around $\varphi =1$, monkeys around $\varphi =0.5$, humans take a range of values that depend on the social environment. Sociality type does not appear to affect $\varphi $; sheep, bison, and cattle have different social fluidity compared to kangaroos and bats, although they are all categorized as fissionfusion species (Sah et al., 2018).
Across the 57 networks, there is no evidence that social fluidity scales with the size of the network or the number of observations per individual. No correlation was found between the mean number of interactions per individual ($\overline{s}$) and social fluidity when testing for a monotonic relationship between the variables (Spearman ${r}^{2}=0.02$, $p=0.36$), and in general no correlation across sets of networks taken from the same study (Supplementary file 1: Table S2). Similarly, network size ($N$) does not correlate with $\varphi $ (Spearman ${r}^{2}=0.02$, $p=0.28$). To test for a nonmonotonic relationship, we partition the set of networks into 10 equally sized groups according to each of the two measures being compared, and compute the adjusted mutual information (AMI) of the two groupings. We find AMI=0.15 for the relationship between $\varphi $ and $N$, and AMI=0.2 between $\varphi $ and $\overline{s}$. While nonnegative values of AMI typically indicate a nonrandom relationship, an inherent amount of clustering is to be expected in data aggregated from a diverse range of sources.
Larger values of $\varphi $ correspond to higher mean degrees (Spearman ${r}^{2}=0.21$, $p<0.001$) and lower variability in the distribution of edge weights (measured as the index of dispersion of ${w}_{i,j}$; Spearman ${r}^{2}=0.46$, $p<0.001$). Weight variability and mean degree are uncorrelated in these data (Spearman ${r}^{2}=0.01$, $p=0.54$, AMI=0.01) implying that $\varphi $ combines these two entirely distinct features of social behavior. Finally, the modularity of the network (computed by the Louvain method on the unweighted network Blondel et al., 2008) is negatively correlated with $\varphi $ (${r}^{2}=0.52$, $p<0.001$). This is expected as individuals tend to be loyal to those within the same module while maintaining weaker connections with the remaining network  in all but one network the mean weight of edges within modules is higher than the mean weight of edges between modules (supplementary document).
As with any applied modeling, the validity of these results depends on the extent to which each study system conforms to the assumptions of the model. The value of $N$, for example, might not represent the true group size if some individuals in the group did not have their interactions recorded, or if there are individuals who did not interact during the timeframe of observation. While we found that variation in the value of $N$ did not have a large impact on the estimated value of $\varphi $, as shown in Figure 2—figure supplement 1, we warn that the amount of consistency between model assumptions and the conditions of each study will vary, and close consideration should be given to the way data were collected when interpreting these results.
Characterizing disease spread with social fluidity
Our objective is to characterize how social behavior influences the exposure of the group to infectious disease in a range of human and animal social systems. Intuitively, we expect an infected individual in a group with low social fluidity to expose fewer susceptible group members to the pathogen than they would in a group with highly fluid social dynamics. We explore this idea by introducing a analytical transmission model that incorporates social fluidity. Using this model, we mathematically characterize the impact of social fluidity on density dependence, and apply the model to empirical networks to predict disease spread.
Disease transmission model
We consider the transmission of an infectious disease on the social behavior model introduced in the previous section. An infectious node $i$ interacting with a susceptible node $j$ will transmit the infection with probability β. The node will recover from infection with rate γ, assuming an exponential distribution of the length of the infectious period. The probability that the infection is transmitted from $i$ to any given $j$ is
assuming that the interactions s_{i} of $i$ are distributed randomly across an observation period of duration τ.
By integrating Equation (5) over all possible values ${x}_{ji}$ and infectious period durations and multiplying by the number of susceptible individuals ($N1$) we obtain the expected number of infections caused by individual $i$,
The basic reproductive number (usually denoted R_{0}) is defined as the mean number of secondary infections caused by a typical infectious individual in an otherwise susceptible population (Diekmann et al., 1990). We will use the notation ${R}_{0}^{\varphi}$ to signify the social fluidity reproductive number, that is the analogue of R_{0} derived from our social behavior model.
We assess the relation of the reproductive number with the population density by focusing on a special case where every node has the same strength, that is ${s}_{i}=s$ for all $i$, so that ${R}_{0}^{\varphi}=r(s)$. Furthermore, we choose $\beta =\gamma \tau {R}_{0}^{\mathrm{\infty}}/s$ where ${R}_{0}^{\mathrm{\infty}}$ is ${R}_{0}^{\varphi}$ as $\varphi \to \mathrm{\infty}$, that is a constant that represents what the basic reproductive number would be if every new interaction occurred between a pair of individuals who have not previously interacted with each other.
Figure 3 shows the effect of social fluidity on the density dependence of the disease. At small population sizes, ${R}_{0}^{\varphi}$ increases with $N$ and converges as $N$ goes to ∞ (Figure 3A). The rate of this convergence increases with $\varphi $, and the limit it converges to is higher, meaning that $\varphi $ determines the extent to which density affects the spread of disease. As $N\to \mathrm{\infty}$, we find that ${R}_{0}^{\varphi}\to {R}_{0}^{\mathrm{\infty}}$ for $\varphi >1$. When $\varphi <1$, ${R}_{0}^{\varphi}\to [(1\varphi )/\varphi ][{}_{2}F_{1}(\varphi ,1,1\varphi ;{R}_{0}^{\mathrm{\infty}})1]$. At these values of $\varphi $ the disease is constrained by individuals choosing to repeat interactions despite having the choice of infinitely many potential interaction partners (Figure 3B).
Infection spread in empirical networks with heterogeneous connectivity
To apply this analogue of a reproductive number to an animaldisease system, we need to account for heterogeneous levels of social connectivity in the given population and thus the tendency for infected individuals to be those with a greater number of social partners (Anderson et al., 1986). For the basic reproductive number, this is often done using the mean excess degree, that is the degree of an individual selected with probability proportional to their degree (Newman, 2018). Following a similar reasoning, we define ${R}_{0}^{\text{Est}}$, which incorporates the effect of social fluidity, as the expected number of infections ($r({s}_{i})$) caused by an individual that has been selected with probability proportional to their degree (k_{i}):
Given the degree and strength of each individual in a network, the duration over which those interactions occurrred, and the transmission and recovery rates of the disease, we are able to estimate $\varphi $, compute Equation (6) for each individual, and finally use Equation (7) to derive a statistic that provides a measure of the risk of the host population to disease outbreak.
Numerical validation using empirical networks
We simulated the spread of disease through the interactions that occurred in the empirical data (Materials and methods). We compute ${R}_{0}^{\text{Sim}}(g)$, defined as the ratio of the number of individuals infected at the $(g+1)$th generation to the number infected at the $g$th generation over 10^{3} simulated outbreaks, for $g=0,1,2$ ($g=0$ refers to the initial seed of the outbreak).
Table 1 shows the Pearson correlation coefficient and the adjusted mutual information between ${R}_{0}^{\text{Sim}}(g)$ and its corresponding value ${R}_{0}^{\text{Est}}$ obtained Equation (7) (Materials and methods). Equivalent results are also presented for other indicators and network statistics. The results correspond to one set of simulation conditions and are consistent across a wide range of parameter combinations (see Supplementary file 1). Note that a different value of β was chosen for each network to control for the varying interaction rates between networks while keeping the upper bound (${R}_{0}^{\mathrm{\infty}}$) constant (Materials and methods). While contact frequency is known to be one of the major contributors to disease risk, calibrating β in this way eliminates its effect, allowing the contribution of other network characteristics to be compared. Thus, the mean strength does not have a significant effect on ${R}_{0}^{\text{Sim}}(g)$, and higher mean edge weight does not necessarily imply higher transmission probability over the edges of the network.
These correlations support a known result regarding repeat contacts in network models of disease spread: that indicators of disease risk that are derived solely from the degree distribution are unreliable and the role of edge weights should not be neglected (Smieszek et al., 2009; Stehlé et al., 2011b). After transmission has occurred from one individual to another, repeating the same interaction serves no advantage for disease (most directly transmitted microparasites are not dosedependent). Since a large edge weight implies a high frequency of repeated interactions, networks with a higher mean weight tend to have lower basic reproductive numbers. Furthermore, variability in the distribution of weights concentrates a yet larger proportion of interactions onto a small number of edges, further increasing the number of repeat interactions and reducing the reproductive number.
Correlation between modularity and ${R}_{0}^{\text{Sim}}(g)$ is partly due to the strong correlation between modular networks and those with high social fluidity. Consistent with other evidence (Sah et al., 2017), this suggests that transmission events occur mostly within the module of the seed node, with weaker social ties facilitating transmission to other modules. The effect of clustering (a measure of the number of connected triples in network Watts and Strogatz, 1998) correlates with smaller ${R}_{0}^{\text{Sim}}(2)$, consistent with other theoretical work (Miller, 2009; Smieszek et al., 2009).
Finally, we find the model estimate of the social fluidity reproductive number ${R}_{0}^{\text{Est}}$ to be, on average, within 10% of the simulated value, ${R}_{0}^{\text{Sim}}(g)$ at $g=1$. At $g=2$ the amount of error is larger (to up to 29% for some parameter choices). Prediction accuracy at this generation is negatively correlated with the mean clustering coefficient. This is not surprising as ${R}_{0}^{\text{Est}}$ does not account for the accelerated depletion of susceptible neighbors that is known to occur in clustered networks (Miller, 2009; Smieszek et al., 2009). No other properties of the network affect the accuracy of ${R}_{0}^{\text{Est}}$ consistently across all parameter combinations (see Supplementary file 1).
Results and discussion
We proposed a measure of fluidity in social behavior which quantifies how much mixing exists within the social relationships of a population. While social networks can be measured with a variety of metrics including size, connectivity, contact heterogeneity and frequency, our methodology reduces all such factors to a single quantity allowing comparisons across a range of human and animal social systems. Social fluidity correlates with both the density of social ties (mean degree) and the variability in the weight of those ties, although these quantities do not correlate with each other. Social fluidity is thus able to combine these two aspects seamlessly in one quantity.
By measuring social fluidity across a range of human and animal systems we are able to rank social behaviors. We identify aggressive interactions as the most socially fluid; this indicates a possible learning effect whereby each aggressive encounter is followed by a period during which individuals avoid further aggression with each other (Parker, 1974). At the opposite end of the scale, we find interactions that strengthen bonds (and thus require repeated interactions) such as grooming in monkeys (Seyfarth and Cheney, 1984) and foodsharing in bats (Carter and Wilkinson, 2013). The fact that foodsharing ants are far more fluid than bats, despite performing the same kind of interaction, reflects their eusocial nature and the absence of any need to consistently reinforce bonds with their kin (Hölldobler and Wilson, 2009).
Our results contribute to a body of work examining the disproportionate distribution of social effort in both human and animal groups. This phenomena has been directly observed in human telecommunication (Mac Carron et al., 2016; Saramäki et al., 2014; Gonçalves et al., 2011; Tamarit et al., 2018). Quantifying this aspect of sociality in animal systems, however, has been held back by the limitations of the data, such as the bias introduced by variation in activity levels across the social group (Di Bitetti, 2000). Additionally, while heterogeneous interaction frequencies and temporal dynamics have become common in epidemiological models (Rocha and Blondel, 2013; Colman et al., 2018), our results highlight the importance of including variability in how the individual chooses to expend their social effort.
As with most studies that aim to describe and quantify social structure, there are a number of concerns that ought to be mentioned. The degree of an individual, for example, is known to scale with the length of the observation period (Perra et al., 2012). This is also true of the networks used here (Figure 2—figure supplement 1). Similarly, social fluidity can be affected by the length of the observation window. However, since our model focuses not on the absolute value of degree, but on how degree scales with the number of observations, the results we obtain are relatively robust against this variability (Figure 2—figure supplement 1). Additionally, observed interactions are typically assumed to persist over time (Perreault, 2010). In our model this is not the case; only the distribution of edge weights remains constant, an assumption consistent with growing evidence (Miritello et al., 2013; Centellegher et al., 2017).
We therefore consider the model to be applicable to the data analysed in this study, but advise caution when applying this approach to other data sources. If the duration of a study allows for substantial developments in the group structure, for example, then a model of edge formation and dissolution may be preferred.
Finally, we do not know the extent to which an interaction, as defined for each network, is capable of transmission which can depend on the pathogen’s transmission mode and the infectious dose required. Furthermore, the transmission probability is unlikely to be the same for all interactions within the group since, for example, the duration of contact is known to be important for disease spread (Stehlé et al., 2011b). We did not include explicitly the duration of each contact in our model as this information was only available in a fraction of the datasets (Barrat et al., 2014). There is therefore potential to improve the applicability of this model as more high resolution data becomes openly available.
Our estimate of reproductive number derived from social fluidity provides a better predictor for the epidemic risk of a host population, going beyond predictors based on density or degree only. To illustrate this point, the social network of individuals at a conference (${R}_{0}^{\text{Est}}=1.60$; conference_0, supplementary document) is predicted to be at higher risk compared to the social network at a school (${R}_{0}^{\text{Est}}=1.39$; highschool_0), despite having a smaller size and lower connectivity ($N=93$ vs. $N=312$, and $\overline{k}=5.63$ vs. $\overline{k}=6.78$, respectively). The discrepancy in the risk prediction comes from the lower frequency of repeated contacts between individuals in the conference, compared to the school. Interactions between infectious individuals and those they have previously infected are redundant in terms of transmission. This dynamic is nicely captured by the social fluidity, with $\varphi =0.66$ for the conference and $\varphi =0.40$ for the high school.
Unlike previous work that explores the disease consequences of population mixing (Volz and Meyers, 2007; Reluga and Shim, 2014), our analysis allows us to investigate this relation across a range of social systems. We see, for example, how the relationship between mixing and disease risk scales with group size. For social systems that have high values of social fluidity, ${R}_{0}^{\varphi}$ is highly sensitive to changes in $N$, whereas this sensitivity is not present at low values of $\varphi $. This corroborates past work on the scaling of transmission being associated to heterogeneity in contact (Begon et al., 2002; Ferrari et al., 2011). Going beyond previous work, our model captures in a coherent theoretical framework both densitydependence and frequencydependence, and social fluidity is the measure to tune from one to the other in a continuous way. Since many empirical studies support a transmission function that is somewhere between these two modeling paradigms (Smith et al., 2009; Cross et al., 2013; Borremans et al., 2017; Hopkins et al., 2020), the modeling approaches applied in this paper can be carried forward to inform transmission relationships in future disease studies.
Materials and methods
Python libraries
Request a detailed protocolMean clustering coefficients were computed using the networkx Python library. To evaluate the hypergeometric function in (3) we used the hyp2f1 function from the scipy.special Python library. Numerical solutions to Equation (4) using the fsolve function from the scipy.optimize Python library. Adjusted mutual information was computed using adjusted mutual info score from the sklearn.metrics library. All scripts, data, and documentation used in this study are available through https://github.com/EwanColman/SocialFluidity (Colman, 2021, copy archived at swh:1:rev:90b27e1b84ce4417633885cd260c89bbf1b07eac).
Data handling
Request a detailed protocolOnly freely available downloadable sources of data have been used for this study. Details of the experimentation and data collection, including how the interaction type is defined, can be found through their respective publications. Here, we note some additional processes we have applied for our study.
Each human contact dataset lists the identities of the people in contact, as well as the 20 s interval of detection (Isella et al., 2011; Vanhems et al., 2013; Stehlé et al., 2011a; Mastrandrea et al., 2015; Génois et al., 2015). Any sequence of consecutive time intervals for which contact is detected between two individuals is considered to be one interaction. To exclude contacts detected while participants momentarily walked past one another, only contacts detected in at least two consecutive intervals are considered interactions. Data were then separated into 24 hr subsets.
Bee trophallaxis provided experimental data for five unrelated colonies under continuous observation. We use the first hour of recorded data for each colony (Gernat et al., 2018). The ant trophallaxis study provided six networks: three unrelated colonies continuously observed under two different experimental conditions (Modlmeier et al., 2019). Ant antennation study provided six networks: three colonies, each observed for 4 hr in two sessions separated by a 2week period. The bat study collected individual data at different times and under different experimental conditions (Carter and Wilkinson, 2013). For bats that were studied on more than one occasion we use only the first day they were observed.
Some data sets provided data for group membership collected through intermittent, rather than continuous, observation (Grant, 1973; Massen and Sterck, 2013; Levin et al., 2016; Sailer and Gaulin, 1984; Mourier et al., 2017) and typically recorded over multiple days or weeks. We construct networks from these data by recording an interaction when two individuals were seen to be in the same group during one round of observation. The shark data were divided into six datasets, each one constructed from 10 consecutive observation bouts, and spread out evenly through the 46day period over which the data were collected.
For the grooming data (Butovskaya et al., 1994; Sade, 1972), if one animal was grooming another during one round of observations then this would be recorded as a directed interaction. Similarly for aggressive interactions (Parker, 1974; Takahata, 1991; Hass, 1991; Lott, 1979; Schein and Fohrman, 1955; Hobson and DeDeo, 2015). These data are typically collected over a period of days or weeks. When an animal was determined to be the winner of a dominance encounter then this would be recorded as a directed interaction between the winner and the loser. We consider interaction in either direction to be a contact in the network.
We considered including two rodent studies in which interaction is defined as being observed within the same territorial space (Smith et al., 2009; Borremans et al., 2017). We did not find this suitable for our analysis since the network we obtain, and the consequent results are sensitive to setting of arbitrary threshold values regarding what should, or should not, be considered sufficient contact for an interaction.
For data that did not contain the time of each interaction, contact time series were generated synthetically. For those networks, the interactions between each pair were given synthetic timestamps in three different ways, Poisson: the time of each interaction is chosen uniformly at random from {0, 1, ..., 10^{4}} seconds, Circadian: chosen uniformly at random from {0,1, ...,3333, 6666, ....,10^{4}}, and Bursty: interaction times occur with powerlaw distributed interevent times adjusted to give an expected total duration of 10^{4} seconds.
Disease simulation
Request a detailed protocolSimulations of disease spread were executed using the contacts provided by the datasets. The the bat network was omitted from this part since these data were collected over a series of independent experiments carried out at different times and under different experimental treatments.
In one run of the simulation, one seed node is randomly chosen from the network and, at a randomly selected point in time during the duration of the data, transitions to the infectious state. The duration for which they remain infectious is a random variable drawn from an exponential distribution with mean $1/\gamma $. During this time, any contact they have with other individuals who have not previously been infected will cause an infection with probability β.
The simulation runs until all individuals who were infected at the second generation of the disease, that is those infected by those infected by the seed, have recovered. The datasets are ‘looped’ to ensure that the timeframe of the data collection does not influence the outcome. In other words, immediately after the latest interaction, the interactions are repeated exactly as they were originally. This continues to happen until the termination criteria is met.
We set the parameters to normalise for the variation in contacts rates between networks. To achieve this, we consider a hypothetical counterpart to each network in which the strength of every node is the same, but each interaction occurs between a pair of individuals who have not previously interacted. This is equivalent to $\varphi \to \mathrm{\infty}$. Under these conditions ${x}_{ji}=1/(N1)$ for all pairs $i,j$. It follows that Equation (5) becomes ${T}_{i\to j}\approx {s}_{i}\beta /\gamma \tau (N1)$, then $r({s}_{i})\approx {s}_{i}\beta /\gamma \tau $, and, since ${k}_{i}={s}_{i}$ for all nodes $i$, Equation (7) gives
The value of ${R}_{0}^{\mathrm{\infty}}$ can be chosen arbitrarily. Then, by setting $\gamma =1/\tau $ and $\beta ={R}_{0}^{\mathrm{\infty}}{\sum}_{i}{s}_{i}/{\sum}_{i}{s}_{i}^{2}$ we guarantee that Equation (8) holds for every network. To test that our results hold over a range of disease scenarios, we repeat our analysis with ${R}_{0}^{\mathrm{\infty}}=2$, 3, and 4.
Data availability
All scripts, data, and documentation used in this study are available through https://github.com/EwanColman/SocialFluidity (copy archived at https://archive.softwareheritage.org/swh:1:rev:90b27e1b84ce4417633885cd260c89bbf1b07eac).

Dryad Digital RepositoryAnt colonies maintain social homeostasis in the face of decreased density.https://doi.org/10.5061/dryad.sh4m4s6

Dryad Digital RepositorySocial feedback and the emergence of rank in animal society.https://doi.org/10.5061/dryad.p56q7

Dryad Digital RepositoryLearning and robustness to catchandrelease fishing in a shark social network.https://doi.org/10.5061/dryad.gg859

Dryad Digital RepositoryFood sharing in vampire bats: reciprocal help predicts donations more than relatedness or harassment.https://doi.org/10.5061/dryad.tg7b1

Dryad Digital RepositoryStress response, gut microbial diversity and sexual signals correlate with social interactions.https://doi.org/10.5061/dryad.3jn35

SociapatternsID baboonsinteractions. Baboons’ interactions.
References

Social organization and parasite risk in mammals: integrating theory and empirical studiesAnnual Review of Ecology, Evolution, and Systematics 34:517–547.https://doi.org/10.1146/annurev.ecolsys.34.030102.151725

A preliminary study of the transmission dynamics of the human immunodeficiency virus (HIV), the causative agent of AIDSMathematical Medicine and Biology 3:229–263.https://doi.org/10.1093/imammb/3.4.229

A clarification of transmission terms in hostmicroparasite models: numbers, densities and AreasEpidemiology and Infection 129:147–153.https://doi.org/10.1017/S0950268802007148

Fast unfolding of communities in large networksJournal of Statistical Mechanics: Theory and Experiment 2008:P10008.https://doi.org/10.1088/17425468/2008/10/P10008

Food sharing in vampire bats: reciprocal help predicts donations more than relatedness or harassmentProceedings of the Royal Society B: Biological Sciences 280:20122573.https://doi.org/10.1098/rspb.2012.2573

SoftwareSocialFluidity, version swh:1:rev:90b27e1b84ce4417633885cd260c89bbf1b07eacSoftware Heritage.

BookHow does transmission of infection depend on population size?In: Mollison D, editors. Epidemic Models: Their Structure and Relation to Data. Cambridge University Press. pp. 1019–1022.https://doi.org/10.1007/BF02459495

BookBondedness and socialityIn: Dunbar R. I, editors. Behaviour. Brill. pp. 775–803.https://doi.org/10.1163/000579510X501151

Pathogens, social networks, and the paradox of transmission scalingInterdisciplinary Perspectives on Infectious Diseases 2011:1–10.https://doi.org/10.1155/2011/267049

Social feedback and the emergence of rank in animal societyPLOS Computational Biology 11:e1004411.https://doi.org/10.1371/journal.pcbi.1004411

BookThe Superorganism: The Beauty, Elegance, and Strangeness of Insect SocietiesWW Norton & Company.

Systematic review of modelling assumptions and empirical evidence: does parasite transmission increase nonlinearly with host density?Methods in Ecology and Evolution 11:476–486.https://doi.org/10.1111/2041210X.13361

What's in a crowd? analysis of facetoface behavioral networksJournal of Theoretical Biology 271:166–180.https://doi.org/10.1016/j.jtbi.2010.11.033

Time varying networks and the weakness of strong tiesScientific Reports 4:4001.https://doi.org/10.1038/srep04001

Group size, grooming and social cohesion in primatesAnimal Behaviour 74:1617–1629.https://doi.org/10.1016/j.anbehav.2006.10.025

Dominance relations and breeding rate in mature male american BisonEthology : Formerly Zeitschrift Für Tierpsychologie 49:418–432.https://doi.org/10.1111/j.14390310.1979.tb00302.x

Stability and durability of intra and intersex social bonds of captive rhesus macaques (Macaca mulatta)International Journal of Primatology 34:770–791.https://doi.org/10.1007/s1076401396957

Spread of infectious disease through clustered populationsJournal of the Royal Society Interface 6:1121–1134.https://doi.org/10.1098/rsif.2008.0524

Assessment strategy and the evolution of fighting behaviourJournal of Theoretical Biology 47:223–243.https://doi.org/10.1016/00225193(74)901118

Activity driven modeling of time varying networksScientific Reports 2:469.https://doi.org/10.1038/srep00469

Population viscosity suppresses disease emergence by preserving local herd immunityProceedings of the Royal Society B: Biological Sciences 281:20141901.https://doi.org/10.1098/rspb.2014.1901

Bursts of vertex activation and epidemics in evolving networksPLOS Computational Biology 9:e1002974.https://doi.org/10.1371/journal.pcbi.1002974

Sociometrics of macaca mulatta i. linkages and cliques in grooming matricesFolia Primatologica 18:196–223.https://doi.org/10.1159/000155480

Disease implications of animal social network structure: a synthesis across social systemsJournal of Animal Ecology 87:546–558.https://doi.org/10.1111/13652656.12786

Proximity, sociality, and observation: the definition of social groupsAmerican Anthropologist 86:91–98.https://doi.org/10.1525/aa.1984.86.1.02a00080

Social dominance relationships in a herd of dairy cattleThe British Journal of Animal Behaviour 3:45–55.https://doi.org/10.1016/S09505601(55)800123

The adaptive value of sociality in mammalian groupsPhilosophical Transactions of the Royal Society B: Biological Sciences 362:539–559.https://doi.org/10.1098/rstb.2006.1994

Models of epidemics: when contact repetition and clustering should be includedTheoretical Biology and Medical Modelling 6:11.https://doi.org/10.1186/17424682611

Group size, grooming and fission in primates: a modeling approach based on group structureJournal of Theoretical Biology 273:156–166.https://doi.org/10.1016/j.jtbi.2010.12.035

BookDiachronic changes in the dominance relations of adult female japanese monkeys of the arashiyama b groupIn: Fedigan L. M, Asquith P. M, editors. The Monkeys of Arashiyama. Albany: State University of New York Press. pp. 123–139.

Predicting epidemic risk from past temporal contact dataPLOS Computational Biology 11:e1004152.https://doi.org/10.1371/journal.pcbi.1004152

Susceptible–infected–recovered epidemics in dynamic contact networksProceedings of the Royal Society of London B: Biological Sciences 274:2925–2934.https://doi.org/10.1098/rspb.2007.1159
Article and author information
Author details
Funding
National Science Foundation (Award 141429)
 Ewan Colman
 Ephraim M Hanks
 David P Hughes
 Shweta Bansal
The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Acknowledgements
We are grateful to Andreas Modlmeier for his involvement in the inception of this project. We are grateful for insightful feedback from Pratha Sah and Daniela Gerwehns. We also thank all the researchers who have made their behavioral data openly accessible, making this study possible.
Copyright
© 2021, Colman et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics

 773
 views

 75
 downloads

 6
 citations
Views, downloads and citations are aggregated across all versions of this paper published by eLife.
Download links
Downloads (link to download the article as PDF)
Open citations (links to open the citations from this article in various online reference manager services)
Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)
Further reading

 Computational and Systems Biology
Earlycareer researchers in the Global South have to overcome obstacles that are not found in highincome countries, but in Morocco at least, the future is looking brighter than the past.

 Cancer Biology
 Computational and Systems Biology
Assay for TransposaseAccessible Chromatin sequencing (ATACSeq) is a widely used technique to explore gene regulatory mechanisms. For most ATACSeq data from healthy and diseased tissues such as tumors, chromatin accessibility measurement represents a mixed signal from multiple cell types. In this work, we derive reliable chromatin accessibility marker peaks and reference profiles for most nonmalignant cell types frequently observed in the microenvironment of human tumors. We then integrate these data into the EPIC deconvolution framework (Racle et al., 2017) to quantify celltype heterogeneity in bulk ATACSeq data. Our EPICATAC tool accurately predicts nonmalignant and malignant cell fractions in tumor samples. When applied to a human breast cancer cohort, EPICATAC accurately infers the immune contexture of the main breast cancer subtypes.