Volume 90, Issue 11 p. 2609-2622
Free Access

Spatial dynamics of pathogen transmission in communally roosting species: Impacts of changing habitats on bat-virus dynamics

Tamika J. Lunn

Corresponding Author

Tamika J. Lunn

Centre for Planetary Health and Food Security, Griffith University, Brisbane, Qld, Australia

School of Environment and Science, Griffith University, Brisbane, Qld, Australia


Tamika J. Lunn

Email: [email protected]

Search for more papers by this author
Alison J. Peel

Alison J. Peel

Centre for Planetary Health and Food Security, Griffith University, Brisbane, Qld, Australia

Search for more papers by this author
Hamish McCallum

Hamish McCallum

Centre for Planetary Health and Food Security, Griffith University, Brisbane, Qld, Australia

School of Environment and Science, Griffith University, Brisbane, Qld, Australia

Search for more papers by this author
Peggy Eby

Peggy Eby

Centre for Planetary Health and Food Security, Griffith University, Brisbane, Qld, Australia

School of Biological Earth and Environmental Sciences, University of New South Wales, Sydney, NSW, Australia

Search for more papers by this author
Maureen K. Kessler

Maureen K. Kessler

Department of Microbiology and Immunology, Montana State University, Bozeman, MT, USA

Search for more papers by this author
Raina K. Plowright

Raina K. Plowright

Department of Ecology, Montana State University, Bozeman, MT, USA

Search for more papers by this author
Olivier Restif

Olivier Restif

Department of Veterinary Medicine, University of Cambridge, Cambridge, UK

Search for more papers by this author
First published: 30 June 2021
Citations: 3

Handling Editor: Isabella Cattadori


  1. The spatial organization of populations determines their pathogen dynamics. This is particularly important for communally roosting species, whose aggregations are often driven by the spatial structure of their environment.
  2. We develop a spatially explicit model for virus transmission within roosts of Australian tree-dwelling bats (Pteropus spp.), parameterized to reflect Hendra virus. The spatial structure of roosts mirrors three study sites, and viral transmission between groups of bats in trees was modelled as a function of distance between roost trees. Using three levels of tree density to reflect anthropogenic changes in bat habitats, we investigate the potential effects of recent ecological shifts in Australia on the dynamics of zoonotic viruses in reservoir hosts.
  3. We show that simulated infection dynamics in spatially structured roosts differ from that of mean-field models for equivalently sized populations, highlighting the importance of spatial structure in disease models of gregarious taxa. Under contrasting scenarios of flying-fox roosting structures, sparse stand structures (with fewer trees but more bats per tree) generate higher probabilities of successful outbreaks, larger and faster epidemics, and shorter virus extinction times, compared to intermediate and dense stand structures with more trees but fewer bats per tree. These observations are consistent with the greater force of infection generated by structured populations with less numerous but larger infected groups, and may flag an increased risk of pathogen spillover from these increasingly abundant roost types.
  4. Outputs from our models contribute insights into the spread of viruses in structured animal populations, like communally roosting species, as well as specific insights into Hendra virus infection dynamics and spillover risk in a situation of changing host ecology. These insights will be relevant for modelling other zoonotic viruses in wildlife reservoir hosts in response to habitat modification and changing populations, including coronaviruses like SARS-CoV-2.


Communal roosting, wherein animals gather for inactive periods of the diurnal cycle (Grether et al., 2014), occurs in a wide variety of taxa, including primates (Ansorge et al., 1992), bats (Kerth, 2008), birds (Goodenough et al., 2017) and invertebrates (Seeley, 1997). Aggregations can range in size from a few individuals—for example, tent-making bats (Brooke, 1990) and some ‘loosely colonial’ seabirds (Coulson, 2002)—to hundreds or hundreds-of-thousands of individuals—for example, colonial seabirds (Coulson, 2002), pre-murmuration roosts of European starlings (Goodenough et al., 2017), cave-roosting bats (Willoughby et al., 2017) and social bees (Seeley, 1997). Aggregations can vary in density according to roosting behaviour (e.g. attachment to individuals or a roosting substrate) and the structure of roosting substrates (e.g. size of caves and hollows or distribution of vegetation; Dollin et al., 1997; Lunn, Eby, et al., 2021). Patterns of communal roosting are particularly important in the context of infectious diseases, as the rate of contacts will influence the propensity for infection and spread of pathogens. Clustering within communal species has been demonstrated to facilitate transmission of pathogens, including the fungal agent of white-nose syndrome in bats Pseudogymnoascus destructans (Hoyt et al., 2021), phocine distemper virus in harbour seals (Swinton et al., 1998) and West Nile virus in American crows and robins (Diuk-Wasser et al., 2010).

