Abstract
Epidemic forecasting tools embrace the stochasticity and heterogeneity of disease spread to predict the growth and size of outbreaks. Conceptually, stochasticity and heterogeneity are often modelled as branching processes or as percolation on contact networks. Mathematically, probability generating functions (PGFs) provide a flexible and efficient tool to describe these models and quickly produce forecasts. While their predictions are probabilistic—i.e. distributions of outcome—they depend deterministically on the input distribution of transmission statistics and/or contact structure. Since these inputs can be noisy data or models of high dimension, traditional sensitivity analyses are computationally prohibitive and are therefore rarely used. Here, we use statistical condition estimation to measure the sensitivity of stochastic polynomials representing noisy generating functions. In doing so, we can separate the stochasticity of their forecasts from potential noise in their input. For standard epidemic models, we find that predictions are most sensitive at the critical epidemic threshold (basic reproduction number ) only if the transmission is sufficiently homogeneous (dispersion parameter ). Surprisingly, in heterogeneous systems (), sensitivity is highest for values of . We expect our methods will improve the transparency and applicability of PGFs as epidemic forecasting tools.
Keywords: probability generating functions, branching processes, percolation, sensitivity analysis, epidemic forecasting
1. Introduction
Epidemic dynamics are stochastic, heterogeneous, noisy and, at times, very sensitive to small changes in pathogen properties or human behaviour. Our epidemic forecasts are similar and require careful calibration to provide useful predictions. When epidemic forecasters are asked if another epidemic might occur, a typical response is ‘not if, but when’. As a result, the community largely embraces probabilistic forecasts that model the probability that a large epidemic emerges when a pathogen is introduced into a new population. These forecasts clash with traditional modelling approaches, as they require large simulations or high-dimensional mathematical tools, and consequently, less is known about the sensitivity of their predictions.
Classic compartmental models, such as Kermack and McKendrick’s SIR model [1-3], represent deterministic dynamics, eliminating the possibility of stochastic extinctions. These deterministic frameworks do not capture epidemics that die out early; instead, outbreaks always occur if transmission parameters exceed a certain threshold, and never do under that threshold. To account for stochastic extinction, modellers move to stochastic models, such as branching processes. These types of models, in particular those whose analysis uses probability generating functions (PGFs), measure not ‘if’ an epidemic can occur but ‘what are the chances of an outbreak of a given size’, encapsulating the randomness of everyday interactions, extinctions and extreme events. In this work, we use PGFs to estimate the survival probability of an epidemic, which we will refer to as the epidemic probability (or its complement, the extinction probability).
In these stochastic models, we often assume that input parameters are exact observations and lack any noise. We then let uncertainty in our forecast be only a reflection of the stochasticity of the dynamics. The effects of noise in the observed inputs, if any, are intertwined with the probabilistic nature of the forecasts and therefore hard to estimate. Here, we quantify the sensitivity of these models and extend forecasts about ‘the chances of an outbreak of a given size’ to include ‘their sensitivity to noise’. Although sensitivity analyses are not novel in deterministic settings such as epidemiological compartmental models [4-6], we present a sensitivity analysis of epidemiological applications of PGFs to provide intuition about the reliability of stochastic and probabilistic forecasts.
Sensitivity analyses help scientists evaluate the limitations and scope of their models. As new methodologies emerge, modellers must explore input parameter spaces to identify how small changes affect their projected outcomes. For models of disease spread, perturbations to input values can affect key metrics such as case counts, mortality rates or the infected proportion of the population. This is especially important given that epidemiological parameters and the size of the vulnerable population are hard to estimate from early data [7]. Examining these effects helps modellers pinpoint which parameters and, in turn, which particular diseases are the most sensitive to noise.
We conduct a global sensitivity analysis to evaluate how output variability is apportioned to all sources of input uncertainty over the entire input space [8,9]. PGF models of disease spread are usually parametrized by probability distribution over the number of infections caused by individuals, encoded as the coefficients of a polynomial [10]. Standard mathematical manipulations briefly detailed in §2 can then be used to deduce the extinction probability and the epidemic probability implied by these case distributions. With a probability distribution as our input, we use a variation of the elementary effect, also known as the Morris method [11], to evaluate the sensitivity of our epidemic probability forecasts to variations in model parameters. This method produces a statistical condition estimation (SCE) of a condition number [12], denoted as . A visual and conceptual representation of the SCE process is shown in figure 1.
Figure 1.

