Introduction

Most animals engage in some form of social interaction (Krause et al. 2002; Frank 2007; Clutton-Brock 2016). These interactions frequently provide opportunity for gaining social information (Danchin et al. 2004; Laland 2004; McGregor 2005; Allen et al. 2013; Aplin et al. 2015), whether it be the location of new food sources (Aplin et al. 2012; Kendal et al. 2015; Berdahl et al. 2018; Nöbel et al. 2018) or predation risk (Beauchamp et al. 2012; Crane and Ferrari 2013; Frechette et al. 2014). However, interacting with others can also be costly, with one of the primary costs being the risk of infection with pathogens or parasites (Daszak et al. 2000; Stattner and Vidot 2011). Balancing risk of infection with the potential to gain useful information can thus be one of the key trade-offs animals face when engaging in social interactions (Evans et al. 2020; Romano et al. 2020). Although it is possible to obtain information or become infected indirectly via interactions with the physical environment (e.g. scent marking: Gosling and Roberts 2001; disease reservoirs: Adelman et al. 2015), many studies have shown that the spread of both infectious disease and information through a population will be strongly influenced by social interaction patterns (Aplin et al. 2012; White et al. 2017; Hoyt et al. 2018). While the transmission of infection and information may depend on different types of interactions, there is likely to be overlap depending on how the pathogen spreads between hosts and how individuals learn from each other (Evans et al. 2020).

To better understand this potential trade-off between information and disease, it is necessary to quantify how different social structures can promote access to useful information while minimising risk of infection (Evans et al. 2020; Firth 2020; Romano et al. 2020). Social structures can help maximise the benefits of sociality for their members by promoting the persistence of social units and so increasing their fitness indirectly (Ilany and Akcay 2016; Kramer and Meunier 2019). As such, selection can act on behaviours because of their influence on emergent social structures in addition to their direct impact on individual fitness. Consequently, investigating which aspects of sociality slow down the spread of disease while promoting information transmission therefore represents an important contribution to our understanding of social evolution.

Animal social systems vary widely among species (Krause et al. 2002). Social networks offer a useful toolkit to capture and quantify this diversity (Krause et al. 2007; Wey et al. 2008; Pinter-Wollman et al. 2014), and can help distinguish species that, for example, live in multi-level societies (e.g. reticulated giraffes Giraffa camelopardalis: VanderWaal et al. 2014; sperm whales Physeter macrocephalus: Cantor et al. 2015; vulturine guineafowl Acryllium vulturinum: Papageorgiou et al. 2019), stable social groups (e.g. meerkats Suricata suricatta: Drewe et al. 2009; European badgers Meles meles: Weber et al. 2013), fission–fusion groups (e.g. Bechstein’s bats Myotis bechsteinii: Kerth and König 1999; many bird species: Silk et al. 2014; reviewed in general: Couzin and Laidre 2009), or whose interactions and associations are more constrained by other factors such as shared space or resource use (Davis et al. 2015; Spiegel et al. 2016; Evans and Morand-Ferron 2019). Social network structure plays a critical role in governing both pathogen and information transmission (Aplin et al. 2012; Godfrey 2013; Webster et al. 2013; Silk et al. 2017; Evans et al. 2020). For example, considerable variability in the connectedness of individuals can drive a superspreader effect in infectious diseases, causing more explosive outbreaks (Lloyd-Smith et al. 2005). Global properties of the network such as the number (or density) of connections and how these are distributed are also important. The efficiency of information transfer is maximised when social networks show intermediate levels of subdivision into different modules or communities (Romano et al. 2018). Many animal social networks possess such modular structures (Wey et al. 2008), especially species that form relatively stable social groups (e.g. meerkats: Drewe et al. 2009; badgers: Weber et al. 2013). Consequently, both community structure and how inter-connected these communities are — their modularity — are likely to be important in governing any differences between information and disease transmission in animal societies.