Importantly, habitat modification has the potential to change both spatial and temporal aspects of communal roosting, which could be a major contributor to altered infection dynamics. Habitat modification can affect aggregations through the addition or loss of roosting structures (e.g. Feldhamer et al., 2003), alteration of group or community population sizes (e.g. Davis et al., 2012) or the creation of structural or behavioural barriers to movement (Tucker et al., 2018). The seasonal ecology of some species may also be impacted, for example through altered distribution of seasonal resources (e.g. Leveau et al., 2018). These ecological changes are known to have broad impacts on pathogen dynamics: for example, fragmentation of species into smaller, disconnected populations can drive local extinction of pathogens through stochastic processes first described in human populations (Bartlett, 1956) and more recently in animal populations (Lloyd-Smith et al., 2005). Periods of local pathogen extinction can then cause total loss of immunity in populations, and subsequently increase the magnitude of epidemics in events when the pathogen is reintroduced (Bartlett, 1956; Plowright et al., 2011). Despite the recognized importance of ecological dynamics on transmission, the epidemiological consequences of fine-scale animal aggregations, and changes to both with habitat modification, have not been well studied (Altizer et al., 2006). Work by Laughlin et al. (2019) has moved this topic forward, by exploring general theory for how inter-roost movements and host attributes can influence pathogen spread among roosts. However, fine-scale intra-roost aggregations remain unexplored.

Hendra virus (HeV) is one of several zoonotic viruses that have emerged from bats in recent decades (Eaton et al., 2006). It is a paramyxovirus (Genus: Henipavirus) that causes highly lethal disease in horses and humans in eastern Australia (Plowright et al., 2011). Surveillance of virus excretion from fruit bats (Pteropus alecto, the primary host in subtropical eastern Australia) has shown strong spatio-temporal variation in virus detections in this region (Field et al., 2015), and spillover events in horses (Plowright et al., 2015), both of which tend to peak in winter months. Two distinct processes have been hypothesized to drive this seasonal pattern in bat-virus shedding: ‘within-host processes’ in which the virus could persist within individuals, with seasonal changes in immune function driving the reactivation and shedding of virus; and ‘between-host processes’ in which host population dynamics drive transmission cycles through changes in the density of susceptible individuals, with virus re-introduction to roosts occurring through immigration (Plowright et al., 2016). Concurrent with the emergence of Hendra virus has been the observation of dramatic ecological shifts in flying-fox populations (Eby et al., in review; Williams et al., 2006). Wide-spread land clearing in south-eastern Australia has resulted in large-scale fragmentation of flying-fox roosts, and has seen an increasing transition from bats forming large roosts of nomadic individuals in areas with dense roosting habitat, to small, continuously occupied roosts of resident bats in urban areas with sparse roosting habitat (Eby et al., in review; Eby et al., 1999; Tait et al., 2014). Increased incidence of spillover has been correlated with the rise of these smaller, continuously occupied roosting sites (Eby et al., in review; Plowright et al., 2011). Previous studies that have modelled between-host processes in pteropodid bats have considered infection in homogenous populations (e.g. birth pulses Peel et al., 2014), or population heterogeneity at large landscape scales (Plowright et al., 2011), but the role of fine-scale roost habitat structure remains unexplored, particularly in the context of anthropogenic habitat change.

The goal of the present study is to investigate how infection dynamics (including the probability of an outbreak, the magnitude and speed of epidemics and persistence of pathogens) is influenced by roost stand structure and total bat abundance. To do this, we use empirical data on roost stand structure and flying-fox aggregation to develop spatially explicit compartmental models, and simulate the spread of Hendra virus within isolated roosts of different sizes. We measure the effect of several model features, such as the presence of a latent infection period, the strength of connectivity between groups and the existence of pre-existing immunity within the population. Outputs from our models extend from works by Laughlin et al. (2019) to contribute understanding of epidemic dynamics inside structured roosts, and to provide insights from an empirical system in a situation of changing host ecology. These findings will be relevant for modelling other communally roosting zoonotic reservoir hosts and will be particularly relevant for gregarious bat species as they, once again, return to the forefront of zoonotic emerging infectious disease research.


2.1 Model description

We use a set of spatially explicit and stochastic compartmental models to simulate Hendra virus epidemics within isolated flying-fox roosts consisting of multiple trees within a square area. We consider closed roosts without demographic processes to focus on the effects of spatial structure on infection dynamics. Moreover, as we are mainly interested in short-term dynamics (a single year cycle), and flying foxes have synchronous reproduction (a single birth pulse per year) and long life spans (McIlwee & Martin, 2002), we consider the dynamics in the period between annual birth pulses and ignore births and deaths, as a first approximation. Because the community structure of tree-roosting pteropodid species is driven by the spatial structure of tree stands (Lunn, Eby, et al., 2021), and individual bats show tree-level fidelity with moderate movement between trees (Markus, 2002), we use a spatial framework where each tree hosts a group of bats and transmission occurs among individuals within and among these groups (‘tree-groups’). We specify that transmission is a function of distance, and assume (a) the route of transmission is through direct contact with infectious urine droplets (as it falls towards the ground contacting animals in the three-dimensional roost structure) or by exposure to clouds of aerosolized urine over small (within-tree) distances (Plowright et al., 2015), (b) that there is more mixing within tree-groups than between tree-groups (Markus, 2002), (c) mixing between tree-groups decreases with distance between trees and (d) mixing within tree-groups (or between interlocking neighbouring trees) is homogenous.