Conceptual framework. This figure illustrates our process for defining the statistical condition estimate, . (a) We perturb the probability distribution generated by the PGF, . The thick orange line shows the original discrete probability distribution; thinner, paler lines show perturbed variations of the distribution. (b) We plot against (thick blue line). The large circle marks the extinction probability , given by the fixed point of (dotted line) in [0,1]. Paler curves and markers show how perturbations affect these fixed points. (c) We compute the , from the fixed points to quantify the sensitivity to noise of forecasts over different parameter values (e.g. transmission probability). Here, peak sensitivity occurs at the critical threshold. The shaded region shows a 90% confidence interval for relative outbreak size in a percolation example.
In this article, we calculate , for two common applications of PGFs forecasts: branching processes and percolation on random graphs. Section 2.1 describes the PGF method for the former case, while §2.2 details the latter. Section 2.3 provides background on condition numbers and explains Laub & Xia’s algorithm for SCE [12]. The results for each case study follow in §§3.1 and 3.2. Finally, in §4, we discuss how sensitivity patterns differ between homogeneous and heterogeneous systems, with the latter showing maxima of sensitivity far from their critical point.
2. Methods
We review two flavours of PGFs applied to epidemic dynamics and forecasting, describing branching processes or percolation dynamics on random networks. PGFs compactly encode a discrete probability distribution as the coefficients of a formal power series [10]. In both of our applications, we consider as the PGF of the offspring distribution {}, denoting the probability that an infected individual infects additional individuals in the next generation. We thus write
| (2.1) |
PGFs allow for the easy calculation of many properties of distributions [10]. For example, the average number of offspring (i.e. the basic reproduction number ) can be calculated by
| (2.2) |
In what follows, we use similar calculations to derive important quantities of interest for epidemic forecasting.
2.1. Probability generating functions for branching processes
Branching processes are fully defined by their offspring distribution and, therefore, by their PGF, . In the context of epidemic forecasting, each offspring represents a secondary infection. Starting from the first infected individual, patient zero, we are interested in using to calculate the probability of seeing a stochastic extinction rather than a large macroscopic epidemic that does not end.
We can calculate the extinction probability for the branching process, , with a self-consistent argument. For an outbreak starting at patient zero to be of finite size, every secondary infection of patient zero must also create chains of transmission of finite sizes. With probability , patient zero does not create any secondary infections, and the outbreak is certainly finite. With probability , patient zero creates one secondary infection, which must lead to a finite outbreak with probability . With probability , patient zero creates two secondary infections that both lead to a finite outbreak with probability . And so on and so forth, until we realize that
| (2.3) |
which gives us a self-consistent equation for . We also define the epidemic probability as the complement .
Note, equation (2.3) only admits a non-trivial solution if the branching process is above its epidemic threshold. In a branching process, this means having an average number of offspring or secondary infections greater than or equal to 1 (i.e. only if ).
In epidemic forecasting, it is typical to assume that generates a negative binomial of secondary infections [13,14]. This particular distribution is shaped by two parameters: its average, which corresponds to the classic basic reproduction number , and its dispersion parameter . The dispersion parameter allows us to shape the heterogeneity of the distribution around its average . Counterintuitively, a high dispersion parameter represents homogeneous distributions (a Poisson distribution in the limit ), while a dispersion parameter close to 0 represents overdispersed distributions with rare but important superspreading events. In this parametrization, the probability mass function of the negative binomial is equal to
| (2.4) |
where is the gamma function. Figure 2 shows forecasts for the probability of an epidemic using and .
Figure 2.