There are often important differences in how infection and information spread through a network. Infection is generally considered a simple contagion (Moore and Newman 2000); the likelihood of becoming infected will depend predominantly on the number of relevant contacts with infected individuals, and the duration of these contacts (Godfrey et al. 2009). In contrast, information can often be considered a complex contagion (Macy 1991; Centola 2010; Firth 2020); individuals decide on whether to act on the information acquired and so may use different social learning strategies that change how information spreads (Laland 2004; Kendal et al. 2018). For example, they might accept information only from certain individuals (e.g. Kavaliers et al. 2005; van de Waal et al. 2010), or be much more likely to use it if a set proportion of their contacts behave in that way (Danchin et al. 2018). The latter can result in conformist social learning, which has been demonstrated in taxonomically diverse animal societies (e.g. vervet monkeys Chlorocebus aethiops: van de Waal et al. 2013; great tits Parus major: Aplin et al. 2015; fruit flies Drosophila melanogaster: Danchin et al. 2018).

Because of the differences in how infection and information spread, modularity shapes their transmission in different ways (Nematzadeh et al. 2014; Sah et al. 2017; Evans et al. 2020). While modular networks can promote the spread of infection within particular groups, they tend to trap infection within these groups, slowing down disease spread through the population as a whole (Sah et al. 2017). The impact of modular structure on disease outbreaks is greatest when the modularity of these subdivisions is high (i.e. different groups have relatively few contacts between them; Salathé and Jones 2010; Sah et al. 2017), especially when transmissibility is low so that infection is unlikely through occasional contacts (Griffin and Nunn 2012; Sah et al. 2017; Rozins et al. 2018). In contrast, when information transmission is a complex contagion where individuals disproportionally copy the majority of their group members (Aplin et al. 2015), modular networks can promote the global spread of information, especially at intermediate modularities (i.e. when contacts between groups or modules are infrequent but not rare), due to strong social reinforcement within groups (Nematzadeh et al. 2014). As a result, modular networks may provide one route to promote the spread of information through a population disproportionately to the spread of infection (Evans et al. 2020). However, there are many other aspects of the structure of modular networks that might also shape this pattern and have been less well studied.

Social group (or sub-group) size, which is highly variable across and within animal societies, represents one such trait that could also impact how network structure shapes transmission dynamics (Côté and Poulinb 1995; Nunn et al. 2015). Sah et al. (2017) showed that modular networks caused the greatest reduction in epidemic spread when networks were composed of many smaller (sub-)groups, i.e. network fragmentation was high (Godfrey et al. 2009; Sah et al. 2017). This suggests that the formation of more fragmented networks consisting of smaller rather than larger (sub-)groups is more effective in reducing infectious disease transmission. However, different levels of network fragmentation may also change the optimum modularity for information transmission, which depends on high clustering of connections within groups to promote the spread of information in the first place (Nematzadeh et al. 2014). For example, small modules or sub-groups that contain many friends of friends may help promote the spread of information while limiting infectious disease transmission if between-group contacts are rare. This could be especially important as the impact of modularity on infection transmission is non-linear, with modular networks having no substantial effect on how disease spreads when modularity is below a certain value (Sah et al. 2017). Thus, if the optimal level of separation between groups to promote information spread is too far below the level of separation at which a modular network structure begins to protect effectively against the spread of infectious disease, then the benefits are lost.

We used simulation models to examine how social group size (network fragmentation) interacts with modularity (the strength of the subdivision of a network into groups) to determine differences in the speed of social information spread and infectious disease transmission. We generated unweighted (binary) networks of a fixed size with different edge density (the social connectedness of individuals), group sizes (size of social groups within the network), and modularity (strength of the division between these social groups) to examine how these properties affected the transmission rates of information and disease, at varying levels of transmissibility. We treated the spread of information using a conformist model in which the relationship between the likelihood of acquiring/using information and proportion of informed contacts was sigmoidal, while infection risk was fixed for each contact with an infected individual. We compared the rates of spread of infection and information through social networks that varied in both their modularity and the size of groups making up the modular structure of the network, for different values of social connectedness and transmissibility (how likely a disease or a piece of information is to be transmitted). We expected that modular networks would promote the transmission of information relative to the spread of infection, especially when transmissibility was low. However, because of previous research suggesting a role of network fragmentation alongside modularity on transmission dynamics (Sah et al. 2017), we anticipated that the extent of this benefit would also be shaped by the number and size of social groups, although we had no a priori expectation for the direction of this effect.

