This research was supported by National Institutes of Health and National Institute of General Medical Sciences—Models of Infectious Disease Agent Study Grant 5U01GM070694-11 and a research grant from the Investigator-Initiated Studies Program of Merck sharp & Dohme (

Conceived and designed the experiments: ETL. Performed the experiments: ETL. Analyzed the data: ETL. Contributed reagents/materials/analysis tools: ETL. Wrote the paper: ETL.

Mathematical models in ecology and epidemiology often consider populations “at equilibrium”, where in-flows, such as births, equal out-flows, such as death. For stochastic models, what is meant by equilibrium is less clear – should the population size be fixed or growing and shrinking with equal probability? Two different mechanisms to implement a stochastic steady state are considered. Under these mechanisms, both a predator-prey model and an epidemic model have vastly different outcomes, including the median population values for both predators and prey and the median levels of infection within a hospital (

Dynamic models have a long and well-established history of providing insight into biological systems by allowing the synthesis of disparate empirical data into cohesive theory[

These models are not without their drawbacks. They model populations continuously, rather than discretely, which often results in populations within the model being reported in small fractional numbers at the system asymptotically approaches zero. For large populations, this tendency is of no concern, as 0.01 percent of the U.S. population, for example, is still a meaningful number. For small populations however, this tendency becomes extremely problematic, as the model begins to report the existence of fractional individuals, a biologically meaningless concept. This phenomenon, known as the “atto-fox problem” [^{−18} foxes.

One solution to this problem has been to use a stochastic simulation approach with discrete values for the population[

Stochastic extinction can even arise in populations that are being modeled as being in a steady state, where in-flows (i.e. births and immigration) are equal to out-flows (i.e. deaths and emigration), representing a population at equilibrium save for the dynamic process the researcher is exploring. How one approaches formulating the stochastic simulation has a profound impact on the dynamics of the system as a whole. Here, I present two different formulations of steady state for a model that have identical outcomes when modeled using differential equations, but have vastly different outcomes when simulated stochastically. I have termed these “Pool” and “Queue” stability. I also suggest there are not one but two types of stochastic extinction present in most stochastic dynamic models:

Consider a single differential equation, part of a set of equations that make up a deterministic model,
_{i} is at equilibrium. The population of X_{i} will remain at equilibrium with the addition of arbitrarily many additional terms within the equation so long as these too sum to zero. When extended to the equation system as a whole, the system’s population is in equilibrium so long as
_{i}_{i} ≠ _{i}_{i} for any particular equation

The first is what I term

An alternate strategy for handling stochastic steady states is what I will refer to as

The latter method seems to eliminate one of the great strengths of stochastic simulation models, the possibility for stochastic extinction of the population, in exchange for maintaining a constant population. This is only partially accurate. While the extinction of the entire model system because of demographic stochasticity is no longer possible, extinction may occur in any given component of the model. This difference gives rise to the need to disambiguate two different potential types of stochastic extinction.

Two unique types of stochastic extinction events are possible within the compartmental model framework. The first, which is allowed by Pool stability models but prohibited in Queue stability models, is the complete extinction of the model system, where the sum of all compartments is 0, which I term N-extinction[

Like different mechanisms for modeling population mixing and interaction, or changes in model structure, the choice of stabilization method is a fundamental choice about the biological process being modeled, namely whether or not it is possible, within the scope of the model, for the population as a whole to go extinct. For some models, the answer is “Yes”, especially for the small populations most frequently modeled using stochastic techniques, but for other models allowing N-extinction may be irrelevant or actively detrimental to the model’s mapping with reality.

Two models are used as motivating examples to explore this choice and under which conditions one might with to disallow

The first example model is a straightforward adaptation of a classical Lotka-Volterra predation model[

The hospital infection model concerns the spread of _{S}) or contaminated (H), representing hands or gloves contaminated by _{P} and U_{A}, represent patients uncolonized with _{P} and C_{A} similarly represented colonized patients in low- and high-risk states. Finally, D denoted patients who had developed an active

Healthcare personnel are considered uncontaminated (U_{S}) or contaminated (H), and patients are considered to be low risk and uncolonized (U_{P}), low risk and colonized (C_{P}), high risk and uncolonized (U_{A}), high risk and colonized (C_{A}) or actively infected (D). Solid arrows denote transitions between states, while dashed lines indicate routes of transmission and contamination between patients and healthcare personnel.

All patients are eventually discharged from the hospital with one of three possible outcomes: discharge from the hospital in good health, discharge from the hospital with the subsequent development of a recurrent

The distribution of model outcomes for each model (population medians of predator and prey species and recurrent and incident cases of ^{2} test. The stochastic results are also compared to the models’ deterministic ODE analog, to evaluate whether either approach necessarily has the ODE’s result as its average.

Finally, the mean and median model run times (measured in seconds) were taken for a subset of 100 iterations of each model using both pool and queue equilibrium. All models were implemented in Python using the StochPy library (Version 1.1)[

The mean and median population for the predator and prey populations, as well as the probability of either species or the entire system going extinct, is reported in

Green lines depict the trajectories of Pool stabilized simulations, while blue lines indicate the trajectories of Queue stabilized simulations. All lines are semi-transparent, with areas of more opaque color indicating more frequent results. Dashed line indicates the trajectory of an identically parameterized deterministic model.

Green lines depict the trajectories of Pool stabilized simulations, while blue lines indicate the trajectories of Queue stabilized simulations. All lines are semi-transparent, with areas of more opaque color indicating more frequent results. Dashed line indicates the trajectory of an identically parameterized deterministic model.

Pool Stable | Queue Stable | Difference (95% CI)^{†} |
||
---|---|---|---|---|

Mean Predators | 8.58 | 9.79 | -1.21 | 0.347 |

Median Predators | 10.50 | 11 | -0.50 | >0.001 |

Mean Prey | 4.06 | 2.93 | 1.13 | >0.001 |

Median Prey | 0 | 0 | 0 | >0.001 |

Mean Total Population | 12.64 | 12.72 | -0.08 | 0.001 |

Median Total Population | 13.5 | 12 | 1.50 | >0.001 |

Probability of Predator Extinction | 0.19 | 0.00 | 0.19 (0.18,0.21) | >0.001 |

Probability of Prey Extinction | 0.80 | 0.99 | -0.19 (-0.21, 0.17) | >0.001 |

Probability of Total Extinction | 0.03 | 0.00 | 0.03 (0.02,0.03) | >0.001 |

*95% CI: 95% Confidence Interval.

^{†}Confidence intervals not calculated for Kruskal-Wallis tests.

The cumulative number of incident and recurrent infections, as well as the probability of the patient population going extinct, is reported in

Each ‘violin’ represents a smoothed kernel-density estimation of the distribution of cases, mirrored along the y-axis.

Pool Stable | Queue Stable | Difference | 95% CI |
||

Probability of N-extinction | 0.71 | 0.00 | 0.71 | 0.69, 0.73 | >0.001 |

Pool Stable | Queue Stable | ||||

Mean | Median | Mean | Median | ||

Incident Cases | 0.72 | 0 | 0.86 | 1 | >0.001 |

Recurrent Cases | 4.13 | 2 | 4.24 | 4 | >0.001 |

*95% CI: 95% Confidence Interval.

Both stochastic predator-prey model implementations had median predator populations well below the deterministic model’s equilibrium state of 15, with the Queue stabilized model’s median predator population of 9.79 slightly closer than the Pool stabilized model’s median of 8.58. Both stochastic models had a median prey population of 0 compared to the deterministic model’s 3.5 animals. The mean prey population of the deterministic model (3.43) fell between the Pool stabilized model’s mean of 4.06 and the Queue stabilized model’s mean of 2.93

The Queue stabilized hospital infection model more closely resembled the deterministic model’s 0.83 incident and 4.22 recurrent cases, with a median of 1 incident and 4 recurrent cases compared to the Pool stabilized model’s 0 incident and 2 recurrent cases. The mean values for incident and recurrent cases for both stabilization types were closer to the deterministic results (see

For both the predator-prey and epidemic models, the Queue stabilized implementations had a markedly longer runtime, each requiring approximately twice the computation time per iteration when run on an identical 3.2 GHz Intel Core i5 system. The predator-prey model had a median per-iteration runtime of 0.007 seconds for the Pool stabilized version and 0.014 seconds for the Queue stabilized version (

Each ‘violin’ represents a smoothed kernel-density estimation of the distribution of runtimes, mirrored along the y-axis.

The choice of how one approaches the stochastic modeling of steady-state systems can profoundly influence the results of otherwise identically implemented and parameterized models. Some outcomes, such as the stochastic extinction of an entire system, move from impossible to relatively common. The stability of a system is often considered a “given” within a modeled scenario, rather than a deliberate choice. These differences have the potential to obfuscate results of more direct interest or inject additional disagreement between two different models that predict the same system dynamics but have different equilibrium schemes.

Neither Pool nor Queue stability is inherently superior. The results of the two example models illustrate that the choice of stabilization method is not a straightforward algorithm. In the hospital infection model, Queue stability more closely resembles the results of a deterministic model because it disallows N-extinction. Yet in the predator-prey model, both model implementations differ from their deterministic analog, and in one case the disagreement between them is equal in magnitude and opposite in direction. Despite the Pool stabilized models being seemingly direct adaptations of deterministic ODE models in fact neither stability method clearly mirrors a deterministic model. The only clear, unambiguous difference is the longer computing time for Queue stabilized models.

Instead, the nature of the biological process being modeled should dictate the choice of stabilization method. Specifically, consider whether or not allowing N-extinction is realistic and desirable. For example, it is easy to see how a small wildlife population might be subjected to N-extinction due to string of random events all of which negatively impact survival, and thus how pool-stabilization is an appropriate means to reflect a population at a stochastic steady state. In contrast, Queue stabilization implies something like an infinite line of predators patiently waiting their turn to begin hunting and breeding–an implausible situation suggesting a poor fit for Queue stabilization.

However, despite similarly small population size, intensive care units in major hospitals are relatively stable, and closure to random fluctuations in patient demand is highly unlikely. As such, disallowing N-extinction through a Queue stabilization mechanism is a reasonable choice for modeling such a system. It is significantly easier to picture a line of patients waiting to be admitted into an ICU–indeed, this situation confronts the medical system every day.

This is not an exhaustive study of the effects of how stochastic steady states are modeled, nor even a comprehensive description of all steady-state mechanisms. It is meant to illustrate the importance of considering how each term within a model, even those not of research interest that might be easily overlooked translate to reality, and how reasonable that translation is.

The author would like to thank N.H. Fefferman and S.G. Eubank for their input and advice.