Negative binomial offspring distribution epidemic probability. The contour lines show the epidemic probability for a branching process with a negative binomial offspring distribution, parametrized with the average number of secondary cases, and a dispersion parameter, . A smaller defines a more heterogeneous offspring distribution with larger variance. On the other hand, a larger defines a more homogeneous offspring distribution with smaller variance.
Importantly, we will want to evaluate the sensitivity of the solution of equation (2.3) not to the parametrization of in terms of and , but in terms of the true distribution {} of the dynamics. This might seem like a minor point, but it is essential for the generality of our approach.
2.1.1. Assumptions
This framework relies on several assumptions that are critical to keep in mind. The most important is that equation (2.3) assumes an infinite population, which consequently means a large-scale epidemic never ends. Additionally, the PGF does not depend on time, resulting in a constant offspring distribution [15]. These assumptions collectively imply that the population does not react to the epidemic, there is no depletion of susceptible individuals (given the infinite population), and the pathogen remains genetically stable without mutation. These assumptions are made to ease the presentation of results, but in future work, the sensitivity analysis techniques presented here could be easily applied to a situation where these assumptions are relaxed.
2.2. Probability generating functions for percolation on contact networks
Percolation on random contact networks is a common way of capturing spreading dynamics over some network structure [16,17]. In this context, we consider different PGFs that represent both network structure and the stochastic dynamics of transmission supported by the network.
Let us first consider our patient zero, a node of the network selected uniformly at random. Its number of contacts will follow the degree distribution {} of the network [18], generated by
| (2.5) |
From there, the neighbours of patient zero are nodes reached by following random edges. Through this process, it is times more likely to reach a node of degree than a node of degree 1 (and therefore obviously impossible to reach a node of degree 0). Patient zero’s number of other neighbours therefore follows the excess degree distribution of the network [18] and is generated by
| (2.6) |
which is normalized by the average degree, given by
| (2.7) |
We assume that every contact between an infected individual and their neighbours will lead to transmission with probability . This is a simple Bernoulli trial, with PGF where encodes the fact that a transmission event happened. The probability mass function of secondary infection is then determined by the combination of the two stochastic processes—a random number of neighbours, some subset of which get infected. This distribution is generated by .
This spreading process on a random network is analogous to a branching process, and the probability of extinction after an infection is given by
| (2.8) |
However, the overall probability of extinction is defined at patient zero. Having solved for , we write the extinction probability for the percolation process as
| (2.9) |
Assuming that the contact network is undirected, there is now a useful equivalence between the probability of a macroscopic epidemic () and its eventual size (). Since nodes involved in the largest transmission cluster can either start or be reached by the transmission process, the probability of patient zero being in this cluster is equivalent to the relative size of the cluster. The relative final size of a macroscopic epidemic is equal to the epidemic probability,
| (2.10) |
Hence, solving for in equation (2.8) tells us everything there is to know about the process.
Since PGFs are always normalized, will always be a fixed point of equation (2.8), and in this case, we have and since . There is a second non-trivial solution when we exceed the epidemic threshold . Since is defined as the average number of secondary cases, we can write , which gives us the critical transmission probability,
| (2.11) |
that is, the value of such that . This relation allows us to calculate the critical transitions in the rest of the article.
The natural question then is to measure how sensitive our forecasts for the probability and size of an epidemic are to our parametrization of network structure, {}, and disease transmission, .
2.2.1. Assumptions
One additional assumption to consider for this case study is that the model is only exact on treelike networks: no downstream path can connect two neighbours of a given node since equation (2.8) assumes that the secondary cases are independent of one another.
2.3. Statistical condition estimate of polynomial fixed points
We use SCE to quantify the sensitivity of extinction probability to noisy data. In our case studies, this SCE captures the sensitivity of the extinction probability u to perturbations in the distribution that parametrizes the PGF models. We encode the probability mass function in a vector , and we denote the function that maps to a corresponding extinction probability as . Note that is neither the PGF itself nor the condition ; it is the function that solves for (appendix A).
In the case of the branching process, is the self-consistent solution to equation (2.3), and represents the offspring distribution. In the case of percolation, the extinction probability is given by equation (2.8), and represents the degree distribution of the contact network. In both cases, is a reasonable upper bound on the number of offspring or the degree of nodes.
The simplest notion of a function’s sensitivity is the absolute condition number, the magnitude of the gradient at a point, . It provides a natural measure of the sensitivity of a function to perturbations of the coefficients . If the condition number of a function is small (large), a small (large) change to the input will result in a correspondingly small (large) change in the output.
However, this absolute condition number provides a relatively restrictive notion of sensitivity. First, the calculation of the gradient can be difficult or computationally intractable if either lacks a closed-form expression or if its domain is high dimensional. Second, the condition number only considers the sensitivity of functions to isotropic perturbations of constant magnitude, which are not always applicable when first-hand knowledge of the system is available to practitioners.
We use the SCE to calculate how the function changes under arbitrary random perturbations to the coefficients of the infection process, . We will (ironically) focus on isotopic, uncorrelated perturbations, though we note that the SCE can easily accommodate more general, structured perturbations. We do this for the sake of the exposition, and because the SCE turns out to be related to the condition number. Indeed, the SCE is in fact an unbiased estimator of the relative condition number if perturbations follow this specific distribution [19]; see our detailed exposition of this connection in appendix B.
Our method to calculate the SCE is thus as follows [12]:
Randomly perturb the input to . The size of the perturbation is proportional to a small constant .
Calculate the respective extinction probabilities and .
- Compute the change in the output due to perturbation, normalized by the magnitude of the unperturbed output,
- Repeat times and use the sampled values to calculate the relative SCE,
(2.12)
It is known that the bounds obtained from on the true relative condition number are dramatically tightened if the perturbations are sampled orthogonally and the equation for is updated accordingly [19]. Hence, to calculate our final estimate, we actually generate perturbations as a random orthogonal set of unit vectors , obtained by calculating the decomposition of an matrix of i.i.d. draws; cf. appendix B.2 for details. We then ensure the probability distribution is preserved by letting
| (2.13) |
When the perturbations are sampled so, becomes proportional to the 2-norm of the sampled . The constant of proportionality is a ratio of Wallis factors . For any integer , this factor is defined as
| (2.14) |
where is a skip factorial, equal to for odd and for even . Our final estimate is thus
| (2.15) |
A condensed SCE algorithm can be found in appendix D.
3. Results
We present two case studies inspired by the work of Lloyd-Smith et al. [13] and Meyers [17], among others. Lloyd-Smith et al. show the importance of individual variation on the distribution of secondary cases. This individual variation can be characterized by a negative binomial offspring distribution encapsulating the individual variation through the dispersion parameter, , which can produce high variance (low ) around the average of the distribution () [13,14]. Meyers models population-level disease spread with bond percolation on heterogeneous random contact networks. Even with a fixed transmission probability for the bond percolation, using fat-tailed degree distributions to specify degrees in the contact network can drive heterogeneity in the spreading process [16,17].
We use two random networks and their associated degree distributions in this analysis. The first is an Erdős–Rényi (ER) random network characterized by a Poisson degree distribution, and the second is a power-law network characterized by a power-law degree distribution. In both case studies, we test the effect of added error or noise on the input probability distribution.
3.1. Case study: negative binomial branching processes
As stated in §2.1, a negative binomial distribution commonly defines a distribution of secondary cases for public health applications. For the present article, we limit the range of parameter values to and . This parameter space encapsulates both homogeneous and heterogeneous processes, remembering that homogeneous spread (high ) has less variability in the number of secondary cases and heterogeneous spread (low ) has more. This leads to a wide range of dynamical outcomes, as shown in figure 2. For each pair of parameters, we calculate the from 1000 perturbed PGFs with perturbations using . To handle the calculation numerically, we truncate the support of the PGF, meaning the number of secondary cases ranges from 0 to 1000. The results are shown in figure 3.
Figure 3.

Statistical condition estimates for negative binomial branching processes. (a) The largest , meaning the most sensitive values, correspond to the ranges and . The maximum for a given value is shown with the light blue circle markers, which follow a ridge of larger from the largest to . On the other hand, the maximum for a given value is shown with yellow circle markers. Surprisingly, these markers diverge away from when . The black square, triangle and diamond markers highlight parametrizations studied in panel (b), (, ), (, ) and (, ), respectively. Parameter subspaces, denoted with varying dashed boxes, depict the likely values of and for three recent disease outbreaks: the 2020 SARS-CoV-2 outbreak in China, the 1958–1973 smallpox outbreak in Europe, the 2022–2023 mpox outbreak in the UK and the 2009 influenza outbreak in Italy (see table 1 for details). (b) Violin plots depicting the deviation from the mean fixed point of 1000 perturbed PGFs with , for the three parameter pairs highlighted by black markers in panel (a). These violin plots validate the magnitudes of the shown in the heat map.
Our results show that the sensitivity of homogeneous and heterogeneous processes vary in fundamentally different ways with respect to the average number of secondary infections . In figure 3a, the darkest shades represent the largest , while the lightest shades represent the smallest. As a reminder, a large value of indicates a parameter pair with an extinction probability output that is very sensitive to input perturbations.
Over this space, we highlight the maximum for a given (light blue open circle markers) and a given (yellow open circle markers). For large values of , the largest appear near . This matches conventional wisdom from the physics of phase transitions: The sensitivity of our forecasts aligns with the sensitivity of the dynamical system, and both are maximized at the critical point . Unexpectedly, for small values of , particularly , the sensitivity of our forecasts is maximized at larger values of , and forecasts of heterogeneous epidemic spread are more uncertain with larger values of .
To validate the results shown in figure 3a, we created three violin plots, displayed in figure 3b, showing fluctuations around the mean forecast, or extinction probability, for three parameter pairs: (, ) (square marker), (, ) (triangle marker) and (, ) (diamond marker) with input distributions perturbed by very large noise . This figure confirms that correctly increases as the fixed point becomes sensitive to perturbations.
Figure 4 showcases slices of the parameter space, emphasizing the relationship between each individual parameter and the epidemic probability. We again see that the largest appear near for large values of , in both figure 3a and figure 4c. Figure 4a,c emphasizes the conventional wisdom from phase transition theory, namely, that peaks of sensitivity align with the epidemic threshold at . For in figure 3, we notice a ridge of maximum develop as increases. This ridge defines non-monotonic curves across values of when , which is clearly shown in figure 4d. This maximum ridge for large values has associated values of that plateau at .
Figure 4.