Methods

Simulation summary

Each simulation consisted of two main steps (Fig. 1). First, we generated random networks which were used to select parameters controlling disease and information spread. We then altered these random networks to create modular networks of varying levels of fragmentation, in which we compared relative transmission speeds (for infection and information spreading independently).

Fig. 1
figure 1

Summary of simulations for a single parameter set

We generated a random network of 200 nodes (i.e. individuals) with a particular edge density (proportion of potential pairs of individuals in the network who were connected; Table 1). We then simulated the spread of a disease through this network, starting from a randomly selected individual, using a susceptible-infected (SI) model with the transmissibility of that disease in that network derived from an adjusted, per time interval R0 (infectiousness of the disease; Table 1). Values of R0 were chosen to simulate a broad range of pathogens with transmissibilities that have previously been shown to generate disease dynamics that can be influenced by modular network structure (Sah et al. 2017; Rozins et al. 2018). This disease simulation was carried out in the random network 50 times, each time starting with a different randomly selected individual (50 simulations sufficed for our results not to be influenced by the randomly selected starting individual; Supplementary Fig. 1). For each of these simulations, we recorded the number of timesteps it took a disease to infect 75% of the individuals in that network, as it may not be possible for 100% of individuals to be infected in some of our networks. We used the distribution of timesteps taken to reach this 75% threshold in the 50 disease simulations to determine the value of a scaling parameter γ, which modified the speed of information spread, so that information spread at a similar speed to disease in the random network. Matching the speeds of the two transmission processes in the random networks allowed us to isolate the effects of network fragmentation and modularity when simulating spreads in modular networks. We simulated information spread using this scaling parameter through the random network 50 times, starting with a random node, and recorded the average time taken for 75% of individuals to be informed.

Table 1 Description of the four parameters used in the simulations. Parameters are summarised in bold, followed by more detailed explanation. Number of parameter values and values also shown

We then rewired the edges of the random network to produce new modular networks with the same edge density but a particular network modularity (strength of division of a network into modules; Table 1), with individuals subdivided into social groups of a particular size. This led to a total of 18 modular networks being derived from each random network, one for every combination of modularity and group size (see Table 1 for values used). We simulated the spread of disease and information through each of these new modular networks 50 times, recording the average time each process took to infect or inform 75% of nodes in the rewired, modular, networks. We then compared the difference in mean time taken for information and infection to reach the 75% threshold in that particular modular network. We also compared the transmission rates through a modular network to those through the random network from which it was derived, to establish the relative influence of modularity and group sizes on the transmission speeds of information and disease.

The nine values of network density, five values of transmissibility, six values of group size (network fragmentation), and three values of network modularity tested led to a total of 810 parameter combinations (Table 1). Each parameter combination was repeated 20 times. We conducted all 16,200 independent simulation runs (each containing multiple simulated spreads of infection and information) in R 4.0.2 (R Development Core Team 2020). R code is provided in the Supplementary Materials. See Supplementary Video 1 for a visualisation of an example simulation.

Detailed methods

We now provide a detailed description of the methods used. We first describe the method used to simulate the spread of information and disease, which were used for both parameter selection and for producing the final results. We then detail the generation of random networks and the selection of parameters governing the transmission processes in these networks. Finally, we describe the modification of random networks into modular networks and comparisons of the effect of group size and modularity in these new networks and to the same processes in the random networks.

Simulating disease and information spread

We here summarise the methods used to model information and disease transmission throughout these simulations. We modelled both disease and information transmission as simple susceptible-infected (SI) models. Nodes were therefore either susceptible (uninfected/uninformed) or infected (informed), with no possibility for recovery from this state.

Disease-spread simulation

We make the assumption that an individual’s likelihood of infection depends on the infectiousness of the disease and how many of their contacts are infected. We begin by infecting a random node (i.e. individual) in the network. In each subsequent timestep, whether a susceptible node will become infected is determined by a binomial trial, with the probability of infection for a node v being:

