A hybrid framework for compartmental models enabling simulation-based inference
Authors:
Domenic P. J. Germano,
Alexander E. Zarebski,
Sophie Hautphenne,
Robert Moss,
Jennifer A. Flegg,
Mark B. Flegg
Abstract:
Multi-scale systems often exhibit a combination of stochastic and deterministic dynamics. In compartmental models, low occupancy compartments tend to exhibit stochastic dynamics while high occupancy compartments tend to follow deterministic dynamics. Representing both dynamics with existing methods is challenging. Failing to account for stochasticity in small populations can produce ``atto-foxes''…
▽ More
Multi-scale systems often exhibit a combination of stochastic and deterministic dynamics. In compartmental models, low occupancy compartments tend to exhibit stochastic dynamics while high occupancy compartments tend to follow deterministic dynamics. Representing both dynamics with existing methods is challenging. Failing to account for stochasticity in small populations can produce ``atto-foxes'', for example in the Lotka-Volterra ordinary differential equation (ODE) model. This limitation becomes problematic when studying the extinction of species or the clearance of infection, but it can be overcome by using discrete stochastic models, such as continuous time Markov chains (CTMCs). Unfortunately, simulating CTMCs is impractical for many realistic models, where discrete events have very high frequencies.
In this work, we develop a novel mathematical framework to couple continuous ODEs and discrete CTMCs: ``Jump-Switch-Flow'' (JSF). In this framework, compartments can reach extinct states (``absorbing states''), thereby resolving atto-fox-type problems. JSF has the desired behaviours of exact CTMC simulation, but is substantially computationally faster than existing alternatives, by at least one order of magnitude, and can even obtain constant scaling, irrespective of compartment occupancy.
We demonstrate JSF's utility for simulation-based inference, particularly multi-scale problems, with several case-studies. In a simulation study, we demonstrate how JSF can enable a more nuanced analysis of the efficacy of public health interventions. We also carry out a novel analysis of longitudinal within-host data from SARS-CoV-2 infections to quantify the timing of viral clearance. In this work, we show how JSF offers a novel approach to compartmental model simulation.
△ Less
Submitted 29 July, 2025; v1 submitted 21 May, 2024;
originally announced May 2024.