The force of infection experienced by bats in a given tree i is modelled as:
where urn:x-wiley:00218790:media:jane13566:jane13566-math-0002 is the rate at which susceptible individuals in tree i acquire infection from infectious individuals in tree j. The rate of new infections in tree i is urn:x-wiley:00218790:media:jane13566:jane13566-math-0003, where Si is the number of susceptible individuals in the ith tree-group, and Ij is the number of infectious individuals in the jth tree-group. We assume that transmission is density dependent within tree-groups (see Appendix S1 for a description of contact scaling within tree-groups).
In the absence of data on the force of infection within roosts, we explore the assumption that contact rates between bats from different groups decreases with the distance between their respective trees. Specifically, we model transmission rate between tree-groups (denoted i and j) as follows (Lloyd & Jansen, 2004):
where urn:x-wiley:00218790:media:jane13566:jane13566-math-0005 is the within-tree transmission rate, dij is the distance between trees i and j and θ is a scaling parameter that controls the decay of transmission with distance (with θ ranging between 0.1 and 10 m). Low values of θ correspond to weaker coupling between tree-groups, as there is fast decay in transmission with distance. This represents a scenario where bats mix freely within their individual roost trees but rarely come into contact with bats in other trees. As θ increases, mixing becomes more homogenous as transmission between tree-groups becomes as likely as transmission within tree-groups. High values of θ hence represent a free flow of bats across the roost. In the Supporting Information, we consider an alternative mathematical function whereby transmission rate decreases with the square of the distance (Appendix S2); both functions generate similar results for comparable values of θ (Appendix S3).

Because within-host dynamics of henipaviruses in bats are not well characterized, we compare two plausible compartmental model structure types: a susceptible-infected-recovered (SIR) model, and a susceptible-exposed-infected-recovered (SEIR) model, which only differ by the inclusion of a latent, non-infectious initial stage following exposure to the virus (E). Our focus is on short-term invasion dynamics (up to 365 days), therefore we do not consider models with waning immunity or cycles of reactivation in persistent infections (Plowright et al., 2016) that would only affect longer term infection dynamics: indeed, henipavirus antibodies in African fruit bats may persist for ~1,500 days (Peel et al., 2018), and reactivation of latent infection is likely to occur in annual cycles (Kessler et al., 2018). Consistent with empirical evidence, we assume no disease-induced mortality (Edson et al., 2015). A visual representation of the model is given in Figure 1.

Details are in the caption following the image
Conceptual diagram of the modelling approach. Empirical data on the structure of roosting trees forms the base of the spatial framework (1), with transmission between groups of bats in trees (grey circles). We include three scenarios of stand structure density to reflect ecological shifts in Australian flying-foxes (‘sparse’, ‘intermediate’ and ‘dense’ structures). Realistic values of total abundance are applied to models (N = 288, 2,880 and 4,320), and simulated individuals are divided equally between tree-groups (2). We model transmission as urn:x-wiley:00218790:media:jane13566:jane13566-math-0006, being the rate at which susceptible individuals in tree i acquire infection from infectious individuals in tree j. Transmission is underlain by roost stand structure in heterogenous models (3). Specifically, transmission is a function of distance between tree-groups, and a scaling parameter that controls the decay in transmission with distance (θ). The influence of θ is represented in the figure as ‘transmission strength’: at low values of θ there is fast decay in transmission with distance, shown by the intensity of yellow shading from an index case. As θ increases transmission becomes more homogenous, as transmission between tree-groups becomes as likely as transmission within tree-groups. In homogenous models (4) transmission is constant (equivalent to mean-field models). From this model framework we calculate the basic reproductive number (R0) of each model (5), and use stochastic simulations to investigate the infection dynamics for each scenario (6). For all summary measures, we report the median of successful simulations (dark purple), together with the interquartile range to indicate the variation between simulations (light purple shading)

2.2 Basic reproductive number

Similar to meta-population models, our spatially structured compartmental model has two levels to infection dynamics: infection within groups, and infection of the global population (Jesse et al., 2008). The basic reproductive number (R0) is therefore defined at two levels: within-group R0 (calculated per group) and the global R0 (Colizza & Vespignani, 2008). For our models, which have a spatially explicit, heterogenous structure, the global R0 depends on the index group where the virus is introduced, its location within the spatial structure, and its local population size (Liu & Hu, 2005). We therefore calculate global R0 as the average of within-group R0 values in the global population, given that any tree-group could be selected as the index case. For our models the global R0 is calculated as:
where n is the number of tree-groups, Ni is the number of individuals in the ith tree-group and γ is the rate of recovery. The expression for within-group R0 values is contained within Equation 3, as urn:x-wiley:00218790:media:jane13566:jane13566-math-0008. Note that the expression of R0 is the same for SIR and SEIR model structures because roosts are closed and there is no mortality (i.e. the probability of surviving the latent period is one).

2.3 Roost structure and model parameterization

To explore how infection dynamics are influenced by heterogeneity in stand structure, we apply the above models to three empirical examples of flying-fox roost stand structures, representing sparse, intermediate and dense stand structures respectively (collectively referred to as ‘heterogenous’ models; Figure 1). For details on how these stand structures were mapped, see details in Lunn, Eby, et al. (2021). Because the focus of this study is on spatial structure and tree density rather than spatial extent, the modelled roosts are contained in 20 × 20 m squares, even though in reality the roosts span different areas. Within this area, the dense roost comprises of 72 trees (with a median pairwise distance of 10.5 m), the intermediate roost 32 trees (median pairwise distance 10.7 m) and the sparse roost four trees (median pairwise distance 12.3 m). See Appendix S4 for a complete description.