$${1-\left(1-\beta \right)}^{\left|N(v)\subseteq \mathrm{ i}\right|}$$

where \(\left|N\left(v\right)\subseteq \mathrm{I }\right|\) is the number of nodes adjacent to node v (\(N(v)\)) that are infected. \(\beta\) is a per timestep transmission probability per connection for a particular random network (see below for parameter selection information). The likelihood of a node becoming infected therefore increases as the number of infected connections increases (Fig. 2a).

Fig. 2
figure 2

Visualisation of transmission probabilities for a) disease and b) information, depending on the number or proportion of infected/informed contacts, at different values of R0

Information-spread simulation

We use a conformist learning rule to simulate the spread of information. Under this rule, an individual’s likelihood of accepting the information will depend on a scaling parameter and the proportion of contacts who have already accepted the information, with the probability of accepting increasing once 50% of contacts have accepted the information. The likelihood of accepting the information based on the proportion of contacts who have accepted the information is therefore a sigmoidal function, described in the equation below and illustrated in Fig. 2b. Note that the function allows a very low probability of acquiring information even when no contacts are informed, which simulates there being some individual learning alongside social transmission of information. A random node starts with the information, and in each subsequent timestep whether a susceptible node v will accept the information and become informed is based on a binomial trial, with the probability of accepting the information being

$$\gamma \times \frac{1-2*\eta }{1+\exp \left(-\psi \times \frac{1}{\gamma }\times \left(\frac{\left|N(v) \subseteq \mathrm{ i}\right|}{\updelta (v)}-0.5\right)\right)}+ \eta$$

where \(\gamma\) is a scaling parameter used to modify the rate of information spread (allowing us to ensure information and disease spread at the same speed in the random network), \(\left|N\left(v\right)\subseteq i\right|\) is the number of adjacent nodes that are informed, and \(\updelta (v)\) is the node’s degree. \(\eta\) is the base probability of accepting information (baseline learning rate), and \(\psi\) is the steepness of the sigmoidal function (Fig. 2b). Based on our exploration of parameter values to match the rate of spread of information to the rate of disease spread in the random networks, we fixed \(\eta\) at 0.001 and \(\psi\) at 10 in all simulations (Fig. 2).

Random network generation and parameter selection

We generated random networks consisting of 200 nodes using igraph’s implementation of the Erdos–Renyi model (Csardi and Nepusz 2006). Probability of edge formation between nodes was determined by the value of the density parameter under investigation. Networks were unweighted (i.e. individuals were connected or not) and undirected (i.e. either both or neither individual were connected to each other). We then modelled the spread of a disease of each value of transmissibility (per-time period R0; see Table 1) through this random network. This allowed us to establish a baseline disease spread speed in a random network of each density, which could later be compared to the spread speed in modular networks. We also used this spread of disease to choose parameters allowing information to spread at the same rate.

Disease spread parameter selection

To simulate the spread of disease through a network, we converted a chosen per-time period R0 to a transmission probability for the random network under investigation. First, we calculated r, the transmission probability for a time period t in that network, where t is the time period over which an R0 is calculated and was fixed at 100. For example, for an R0 of 3, an individual should on average infect 3 other individuals in this network over 100 timesteps.

$$r= {~}^{{R}_{0}}\!\left/ \!\!{~}_{ \frac{\langle {k}^{2}\rangle -\langle k\rangle }{\langle k\rangle }}\right.$$

Here, \(\langle k\rangle\) is the average degree of all nodes in the network and \(\langle {k}^{2}\rangle\) is the average squared degree of all nodes in the network (Newman 2008). We then used the resulting value of r to calculate \(\beta\), the per timestep transmission probability per connection for this R0 in this network.

$${\beta = 1-(1-r)}^{(1/t)}$$

We used this value of \(\beta\) when simulating disease spread through the random network under investigation and for all modular networks derived from that initial random network, for this value of our per-time period R0 (Newman 2008).

Learning rule parameter selection