Negative binomial critical threshold and SCE peaks. (a) Epidemic probabilities as a function of the average number of secondary cases, and (b) the dispersion parameter, , when the other quantity is fixed. The dotted line in panel (a) shows the critical transition threshold , above which a macroscopic outbreak happens regardless of the value of . The bottom panels illustrate how changes when we vary (c) and (d) . The dotted line for appears in panel (c) to showcase where the peak relates to the critical transition. The plots in the bottom panels correspond to slices of figure 3. Panel (d) showcases how the change in over different values goes from a monotonically increasing curve to a non-monotonic curve.
We thus find to be a pivotal threshold not only for the maximum for a given but also for the maximum for a given . The latter maximum corresponds to until . We notice the divergence of the maximum for a given at and below in figure 3a. This divergence is also displayed in figure 4d as the curves associated with dip lower than the curves of larger once . This contrasts the conventional wisdom previously mentioned, meaning the variation in the offspring degree distribution plays a vital role in the sensitivity of the epidemic forecast.
Finally, to ground our results in examples, figure 3 highlights four ranges of parameter values, shown by the dashed boxes. These parameter regimes correspond to the 2009 influenza outbreak in Italy, the 1958–1973 smallpox outbreak in Europe, the 2022–2023 mpox outbreak in the UK and the 2020 SARS-CoV-2 outbreak in China. Table 1 details more information about the diseases listed above, along with another outbreak of SARS in 2003. Focusing on the influenza case first, the parameter regime sits in a heightened area, with values between 0.5215 and 0.5393, as noted in table 1. The precise parameter ranges for influenza imply that predictions based on the offspring distribution for influenza are quite sensitive to input perturbations, yet the sensitivity is consistent across the estimated parameter range.
Table 1.
Table of diseases defined by negative binomial parameters. This table provides specific cases of negative binomial parameters corresponding to disease outbreaks. Each instance details the corresponding epidemic probability and ranges. The table is inspired by table 1 from [14] and supplementary table 1 from [13]. This table extends the analysis of Hébert-Dufresne et al. with the for each disease. Epidemic probability ranges are calculated from the confidence interval boundaries. For a point of reference, the minimum value from this analysis is 0.00 and the maximum is 0.78.
| disease—location (year) | epidemic probability |
ref. | |||
|---|---|---|---|---|---|
| smallpox—Europe (1958–1973) | 0.21–0.59 | 3.19 (1.66–4.62) 90% | 0.37 (0.26–0.69) 90% | 0.26–0.39 | [13] |
| influenza—Italy (2009) | 0.37–0.42 | 1.32 (1.30–1.34) 95% | 8.09 (5.17–11.79) 95% | 0.52–0.54 | [20] |
| SARS—Singapore (2003) | 0.00–0.46 | 1.63 (0.54–2.56) 90% | 0.16 (0.11–0.64) 90% | 0.00–0.45 | [13,21,22] |
| SARS-CoV-2—China (2020) | 0.06–0.21 | 2.50 (1.4–3.9) 95% | 0.10 (0.04–0.2) 95% | 0.08–0.28 | [23,24] |
| mpox—UK (2022–2023) | 0.13–0.35 | 1.82 (1.52–2.18) 95% | 0.30 (0.18–0.54) 95% | 0.25–0.39 | [25,26] |
Unlike the influenza example, the SARS-CoV-2, smallpox and mpox examples have larger parameter regimes, and are positioned at or below the threshold. The smallpox regime encloses between 0.2571 and 0.3930. Similarly, the mpox regime encloses between 0.2490 and 0.3886. Despite having different ranges, both the mpox and smallpox regime centre on . This consistency demonstrates that is a key driver of , while has minimal influence.
The SARS-CoV-2 parameters also imply a large range of possible . Even when assuming a specific estimate of , the range from the triangle marker, , to the diamond marker, , shows approximately a 28% increase of sensitivity when increasing . This reiterates our result that offspring distributions with and larger are more sensitive than those with .
3.2. Case study: transmission on random networks
We next consider the SCE of epidemic models on heterogeneous contact networks as defined in §2.2. We examine two ensembles of random networks characterized by their degree distributions. The first ensemble consists of ER random networks. In the infinite size limit, node degrees are independent random variables following a Poisson degree distribution,
| (3.1) |
where is the mean degree. ER networks are therefore entirely defined by their mean degree (varied between in this work), or equivalently, their density. They do not exhibit heterogeneity, hubs, correlations or structural features beyond density. Since all moments of a Poisson distribution are equal, the degree distribution, generated by , and the excess degree distribution, generated by , are identical. Hence, the neighbours of any given node are statistically indistinguishable from any other node.
Our second random network example, the scale-free network, is inspired by the fact that many real-world contact networks display extreme heterogeneity, where some nodes have many neighbours and most have few. This heterogeneity leads to heavy-tailed degree distributions and the formation of hub nodes within the network. Heterogeneous networks are often modelled using power-law degree distributions of the form,
| (3.2) |
where is a normalization constant. The exponent controls the level of heterogeneity, and is varied between 2.1 and 3.6 in the present analysis. Larger values of lead to more homogeneous networks, while smaller values result in networks with heavy-tailed degree distributions and the existence of hub nodes with disproportionately high degrees.
The epidemic probability, , given in equation (2.10), is determined by both the transmission probability, , and the degree distribution parameter: either the mean degree for ER networks or the heterogeneity of networks with power-law degree distributions. As in the case of branching processes, we use the method defined in §2.3 to obtain the , or estimate of the sensitivity of the extinction probability . ER and power-law networks display a critical transition in the epidemic probability, defined in equation (2.11). Below a critical transmission probability, , both network models have an epidemic probability of 0. And both network models have a non-zero epidemic probability above the critical transmission probability, . As shown in figure 5, this critical transition marks a spike in the . The figure displays the epidemic probability along with the for both ensembles as a function of the transmission probability and the respective parameter for the network degree distribution.
Figure 5.