To explore the influence of bat abundance, we populate each roost with 288, 2,880 or 4,320 bats in turn, evenly split among trees (hence the choice of bat numbers for arithmetic reasons). We chose this set of scenarios to reflect empirical observations of bat roost sizes and roosting behaviour, where the number of bats per occupied tree is typically higher in sparse stand structures than dense structures (Lunn, Peel, Eby, et al., 2021). Lastly, previous works on metapopulation models have highlighted the distinct roles of between-group coupling and structural heterogeneity on infection dynamics (e.g. Colizza & Vespignani, 2008; Park et al., 2002). We explore the effect of coupling strength (here being the decay of transmission rate with distance, θ) and the effect of heterogeneity (stand structure scenarios) in the model structure separately, by simulating replicate epidemics with a range of values for the distance tuning parameter, θ. Specifically, values of θ within a range of 0.1–10 m represent a gradient of spatial heterogeneity, which we contrast with a homogenous scenario where θ tends to infinity, such that every inter-tree transmission rate βi,j is equal to the within-tree rate β. Mixing in homogenous models is random (all bats have an equal probability of coming into contact, regardless of underlying stand structure), and are equivalent to standard, mean-field models. As underlying stand structure does not matter here, outputs from ‘dense’, ‘intermediate’ and ‘sparse’ homogenous models are combined into one group for presentation.

Hendra virus epidemiological parameters were derived from experimental, field and captive studies of Pteropus alecto (Table 1). Direct empirical estimates of transmission rates urn:x-wiley:00218790:media:jane13566:jane13566-math-0009 have not been obtained, so we inferred a range of plausible values from field seroprevalence data (Breed et al., 2011; Edson et al., 2019; Field, 2004). Seroprevalence reports typically range between 25% and 75%. Assuming Hendra virus in natural populations is stationary, we can approximate R0 as the inverse of the proportion of seronegative bats (Appendix S2; also see Plowright et al., 2011), hence a range of 2–4. We chose three values for R0 (2, 3 or 4), from which we derived corresponding values of β under each set of roost structure and population size (see Appendix S2).

TABLE 1. Model parameters
Parameters Value Description (reference)
Infectious period (1/γ) 7 days Shedding duration (Halpin et al., 2011)
Incubation period (1/δ) 6 days Time between infection and shedding (Halpin et al., 2011)
Mean seroprevalence 0.25; 0.5; 0.75 Seroprevalence values from wild Pteropus alecto (Breed et al., 2011; Edson et al., 2019; Field, 2004)
Transmission rate (β)

0.001984 (0.25);

0.000992 (0.50);

0.000661 (0.75)

Calculated from field seroprevalence data: urn:x-wiley:00218790:media:jane13566:jane13566-math-0010, where urn:x-wiley:00218790:media:jane13566:jane13566-math-0011, and seroprevalence = 0.25, 0.50 or 0.75, urn:x-wiley:00218790:media:jane13566:jane13566-math-0012 and N = 288
Threshold epidemic size 10 Minimum separation point from bimodal distributions of frequency of epidemic peak versus epidemic size
Distance tuning parameter (θ) 0.1; 0.5; 1; 2; 10 m Gradient of values from low decay in transmission with distance (10) to high (0.1)
Radius scaling factor (1/α) 3 m Mean tree radii for roost trees (Lunn, Peel, Eby, et al., 2021)

2.4 Stochastic simulations

The model is implemented as a continuous-time, discrete-event Markov stochastic process with exponentially distributed time to next event. Simulations were run using a tau-leap algorithm (Gillespie, 2001) implemented in R. Because of the heterogenous structure of the roosts, simulation outputs depended on the choice of index location relative to the structure of the roost (Liu & Hu, 2005). Therefore, at the start of each simulation we introduced one infected individual into a randomly selected tree-group. Data and annotated R code are available at https://github.com/TamikaLunn/spatial-model-HeV.

For each scenario and parameter combination, we ran 500 simulations from which we calculated summary statistics, including the probability of virus extinction within a year of its introduction. In each simulation, virus introduction was considered successful if the number of total infections exceeded a threshold of 10 bats. The threshold was chosen as a standard mid-point in the bimodal distribution of final epidemic sizes across a broad set of parameter values. We then calculated time to extinction, given as the time (in days) when the last infected bat recovered. We calculated the magnitude of the epidemic peak as the proportion of infections at the infection peak, as well as the duration (the number of days spanning the inter-quartile range of the curve) and timing of the epidemic peak. For all summary measures, we report the median of successful simulations, together with the first and third quartile to indicate the variation between simulations.


The effects of stand structure, total abundance and between-tree coupling on infection dynamics are largely conserved between scenarios of pre-existing immunity (25%, 50% and 75% initial seroprevalence) and model compartmental structure (SIR and SEIR). For simplicity in reporting general patterns, we focus on outputs from models with an SIR structure and 50% starting seroprevalence, but highlight differences in absolute values between scenarios of immunity and model structure at the end of this section. Figures for additional model outputs are given in the Supporting Information.

3.1 Effect of roost structure on infection dynamics