Having established the value of \(\beta\) that corresponded to a value of R0 in the current random network, we then found the equivalent parameter value that lead to a similar transmissibility for information. To do this, we first simulated the spread of disease through the random network 50 times, recording the number of timesteps it took to infect 75% of the nodes. We used this distribution as a baseline with which to compare the spread of information. We searched for a value of a scaling parameter that governed the speed of information transmission, γ, which would produce a similar distribution of information spread (time to inform 75% of nodes) as our infection baseline. When generating a distribution, information spread through the random network was simulated 50 times with a potential value of γ, using the learning rule described below. We then compared the distribution of the number of timesteps to reach the 75% threshold from these 50 simulations of information spread to that of the 50 simulations of the spread of disease by calculating the Bhattacharyya distance (Bhattacharyya 1946) between the two distributions. Bhattacharyya distance is a measure of the similarity between two distributions using their means and variances. A smaller Bhattacharyya distance indicates a greater overlap between the two distributions. We optimised γ so as to minimise the Bhattacharyya distance between the distribution of disease and information spread times to reach the 75% threshold using R’s “optimise” function (Nelder and Mead 1965). Parameter optimisation was run five times so as to avoid being trapped in local optima based on potential combinations of starting nodes and γ. From these five parameter searches, we selected the value of γ that produced the smallest Bhattacharyya distance (i.e. resulted in information spreading at a similar speed to disease), and recorded the mean time taken for each to spread to 75% of individuals in the network.

Modular network generation and comparisons

We then altered the network to test how modularity and group sizes affected these spreading processes. For each random network, we generated 18 modular networks with differing levels of fragmentation, varying in group size and modularity. The random network was rewired to generate community structure with the desired group size and relative modularity (Qrel). Qrel adjusts the modularity calculated for a particular network by dividing by the modularity calculated for the same network but within between-module edges excluded (Sah et al. 2017). The algorithm first assigns every node to a group, with the number of groups depending on the desired group size. It then rewires the network one edge at a time until the relative network modularity reaches its target. See Fig. 3 for an example of the modular networks generated for different densities and group sizes.

Fig. 3
figure 3

Examples of the networks at different levels of network density (row), rewired to different values of network modularity (column) and two different group sizes (5 and 40) for the same population size (200)

We then simulated information and disease spread through each of these 18 new modular networks 50 times, using the parameters β and γ derived from the random networks. We recorded the mean time it took for 75% of nodes to become infected and the mean time it took for 75% of nodes to become informed in each modular network, with a cut off if one or both of the spreading processes failed to reach this threshold after 3500 timesteps. Supplementary Fig. 2 shows a visualisation of the progress of the spreading processes through both random and modular networks, in relation to network density, and in the modular networks: modularity and group size. Supplementary Video 1 shows an animated example of simulations in both random and modular networks of varying densities. Supplementary Fig. 3 shows a static visualisation of the same set of simulations.

Results

The impact of network modularity and fragmentation on transmission rate

Speed of transmission of both disease and information was reduced by modular network structure, but mainly when group sizes were smaller and networks more fragmented (Fig. 4). The reduced speed of transmission was most striking in more modular networks (Qrel of 0.6 and 0.8). Importantly, more modular and fragmented networks slowed the transmission of infection far more than information for most network densities considered (Fig. 4; supplementary Fig. 4). Qualitatively similar patterns were apparent when considering the difference in spread speeds between modular and random networks (Fig. 5); both information and disease spread more slowly in modular networks than in random networks.

Fig. 4
figure 4

Overview of mean time taken for disease (red) and information (blue) to infect 75% of nodes in modular networks of 200 nodes. Smaller datapoints are results for each of the 20 repeats, while large datapoints are the mean for that parameter combination. Results are shown for different levels of network modularity (column), density (row) and R0 (symbol and colour). Note that for illustrative purposes, we include only a subset of group sizes and other parameter values in this figure, while the full dataset is visualised in Supplementary Fig. 4. Note also that for infection spread, some runs of the simulation with a group size of five and network density of 0.1 did not complete before the time cut-off of our simulations and are not shown on this plot

Fig. 5
figure 5