Percolated random contact networks critical thresholds and SCE peaks. The outbreak size as a function of the infection rate is displayed for (a) ER networks and (b) power-law networks. The dotted lines indicate the critical transitions calculated using equation (2.11). In panel (a), each solid line is associated with a value of the mean degree, , which defines the network’s density. In panel (b), each solid line is associated with different values of the exponent, , which defines the network’s heterogeneity. The for varying (c) of an ER network are shown, and (d) for varying of a power-law network are shown. The dotted lines for the critical transitions from panels (a) and (b) are displayed in panels (c) and (d) to relate the peak sensitivity to the critical transition thresholds.
Similar to the results shown in §3.1, the largest for ER networks occur at the critical transition and decrease as the increases past . As the mean degree increases, the critical transition decreases. While the maximum always occurs at the critical transition, its value depends on the average degree . As the increases, the at the critical transition decreases. Low-density networks have the highest peak and are thus the most sensitive to input perturbations in the degree sequence.
Outbreak sizes and obtained on scale-free networks are shown for varying and varying , which, as a reminder, varies the heterogeneity. Figure 5b,d displays results for scale-free random networks, where the behaviour of percolation depends strongly on the value of . For , the first moment (average degree) is finite, but the second moment (average degree of neighbours) diverges, indicating extremely large fluctuations in node degree [27]. This results in a network with a few very large ‘hub’ nodes that dominate the spreading dynamics [28]. In the regime , the critical transition is , which means that arbitrarily low transmission probabilities result in non-zero epidemic probabilities. The highest degree in a network of size scales faster than , and a small number of very large hubs dominate the epidemic dynamics [27].
If , both the first and second moments of the degree distribution are finite. While hubs still exist, the degree distribution is less heavy-tailed, meaning that hubs do not dominate the epidemic dynamics to the same extent. The size of the highest-degree node scales more slowly than , and the largest hubs are not extreme enough to dominate the network. As a result, the critical transition is finite, [27]. In dynamical systems, the moderately sized and weakly coupled hubs in the regime ‘trap’ outbreaks in their surrounding region in a phenomenon known as hub localization. Above the critical transition, increases in epidemic probability are driven by interconnections between microscopic hubs, making epidemic probability highly sensitive to perturbations in the degree sequence [27]. In percolation, a similar effect leads to smeared phase transitions, where system susceptibility can peak away from the critical point [29].
This localization phenomenon, or smearing of the phase transition, explains the results in figure 5. For below or close to 2, specifically , the maximum occurs at the critical transition, , and decreases monotonically. For , the increases monotonically with . In between, , has a first peak at the critical point and a second larger peak at a higher value of . These results are remarkably different from those for ER networks, and the difference can be understood in analogy with the phenomenon of microscopic localization or smeared phase transition.
More generally, the results on scale-free networks mirror those of §3.1. In homogeneous systems, our mathematical forecasts for the probability of an epidemic are most sensitive at the epidemic threshold (e.g. in branching processes with or percolation on homogeneous networks or large enough coupling between hubs). In heterogeneous systems, however, sensitivity stems from a minority of superspreading events or hubs and can, therefore, be maximized with the higher average number of secondary cases, .
4. Discussion
Uncertain, noisy or missing data all affect epidemiological models, obfuscate our interpretation of their forecasts and hinder our interventions [30]. When using PGFs to calculate the probability of an epidemic, it is necessary to quantify the sensitivity of our predictions to noise in model inputs. The results of this work answer this question for two epidemiological cases, one specifying a negative binomial branching process and the other specifying two random contact networks with bond percolation.
For the negative binomial branching process model, we not only show that the forecasted probability of an epidemic is most sensitive to noise when only if , but heightened sensitivity occurs for large when as well. As the dispersion parameter decreases, the offspring distribution reflects a higher potential for a superspreading event [31]. Thus, when probabilities associated with a larger number of secondary infections are perturbed, the epidemic probability solution could be prone to more variation and be less stable. This result implies that our forecasts are most sensitive to noise not around the critical point between no epidemic and small epidemics, but at the distinction between small and large epidemics. This peak sensitivity can occur at very large . Hence, public health officials must consider the sensitivity of heterogeneous offspring distributions even in the limit of a large basic reproduction number.
Switching to the bond percolation case study, the ER network example intuitively yields similar results to the negative binomial branching process case with . With these homogeneous networks, the largest sensitivity occurs around for varying . As decreases, the peak sensitivity increases in conjunction with an increase in the corresponding . Similar to the negative binomial branching process case, this presents a major obstacle in disease mitigation due to small producing small or zero change epidemics. On the other hand, the power-law random network analysis defines heterogeneous contact distributions or fat-tailed distributions. While there is a spike at the critical transition for all values of , the sensitivity continues to grow past each threshold for . Similar to the negative binomial branching process case, fat-tailed degree distributions create sensitive forecasts in outbreak size solutions, which is essential information for public health officials.
Heterogeneity of the degree distribution of a network, here parametrized by the scaling exponent , has well-documented impacts on the moments of the distribution and on the largest expected degrees [27]. Values lead to significant hubs with finite coupling such that epidemic dynamics can localize around the hubs [32], and the sensitivity of the model appears fundamentally different in that regime (as opposed to global, delocalized, epidemic spread). However, the mechanisms producing a similar behaviour in the negative binomial branching process with remain an open question.
The conventional wisdom that the response of a model to variations in input is maximized at its epidemic threshold is based on phase transition theory. The system moves from a disease-free state below the critical transition, , to an epidemic state above it, and the response, or change in output, is therefore infinite at the threshold. Following this conventional wisdom, the quantitative forecasts of our models exhibit heightened sensitivity around that critical transition point where forecasts for the probability of an epidemic transition from exactly zero to barely above zero. However, we see a different picture in heterogeneous systems, i.e. in processes with superspreading events (dispersion parameter ) or in transmissions on networks with fat-tailed degree distributions (scale exponents ). Interestingly, with enough heterogeneity, we find more sensitive forecasts at higher values of , where small variations can change our prediction from a low to a high probability of an epidemic. This occurs because changes in epidemic probability are relatively small at the critical point of heterogeneous systems, especially in systems with smeared phase transitions. This does not mean that the conventional wisdom is completely wrong, but that system susceptibility is different from forecast sensitivity. These two concepts appear to align only in homogeneous systems.
Our findings have direct implications for epidemic resource allocation and risk communication strategies. Since quantifies the sensitivity of the forecast to noise, public health officials can allocate resources based on the forecast and its sensitivity. For forecasts with high sensitivity, officials should prepare for worst-case scenarios rather than the most likely ones [33]. Conversely, low-sensitivity forecasts should have allocations for the most probable scenarios. Traditional risk communication often reduces to whether or not is below or above the critical threshold, . However, this work shows that this focus on primarily matters when . Below , there is certainty of a small outbreak for most . In the interesting regime, , risk uncertainty is instead driven by the sensitivity of the forecast models rather than by the accuracy of parameter estimates. If the sensitivity of the forecasts is not understood and communicated properly, all aspects of epidemic preparedness can be compromised, which can lead to an unforeseen worst-case scenario.
Acknowledgements.
M.C.B. would like to acknowledge the thought-provoking discussions with Guillaume St-Onge during this work.
Funding.
M.C.B. is supported as a Fellow of the National Science Foundation under NRT award DGE-1735316. W.H.W.T. is supported by UVM’s College of Engineering and Mathematical Sciences as well as National Institutes of Health Centers of Biomedical Research Administrative Supplement 2024 AWD 118 037649. C.M.D., J.-G.Y. and L.H.-D. acknowledge financial support from the National Institutes of Health P20GM125498 Centers of Biomedical Research Excellence Award. W.H.W.T. and L.H.-D. are also supported under the 3P20GM103449-23S1 IDeA Networks of Biomedical Research Excellence.
Appendix A. Solving self-consistent equations
In this article, the size of the outbreak or the probability of the epidemic is related to the solution of a self-consistent equation involving a PGF,
| (A 1) |
where represents a generic PGF whose form depends on the details of the problem at hand. Solving for the smallest real positive root of the polynomial is equivalent to solving for a non-trivial solution to the self-consistent equation. These self-consistent equations are often solved by direct iteration, since the PGF has only positive or zero coefficients. One simply starts with a random guess for the solution and iterates until convergence to a certain tolerance threshold. Another, often faster method is to use Newton’s method, where the gradient of the function at a point is used to construct a first-order Taylor expansion, whose solution estimates the next iteration.
In this article, however, we use Steffensen’s (or Aitken’s) method for root finding, as it does not require a gradient, yet achieves the same performance as Newton’s method. The iteration proceeds as
| (A 2) |
Appendix B. Absolute and relative condition number
This section reviews the condition number, its estimation, and the relationship between various definitions.
B.1. Absolute condition number
The absolute condition number formalizes the notion of sensitivity for any differentiable function at a point . Concretely, it is defined by the norm of the gradient, since is exactly the maximal rate of change of under an infinitesimal perturbation,
| (B 1) |
This definition is sensible and can be used as is, but it can also be justified from first principles using the directional derivative, which measures the rate of change of along any unit direction . We go through this derivation because it suggests algorithms that we use in the main text.
Consider a perturbation to in an arbitrary direction,
| (B 2) |
In this notation, the directional derivative of at along is
| (B 3) |
and the gradient represents the direction of steepest ascent, given by . Thus, computing the gradient norm can be reframed as finding the direction of steepest ascent and computing the norm of the corresponding directional derivative.
This perspective is useful when the gradient norm is difficult to calculate, as is the case here. (The function we are interested in is the solution of a self-consistent equation that is not easy to differentiate analytically.) The idea is to use the fact that any directional derivative carries information about the full gradient norm, as shown in equation (B 3). For a random unit vector from the unit -sphere, , it is known that [19]
| (B 4) |
where is the Wallis factor defined in equation (2.14) of the main text.
Rearranging equation (B 4), we obtain an estimator of the absolute condition number [19],
| (B 5) |
Evaluating this expression is now easy, as all the steps can be carried out numerically with sampling. The algorithm proceeds as follows:
Create a matrix of independently and identically distributed random variables, , with entries drawn from a standard normal distribution .
-
Calculate the decomposition,
where has dimensions and has dimension .
- Use the orthonormal columns as perturbation directions. For each , compute
using equation (B 3), and estimate
| (B 6) |
This algorithm uses a decomposition to generate orthogonal samples, which we have not discussed yet. The idea is essentially to reduce the variance of to obtain a sharper approximation [19]. Since these perturbations form an orthogonal basis, each estimate represents the directional derivative along a specific basis vector. Equation (B 6) thus represents the 2-norm of a gradient in a random subspace defined by the decomposition. As the dimension of this subspace approaches the dimension of the full -dimensional domain of , this approximation of the gradient approaches the true gradient. The additional coefficient accounts for the fact that only a subspace is sampled when .
In practice, one can use a fairly small value of to obtain good estimates. Note that when computing the Wallis factor, we use the fourth-order expression [19],
| (B 7) |
since skip factorials grow rapidly with , but their ratio grows slowly enough to admit an accurate approximation.
B.2. Relative condition number
The absolute condition number measures the absolute sensitivity to change of a function. We need to make two modifications to adapt it to our problem. First, it is often preferable to calculate the sensitivity of a function relative to the size of the perturbation—we want to capture the idea that small changes to the distribution of degrees or offspring can lead to large changes to the epidemic outcome. Second, we need to account for the fact that is in fact a probability vector, meaning that it must sum to 1 after it is perturbed.
To this end, we use the relative condition number [12] by normalizing the numerator and the denominator,
| (B 8) |
where we have expressed the gradient norm as a maximization of the norm of the directional derivative.
In this new equation, the perturbed vector is now normalized, and it is also a relative perturbation in the sense that larger entries are perturbed more strongly. We express it in terms of the matrix , a diagonal matrix with elements equal to the elements of the vector , such that the product is the element-wise product of and ,
| (B 9) |
where the size of the perturbation in each direction of is scaled by the corresponding component of . We then use in place of in equation (B 2), and define the relative perturbation ,
| (B 10) |
where the denominator ensures that is a probability mass that sums to 1. (Some of the elements of can be negative in principle, but appendix C shows that the calculation holds in the limit of large support, .)
We can then use the same line of reasoning as before to arrive at a numerical estimate of this relative condition number. This leads to
| (B 11) |
where
| (B 12) |
and the expectation is taken over . This expression can be evaluated by sampling as before.
Appendix C. Asymptotic connection to standard statistical condition estimation
In our calculations, we consider condition numbers on probability distributions. Since we renormalize the probability distributions after a perturbation, it is important to show that the effect of the normalization is asymptotically small. Here, we demonstrate that it has little impact in the sense that
| (C 1) |
in expectation. To show this, we first write the 1-norm explicitly as
| (C 2) |
If we can show that the last term is small, then we have our result. This is exactly what Theorem 2.1 of [19] does. It establishes that
| (C 3) |
In our case is a probability vector, and its 2-norm is bounded between (uniform distribution) and 1 (delta distribution), while scales as . Furthermore, we have taken to be a small constant. Hence, we find that
| (C 4) |
In other words, the perturbation has a negligible impact on the norm of probability vector in the limit of large supports .
Appendix D. Algorithm
The algorithm below summarizes the steps involved in calculating .
| Algorithm 1 for the solutions to | |
|---|---|
|
|
Footnotes
Ethics. This work did not require ethical approval from a human subject or animal welfare committee.
Declaration of AI use. AI-assisted technologies were used to improve readability and language of the work. This technology was also used as a ‘search engine’ to aid in code or statistical techniques.
Conflict of interest declaration. We declare we have no competing interests.
Data accessibility.
All analysis code is available via Zenodo at [34].
References
- 1.Kermack WO, McKendrick AG. 1927. A contribution to the mathematical theory of epidemics. Proc. R. Soc. A 115, 700–721. (doi: 10.1098/rspa.1927.0118) [DOI] [Google Scholar]
- 2.Kermack WO, McKendrick AG. 1932. Contributions to the mathematical theory of epidemics. II.The problem of endemicity. Proc. R. Soc. A 138, 55–83. (doi: 10.1098/rspa.1932.0171) [DOI] [PubMed] [Google Scholar]
- 3.Kermack WO, McKendrick AG. 1933. Contributions to the mathematical theory of epidemics. III.—Further studies of the problem of endemicity. Proc. R. Soc. A 141, 94–122. (doi: 10.1098/rspa.1933.0106) [DOI] [Google Scholar]
- 4.LuX B, Borgonovo E. 2023. Global sensitivity analysis in epidemiological modeling. Eur. J. Oper. Res 304, 9–24. (doi: 10.1016/j.ejor.2021.11.018) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Gilbert JA, Meyers LA, Galvani AP, Townsend JP. 2014. Probabilistic uncertainty analysis of epidemiological modeling to guide public health intervention policy. Epidemics 6, 37–45. (doi: 10.1016/j.epidem.2013.11.002) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Powell DR, Fair J, LeClaire RJ, Moore LM, Thompson D. 2005. Sensitivity analysis of an infectious disease model. In Proc. of the Int. System Dynamics Conf, Boston, MA, USA. [Google Scholar]
- 7.Case BKM, Young JG, Hébert-Dufresne L. 2023. Accurately summarizing an outbreak using epidemiological models takes time. R. Soc. Open Sci 10, 230634. (doi: 10.1098/rsos.230634) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Saltelli A, Ratto M, Andres T, Campolongo F, Cariboni J, Gatelli D, Saisana M, Tarantola S. 2008. Global sensitivity analysis: the primer. Chichester, UK: John Wiley & Sons. (doi: 10.1002/9780470725184) [DOI] [Google Scholar]
- 9.Wu J, Dhingra R, Gambhir M, Remais JV. 2013. Sensitivity analysis of infectious disease models: methods, advances and their application. J. R. Soc. Interface 10, 20121018. (doi: 10.1098/rsif.2012.1018) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Wilf HS. 2005. Generatingfunctionology, 3rd edn. Wellesley, MA, USA: A K Peters. [Google Scholar]
- 11.Morris MD. 1991. Factorial sampling plans for preliminary computational experiments. Technometrics 33, 161–174. (doi: 10.1080/00401706.1991.10484804) [DOI] [Google Scholar]
- 12.Laub AJ, Xia J. 2008. Statistical condition estimation for the roots of polynomials. SIAM J. Sci. Comput 31, 624–643. (doi: 10.1137/070702242) [DOI] [Google Scholar]
- 13.Lloyd-Smith JO, Schreiber SJ, Kopp PE, Getz WM. 2005. Superspreading and the effect of individual variation on disease emergence. Nature 438, 355–359. (doi: 10.1038/nature04153) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Hébert-Dufresne L, Althouse BM, Scarpino SV, Allard A. 2020. Beyond R0: heterogeneity in secondary infections and probabilistic epidemic forecasting. J. R. Soc. Interface 17, 20200393. (doi: 10.1098/rsif.2020.0393) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Allen AJ, Boudreau MC, Roberts NJ, Allard A, Hébert-Dufresne L. 2022. Predicting the diversity of early epidemic spread on networks. Phys. Rev. Res 4, 1–11. (doi: 10.1103/PhysRevResearch.4.013123) [DOI] [Google Scholar]
- 16.Newman MEJ. 2002. Spread of epidemic disease on networks. Phys. Rev. E 66, 016128. (doi: 10.1103/PhysRevE.66.016128) [DOI] [PubMed] [Google Scholar]
- 17.Meyers LA. 2007. Contact network epidemiology: bond percolation applied to infectious disease prediction and control. Bull. New Ser. Am. Math. Soc 44, 63–86. (doi: 10.1090/S0273-0979-06-01148-7) [DOI] [Google Scholar]
- 18.Newman MEJ, Strogatz SH, Watts DJ. 2001. Random graphs with arbitrary degree distributions and their applications. Phys. Rev. E 64, 026118. (doi: 10.1103/PhysRevE.64.026118) [DOI] [PubMed] [Google Scholar]
- 19.Kenney CS, Laub AJ. 1994. Small-sample statistical condition estimates for general matrix functions. SIAM J. Sci. Comput 15, 36–61. (doi: 10.1137/0915003) [DOI] [Google Scholar]
- 20.Dorigatti I, Cauchemez S, Pugliese A, Ferguson NM. 2012. A new approach to characterising infectious disease transmission dynamics from sentinel surveillance: application to the Italian 2009–2010 A/H1N1 influenza pandemic. Epidemics 4, 9–21. (doi: 10.1016/j.epidem.2011.11.001) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Leung GM et al. 2006. Seroprevalence of IgG antibodies to SARS-coronavirus in asymptomatic or subclinical population groups. Epidemiol. Infect 134, 211–221. (doi: 10.1017/S0950268805004826) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Quah SR, Hin-Peng L. 2004. Crisis prevention and management during SARS outbreak, Singapore. Emerging Infect. Dis 10, 364–368. (doi: 10.3201/eid1002.030418) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Li Q. 2020. Early transmission dynamics in Wuhan. N. Engl. J. Med 382, 1199–1207. (doi: 10.1056/NEJMoa200131316) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Endo A, Abbott S, Kucharski AJ, Funk S. 2020. Estimating the overdispersion in COVID-19 transmission using outbreak sizes outside China. Wellcome Open Res. 5, 67. (doi: 10.12688/wellcomeopenres.15842.3) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Saldaña F, Daza-Torres ML, Aguiar M. 2023. Data-driven estimation of the instantaneous reproduction number and growth rates for the 2022 monkeypox outbreak in Europe. Epidemiology. (doi: 10.1101/2022.12.20.22283714) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Paredes MI, Ahmed N, Figgins M, Colizza V, Lemey P, McCrone JT, Müller N, Tran-Kiem C, Bedford T. 2024. Underdetected dispersal and extensive local transmission drove the 2022 mpox epidemic. Cell 187, 1374–1386. (doi: 10.1016/j.cell.2024.02.003) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Castellano C, Pastor-Satorras R. 2010. Thresholds for epidemic spreading in networks. Phys. Rev. Lett 105, 218701. (doi: 10.1103/PhysRevLett.105.218701) [DOI] [PubMed] [Google Scholar]
- 28.Pastor-Satorras R, Vespignani A. 2001. Epidemic spreading in scale-free networks. Phys. Rev. Lett 86, 3200–3203. (doi: 10.1103/PhysRevLett.86.3200) [DOI] [PubMed] [Google Scholar]
- 29.Hébert-Dufresne L, Allard A. 2019. Smeared phase transitions in percolation on real complex networks. Phys. Rev. Res 1, 013009. (doi: 10.1103/physrevresearch.1.013009) [DOI] [Google Scholar]
- 30.Rosenblatt SF, Smith JA, Gauthier GR, Hébert-Dufresne L. 2020. Immunization strategies in networks with missing data. PLoS Comput. Biol 16, e1007897. (doi: 10.1371/journal.pcbi.1007897) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Althouse BM, Wenger EA, Miller JC, Scarpino SV, Allard A, Hébert-Dufresne L, Hu H. 2020. Superspreading events in the transmission dynamics of SARS-CoV-2: opportunities for interventions and control. PLoS Biol. 18, e3000897. (doi: 10.1371/journal.pbio.3000897) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.St-Onge G, Young JG, Laurence E, Murphy C, Dubé LJ. 2018. Phase transition of the susceptible-infected-susceptible dynamics on time-varying configuration model networks. Phys. Rev. E 97, 022305. (doi: 10.1103/PhysRevE.97.022305) [DOI] [PubMed] [Google Scholar]
- 33.Muzamil M. 2025. The role of mathematical modelling in pandemic management. Open Access J. Behav. Sci 18, 180174. [Google Scholar]
- 34.Boudreau MC, Thompson WHW. 2025. mariahcboudreau/stochastic-polys: v1.0.0 - Final Published Version (v1.0.0). Zenodo. (doi: 10.5281/zenodo.17496557) [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
All analysis code is available via Zenodo at [34].