Simulated dynamics for structured populations differ substantially from that of mean-field (homogenous) compartmental models for equivalently sized populations. Models that assume homogenous mixing (equivalent to bats continuously flying throughout the roost and contacting all other bats with equal likelihood) are more likely to generate successful outbreaks (Figure 2) of higher and faster magnitude (Figure 3) than any model with heterogenous mixing, where contact rates are governed by stand structure. Differences in outbreak success can be seen by comparing the height of the dark blue bars in Figure 2—for example, under the scenario of a small roost size (288 bats) and low between-tree coupling (θ = 0.1; panel a) outbreaks failed in nearly 100% of simulations for heterogenous (‘dense’, ‘intermediate’ and ‘sparse’ stand structures, left-hand bars), compared with ~80% of simulations for homogenous models (‘homogenous’, right-hand bar). Differences in the magnitude of epidemics can be seen in Figure 3: for example, in the medium-size roost (2,880 bats) with low contact rates between tree-groups (θ = 0.1 m; panel a-iv), the prevalence peaked at 10% or less for all three roost structures under heterogenous mixing (red, green and blue boxes), compared to over 30% under homogenous mixing (purple box). Under the same scenario, the time until the epidemic peak is also shorter with homogenous mixing (reached within a week) than with homogenous mixing (reached after a week; Figure 3b-iv).

Details are in the caption following the image
Probability of outbreak success. Bars show the proportion of simulations that were successful, and the time until extinction (in days). Bars are split by stand structure (x axis). Vertical facets show the total number of individuals in the population, and horizontal facets show the strength of between-tree coupling moderated by θ. Low values of θ correspond to weaker coupling between tree-groups, as there is fast decay in transmission with distance, represented in the figure by the intensity of yellow colouring. Maximum time to extinction shown here (84 days) is the end of a single season period
Details are in the caption following the image
Characteristics of the epidemic peak for successful outbreaks. Plots show (a) magnitude of the epidemic peak, (b) time (days) till the epidemic peak and (c) the duration of the epidemic peak (days). Panels show stand structure (x axis and bar colouring), total number of individuals in the population (vertical facets), and the strength of between-tree coupling moderated by θ (horizontal facets). Low values of θ correspond to weaker coupling between tree-groups, as there is fast decay in transmission with distance, represented in the figure by the intensity of yellow colouring

As expected, heterogenous models became more indistinguishable to homogenous models when they approached free mixing (increasing values of θ). This can be seen in the outbreak success of simulations, for example—in medium and large roosts, the proportion of successful outbreaks was ~90% for all models (sparse, intermediate, dense and homogenous bars) in medium and large roosts with free mixing (Figure 2f,i). Moreover, for small roosts, successful outbreaks in heterogenous models (three left-hand bars) were only observed with freer mixing (Figure 2c, but not Figure 2a,b). Additionally, the epidemic curve of simulated infections became more similar between models as mixing became more free, including the magnitude of the peak, timing of the peak and duration of the peak (Figure 3, compare panels -i, -iv, -vii to panels -iii, -vi, -ix for each set).

The underlying structure of roosting trees created different infection dynamics in heterogenous mixing models. Differences between infection dynamics with different stand structure types (dense, intermediate or sparse) were most pronounced with restricted mixing (low θ) but were observable for all but the highest value of θ (closer to homogenous mixing). This can be seen by comparing bars (Figure 2) and boxes (Figure 3) of stand structures within panels where θ = 0.1 and θ = 10. To highlight the effects of stand structure on simulated infection dynamics, we report output values for an intermediate mixing scenario (θ = 1) in the following paragraphs, where there is some effect of distance on transmission, but this is not so exaggerated that there is either completely free transmission (high θ) or no transmission (low θ) between tree-groups. Outputs for other values of θ can be viewed in the figures.

Sparse stand structures (with fewer trees but more bats per tree) are more likely to generate successful outbreaks, as well as larger and faster epidemics with shorter virus extinction times, compared with intermediate and dense stand structures with more trees but fewer bats per tree. The probability of successful outbreaks is highest in sparse roosts, with the average proportion of successful outbreaks being 0.75 (interquartile range 0.72–0.78, given θ = 1), versus 0.55 (0.49–0.60) and 0.47 (0.42–0.51) for intermediate and dense stand structures respectively (averaged across abundance scenarios, i.e. panels b, e and h in Figure 2). Sparse stand structures also generate the largest epidemics, followed by intermediate, then dense stand structures. The mean prevalence of infection at the epidemic peak is: 0.20 (interquartile range: 0.16–0.23; 1,048 infected) for sparse structures, 0.10 (interquartile range 0.06–0.13; 998 infected) for intermediate structures and 0.08 (0.04–0.11, 885 infected) for dense structures (averaged across abundance scenarios—panels a-ii, a-v and a-viii, Figure 3).

The epidemics also occur earlier (Figure 3b) and are of shorter duration (Figure 3c) for sparse structures (also see epidemic curves in Appendix S5). Sparse stand structures reach their epidemic peak at 22 days (interquartile range 17–26) and last 41 days (37–45), intermediate structures at 42 days (32–49) lasting 58 days (50–65), and dense structures at 51 days (38–60) lasting 67 days (56–77; averaged across abundance scenarios—panels b-ii, b-v and b-viii, Figure 3). Time to extinction is similarly faster for sparse structures. Average extinction time is 82 days (73–89) compared with 116 days (99–130) and 134 days (111–154) for sparse, intermediate and dense stand structure respectively, averaged across abundance scenarios (panels b, e, h, Figure 2).