Overview of the difference between modular and random networks in mean time taken for disease (red) and information (blue) to infect 75% of nodes in a network of 200 nodes. The Y-axis shows the mean time taken for a transmission process to reach 75% of nodes in a random network subtracted from the mean time taken for a transmission process to reach 75% of nodes in a modular network derived from that random network. Positive values therefore indicate slower spreading in modular networks, negative values faster spreading. Smaller datapoints are results from each of the 20 repeats, while large datapoints are the means for that parameter combination. Results are shown for different levels of network modularity (column), density (row), and R0 (symbol and colour). Note that we include only a subset of group sizes and other parameter values in this figure; for a figure showing the full dataset, see supplementary Fig. 5. Note also that for infection spread, some runs of the simulation with a group size of five and network density of 0.1 did not complete before the time cut-off of our simulations and are not shown on this plot

The role of transmissibility and network density

Higher levels of transmissibility always led to faster spread of disease and information, in all types of modular networks (Fig. 4). When transmissibility and modularity were high (R0 = 3 and Qrel ≥ 0.6), the time taken for 75% of the population to be informed remained effectively unchanged from that in random networks, while time taken for 75% to be infected increased substantially compared with the random networks except when network density was very low (Fig. 5). With lower modularity (Qrel of 0.4), only the smallest group sizes were able to slow transmission, and only when transmissibility was very low. There were 19 dense, highly modular networks with small group sizes where disease entirely failed to spread within 3500 timesteps when transmissibility was low (R0 of 1.1 or 1.25).

The time difference between 75% of the population becoming informed via conformist learning and 75% being infected increased with network density within the range studied (Fig. 6), although the nature of this relationship depended on both network modularity and transmissibility. When transmissibility was higher, the difference between the rate of information spread and rate of disease spread increased consistently as the modularity of the network increased (Fig. 6). How much the difference increased depended on the density of connections in the network. However, when transmissibility was lower, the relationship between modularity and difference in transmission speeds was more complicated. First, for networks with intermediate modularities (Qrel of 0.4 or 0.6), the difference in the time taken for 75% of the population to be infected or informed by the two transmission processes showed a (slightly) humped relationship, with the difference in time taken being minimised (i.e. close to zero) at low- to intermediate network densities, with disease spreading faster than information in some repeats of the simulation. Second, at high network densities, the difference in transmission rates was higher for intermediate modularities (Qrel = 0.6) than high modularities (Qrel = 0.8), although it should be noted here that it was for networks with high densities, high modularities, and high fragmentation that disease failed to infect 75% of the population in some runs. Consequently, this result should be interpreted as a lack of evidence for a difference between intermediate and high modularities, rather than a quantitative difference between the two.

Fig. 6
figure 6

Effect of network density on the difference in time taken for disease and information to infect 75% of 200 nodes in a modular network consisting of small groups of 5 individuals. The Y-axis shows the time taken for disease to infect 75% of nodes subtracted from the time taken for information to inform 75% of nodes. Positive values on the Y-axis therefore indicate information taking longer to reach this level of infection than disease, while negative values on the Y-axis indicate disease taking longer. Smaller datapoints are raw data, while large datapoints are means. Results are shown for different levels of R0, network modularity and density. Means for parameter combinations where 75% of individuals were not infected by our cut-off of 3500 time steps are excluded

For networks with intermediate or high modularity, the difference in the rate of transmission between information and infection was maximised for intermediate values of transmissibility (Fig. 7), resulting in the biggest difference at R0 = 1.5 for networks with Qrel = 0.6 (intermediate modularity) and R0 = 2 for networks with Qrel = 0.8 (high modularity) among the parameter values we tested.

Fig. 7
figure 7

Effect of transmissibility on the difference in time taken for disease and information to infect 75% of nodes in a 200-node network of density 0.05 with small groups of 5 individuals. The Y-axis shows the time taken for disease to infect 75% of nodes subtracted from the time taken for information to inform 75% of nodes. Positive values on the Y-axis therefore indicate information taking longer to reach this level of infection than disease, while negative values on the Y-axis indicate disease taking longer. Smaller datapoints are raw data, while large datapoints are means. Results are shown for different levels of network modularity

Discussion

We show that both modularity and network fragmentation/(sub-)group size are important in mediating the balance between pathogen and information spread when individuals use conformist social learning. In our simulations, it took longer for three quarters of individuals to become either informed or infected in more fragmented modular networks where group sizes were small, but not when group sizes were larger. In more fragmented modular networks, the rate of information transmission slowed less than that of infectious disease compared with random networks, resulting in information spreading faster than infection.

Our simulations clearly demonstrate that modularity can, but does not always, slow the rate of spread of infection, supporting the findings of previous work (Salathé and Jones 2010; Griffin and Nunn 2012; Nunn et al. 2015; Sah et al. 2017). Modularity decreased the rate of disease spread most when there was a higher density of network connections and the size of communities was smaller. The effect of community size is similar to that found by Sah et al. (2017), who showed that both modularity and network fragmentation are important in reducing outbreak size in modular networks. The impact of modularity on how quickly 75% of our simulated populations became infected was greatest when transmissibility was lower, as would be expected from previous research (Sah et al. 2017; Rozins et al. 2018). For highly transmissible pathogens and intermediate modularities, even small group sizes were unable to meaningfully slow the spread of disease.

We found similar general patterns for the spread of information via a conformist learning rule. However, while modularity and fragmentation affected information transfer in a similar direction to disease spread, modular networks did not slow down transmission of information as much as the spread of infection. This was especially the case for networks with intermediate modularities and high densities. In general, we did not find support for modularity leading to an increase in the rate of information transmission in our models, contrary to some previous findings (Nematzadeh et al. 2014; Romano et al. 2018). In our results, there was no consistent tendency for information to spread faster in modular networks than in random networks. However, at low network densities and intermediate modularities (Qrel of 0.4 or 0.6), some individual simulation runs found faster information spread in modular than random networks. It is possible, therefore, that modularity might facilitate faster information spread in our modelling framework when using parameter values that we did not explore in this study, such as values of \(\psi\) that result in a steeper threshold for conformist learning (González-Avella et al. 2011; Nematzadeh et al. 2014). Previously, network efficiency (a proxy for how efficiently a network exchanges information) was shown to have a relatively weak relationship with modularity that peaked at smaller levels of modularity than those investigated here (Romano et al. 2018). Together with our findings, this suggests that information spreads fastest in these less modular networks, while more modular networks favour the rate of information transmission relative to the spread of infection.

Conformist social learning has been reported in species ranging from vervet monkeys to great tits and fruit flies (van de Waal et al. 2013; Aplin et al. 2015; Danchin et al. 2018), suggesting that the difference between information transmission through conformist learning and infectious disease spread shown in our models has ecological and evolutionary significance. Social groups with modular social structure and sufficiently small sub-groups will impede the transmission of infection while having much less impact on how quickly beneficial information spreads. The importance of modular social structure will be most apparent when infection and information spread through similar or overlapping types of interaction, for example when social learning requires prolonged close proximity interactions (Hobaiter et al. 2014). The fact that the difference in information and disease spread is substantial only for small (sub-)groups may contribute to the evolution of hierarchical or multi-level social structures as seen in humpback whales and vulturine guineafowl (Cantor et al. 2015; Papageorgiou et al. 2019; Grueter et al. 2020). In addition, our work suggests capacity for social structure and social learning rules to co-evolve We might expect conformist social learning to be more common in species with hierarchical social structures, in which the social networks of stable groups are further subdivided by fission–fusion dynamics (e.g. chimpanzees Pan troglodytes and Pan paniscus: Lehmann et al. 2007; spider-monkeys Ateles geoffroyi: Ramos-Fernández and Morales 2014). Such social structures could lead to highly fragmented networks which increase the effectiveness of conformist learning relative to simple contagions. Finally, our findings will also be relevant to the spread of information about a disease (Funk et al. 2009). When sub-groups and small networks have intermediate modularity, information about the presence of disease will be able to spread faster than the infection itself, helping to enhance behavioural or social immunity (De Roode and Lefèvre 2012; Meunier 2015). The difference will be greatest when the density of connections in a group is higher, as might be expected, for example, in a social insect colony or when comparing smaller human communities (higher network fragmentation) to large cities (networks likely still modular but with much larger groups). Future research that models direct interactions between information and disease spreading simultaneously (Funk et al. 2009; Silk et al. 2021) could also contribute to understanding patterns of social behaviour in animal groups.