The spatial coverage of infection is consistently greater for sparse stand structures than intermediate or dense structures. The proportion of infected tree-groups more commonly reaches 100% under sparse structure scenarios. This can be seen in Figure 4, where the blue line (sparse structures) reaches saturation for every value of θ, under population sizes where successful outbreaks were consistently achieved (i.e. medium and large populations; Figure 4d–i). This contrasts with intermediate and dense structures, which range between 21%–100% and 7%–100% of tree-groups infected for the same population size scenarios and values of θ (red and green lines, Figure 4d–i). In other words, in intermediate and dense stand structures, infections typically spread beyond the index tree-group, but do not necessarily reach all tree-groups.

Details are in the caption following the image
Proportion of infected trees over time (days) for successful outbreaks. Stand structure is shown by line colour. Models with heterogenous mixing and homogenous mixing are indicated by line type (heterogenous = solid, homogenous = dashed). Vertical facets show the total number of individuals in the population, and horizontal facets show the strength of between-tree coupling moderated by θ. Low values of θ correspond to weaker coupling between tree-groups, as there is fast decay in transmission with distance, represented in the figure by the intensity of yellow colouring. Lines are median values of simulations (500 simulations per set) with lower and upper interquartile range shaded. Time is shown over a single season period (90 days) although simulations could run for up to 365 days

Moreover, the proportion of infected tree-groups reaches its peak most quickly under sparse structure scenarios (shown by the timing of the peak in the blue curve relative to red and green curves, Figure 4d–i). The duration of peak infection is also longest under sparse stand structure scenarios (45–59 days) compared with intermediate (1–30 days) and dense (1–18 days) stand structures (values reported across all values of θ). This is shown by the duration of the flat part of the peak in the blue curves relative to red and green curves in Figure 4d–i. This is an important note, as the spread of infection to tree-groups can be thought of as essentially ‘unlocking’ groups of individuals exposed to infection and will drive the speed and magnitude of the epidemic.

3.2 Effect of total abundance on infection dynamics

Predictably, infection dynamics are highly dependent on population size. For heterogenous models, almost all simulations with small populations (total abundance of 288) fail to generate outbreaks of more than 10 infected bats. Simulations with medium populations (total abundance of 2,880) and large populations (total abundance of 4,320) have a higher proportion of successful outbreaks (i.e. producing more than 10 infections). This pattern in outbreak success is conserved between stand structure types, as shown by the mirrored decrease in the height of blue bars per structure, across rows in Figure 2b,e,h. These patterns are consistent in other metrics of infection, with shorter extinction times, and faster and larger epidemic peaks observed for increasing population sizes (shown by respective heights of boxes per structure, across rows in Figure 3—e.g. panels -ii, -v, -viii).

Viral persistence for at least 84 days (~3 months) is frequently observed for all stand structures for which there are successful outbreaks (shown by the proportion of red in bars, Figure 2). Notably, increasing total abundance in sparse structures (but not dense or intermediate structures) more commonly promotes outbreaks that fade out within 84 days (shown by the reduced proportion of red in bars, for sparse structure in panel e compared with panel h, Figure 2). Persistence for 3 months is ecologically relevant for Hendra virus, which has seasonal dynamics in prevalence, and a peak season over winter (Field et al., 2015). Virus persistence for more than 360 days (roughly 1 year) was not observed despite the maximum duration for simulations being set at 365 days. The longest duration of persistence of the virus occurs in intermediate to dense stand structures, with a medium to large bat abundance, and with a restricted to intermediate level of connectivity between tree-groups (θ: 0.1–1; see the proportion of orange/red bars in Figure S3b). We provide more detailed explorations into scenarios that promote outbreak success and virus persistence in the Supporting Information (Appendix S6).

3.3 Effect of pre-existing immunity on infection dynamics

General patterns of the effect of stand structure, total bat abundance and effect of distance on infection dynamics are largely conserved between scenarios of pre-existing immunity (25%, 50% and 75% starting seroprevalence), but absolute values differ. When infection is introduced into a population with lower seroprevalence (25%), successful outbreaks are more likely, time to extinction is faster and epidemics are slightly larger, faster and of shorter duration (Appendix S3). When infection is introduced into a population with higher seroprevalence (75%), successful outbreaks are much less likely but last longer (Appendix S3).

3.4 Effect of compartmental structure on infection dynamics

General patterns of the effect of stand structure, total abundance and values of theta on infection dynamics are largely conserved between the compartmental model structure types, although absolute values differ. Models with an incubation period (SEIR) show similar probabilities of outbreak success but promote longer viral persistence in the population (Appendix S3). Scenarios that allow the longest persistence of the virus are the same for those in the SIR scenarios: dense and intermediate structures, with either medium or large total abundances. Patterns in infection dynamics (relating to stand structure, total abundance and values of theta) mirror those for SIR models, only with smaller and longer peaks in infection (Appendix S3).


This study was motivated by the hypothesis that recent trends in Hendra virus spillover have been driven by dramatic ecological changes in flying-fox populations in Australia, including shifts in their roosting behaviours (Williams et al., 2006). Integrating empirical data into models allows us to investigate how changing roost structures may affect the spread of pathogens within roosts, and provides a case study of epidemic dynamics in a high-profile communal host–pathogen system. Outputs from these models also contribute insights into the spread of viruses in structured populations more generally, adding to general theory posed by Laughlin et al. (2019). This will be relevant for modelling other zoonotic viruses in wildlife reservoir hosts in response to habitat modification and changing populations.