Our results also complement recent modelling and empirical research suggesting modular networks have minimal effect on the spread of social information (Cantor et al. 2021; Laker et al. 2021). For example, Laker et al. (2021) showed that the transmission of novel foraging information was not impacted by the modularity of network structure in domestic fowl chicks Gallus gallus domesticus. If we assume conformist learning, our models show that for the modularities investigated in their study (Q = 0.63–0.73), we would predict either no increase or a relatively small increase in the rate of learning, depending on how easy information is to acquire; the easier and faster it is to acquire information, the less impact even small sub-groupings have on how quickly information spreads. However, information that spreads according to other social learning rules may respond differently to more modular social structures.

There are a number of limitations to our current model that would benefit from further development. We have only considered binary, unweighted networks at each time-step (a social connection either exists or not). In many situations, social connections will vary in strength between different individuals, which could influence the likelihood of transmission (Valsecchi et al. 1996; Swaney et al. 2001). Similarly, we have only considered one type of social learning rule, while in reality, individuals may use other learning rules such as simple learning rules that result in information spreading in a way very similar to disease (Kempe et al. 2003; van Schaik 2010), a bias toward learning from kin or familiar individuals (e.g. deer mice Peromyscus maniculatus: Kavaliers et al. 2005; chimpanzees Pan troglodytes: Kendal et al. 2015; zebra finches Taeniopygia guttata: Boogert et al. 2018), or combinations of multiple rules. A more comprehensive exploration that incorporates heterogeneity in how individuals learn would provide additional insight into how information spread might be influenced by group size and fragmentation. Our model also uses a static network, with no changes to edge structure over time. In reality, it is likely that network dynamics will influence how information and infection spread through a population, with both transmission types potentially causing changes in network structure (Funk et al. 2009; Croft et al. 2011; Kulahci et al. 2018; Stockmaier et al. 2020). For example, the position of individuals within a network might be expected to change when they are infected (Lopes et al. 2016; Stockmaier et al. 2020) or become informed (Kulahci et al. 2018). Future models that incorporate these network dynamics are likely to provide further insights into the patterns demonstrated here. To aid comparison of the effect of network structure on the two transmission processes, we also set the spread speeds of the two processes to be as similar as possible. Equivalent transmissibility is unlikely in the real world, and so empirical studies are necessary to help explore when and how our simulation results apply to real networks. Preferably, these studies would use systems where interactions can be observed and network structure experimentally manipulated (Blonder and Dornhaus 2011; Stroeymeyt et al. 2018).

Our simulations also focussed solely on a susceptible-infected model where individuals remained infected or informed for the rest of the simulation. This approximated the early stages of spread through a group, helping us directly compare the spread of infection and information. However, modelling recovery from infection using a susceptible-infected-recovered (SIR) model (e.g. with a fixed infectious period for the disease) or allowing individuals to return to a susceptible or uninformed state (using a susceptible-infected-susceptible [SIS] model) would also be informative. Modularity would be expected to have a bigger impact on infectious disease spread if recovery was included, as outbreaks may become trapped within particular modules (Sah et al. 2017). In an SIS version, the ease with which individuals in a (sub-)group become re-informed may depend on the synchrony with which they became uninformed; if a single individual became uninformed it would be likely to re-learn the information very rapidly with conformist learning; however, if a whole (sub-)group became uninformed simultaneously, then we might expect it to take much longer for them to re-learn the information.

Overall, by demonstrating the relative speed with which infection and information can saturate animal groups across a range of biologically realistic social structures, our research helps us learn more about how infection and information act together as selection pressures in animal societies. Groups with social structures that favour the spread of information over infection are more likely to persist, and so the social behaviour of their members be selected for, potentially playing a key role in the evolution of various social systems. Our results highlight the importance of considering network fragmentation in addition to modularity when studying the ecological consequences of animal social network structure and their implications for the evolution of sociality.