The outputs of our homogenous and heterogenous models demonstrate that infection dynamics of heterogenous models are qualitatively unlike that of mean-field models for equivalently sized populations, and will vary under increasing levels of heterogeneity. The observation that spatially explicit stand structures had lower probabilities of outbreak success, with slower and smaller outbreaks, is consistent with comparable studies on network models that compare infection propagation in random versus community networks (Huang & Li, 2007; Liu & Hu, 2005). When mixing is homogenous, all individuals have an equal likelihood of exposure, and global infection in the population is more likely. By contrast, structured populations have a higher probability that pockets of the population could remain uninfected. This highlights the importance of including spatial structure in disease models for communally roosting species whose patterns of aggregation are driven by the spatial structure of their environment.

Within heterogenous models, the higher probabilities of success, faster extinction times and higher magnitudes of epidemics observed in sparse structures compared with intermediate and dense structures are likely attributable to differences in the rate and spread of infection between tree-groups. In sparse structures, infection spreads quickly and consistently throughout the whole population. In contrast, while infections in intermediate and dense structures typically spread beyond the index tree-group, they do not necessarily reach all tree-groups, and the rate of spread is consistently slower. Sparse structures had a higher abundance of individuals per tree than intermediate and dense structures, chosen to reflect expected packing patterns of bats (Lunn, Peel, Eby, et al., 2021). This yields higher values of group-level R0 within sparse structures, and consequently a higher force of infection from these infected groups.

Because of the specificities of bat roost structures, our results contrast with Bartlett’s (1956) seminal classification of disease dynamics in spatially structured systems. In particular, he predicted irregular epidemics in systems with a small number of groups, predictable epidemics interspersed with periods of pathogen extinction for systems with an intermediate number of groups, and regular epidemics in systems with many groups. In our models increasing group-level R0 increases the probability of infection transmission between groups, because there are a larger number of infected hosts to spread the infection (Park et al., 2002). Higher group-level R0 values within sparse structures would therefore (a) increase the probability of transmission between groups, and therefore the probability of success and magnitude of epidemics, and (b) increase the frequency of transmission between groups, consequently accelerating the epidemic and decreasing the extinction time. In contrast, intermediate and dense structures, having a smaller proportion of the population exposed to infection, produce a dampened epidemic peak (a mechanism similarly described by Jesse et al., 2008), and a lower rate of transmission between groups likely slowed the epidemic and increased extinction time (a mechanism similarly described by Park et al., 2002). This example reflects the importance of considering both infection spread (dependent on the total number of groups and the strength of coupling between groups, as in Bartlett (1956)), as well as the force of infection from infected groups, for understanding infection dynamics in spatially structured populations (Park et al., 2002).

Observed differences in the pattern of infection between roost structure types will be important for understanding local infection dynamics of Hendra virus, and may be important when considering the potential impact of urbanization on infection dynamics and spillover risk from roosts. In our data-driven stand structure scenarios, sparse structures promote a higher probability of outbreak success, indicating that roosts of this type may be more susceptible to local epidemics once an infection is introduced, and so, may contribute to spillover more frequently than other roost structure types. Introduction of infection into the roost population could occur through migration from another roost (Plowright et al., 2011) or reactivation of a latent infection within bats occupying the roost (Glennon et al., 2019). Importantly, roosts of this type are common to human-dominated landscapes, where exacerbated stressors may increase the rate of reactivation of latent infections within bats (Kessler et al., 2018; Plowright et al., 2008), and may further contribute to these roosts as frequent hotspots for virus spillover. This would be consistent with the correlation seen between the rise of these roosts types and increasing incidence of spillover (Eby et al., in review; Plowright et al., 2011) and may be one mechanism to explain this correlation.

Additionally, epidemics in these roost structure types are characterized by high magnitude pulses of short duration. Having a high proportion of bats shedding virus, concentrated within a small timeframe, may also contribute to spillover risk from these roosts. While our models were only run for 1 year, there was also a tendency for viruses in these roosts to fade out more quickly than other roost structure types. This could create a pattern of fast, high magnitude epidemics interspersed with periods of local pathogen extinction (and total loss of immunity), in contrast to scenarios of longer viral persistence, where the maintenance of immunity within roosts would dampen the magnitude of epidemics between cycles of infection (Bartlett, 1956; Plowright et al., 2011). Tight boom-bust cycles of infection in these roost types may further add to spillover risk and contribute to the observed correlation with Hendra virus spillover. Practically, this may also reduce the detectability of circulating infection in these roosts, as virus will frequently be absent. Regular sampling may be required to confirm these modelling outputs.

Our finding that pathogens spread most rapidly in sparse structures, when hosts form a small number of large groups, are dynamically similar to those described in Laughlin et al. (2019). However, the difference in scale of the two models—intra-roost in the current study, and inter-roost in Laughlin et al. (2019)—creates a divergence in ecological interpretation of the models. Laughlin et al. (2019) suggest that large roosts amplify pathogen spread and are thereby important sites for pathogen surveillance. Small roosts, by contrast, are suggested to be buffered against the spread and impact of emerging pathogens. In the current study, we take a fixed area inside single roost to explore how fine-scale spatial aggregations within roosts influence infection spread, given a fixed population size. In reality these roosts span different areas and have different total population sizes. Importantly, roosts with sparse stand structures are more typical of small roosts that span small (often urban) areas, while roosts with dense stand structures are more typical of large roosts that span larger areas of intact forest (Lunn, Eby, et al., 2021). Our findings show that in this system, small but sparse structures may be an important target for surveillance, and highlight that fine-scale attributes of roosts are also important to consider when understanding patterns of infection spread.

These interpretations are based on outputs from SIR compartmental models with an existing seroprevalence of 50%. Models with an incubation period (SEIR) at a higher seroprevalence equilibrium, could also be realistic for Hendra virus infection in bat populations (Glennon et al., 2019). While specific choices of compartmental model structure and seroprevalence value influenced the absolute values predicted by simulated dynamics, we have shown that the general effects driven by stand structure and bat aggregation remain consistent, and so the relative risk of sparse structures compared with intermediate and dense structures remain. We also note that these interpretations are dependent on the assumption that the number of bats per tree will be higher in sparse stand structures where there are fewer trees available to roost in. This scenario was deliberately chosen to reflect empirical data on bat aggregation patterns in Australia (Lunn, Peel, Eby, et al., 2021) but may not be the case for all Australian bat roosts, nor reflect the biology of all communally roosting species.

We have considered a closed system, but our model could be easily extended to include demographic processes and other cycles of infection and immunity (such as those identified in Glennon et al., 2019), for example, with immune waning and reactivation of latent infections. These processes are more likely to affect longer term virus spread and persistence at the metapopulation level. Extensions to these models along these lines could be used to reaffirm the relative importance of demographic versus epidemic processes in different population structure types. We use a specific example of flying-fox roosts in this paper, but our code is generalizable to other systems where roosts might act as important transmission sites—for example, to model interactions between colonies or subcolonies of colonial seabirds (Coulson, 2002) or clusters of microbats in structurally complex cave systems (Willoughby et al., 2017). Generation of the spatial model structure simply requires input of a distance matrix between groups, and specification of how transmission is expected to relate to distance. This model framework could be easily adopted to combine basic data on population structures with empirical data on pathogens of potential threat, to understand and predict the risk of novel pathogen introduction, spread and persistence in communally roosting wildlife systems.


Our results highlight that explicit consideration of spatial structure is important in models of structured, communally roosting species. In our models, unstructured populations were more easily invaded and experienced faster and larger epidemics than in structured populations. This will have implications for predicting infection and identifying spillover risk from communal species, including bats, and emphasizes the importance of appropriate model choice informed by host ecology. Within the context of Hendra virus specifically, we demonstrate that modified patterns of animal aggregation driven by urbanization have the potential to change infection dynamics in altered host populations. Counterintuitively, we identify sparse stand structures with fewer trees but more bats per tree, most typical of anthropogenic habitats, as the highest risk for pathogen spillover, with these roosts generating a higher probability of outbreak success, larger and faster epidemics, and shorter virus extinction times. This information could be used to predict spillover risk from roost features at a landscape scale across Australia, particularly in the context of rapidly changing host ecology. Lastly, our modelling approach provides a framework for combining data-driven scenarios of communal roosting with theoretical modelling of infection. This will be valuable for future pathogen modelling efforts in communally roosting species across wide-ranging taxa of zoonotic importance.


We acknowledge the Yuggera Ugarapul and Widjabul Wia-bal people, who are the Traditional Custodians of the land upon which this work was conducted. We thank Beccy Abbot, Kirk Silas, Devin Jones, Liam Chirio, Rachel Smethurst and Cara Parsons for their assistance in the field mapping roosting trees, Emma Glennon, Aaron Morris and Elinor Jax for their feedback and suggestions on modelling. Fieldwork for this work was supported by the Paddy Pallin Foundation, the Royal Zoological Society of NSW, the Foundation for National Parks and Wildlife, the National Science Foundation (a Dynamics of Coupled Natural and Human Systems grant DEB1716698) and a DARPA PREEMPT program Cooperative Agreement (#D18AC00031). T.J.L. was also supported by an Endeavour Postgraduate Leadership Award and a Research Training Program scholarship (both sponsored by the Australian Government). A.J.P. was supported by an ARC DECRA fellowship (DE190100710) and a Queensland Government Accelerate Postdoctoral Research Fellowship. This research was conducted under a Griffith University Animal Research Authority permit (DEB-1716698), a Scientific Purposes Permit from the Queensland Department of Environment and Heritage Protection (WISP17455716), a permit to Take, Use, Keep or Interfere with Cultural or Natural Resources (Scientific Purpose) from the Department of National Parks, Sport and Racing (WITK18590417), a Scientific Licence from the New South Wales Parks and Wildlife Service (SL101800) and general and products liability protection permit (GRI 18 GPL), and with permission to undertake research on council and private land. The content of the information does not necessarily reflect the position or the policy of the US government, and no official endorsement should be inferred. The authors have no competing interests to declare.


    The authors have no conflict of interest to declare.


    T.J.L. and O.R. conceived the ideas and designed methodology; T.J.L. collected the data; T.J.L. led the writing of the manuscript, acquired the funding, and coordinated the project administration; T.J.L., O.R., A.J.P. and H.M. analysed and interpreted model output; O.R., A.J.P. and H.M. provided supervision. All authors contributed critically to the drafts and gave final approval for publication.


    Data and annotated R code are available on GitHub at: https://github.com/TamikaLunn/spatial-model-HeV. Data are also available from the Dryad Digital Repository at https://doi.org/10.5061/dryad.n02v6wwxh (Lunn, Peel, McCallum, et al., 2021).

      Journal list menu