Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Aug 27;16:26950. doi: 10.1038/s41598-026-66481-6

MEmilio: a high performance Modular EpideMIcs simuLatIOn software for multi-scale and comparative simulations of infectious disease dynamics

Julia Bicker 1,#, Carlotta Gerstein 2,3,#, David Kerkmann 4,#, Sascha Korf 1,5,#, René Schmieding 1,#, Anna Wendler 1,#, Henrik Zunker 1,#, Daniel Abele 1, Maximilian Betz 1,7, Khoa Nguyen 6, Lena Plötzke 1, Kilian Volmer 2,3, Agatha Schmidt 1, Nils Waßmuth 1,2,3, Patrick Lenz 1, Daniel Richter 1, Hannah Tritzschak 1,8, Ralf Hannemann-Tamas 7, Julian Litz 7, Paul Johannssen 1,9, Marielena Borges 1, Annika Jungklaus 1, Manuel Heger 1, Annalena Lange 1, Elisabeth Kluth 1, Kathrin Rack 1, Vincent Wieland 2,3, Jonas Arruda 2,3, Sebastian C Binder 4, Margrit Klitz 10, Martin Siggel 11, Manuel Dahmen 7, Achim Basermann 1, Michael Meyer-Hermann 4,12,13,#, Jan Hasenauer 2,3,#, Martin J Kühn 1,2,3,✉
PMCID: PMC13522579  PMID: 42660986

Abstract

Epidemic and pandemic preparedness with rapid outbreak response rely on timely, trustworthy evidence. Mathematical models are crucial for supporting timely and reliable evidence generation for public health decision-making with models spanning approaches from compartmental and metapopulation models to detailed agent-based simulations. Yet, the accompanying software ecosystem remains fragmented across model types, spatial resolutions, and computational targets, making models harder to compare, extend, and deploy at scale. Here we present MEmilio, a modular, high-performance framework for epidemic simulation that harmonizes the specification and execution of diverse dynamic epidemiological models within a unified and harmonized architecture. MEmilio couples an efficient C++ simulation core with coherent model descriptions and a user-friendly Python interface, enabling workflows that run on laptops as well as high-performance computing systems. Standardized representations of space, demography, and mobility support straightforward adaptations in resolution and population size, facilitating systematic inter-model comparisons and ensemble studies. The framework integrates readily with established tools for uncertainty quantification and parameter inference, supporting a broad range of applications from scenario exploration to calibration. Finally, strict software-engineering practices, including extensive unit and continuous integration testing, promote robustness and minimize the risk of errors as the framework evolves. By unifying implementations across modeling paradigms, MEmilio aims to lower barriers to reuse and generalize models, enable principled comparisons of implicit assumptions, and accelerate the development of novel approaches that strengthen modeling-based outbreak preparedness.

Keywords: Infectious diseases, Public health action, Interventions, Agent-based modeling, Metapopulation modeling, High-performance computing

Subject terms: Computational biology and bioinformatics, Mathematics and computing

Introduction

Pandemic preparedness and rapid outbreak response are increasingly important in a globalized world with a rising frequency of epidemics and pandemics1. In this context, timely and reliable evidence generation is essential to support public health decision-making. Over the past decades, mathematical modeling of infectious disease dynamics has become a central tool for hypothesis generation and policy evaluation, and during the COVID-19 pandemic public institutions such as the European Centre for Disease Prevention and Control highlighted mathematical modeling as one of the principal sources of evidence for assessing the effectiveness of interventions2. These findings, together with the continued circulation of seasonal respiratory pathogens such as influenza and RSV, as well as re-emerging threats including Ebola and Dengue, underscore the need for sustained modeling capacity that can be rapidly mobilized to provide robust, evidence-informed support during outbreaks.

From a methodological perspective, infectious disease modeling spans a spectrum of formulations that differ in granularity, data requirements, computational cost, and interpretability. Population-based compartmental models (PBMs) describe aggregated disease dynamics using ordinary3–6, stochastic6–8, or integro-differential equations9,10. Metapopulation models (MPMs)11–13 extend these approaches by incorporating spatial structure and coupling regions through mobility, thus enabling the study of spatio-temporal heterogeneity and regionally targeted nonpharmaceutical interventions (NPIs). Even further, agent-based models (ABMs)14–24 resolve individuals and their interactions, allowing explicit representations of individual contact patterns, mobility, and behavior. Hybrid approaches in time and space6,25–28 aim to combine these paradigms in order to balance realism and computational feasibility. However, a single model formulation can barely address all facets of infectious disease mitigation and the research question typically determines which model type is most appropriate.

A wide ecosystem of open-source software supports infectious disease modeling across this spectrum, typically specializing in a particular model class and resolution (Fig. 1a). While PBMs are often reimplemented for particular applications, different packages such as epidemik4, MetaCast5, PyRoss6, Epydemix7, epipack29, EpiModel30, epidemics31, or EMULSION32 also allow the flexible modeling through PBMs and MPMs; mostly using ordinary or stochastic differential equations (ODEs or SDEs). For ABMs, a variety of implementations exist. A relevant number of ABMs, such as RepastHPC16, OpenABM17, Covasim19, OpenCOVID21, EpiHiper23, GEMS24, or Vahana.jl33, are implemented as network-based models. These models commonly operate on coarser temporal discretizations (e.g., daily time steps) and represent locations implicitly, while mobility- or activity-based ABMs such as FRED15, EMOD18, MatSim-EpiSim 20, UHOHCoronaPolicyLab34, PanVADERE35, or the models by Goldebogen et al.36 and Cuevas37 explicitly simulate movement and allow explicit modeling inside locations, typically at a more fine-grained temporal resolution.

Fig. 1.

Fig. 1

Overview of open-source, state-of-the-art infectious disease modeling frameworks, highlighting the distinctions of MEmilio. (a) Overview of 21 software frameworks, depicting which model types are available through the software, which programming language has been used, if parallelization techniques are provided, which license is given, and, if unit and software tests are implemented, which code coverage is achieved. (b) Statistical overview of the 10 most used programming languages in public GitHub repositories according to the search terms: SARS-CoV-2, COVID-19, influenza, Ebola, HIV, malaria, transmission, epidemiological, infection, pandemic, epidemic, endemic, pandemic spread, epidemic spread, endemic spread (accessed through the GitHub API). (c) Overview of active development of MEmilio, expanding for new applications and features.

Despite this breadth, the current software landscape remains fragmented across model classes, levels of resolution, and computational orientation; see Fig. 1a for an overview and comparison of MEmilio with 20 relevant open-source software frameworks or packages that have been selected after searching on GitHub and in the corresponding scientific literature. In particular, compartmental modeling software often lacks high-performance computing (HPC) support for large-scale parameter estimation and uncertainty analysis. In addition, it offers limited flexibility for data-driven, nonexponential state transition distributions and is mostly not connected to finer-granular or hybrid modeling approaches. While several tools provide efficient simulation capabilities, integrated workflows that combine scalable calibration, uncertainty quantification, and sensitivity analysis with modern epidemiological data pipelines remain uncommon. Conversely, detailed agent-based frameworks are rarely linked to corresponding coarser or hybrid models that would allow for rapid early exploration of open research questions before committing to computationally demanding simulations; many frameworks also have limited scaling capabilities with respect to population sizes and HPC infrastructure. More broadly, the absence of harmonized abstractions across modeling paradigms complicates systematic inter-model comparison: even when similar epidemiological processes are represented, models are typically implemented in tool-specific ways that hinder the transparent transfer of assumptions, intervention definitions, and data interfaces across PBMs, MPMs, and ABMs. Eventually, there is currently no open framework that allows different epidemiological model types – ranging from PBMs to MPMs and ABMs – to be generated, calibrated, and compared from a shared abstract description of the relevant processes, while additionally aiming at computational scalability and software-engineering robustness. To address these challenges, we present the MEmilio high performance Modular EpideMIcs simuLatIOn software framework for simulating infectious disease dynamics, developed as a unified and scalable framework. Distinct features of MEmilio include

  • uniform model descriptions and harmonized implementations of a broad range of epidemiological model types from PBMs to MPMs and ABMs;

  • efficient C++ backends with coherent interfaces and a user-friendly Python frontend38 supporting execution from laptops and supercomputing infrastructure as well as the use of established Python packages for uncertainty quantification and parameter inference;

  • explicit support for multiple compartmental formulations, including ODE and SDE as well as Linear Chain Trick (LCT) and integro-differential equation (IDE) based models that allow flexible, nonexponential state transition time distributions;

  • integration of models across scales, including hybrid approaches that facilitate rapid exploration while preserving desired accuracy in focus regimes;

  • standardized spatial and demographic stratifications and mobility layers enabling scalability in demographic resolution and systematic inter-model comparison;

  • strict software-engineering practices with extensive and continuous unit and software testing.

MEmilio’s backend is extended by two packages enabling optimal control39 for PBMs and MPMs and by supporting the import of models specified in the Systems Biology Markup Language (SBML) standard40. MEmilio’s machine-learning surrogate model package support Multi-Layer Perceptrons, Long Short-Term Memory networks41, Convolutional Neural Networks42, and spatially resolved Graph Neural Networks (GNNs)43 on top of PBMs and MPMs, enabling on-the-fly computation in low-barrier web applications44 and integration in HPC-capable full software stacks for pandemic mitigation45.

Results

Applicability to a multitude of research questions and use cases

To address the aforementioned needs, we developed MEmilio as a unified framework supporting infectious disease modeling across multiple levels of granularity and application domains (Fig. 2). MEmilio provides a broad range of PBMs, MPMs, and ABMs, each with distinct strengths and limitations and each suited for different classes of research questions (Fig. 3). All models are implemented with harmonized interfaces, consistent data structures, and shared design principles, enabling systematic comparison and facilitating transitions between model types. In addition to supporting the individual model classes, this common implementation allows models of different fidelity to be applied to matched epidemic settings. Computationally inexpensive PBMs and MPMs can thereby be used to screen parameters, assumptions, and scenarios before selected configurations are investigated with more detailed ABMs. The resulting cross-fidelity comparisons can identify which assumptions materially affect the outcomes and, consequently, which inputs and regimes should be represented when constructing or validating surrogate models for computationally expensive simulations. For more details on the explicit models, see the Methods section and the Supplementary Information.

Fig. 2.

Fig. 2

Overview of the MEmilio software framework. The MEmilio software framework consists of an efficient C++ backend (center) which provides models of different types, granularity and application foci. Several optional modules (left and right) provide additional functionality to be used from MEmilio’s C++ or Python interface. Software packages located with MEmilio’s Python frontend are shown in green, additional functionality directly integrated in the C++ backend is shown in blue. C++, Python, and SBML logos in the upper part of the boxes indicate the (main) programming language of the additional functionality or package. In the bottom row, we depict the execution on consumer laptops or supercomputing infrastructure, together with the typical external packages that can be integrated into a modeling workflow.

Fig. 3.

Fig. 3

Detailed overview of PBMs, MPMs, and ABMs in MEmilio. Models are shown from finest (top) to coarsest (bottom) granularity. The first column shows the individual (ABM), regionally heterogeneous (MPM) or aggregated (PBM) disease courses, with the corresponding spatial resolution in the second column. The necessary data items with required level of detail are shown in the third and fourth column. Exemplary research questions are given in the rightmost column.

Among all considered model formulations, MEmilio’s PBMs (Fig. 3, top row) have the sparsest data requirements and enable quick exploration of reproduction numbers as well as population-level effects of vaccination strategies. In addition, they can be used to assess aggregated NPI effects and are well-suited for early-stage, coarse-grained parameter estimation. Particular models are ODE-based12, using the LCT46 or more flexible IDE-based representations47 which allow for transmission probabilities and state transitions dependent on the time since infection or last transition. More realistic distribution assumptions on relevant parameters such as the incubation period makes MEmilio well-suited for analyzing epidemic change points.

MEmilio’s PBMs are provided to users such that a simple Model (Inline graphic) creates a user-defined model with Inline graphic demographic groups including group-specific parameters and contact matrices (Fig. 2, “Demographic stratification”) to, e.g., study age-dependent severity or mortality risks. The contact matrix can be further resolved by a simple list of ContactLocations (such as Home, School, Work, and Other), automatically preparing the inclusion of any type of contact patterns specific by location such as given by POLYMOD48, Fumanelli et al.49, or CoMix50. Most importantly, users can thereby separately target locations for interventions or restrictions.

MEmilio’s structure allows users to couple any number Inline graphic of local PBMs with an Inline graphic mobility matrix to form an MPM (Fig. 2, “Metapopulation & Mobility”) that accounts for spatial heterogeneity. MPMs (Fig. 3, central row) allow for the study of spatially heterogeneous disease dynamics and the effect of locally varying NPIs51. They explicitly account for disease import from hotspot regions into susceptible populations and can capture spatio-temporal heterogeneity in population-level immunity, thereby enabling the study of complex and region-specific vaccination strategies. As mobility plays a crucial role in shaping disease dynamics, MEmilio supports to study the effects of mobility restrictions and commuter-based testing strategies52. A particularly important feature are region- and threshold-specific intervention schemes. Through a structure denoted DynamicNPIs, user-defined intervention schemes can be automatically applied upon exceeding region-specific thresholds in, e.g., new symptomatic cases or hospitalizations. In combination with optimal control, this structure drastically reduces the number of control variables that otherwise scale with the spatial and temporal resolution and, thus, enables optimal control even for large models.

MEmilio’s ABM, based on individual activities and mobility, (Fig. 3, bottom row) implements detailed individual transmission probabilities such that users can study superspreading events53,54 or location-specific transmissions in schools, workplaces and recreation areas. The ABM further enables the direct modeling of mask usage, heterogeneous immunity, and usage of NPIs tailored to individual age groups, locations, or symptoms. Furthermore, MEmilio’s ABM allows studying (imperfect) quarantining and isolation strategies of variable length, individual (non)compliance, or complex vaccination patterns tailored to individual immunization histories.

From the aforementioned software packages and frameworks, EMULSION’s32 approach comes closest to MEmilio, yet, it does not provide HPC support. MEmilio’s parallelization approaches comprise shared memory parallelization inside most costly ABM segments and simulation ensemble parallelization for PBMs, MPMs, and ABMs. Altogether, this makes all of MEmilio’s models suitable to be simulated with short runtimes on individual computers as well as highly parallelized on supercomputing infrastructure.

Beyond the plethora of MEmilio’s functions, MEmilio is a rapidly expanding framework with approximately 10 monthly merged pull requests (Fig. 1c) adding new features, novel models and applications in, e.g., veterinary diseases. Adhering to strict software engineering principles with code review, software testing, and continuous integration, MEmilio ensures software stability with minimized error potential for extensions.

Analysis of different diseases and spatio-temporal dynamics across scales

As infectious disease dynamics vary for different diseases and are often heterogeneous on a spatial scale, we assess MEmilio’s capabilities to generate, simulate, and calibrate models for different diseases and across multiple spatial scales. In particular, we investigate applications of influenza and Ebola as well as highly resolved epidemic data on SARS-CoV-2. To do so, we select three of MEmilio’s pre-implemented PBMs: an SDE-based SIRS-type model for seasonal influenza allowing for seasons of varying severity, an ODE-based SEIRDB model for Ebola based on Legrand et al.55, and an ODE-based SECIR-type model for the early phase of SARS-CoV-2 (Fig. 4a).

Fig. 4.

Fig. 4

Models and calibrations for different diseases and spatio-temporal dynamics together with an evaluation of intervention strategies. (a) SIRS, SEIRDB, and SECIR-type course of disease structure for modeling influenza, Ebola, and early SARS-CoV-2, respectively. (b) Fit of the SDE SIRS-type influenza model for Germany. (c) Fit of the ODE SEIRDB-type Ebola model for the outbreak in Guinea in 2014. (d) Fits of the ODE SECIR-type model for SARS-CoV-2 related ICU cases in Germany for national (top) and district (bottom) level. (e) Fits of the SECIR-type model for SARS-CoV-2 related ICU cases in Spain for national (top) and provinces (bottom) level. (f) Evolution of infected cases for five different global and local intervention strategies for Germany. (g) Evolution of continued NPIs and DynamicNPIs for three randomly selected districts (in color for Flensburg, in gray for Aachen and Heilbronn). (h) Evolution of infected, severe, and critical cases for DynamicNPIs with optimal control. (i) Summary of the five intervention strategies with respect to the average number of realized contacts and outcomes for infected, severe, and critical cases. Shape files for Germany using geodata ‘Verwaltungsgebiete 1:250 000 (VG250)” from BKG (2026) dl-de/by-2-0, data sources: https://sgx.geodatenzentrum.de/web_public/gdz/datenquellen/datenquellen_vg_nuts.pdf. Shape files for Spanish administrative units CC-BY 4.0 ign.es.

First, we evaluate the integration of MEmilio’s Python interface with Particle Markov chain Monte Carlo (PMCMC) methods56 for non-spatial applications to influenza and Ebola using PBMs (see Supplementary Information Section D.1 for details). For influenza, we fit an SDE-based SIRS PBM to reported cases in Germany57 using the pseudo-marginal Metropolis–Hastings (PMMH) algorithm. We allow for variable seasonal lengths and peak intensities, showing that three distinct seasons of influenza can be calibrated. Fluctuating reporting, in particular during holiday seasons, leads to broader uncertainty, with seasonal peak periods of the first two seasons falling in the 90 % credibility interval (CI). The reported numbers of the summer periods as well as the broader infection dynamics of the last year falling mostly within the 50 % CI (Fig. 4b). For Ebola, we calibrate an ODE-based SEIRDB PBM following Legrand et al.55 to the 2014 Guinea outbreak58, explicitly accounting for infectious and postmortem transmission. Reported case counts largely fall within the 90 % CI and are close to the posterior median (Fig. 4c), indicating that the overall epidemic dynamics are well reproduced. Together, these results demonstrate that MEmilio’s Python interface supports likelihood-free exact Bayesian inference using PMCMC methods effectively.

Second, we test MEmilio’s capabilities of generating PBMs and MPMs of different spatial resolutions and fitting the resulting models with the amortized Bayesian inference framework BayesFlow59, leveraging state-of-the-art inference methods60. Exploiting MEmilio’s resolution-agnostic model specification, we instantiate SARS-CoV-2 models for Germany at national and district (400 districts) level as well as for Spain at national and provinces (47 mainland provinces) level. Infection spread is modeled using a SECIR-type model, extending the classical SEIR formulation to represent presymptomatic transmission as well as hospitalization and critical cases requiring intensive care, and calibration targeted reported COVID-19 ICU occupancy (see Supplementary Information Section D.2 for details).

The analysis of the calibration results reveals that the national-level models yield comparatively narrow uncertainty bands (Fig. 4d,e) but necessarily enforce homogeneous prevalence across entire countries, averaging out local deviations. At the finer spatial resolution, calibration across 400 German districts and 47 Spanish provinces also closely matches reported ICU occupancy, demonstrating that fine-grained spatial models can be effectively used when disease dynamics are driven by regional hotspots.

By leveraging detailed spatial information, MEmilio captures regional variation in transmission dynamics, contact structures, and intervention effects, resulting in more realistic epidemic simulations despite broader uncertainty bands. This trade-off between precision and realism is fundamental: increased uncertainty at higher spatial resolution reflects genuine epidemiological heterogeneity and unresolved local influences rather than model deficiencies, providing decision makers with a more faithful representation of plausible epidemic trajectories.

Tailored local intervention schemes that avoid untargeted strictness

To assess locally tailored NPIs that reduce epidemiological burden while avoiding unnecessary restrictions, we require tools that can represent policies varying across regions and over time. MEmilio supports systematic assessment of a broad range of such NPI schemes, including policies that vary across regions or dynamically adapt over time. In this section, we assess automatic NPI activation once user-defined epidemiological thresholds are exceeded and MEmilio’s integration with optimal control to balance intervention strictness against epidemiological objectives.

To study the relative effectiveness of different intervention schemes, we consider the district level model of the SARS-CoV-2 spread in Germany. We select a representative snapshot of disease dynamics based on the root mean square deviation (Fig. 4d) and perform a scenario analysis by simulating 60-days under five alternative strategies: i) no NPIs, ii) continuation of the calibrated NPI strictness, iii) implementation of stricter NPIs, iv) DynamicNPIs on district level, with predefined strictness, and v) DynamicNPIs combined with optimal control (Fig. 4f–h). For more details, see Supplementary Information Section E. Uncertainty from calibration was excluded by fixing the initial setting across all scenarios; thus, results should not be interpreted as forecasts, but rather as a comparative assessment of the relative performance of different intervention strategies.

MEmilio’s simulations illustrate clear differences in how the respective intervention mechanisms shape epidemic outcomes. In the absence of NPIs, approximately 70 % of the population becomes infected, with more than 223 000 severe and 39 500 critical cases. Continuing the fitted NPIs reduces infections, severe cases, and critical cases by roughly a factor of three. Imposing stricter NPIs further lowers the number of critical cases and reduces the average number of daily contacts from 2.82 to 1.80. In contrast, our threshold-triggered DynamicNPIs applied for 14 days once incidences of 250 and 1 000 symptomatic cases are exceeded achieve a comparable reduction in infections, severe, and critical cases while allowing 31 % more contacts. When optimizing for minimal NPI strictness under the terminal constraint that total infections on January 21, 2021 remain below 500 000, DynamicNPIs combined with optimal control reduce critical cases by further 20 % while even permitting 35 % more contacts than the stricter NPI scenario.

Taken together, these results demonstrate that MEmilio provides a flexible and effective framework for implementing and evaluating targeted, local intervention strategies that can substantially reduce epidemiological burden while limiting the societal costs associated with untargeted, country-wide responses. Importantly, the same analysis pipeline can be applied without modification in the presence of parameter uncertainty, allowing the systematic evaluation of threshold-based interventions under calibrated uncertainty ensembles.

Reducing runtime and resource demands with hybrid modeling

Through their increased computational cost, additional constraints can come into play when exploring a particular research question with ABMs. To test MEmilio’s capabilities of simulating disease dynamics with efficient hybrid models that retain the accuracy of ABMs in highly stochastic regimes, we compare a temporal-hybrid ABM-PBM model against its pure ABM counterpart. All models use a SECIR-type disease progression and the temporal-hybrid model switches dynamically from the diffusion-based ABM to the ODE-based PBM once the predefined threshold of three infected individuals per population of 10 000 is reached (Fig. 5a). For more details, see Supplementary Information, Section F.1.

Fig. 5.

Fig. 5

PBM and ABM in comparison with temporal-hybrid ABM-PBM model and inter-model comparison with different state transition assumptions and contact structures. (a) Schematic visualization of the temporal-hybrid model for a SEIR model with colors as in Fig.  3. (b) Median and CI through 5th and 95th percentiles for 1 000 runs of all three models for the whole simulated time frame (top) and median and 90 % CI of the simulations with virus extinction (bottom). (c) Initialization and simulation runtime for all three models, with the pie chart showing the percentage of the temporal-hybrid model’s simulation runtime relative to the ABM’s simulation runtime. (d) Settings used for the inter-model comparison of ABM, ODE, LCT, IDE. (e) Trajectories of the simulated number of Exposed, ICU, and Dead for ABM, ODE, LCT, IDE for exponential (S1) and lognormal (S2) transition distributions using one (S1.1, S2.1) or multiple (S1.2, S2.2) locations per type in the ABM. For the ABM, median and 90 % CI across 100 runs are shown.

In simulations with only one exposed individual in a total population of 10 000, approximately 20 % of all ABM simulations result in virus extinction. While also using PBM structures, the temporal-hybrid model is able to capture both the median number of total infected and the ABM percentiles with reasonable approximation error compared to the pure PBM (Fig. 5b, top). Moreover, the temporal-hybrid model reliably captures scenarios of virus extinction (Fig. 5b, bottom), a feature that is particularly important in local outbreaks of novel or re-emerging respiratory diseases. To quantify the computational speedup, we measured the runtime of all models. While the hybrid model requires slightly more time for initialization, it reduces the simulation runtime of the ABM by almost 99 % (Fig. 5c).

Summarized, our findings show that MEmilio’s temporal-hybrid model combines the advantages of ABMs and PBMs. The hybrid model is able to capture overall disease dynamics and cases of extinction with small additional model error at a fraction of the ABM runtime and computational cost.

Model ensembles and quantification of model-specific assumptions

As all models are mathematical simplifications, their outcomes depend on explicit and implicit modeling assumptions. For example, exponentially distributed transition times, as used in most compartmental models, can lead to substantially premature or delayed predictions of epidemic peak timings46. We therefore use MEmilio’s harmonized model implementations as a cross-fidelity sensitivity-analysis framework. By varying individual assumptions while keeping the remaining epidemic setting aligned, inexpensive PBMs can be used to screen which structural choices materially affect the quantities of interest and where the additional resolution of an ABM becomes important. Such analyses can also guide surrogate construction by identifying the parameters, structural features, and epidemic regimes that need to be varied in the training data of a surrogate for a higher-fidelity model.

To demonstrate this functionality, we consider two setups. In Setup S1, state transition times are exponentially distributed for all models, whereas in Setup S2, the ABM, LCT-, and IDE-based models use the specific distributions given in Fig. 5d. In addition, we assess the effect of replacing one large, homogeneously mixing location of each type (Home, School, Work, Event, and Shop) by multiple smaller locations in the ABM. To generate a common starting point for all models, we create synthetic initial data by simulating one outbreak trajectory with the ABM for the first 20 days. For more details, see Supplementary Information Section F.2.

Given Setup S1 with one location per location type (S1.1), we first observe that all considered models can be aligned under the same simplifying assumptions, giving almost identical epidemic dynamics with respect to the number of Exposed, ICU, and deceased cases (Fig. 5e S1.1). Employing more realistic distributions in S2.1 results in higher and sharper peaks in the number of Exposed and ICU cases than when using exponential distributions as in the ODE-based model (Fig. 5e S2.1). Although the IDE- and LCT-based models approximate the median ABM peak number of Exposed closer than the ODE-based model, they both yield 25 % reduced peaks. A similar pattern is observed for the ICU occupancy: median peak ICU cases in the ABM are approximated closer by LCT- and IDE-based models with the IDE-based model also aligning with the peak time point of the ABM. In contrast, the LCT- and ODE-based models exhibit a delay in the ICU peak of approximately 20 days (Fig. 5e S2.1). Replacing one location per type in the ABM by many smaller locations per type yields smaller and more heterogeneous contact networks of individuals. As a result, we observe substantially reduced transmission events and consequently less ICU admissions and deaths (Fig. 5e S1.2, S2.2), a property which is not captured with homogeneous mixing as modeled by the PBMs. While this effect is qualitatively known from graph theory and earlier network-based infectious disease models61,62, the comparison allows quantifying these differences appropriately.

Combining a broad range of models with harmonized interfaces and uniform model descriptions, MEmilio enables systematic cross-fidelity sensitivity analyses within a single framework. Inexpensive PBMs and MPMs can be used to screen large parameter spaces and alternative structural assumptions, while selected regimes can subsequently be evaluated with more detailed ABMs. The resulting comparisons quantify when coarse-grained models provide adequate approximations and when individual contact structures, nonexponential transition times, or other high-fidelity features materially alter the outcomes. They can therefore inform both the selection of an appropriate model resolution and the design of training and validation scenarios for surrogate models of computationally expensive simulations.

Efficient and scalable implementations for swift simulations

As simulation and calibration can be time-critical, efficient and scalable implementations are essential for epidemic modeling. To demonstrate MEmilio’s capabilities of running large-scale models in narrow time frames and executing a large number of parallelized model runs, we assess MEmilio’s efficiency as well as the scaling performance with respect to the number of regions, the population size, the number of simulations, and the number of available computing resources. For more details, see the Supplementary Information, Sections F.1, G, H, I, and J.

The assessment of MEmilio’s efficiency with PBMs and MPMs reveals MEmilio’s strength in building on a highly efficient C++ backend, simulating 500 days of a single PBM in the order of Inline graphic seconds and up to 100 regions in a second or less (Fig. 6a, left). In particular, the computational overhead of using MEmilio’s Python interface is negligible, thus enabling efficient model executions from a user-friendly interface, e.g., through Python and Jupyter Notebooks. While Euler and RK4 methods are chosen here for a standardized comparison, additional speedups are expected when using MEmilio’s default adaptive solvers. Using a manually implemented Euler solver, both of MEmilio’s interfaces outperform an R-based implementation (as often used for epidemiological modeling; see Fig. 1b) of the MPM by one or two orders of magnitude (Fig. 6a, right). The use of the precompiled, C-based deSolve integrator in R yields a method that comes closer to MEmilio’s performance at 256 regions, but is substantially outperformed by MEmilio for modest numbers of regions.

Fig. 6.

Fig. 6

Performance and computational scalability of MEmilio’s models with respect to regions, population sizes, and the number of deployed CPU cores. (a) Performance comparison in runtime (left) and speedup (right) of MEmilio’s ODE-based SEIR-type MPM (C++ in blue, Python in green) against an R implementation. (b) Runtime scaling of MEmilio’s MPMs with respect to the number of modeled regions. (c) Runtime scaling of MEmilio’s mobility-based ABM with a comparison to other frameworks. (d) Comparison of different temporal-hybrid models to the corresponding diffusion-based ABM and ODE-based PBM in linear (left) and log (right) scale. (e) Runtime scaling for a MPM with 400 districts and different prediction horizons (30, 60, and 90 days) compared to a correspondingly trained GNN. (f) Strong scaling of the ensemble-run functionality for different PBMs, MPMs, and ABMs of MEmilio.

Beyond its efficiency, we assess MEmilio’s scalability with respect to larger numbers of regions for different local model types (ODE, LCT, or IDE). Regardless of the specific PBM assigned to the graph nodes, the graph-based MPM scales modestly with respect to the number of modeled regions (Fig. 6b). Due to its substantially more complex form, the IDE-based model47 shows a runtime that is about three times higher than that of the LCT-based model and even approximately 15 times higher than the runtime of the ODE-based model. However, all considered models complete within several seconds for up to 1 000 regions.

In order to allow scalable research studies on an individual-based level, we assess the scalability of MEmilio’s ABM with realistic mobility patterns. First, we observe optimal linear scaling with respect to the number of modeled individuals (agents), consistent with reports of comparable state-of-the-art ABMs such as Covasim19 and OpenCOVID21. Excluding differing features of the considered models, the sequential execution of one time step in MEmilio’s ABM is 1.2-1.8 (Covasim) and 8-12 (OpenCOVID) times faster than one time step in Covasim and OpenCOVID for simulations with 1 million agents (Fig. 6c). MEmilio’s ABM scales to substantially larger populations, successfully simulating 128 and 256 million agents, whereas Covasim and OpenCOVID did not complete runs beyond 64 million agents in our benchmark setup. We also see that we can further speedup MEmilio’s ABM by using its intra-model parallelization (Fig. 6c).

Beyond computational optimization and direct population-size scaling in ABMs, we assess the scaling of MEmilio’s previously introduced temporal-hybrid model with respect to the population size for different threshold values. In our tests, the hybridization significantly accelerates simulations with up to 30 000 modeled individuals; expecting higher acceleration with increasing population sizes. The hybrid model’s runtime depends on the chosen switching condition and has the same scaling behavior as the diffusion-based ABM (dABM) on which it is based (Fig. 6d). While a switch upon exceeding a threshold of three infected agents in a population of 10 000 reduced the runtime of the corresponding dABM by almost 99 % (Fig. 5c), a threshold upon exceeding 10 % of infected agents in a population of 30 000 still results in a speedup of 5.0 (Fig. 6d) and thresholds of five or two percent realize speedups of 11.6 and 39.8, respectively.

Finally, we assess MEmilio’s scalability with respect to the number of individual simulations to either address the uncertainty in a selected setup or to consider large numbers of alternative scenarios. For MEmilio’s surrogate modeling package designed to train and evaluate GNNs with spatio-temporal disease dynamics, we find that up to 128 simulations on the German mobility network with 400 districts can be executed on-the-fly within a fraction of a second (0.1 s) (Fig. 6e). Since the corresponding simulation of the graph-based ODE MPM (Graph-ODE) takes approximately 10 seconds for one simulation, scaling linearly with the number of simulations, the speedup of the GNN ranges from 806 to 32 078 (Fig. 6e). Using MEmilio’s ensemble-run functionality that leverages distributed memory parallelism to start multiple independent simulations in parallel (and post-process their results), we observe (almost) ideal strong scaling for ABM, Graph-ODE-based MPM, LCT- and IDE-based PBM (Fig. 6f, left) – apart from slightly suboptimal scaling of the ABM between one and two cores as well as 32 and 128 cores. On one hand, execution times of the MPM in Fig. 6e can be reduced substantially by leveraging HPC resources, while, on the other hand, the pre-trained GNN allows for the provision of tens or hundred of simulations on a laptop or in a web interfaces without additional need for HPC connection. Furthermore, with up to 16 384 cores on the JURECA supercomputer, we can obtain 16 384 simulation results of an ABM with two million agents in approximately 17 minutes (Fig. 6f, right).

We conclude that MEmilio’s focus on efficiency and parallelization ensures minimized simulation time and enables highly parallelized execution. MEmilio’s distributed memory parallelism is particularly well suited for standalone ensemble runs and offline generation of training data for GNNs63 and neural network–based inference methods59.

Discussion

To overcome the existing fragmentation of mathematical modeling software, we developed MEmilio as a computationally scalable, multi-model and multi-scale epidemic modeling framework with a user-friendly interface. MEmilio allows the study of newly unfolding or ongoing epidemic dynamics in a narrow time frame to address the need for fast and efficient tools that can support public health decision-making. MEmilio’s different model types provide computational scalability with respect to population sizes in ABMs, the number of modeled regions in MPMs, and, generally, the computational resources deployed to the epidemic modeling task. MEmilio’s unique combination of individual-, population- and metapopulation-based models together with hybridization approaches, high performance computing techniques, and GNNs in a single framework provides a novel and holistic approach to epidemiological modeling.

The building blocks of the presented MEmilio framework have already been used for a multitude of projects. This includes the study of NPI lifting during vaccination campaigns51 for SARS-CoV-2, commuter-based testing52, the adaption of human behavior64, the explicit consideration of infection during travel65, coupling individual-based models with waste water dynamics66,67, advanced testing strategies on multi-dimensional outcomes 22, and additional applications in, e.g.12,47,54,68. Furthermore, MEmilio includes published models for RSV69, influenza70, or Ebola55, and allows the rapid and straightforward integration of additional models for, e.g., Dengue71,72, using MEmilio’s SBML interface.

We showed that MEmilio’s uniform model descriptions allow demographic stratification and the integration of spatio-temporal dynamics with only limited adaptations of the model implementation. Beyond simplifying the construction of individual models, this harmonization enables models of different fidelity to be evaluated under matched epidemiological assumptions. The comparisons presented here can therefore be interpreted as a structured sensitivity analysis: by varying transition-time distributions and contact structures, we identify assumptions for which coarse-grained PBMs closely approximate the ABM and regimes in which individual-level structure leads to substantial differences.

This cross-fidelity perspective also provides a basis for more targeted surrogate development. Computationally inexpensive PBMs and MPMs can be used to screen broad parameter ranges, structural assumptions, and intervention scenarios, thereby identifying the regimes that should be sampled more densely with an expensive ABM. The resulting ABM simulations could subsequently be used to train and validate a surrogate specifically in the regions where high-fidelity effects are relevant. In the present study, we demonstrate the constituent capabilities of this workflow through harmonized inter-model comparisons and through a GNN surrogate of a graph-based MPM. Extending the surrogate target directly to the ABM is an important next step rather than a result claimed here.

More generally, multi-model ensembles can improve forecast accuracy relative to individual models73,74. Within MEmilio, such ensembles can be realized to make model-dependent uncertainty and sensitivity to structural assumptions more transparent. Together with modular software testing and continuous integration, this supports the robustness and traceability of model implementations and their comparisons.

Optimizing massively parallel simulations remains a persistent challenge. While most often, parallelization of MPMs is highly effective over a large number of ensemble simulations, balancing load and communication overhead within graph-based MPMs on heterogeneous architectures is non-trivial and a subject of our own active research. Consequently, future developments will target fully integrated numerical solvers for distributed memory systems. Furthermore, to make MEmilio sustainable and ready for most-recent supercomputing infrastructures, we are progressing towards hybrid or fully GPU-based75 model implementations.

As demonstrated, MEmilio can be efficiently coupled with established frameworks for state-of-the-art neural network–based inference methods59, Markov chain Monte Carlo76, and Approximate Bayesian Computation77 to allow for a broad range of applications in parameter inference and model calibration. Furthermore, MEmilio has been successfully coupled with established packages for uncertainty quantification and sensitivity analysis78,79. Being aware of the inherent complexity of a framework with diverse model types and implementations, we have extensively reworked MEmilio’s documentation and provide more than 70 code examples. In addition, we are actively working on the provision of advanced tutorials to further minimize entry barriers for new users and maximize MEmilio’s applicability.

Materials and methods

In the following methodological section, we briefly describe MEmilio’s models that are depicted in the central part of Fig. 2 and that have been used to generate the results of Figs. 3, 4, 5, 6. More technical background on amortized Bayesian inference, mathematical solvers, parallelization, or optimal control as used for this manuscript is given in the Supplementary Information.

Population-based models

MEmilio implements PBMs based on ordinary, stochastic, and integro-differential equations. PBMs provide a computationally efficient representation of infectious disease dynamics. In MEmilio, they can be used standalone or as the basis for MEmilio’s more general MPMs, described in the Sect. “Metapopulation models”.

Models based on ordinary differential equations

MEmilio’s PBMs in the form of ODEs, commonly referred to as compartmental models3, have been used in Figs. 3, 4, 5, 6. In these models, the population is partitioned into a finite set of compartments representing epidemiological states such as susceptible, exposed, infectious, or recovered, optionally stratified by sociodemographic characteristics.

MEmilio’s ODEs are formulated in a flow-based formulation80 in contrast to standard approaches that typically integrate the net change of compartment sizes directly3; also see Zunker et al.81. Through this specification, MEmilio directly computes particular in- and outflows of disease states as well as the total compartmental values. Let Inline graphic denote the number of compartments and let

graphic file with name d33e1352.gif

be the state vector, where Inline graphic denotes the population size of compartment i at time t. Transitions between compartments are described by flow functions

graphic file with name d33e1367.gif

where Inline graphic represents the rate at which individuals move from compartment j to compartment i at time t. Transitions that are not part of the model are assigned a rate of zero and omitted from the implementation. The model dynamics are then defined in terms of cumulative flows

graphic file with name d33e1385.gif

which represent the total number of individuals that have transitioned from compartment j to compartment i up to time t. These cumulative flows evolve according to

graphic file with name d33e1400.gif 1

The compartment sizes are reconstructed from the initial state Inline graphic by accounting for the accumulated inflows and outflows,

graphic file with name d33e1409.gif 2

Population changes not arising from internal disease dynamics, such as births or deaths, are handled by introducing additional source or sink compartments without epidemiological interpretation.

MEmilio also supports direct formulation of compartment derivatives; however, the flow-based representation is used by default and throughout this work. Demographic stratification, for example by age group, is supported for most models by initializing the system with a specified number of groups, resulting in replicated compartment structures with group-specific parameters.

In this work, we use several of MEmilio’s ODE-based PBMs. In Fig. 4c, a SEIRDB-type PBM is fitted to Ebola case data for Guinea (see Supplementary Information, Section D.1.2 for details). In Fig. 4d,e (national level), a SECIR-type model is fitted against case data of SARS-CoV-2 in Germany and Spain (see Supplementary Information, Section D.2 for details). The SECIR-type PBM is further used in Fig. 5a–c (see Supplementary Information, Section F.1 for details), in Fig. 5d,e (see Supplementary Information, Section F.2 for details), and in Fig. 6d (see Supplementary Information, Section F.1 for details). MEmilio furthermore provides ODE-based PBMs allowing for multi-layer immunity with implicit variant change51, waning immunity with different waning paces for protection against symptomatic and severe infections65, a SEIRV-type influenza model70, and an RSV model with four layers of infection and recovery69. Furthermore, by leveraging the SBML import interface, MEmilio can import a large range of models described in the SBML standard. If not stated otherwise, ODE-based initial value problems are solved numerically using an adaptive Runge-Kutta-scheme (see Supplementary Information B.1.1 for details).

Models based on the Linear Chain Trick

MEmilio uses the LCT to overcome exponentially distributed transition times that are implicitly used in simple ODE-based models and which are considered unrealistic from an epidemiological point of view82–84.

Using the LCT, MEmilio divides the compartments that are neither initial nor absorbing states into subcompartments. Based on the property that the sum of independent and identically distributed exponential random variables is Erlang-distributed, we obtain Erlang-distributed transitions through the linear coupling of the subcompartments. In MEmilio’s LCT-based models, the single formula for one compartment of a classical ODE model is substituted by a system of formulas, with one for each subcompartment. More explicitly, the equation for compartment i as in Eq. (2) is substituted by Inline graphic formulas where Inline graphic represents the number of subcompartments into which compartment i is divided. We then have

graphic file with name d33e1481.gif 3

If the variance of the state transition distribution is known, it can be used to compute the number of subcompartments to select the most appropriate Erlang distribution. While most implementations hard-code the numbers of subcompartments used85, MEmilio allows to set the number of subcompartments for each compartment and each group independently and the corresponding model is only created upon compile-time, leading to flexible and performant LCT-based models. In Plötzke et al.46, we showed that a generalization of a model with eight compartments into one with more than 100 subcompartments only increases simulation time from 0.012 to 0.015 seconds.

In this work, we use a SECIR-type LCT-based PBM in Fig. 5d,e (see Supplementary Information, Section F.2 for details) and in Fig. 6f (see Supplementary Information, Section I.2 for details). If not stated otherwise, LCT-based initial value problems are solved numerically using an adaptive Runge-Kutta-scheme (see Supplementary Information B.1.1 for details)

Models based on integro-differential equations

As a generalization of LCT-based models, MEmilio provides highly flexible models based on IDEs. These models offer the possibility to consider arbitrary, user-defined or data-driven transition distributions. While IDE-based models are sometimes also referred to as age-of-infection models, MEmilio’s integral formulations allow for the inclusion of any type of memory regarding disease states and as any other type of PBM, MEmilio allows to stratify the IDE-based model by demographic features such as age.

Similar to ODE-based models and as a matter of harmonization, MEmilio formulates IDE-based models using the flows from one compartment to another, i.e., computing the compartment values based on the flows. Through their memory properties, IDE-based models do not share the Markov property and, in contrast to ODE-based models, the flows Inline graphic of IDE-based models do not only depend on the current state of the system but on the history of infection dynamics. Hence, infection dynamics cannot be described by a system of ODEs as in Eq. (1) and instead, we obtain a system of Volterra integral equations as follows

graphic file with name d33e1515.gif 4

where σ is the vector containing all flows Inline graphic. The function f defines the integrand of the Volterra integral equation system and g is a function that may introduce nonlinearities to the system. Note that the flows may contain derivatives of the compartments which needs to be accounted for in the numerical approach. As initial conditions we require the flows σ to be given on a sufficiently large time interval before the simulation start.

In this work, we use a SECIR-type IDE-based PBM in Fig. 5d,e (see Supplementary Information, Section F.2 for details) and in Fig. 6f (see Supplementary Information, Section I.2 for details). As default Runge-Kutta solvers cannot be applied to the initival value problems with IDE formulations, MEmilio implements a customized numerical scheme10,47 (see Supplementary Information, Section B.1.2 for details).

Models based on stochastic differential equations

MEmilio allows SDE-based modeling to account for random fluctuations that might substantially influence disease dynamics, especially at low population sizes. MEmilio’s SDE-based PBMs generalize the ODE description by incorporating stochastic diffusion terms that can be interpreted as diffusion approximations of the underlying continuous-time Markov chain while retaining the familiar compartmental structure.

While several equivalent formulations exist for describing the diffusion component of stochastic differential equation (SDE) compartmental models86, MEmilio’s approach links the diffusion terms directly to the flows between compartments. In this construction, each transition rate is accompanied by its own stochastic source so that random fluctuations are tied to the same mechanisms driving the deterministic dynamics. This flow-based perspective has been formalized by Allen et al.87 and provides a natural bridge between the deterministic ODE formulation and its stochastic counterpart. More precisely, we allow each cumulative flow to evolve not only according to its deterministic rate but also with a noise term that scales with the flow intensity, i.e., we replace the ODEs in Eq. (1) by SDEs of the form

graphic file with name d33e1571.gif 5

where Inline graphic corresponds to the flow function defined in the ODE section and Inline graphic are independent standard Wiener processes. The compartment sizes are then updated as in Eq. (2) via the net balance of flows.

As random fluctuations in the SDE may drive the system outside the intended and non-negative region when populations approach biological boundaries, potentially leading to degenerate behavior, MEmilio post-processes the compartment values to mitigate non-negativity while preserving population sizes.

In addition to the basic SDE-SIR model, MEmilio by default provides an SDE model with waning immunity and a model with two variants or pathogen strains.

In this work, we use a SIRS-type SDE-based PBM in Fig. 4b to model influenza cases in Germany (see Supplementary Information, Section D1.1 for details). As in the case of IDE-based models, standard Runge-Kutta solvers cannot be applied to SDE-based models and MEmilio, thus, implements an Euler-Maruyama scheme (see Supplementary Information, Section B.1.3 for details).

Metapopulation models

MEmilio leverages its PBMs, as visualized in Fig. 2, to model outbreak dynamics in spatially heterogeneous settings by adding an additional mobility layer to create an MPM. More precisely, the MPM divides the total population N into Inline graphic distinct subpopulations (distributed over Inline graphic spatial patches), indexed by Inline graphic. The total population is then defined by

graphic file with name d33e1622.gif

where Inline graphic denotes the local compartment vector of patch k. The global state is the stacked vector Inline graphic. Through different mobility concepts as presented in the next subsections, the patches are coupled via the exchange of individuals and commuting groups. In the following, we distinguish between graph-based models, which are constructed from many local PBMs in an explicit graph structure, and models that connect individual PBMs through additional equations, e.g., ODEs.

Graph-based metapopulation model

In the graph-based MPM, the spatial structure is represented by a directed generalized graph Inline graphic where Inline graphic denotes the set of nodes, each corresponding to a local subpopulation. The generalized graph uses multiple edges Inline graphic with Inline graphic, Inline graphic that implement different edge properties. More precisely, we use one particular edge for the mobility of a specific subgroup that is composed of all local individuals with a selected disease state and set of demographic features. The graph is implemented in a modular fashion, allowing for any local model to be used as a node. The graph-based MPM advances local disease dynamics within each node independently and then applies the mobility scheme along each graph edge. There are three different mobility approaches implemented for the graph-based MPM that realize the exchange of individuals via the graph edges: a deterministic instant mobility, a deterministic detailed mobility which extends the previous one, and a stochastic mobility.

Deterministic instant mobility

The deterministic instant mobility scheme, introduced in Kühn et al.12, aims at representing daily commuting activity. The number of individuals exchanged per day along a graph edge is given by commuting weights that represent the relative share of the population commuting between the corresponding regions (nodes). For Germany, these weights have been derived from data provided by the German Federal Employment Agency88. Based on the commuting weights, a half-day exchange of commuters takes place with optional reductions in mobility for symptomatically infected individuals. Additionally, commuter testing is supported, enabling the detection of infectious commuters during travel52. Since the model’s resolution is at population level, individual infection trajectories cannot be tracked explicitly and infection states of commuters upon return have to be estimated. This is done by applying a one-step integration scheme separately for the commuters, while treating the other people in the same region as contact persons. The instant mobility scheme assumes instantaneous travel and neglects travel times. As all regions exchange commuters synchronously, the scheme has ideal properties for parallelization.

The graph-based MPM, leveraging an ODE-based SECIR-type PBM with deterministic instant mobility is used in Fig. 4d–i (see Supplementary Information, Sections D.2 and E for details) and in Fig. 6b,f (see Supplementary Information, Section I for details). The graph-based MPM is furthermore used with deterministic instant mobility, leveraging ODE-, LCT- and IDE-based SECIR-type PBMs, in Fig. 6b,e (see Supplementary Information, Sections H and I for details).

Deterministic detailed mobility

The deterministic detailed mobility scheme was introduced in Zunker et al.65 and extends the instant approach by explicitly accounting for travel times and transit interactions. Each region is assigned a local mobility model, which can be flexibly parameterized to represent internal mobility patterns. For two regions k and l, represented as polygons, a straight line connecting their centroids is constructed. If k and l are not adjacent regions, the line traverses other regions. The total predefined travel time between k and l is distributed uniformly across the regions intersected by this line. Commuters move sequentially through the corresponding local mobility models as they traverse the regions along their trip, allowing for interactions with other commuters during transit.

Stochastic mobility

The stochastic mobility scheme implements transitions between two regions as stochastic jumps given by transition rates that depend on the origin and destination node as well as on the infection state. The stochastic jumps are realized through Poisson processes and simulated using a temporal Gillespie algorithm89. The magnitude of the rates determines the frequency of exchange via a given edge, i.e., higher rates correspond to more individuals changing from one node to another in a given time period.

Stochastic metapopulation model

The stochastic metapopulation model (SMM) describes both infection state adoptions and spatial transitions between disjoint regions as stochastic jumps governed by inhomogeneous Poisson processes. Hence, the evolution of the system state is a Markov process given by the master equation (6) with L the location change operator determined by spatial transition rates and G the infection state transition operator as defined in the dABM section. A detailed description of the SMM can be found in Winkelmann et al.90. Since the whole population in one subregion has the same position, the system only changes when an infection state transition or a spatial transition takes place. Consequently, Gillespie’s direct method91 is used for simulation.

ODE-integrated metapopulation model

MEmilio also allows to realize an MPM, and thus spatial heterogeneity, in a large and coupled system of ODEs. This mobility pattern can be regarded as an alternative to the deterministic instant mobility approach in the graph-based MPM, with the key distinction that mobility is modeled implicitly. Instead of explicit population exchanges, the equations include the impact of infectious individuals in other patches, which is proportional to the commuting weights between two patches, through the force of infection. For a patch k, the flow rates between two compartments j and i are given by

graphic file with name d33e1767.gif

resulting in the system

graphic file with name d33e1771.gif

In this work, the ODE-integrated MPM is used with a SEIR-type structure in Fig. 6a (see Supplementary Information, Section G for details).

Agent-based models

Agent-based models (ABMs) are powerful approaches for infectious disease dynamics, addressing many of the limitations of PBMs and MPMs through a direct modeling of individuals and their interactions. ABMs define a representative, synthetic population of agents that influence and infect each other through contact patterns and individual interactions, always acting and reacting according to specified rules and their common environment. Through this individual resolution, ABMs can naturally include any heterogeneity in the population of interest. MEmilio provides two ABMs. MEmilio’s main ABM allows for activity modeling and data-driven mobility rules and is denoted as mobility- or activity-based ABM. Additionally, MEmilio provides a mathematically rigorously described ABM based on stochastic diffusion and drift processes.

Mobility-based agent-based model

MEmilio’s mobility-based ABM models the movement of individual agents between manually defined locations. Instead of modeling an explicit contact network that propagates transmissions and allows infections, agents execute individual activities such as going to work or to a social event, i.e., explicitly changing to locations where they might catch an infection from other infectious agents at the same location. This approach offers a high level of flexibility when setting up an ABM. While in contact network settings, location-specific NPIs, such as venue closures, capacity restrictions, or testing scheme obligations, are modeled implicitly, the mobility-based model realizes an explicit implementation of these NPIs.

Infections are implemented to take into account the viral load in the host, which is responsible for the amount of virus shed. Viral load dynamics are modeled as a time-dependent function, with, by default, rapid exponential growth followed by gradual decline. The transmission between agents at shared locations depends mainly on three components: age-stratified contact matrices, e.g., derived from empirical survey data, the viral shed exposure rate calculated from infectious agents present at that location weighted by contact rates between age groups, and a transmission parameter establishing a linear relationship between exposure and infection probability. Object-oriented implementations of vaccinations and face masks as well as isolation, general contact reduction, and seasonality can be used to reduce infection probability.

Aside from continuous viral load dynamics and for the purpose of harmonized model descriptions, the model also follows a discrete symptomatic state structure that is in line with our PBMs and which can be leveraged to influence the agents’ behavior and movement structure, e.g., that symptomatically or severely infected individuals move less. Susceptible agents can become infected and either progress through a nonsymptomatic course of the disease and recover, or through a symptomatic course with potential escalation to severe or critical state and death. The progression can be set to depend on the agent’s age and virus type or variant, if multiple types or variants are modeled.

Movement between locations can be realized in one of two ways: either through mobility rules that represent typical daily routines with random elements, or through individual data-driven trips. In both cases, a base set of infection-related movement rules is defined. This set handles transfer of severely and critically infected agents to the hospital or the ICU, and deceased agents are removed from the model. Restrictions to movement can be set up through the aforementioned interventions and testing strategies. The model also allows user-defined configurations for agent behavior, including compliance with mask mandates, testing strategies, and quarantine or isolation protocols. Through customization options, users obtain a high flexibility to simulate a wide range of intervention scenarios.

The model then progresses in discrete time steps, alternating between agent movement and simulating infection transmissions during these time steps, which are by default set to one hour. A pseudo-code is given as a general overview in Algorithm 1 and more technical details can be found in Kerkmann et al.22.

Algorithm 1.

Algorithm 1

Discrete mobility-based agent-based model.

To store information for millions of agents, MEmilio uses customizable loggers to write out data points during a simulation. Predefined loggers for tracking basic movement and infection data are provided, and custom loggers can be used to define any data items and granularity to be stored in memory while the simulation is running.

In this work, the mobility-based ABM is used in Fig. 5d,e (see Supplementary Information, Section F.2 for details) and in Fig. 6c,f (see Supplementary Information, Section J for details).

Diffusion- and drift-based agent-based model

The diffusion- and drift-based ABM (dABM) is a mathematically motivated ABM that complements the state-of-the-art mobility-based ABM. The dABM uses a Markov Process to simulate disease dynamics and realizes agents with two features: an agent’s position x on a domain Inline graphic and its infection state z. The Markov Process is determined by the master equation

graphic file with name d33e1846.gif 6

The operator G defines the infection state adoptions, thus only acting on Z, the vector of all agents’ infection states. Infection state adoptions are stochastic jumps modeled with independent inhomogeneous Poisson processes whose rates depend on the current system state. The operator L defines location changes, i.e., movement of agents, and acts only on X, the vector of all agents’ positions. Movement of agents is modeled with independent diffusion processes of the form

graphic file with name d33e1863.gif

with Inline graphic potentials on the domain and Inline graphic noise functions. The Poisson processes that determine the infection state adoptions are given by rate functions that are dependent on the system state Inline graphic and the current time t. These rates can be interpreted as the number of adoptions of a given type, e.g., from susceptible to exposed state, that happen in one unit-time step. The rates determine the time point of the next infection state adoption. In addition to system changes through infection state adoptions taking place, the system changes through time-dependent movement of agents. A time discretization for integrating the movement equation until the time point of the next infection state adoption is used, and the corresponding simulation procedure is realized by a temporal Gillespie algorithm89.

In this work, the diffusion- and drift-based ABM is used in Fig. 5a–c and in Fig. 6d (see Supplementary Information, Section F.1 for details).

Hybrid agent-population and agent-metapopulation models

MEmilio also provides hybridized approaches, from which a temporal-hybrid model, as first introduced in Bicker et al.26, is used in this work. The idea of the temporal hybridization is based on the assumption that with lower case numbers, individual stochastic events have a substantially higher impact, while with higher case numbers, single stochastic simulation trajectories converge towards averaged outcomes. Hence, MEmilio uses PBMs and MPMs as suitable approximations for ABM simulations. The temporal-hybrid model in MEmilio combines two models and a switching condition. It continuously evaluates whether a transition between models is needed. Whenever a switch is triggered, the active model state is converted into a state of the target model through a dedicated conversion routine. These routines can be defined for arbitrary model pairs via template specialization. At present, converters are pre-implemented for the SMM and the dABM, as well as for the ODE-based SECIR-type model and the dABM.

In this work, a SECIR-type temporal-hybrid ABM-PBM is used in Fig. 5b,c, and Fig. 6d (see the Supplementary Information, Section F.1 for details on setups and conversion functions).

Machine learning-based surrogate models

An increased level of detail in modeling is almost always at the expense of the execution time of the used model. Also, despite efficient implementation, complex MPMs or ABMs can often not be simulated without cluster or HPC resources. In particular in time-critical applications, such as epidemic modeling, surrogate modeling approaches can become essential – as they enable rapid and just-in-time evaluation of many potential scenarios.

In MEmilio, we provide surrogate modeling approaches based on several machine learning methods. These surrogate models are trained on the output of the aforementioned PBMs and MPMs and can then be used as replacement of the complex model. For the representation of complex MPMs, MEmilio provides a surrogate training structure based on GNNs. These models are able to learn spatio-temporal dynamics with connectivity patterns among regions while allowing for the integration of demographic features and NPI strictness. While the models themselves operate as black boxes, they can be considered as intermediate between white and black boxes as they are trained on ensemble simulations integrating expert-derived mechanisms. In Schmidt et al.63, we already demonstrated that surrogate models can maintain a high level of accuracy.

In this work, MEmilio’s GNN surrogate model is used in Fig. 6e (see Supplementary Information, Section H for details).

Supplementary Information

Acknowledgements

The authors would like to thank Jan Kleinert, Annette Lutz, Wadim Koslow for early contributions to the MEmilio software and Uwe Naumann (RWTH Aachen University, i12 Software and Tools for Computational Engineering) for providing code for automatic differentiation. The authors gratefully acknowledge computing time on the supercomputer JURECA92 at Forschungszentrum Jülich under grant HPC4EPI.

Author contributions

Conceptualization: Julia Bicker, Carlotta Gerstein, David Kerkmann, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Michael Meyer-Hermann, Jan Hasenauer, Martin J. Kühn. Data Curation: Julia Bicker, Carlotta Gerstein, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Patrick Lenz, Vincent Wieland. Formal Analysis: Julia Bicker, Carlotta Gerstein, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Julian Litz, Martin J. Kühn. Funding Acquisition: Sebastian C. Binder, Margrit Klitz, Martin Siggel, Manuel Dahmen, Achim Basermann, Michael Meyer-Hermann, Jan Hasenauer, Martin J. Kühn. Investigation: Julia Bicker, Carlotta Gerstein, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Julian Litz, Martin J. Kühn. Methodology: All authors. Project Administration: Michael Meyer-Hermann, Jan Hasenauer, Martin J. Kühn. Resources: Michael Meyer-Hermann, Jan Hasenauer, Martin J. Kühn. Software: Julia Bicker, Carlotta Gerstein, David Kerkmann, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Daniel Abele, Maximilian Betz, Khoa Nguyen, Lena Plötzke, Kilian Volmer, Agatha Schmidt, Nils Waßmuth, Patrick Lenz, Daniel Richter, Hannah Tritzschak, Ralf Hannemann-Tamas, Julian Litz, Paul Johannssen, Marielena Borges, Annika Jungklaus, Manuel Heger, Annalena Lange, Elisabeth Kluth, Kathrin Rack, Martin Siggel, Martin J. Kühn. Supervision: Manuel Dahmen, Achim Basermann, Michael Meyer-Hermann, Jan Hasenauer, Martin J. Kühn. Validation: All authors. Visualization: Julia Bicker, Carlotta Gerstein, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Vincent Wieland, Martin J. Kühn. Writing—Original Draft: Julia Bicker, Carlotta Gerstein, David Kerkmann, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker, Maximilian Betz, Kilian Volmer, Martin J. Kühn. Writing—Review & Editing: All authors.

Funding

Open Access funding enabled and organized by Projekt DEAL. This work was supported by the Initiative and Networking Fund of the Helmholtz Association (grant agreement number KA1-Co-08, Project LOKI-Pandemics) and by the German Federal Ministry for Digital and Transport under grant agreement FKZ19F2211A (Project PANDEMOS). It was furthermore supported by the German Federal Ministry of Education and Research and the German Federal Ministry of Research, Technology and Space under grant agreement 031L0297B (Project INSIDe), 031L0319A and 031L0319B (Project AIMS), 031L0325A (Project TwinChain), 031L0324E (Project EPISERVE), and the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) (grant agreement 528702961). TwinChain and EPISERVE are part of the Modeling Network for Severe Infectious Diseases (MONID). This study was furthermore performed as part of the Helmholtz School for Data Science in Life, Earth and Energy (HDS-LEE) and received funding from the Helmholtz Association of German Research Centres. Additionally, it was supported by the European Union via the ERC grant INTEGRATE, grant agreement number 101126146, and under Germany’s Excellence Strategy by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) (EXC 2047–390685813, EXC 2151–390873048, and 524747443), the University of Bonn via the Schlegel Professorship of J.H. This research was partially funded by the Lower Saxony Ministry of Science and Culture (MWK) with funds from the Volkswagen Foundation’s zukunft.niedersachsen program (grant number: ZN4257; Project CAIMed - Lower Saxony Center for Artificial Intelligence and Causal Methods in Medicine).

Data availability

The pre-trained model weights for the GNN surrogate used in the benchmarks are available on Zenodo at https://doi.org/10.5281/zenodo.18507331. Contact patterns are fully integrated in the MEmilio software framework. Raw data for mobility matrices and reported case data is provided publicly by the data owners such as the Federal Employment Agency of Germany or the Robert Koch-Institute – download and transformation to correct formats was done with memilio-epidata.

Code availability

The MEmilio software framework is publicly available on GitHub under https://github.com/SciCompMod/memilio. MEmilio’s documentation is available at https://memilio.readthedocs.io/. The specific simulation code for this manuscript is available at https://github.com/SciCompMod/memilio-simulations/tree/main/2026_Bicker_et_al_Memilio_paper.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Julia Bicker, Carlotta Gerstein, David Kerkmann, Sascha Korf, René Schmieding, Anna Wendler, Henrik Zunker.

These authors contributed equally: Michael Meyer-Hermann and Jan Hasenauer.

Supplementary Information

The online version contains supplementary material available at https://doi.org/10.1038/s41598-026-66481-6.

References

  • 1.Daszak, P. et al. Workshop Report on Biodiversity and Pandemics of the Intergovernmental Platform on Biodiversity and Ecosystem Services (IPBES). Tech. Rep. 10.5281/zenodo.7432079 (2020). [DOI] [Google Scholar]
  • 2.European Centre for Disease Prevention and Control. Public health and social measures for health emergencies and pandemics in the EU/EEA: recommendations for strengthening preparedness planning. Tech. Rep., European Centre for Disease Prevention and Control. https://www.ecdc.europa.eu/en/publications-data/public-health-and-social-measures-health-emergencies-and-pandemics (2024).
  • 3.Brauer, F., Castillo-Chavez, C. & Feng, Z. Mathematical Models in Epidemiology, 69 of Texts in Applied Mathematics 10.1007/978-1-4939-9828-9 (Springer, 2019). [DOI]
  • 4.Gonçalves, B. epidemik. Model repository: https://github.com/DataForScience/epidemik.
  • 5.Grunnill, M., Arino, J., Ghasemi, A., Thommes, E. W. & Wu, J. MetaCast: A package for broadCASTing epidemiological and ecological models over META-populations. Journal of Open Source Software9, 6851 (2024). 10.21105/joss.06851. Model repository: https://github.com/m-d-grunnill/MetaCast. [DOI]
  • 6.Adhikari, R. et al. Inference, prediction and optimization of non-pharmaceutical interventions using compartment models: the PyRoss library. 10.48550/arXiv.2005.09625. Model repository: https://github.com/SoftMatterGroupCambridge/pyross (2020). [DOI]
  • 7.Gozzi, N. et al. Epydemix: An open-source python package for epidemic modeling with integrated approximate bayesian calibration. PLOS Comput. Biol.21, 1–18. 10.1371/journal.pcbi.1013735 Model repository: https://github.com/epistorm/epydemix (2025). [DOI] [PMC free article] [PubMed]
  • 8.Andersson, H. & Britton, T. Stochastic Epidemic Models and their Statistical Analysis151 (Springer Science & Business Media, 2012).
  • 9.Brauer, F. & Watmough, J. Age of infection epidemic models with heterogeneous mixing. J. Biol. Dyn.3, 324–330. 10.1080/17513750802415822 (2009). [DOI] [PubMed] [Google Scholar]
  • 10.Messina, E., Pezzella, M. & Vecchio, A. A non-standard numerical scheme for an age-of-infection epidemic model. J. Comput. Dyn.9, 239. 10.3934/jcd.2021029 (2022). [DOI] [Google Scholar]
  • 11.Pei, S., Kandula, S. & Shaman, J. Differential effects of intervention timing on COVID-19 spread in the United States. Sci. Adv.6, eabd6370. 10.1126/sciadv.abd6370 (2020). [DOI] [PMC free article] [PubMed]
  • 12.Kühn, M. J. Assessment of effective mitigation and prediction of the spread of SARS-CoV-2 in Germany using demographic information and spatial resolution. Math. Biosci. 108648. 10.1016/j.mbs.2021.108648 (2021). [DOI] [PMC free article] [PubMed]
  • 13.Chen, X., Zhang, A., Wang, H., Gallaher, A. & Zhu, X. Compliance and containment in social distancing: mathematical modeling of COVID-19 across townships. Int. J. Geogr. Inf. Sci.35, 446–465. 10.1080/13658816.2021.1873999 (2021). [DOI] [Google Scholar]
  • 14.Bicher, M. & Popper, N. Agent-based derivation of the SIR-differential equations. In 2013 8th EUROSIM Congress on Modelling and Simulation, 306–311. 10.1109/EUROSIM.2013.62 (2013). [DOI]
  • 15.Grefenstette, J. J. et al. FRED (A Framework for Reconstructing Epidemic Dynamics): an open-source software system for modeling infectious diseases and control strategies using census-based populations. BMC Public Health13, 940. Model repository: https://github.com/PublicHealthDynamicsLab/FRED (2013). [DOI] [PMC free article] [PubMed]
  • 16.Collier, N. & North, M. Parallel agent-based simulation with Repast for High Performance Computing. Simulation89, 1215–1235. Model repository: https://github.com/Repast/repast.hpc (2013).
  • 17.Hinch, R. et al. OpenABM-Covid19-An agent-based model for non-pharmaceutical interventions against COVID-19 including contact tracing. PLOS Comput. Biol.17, 1–26. Model repository: https://github.com/BDI-pathogens/OpenABM-Covid19 (2021). [DOI] [PMC free article] [PubMed]
  • 18.Bershteyn, A. et al.: Implementation and applications of EMOD, an individual-based multi-disease modeling platform. Pathogens Disease76 10.1093/femspd/fty059. Model repository: https://github.com/EMOD-Hub/EMOD (2018). [DOI] [PMC free article] [PubMed]
  • 19.Kerr, C. C. et al. Covasim: An agent-based model of COVID-19 dynamics and interventions. PLOS Comput. Biol.17, 1–32. Model repository: https://github.com/InstituteforDiseaseModeling/covasim (2021). [DOI] [PMC free article] [PubMed]
  • 20.Müller, S. A. et al. Predicting the effects of COVID-19 related interventions in urban settings by combining activity-based modelling, agent-based simulation, and mobile phone data. PLoS ONE16, 1–32. Model repository: https://github.com/matsim-org/matsim-episim (2021). [DOI] [PMC free article] [PubMed]
  • 21.Shattock, A. J. et al. Impact of vaccination and non-pharmaceutical interventions on SARS-CoV-2 dynamics in Switzerland. Epidemics38, 100535. Model repository: https://github.com/SWISSTPH/OPENCOVID (2022). [DOI] [PMC free article] [PubMed]
  • 22.Kerkmann, D. et al. Agent-based modeling for realistic reproduction of human mobility and contact behavior to evaluate test and isolation strategies in epidemic infectious disease spread. Comput. Biol. Med.193, 110269. 10.1016/j.compbiomed.2025.110269 (2025). [DOI] [PubMed] [Google Scholar]
  • 23.Chen, J. et al.: Epihiper–A high performance computational modeling framework to support epidemic science. PNAS Nexus4, pgae557. 10.1093/pnasnexus/pgae557. Model repository: https://github.com/NSSAC/EpiHiper (2025). [DOI] [PMC free article] [PubMed]
  • 24.Ponge, J. et al.: Evaluating parallelization strategies for large-scale individual-based infectious disease simulations. In 2023 Winter Simulation Conference (WSC), 1088–1099. 10.1109/WSC60868.2023.10407633. Model repository: https://github.com/IMMIDD/GEMS (2023). [DOI]
  • 25.Bradhurst, R. A., Roche, S. E., East, I. J., Kwan, P. & Garner, M. G. A hybrid modeling approach to simulating foot-and-mouth disease outbreaks in Australian livestock. Front. Environ. Sci.3 10.3389/fenvs.2015.00017 (2015). [DOI]
  • 26.Bicker, J., Schmieding, R., Meyer-Hermann, M. & Kühn, M. J. Hybrid metapopulation agent-based epidemiological models for efficient insight on the individual scale: A contribution to green computing. Infect. Dis. Model.10, 571–590. 10.1016/j.idm.2024.12.015 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Bostanci, I. & Conrad, T. Integrating agent-based and compartmental models for infectious disease modeling: A novel hybrid approach. J. Artif. Soc. Social Simul.28, 5. 10.18564/jasss.5567 (2025).40452812 [DOI] [Google Scholar]
  • 28.Kehrer, K. & Conrad, T. O. F. A hybrid ABM-PDE framework for real-world infectious disease simulations. 10.48550/arXiv.2504.08430 (2025). [DOI]
  • 29.Maier, B. F. epipack. Model repository: https://github.com/benmaier/epipack.
  • 30.Jenness, S. M., Goodreau, S. M. & Morris, M. EpiModel: An R package for mathematical modeling of infectious disease over networks. J. Stat. Softw.84, 1–47. 10.18637/jss.v084.i08 Model repository: https://github.com/EpiModel/EpiModel/ (2018) [DOI] [PMC free article] [PubMed]
  • 31.Gupte, P., Eggo, R. & Van Leeuwen, E. epidemics: composable epidemic scenario modelling. https://github.com/epiverse-trace/epidemics.
  • 32.Picault, S. et al. EMULSION: Transparent and flexible multiscale stochastic models in human, animal and plant epidemiology. PLOS Comput. Biol.15, e1007342. Model repository: https://sourcesup.renater.fr/www/emulsion-public/ (2019). [DOI] [PMC free article] [PubMed]
  • 33.Fürst, S., Conrad, T., Jaeger, C. & Wolf, S. Vahana.jl – a framework (not only) for large-scale agent-based models. 10.48550/arXiv.2406.14441. Model repository: https://github.com/s-fuerst/Vahana.jl (2024). [DOI]
  • 34.Vermeulen, B., Müller, M. & Pyka, A. Social network metric-based interventions? experiments with an agent-based model of the COVID -19 pandemic in a metropolitan region. J. Artif. Soc. Social Simul.24, 6 (2021) . http://jasss.soc.surrey.ac.uk/24/3/6.html [Google Scholar]
  • 35.Rahn, S., Gödel, M., Köster, G. & Hofinger, G. Modelling airborne transmission of SARS-CoV-2 at a local scale. PLoS ONE17, e0273820. 10.1371/journal.pone.0273820 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Goldenbogen, B. et al. Control of COVID-19 outbreaks under stochastic community dynamics, bimodality, or limited vaccination. Adv. Sci.9, 2200088. 10.1002/advs.202200088 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Cuevas, E. An agent-based model to evaluate the covid-19 transmission risks in facilities. Compute. Biol. Med.121, 103827. 10.1016/j.compbiomed.2020.103827 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Betz, M., Richter, D., Abele, D. & Kühn, M. J. Manual binding and semi-automated interface generation for efficient simulation backends with user-friendly frontends: A demonstration for epidemic use cases (2026). To be submitted.
  • 39.Betts, J. T. Practical Methods for Optimal Control and Estimation using Nonlinear Programming (SIAM, 2010).
  • 40.Hucka, M. et al. The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics19, 524–531. 10.1093/bioinformatics/btg015 (2003). [DOI] [PubMed] [Google Scholar]
  • 41.Hochreiter, S. & Schmidhuber, J. Long Short-Term Memory. Neural Comput.9, 1735–1780. https://direct.mit.edu/neco/article-pdf/9/8/1735/813796/neco.1997.9.8.1735.pdf (1997). [DOI] [PubMed]
  • 42.Li, Z., Liu, F., Yang, W., Peng, S. & Zhou, J. A survey of convolutional neural networks: analysis, applications, and prospects. IEEE Transactions on Neural Networks and Learning Systems33, 6999–7019. 10.1109/TNNLS.2021.3084827 (2022). [DOI] [PubMed]
  • 43.Wu, Z. et al. A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst.32, 4–24. 10.1109/TNNLS.2020.2978386 (2021). [DOI] [PubMed] [Google Scholar]
  • 44.Betz, P. K. ESID: Exploring the design and development of a visual analytics tool for epidemiological emergencies. In 2023 IEEE VIS Workshop on Visualization for Pandemic and Emergency Responses (Vis4PandEmRes) 8–14. 10.1109/Vis4PandEmRes60343.2023.00007 (IEEE, 2023). [DOI]
  • 45.Gilg, J. A full software stack for epidemic disease management: Unlocking the joint potential of software technology and supercomputing (2026). 10.48550/arXiv.2608.09933 [DOI]
  • 46.Plötzke, L., Wendler, A., Schmieding, R. & Kühn, M. J. Revisiting the linear chain trick in epidemiological models: Implications of underlying assumptions for numerical solutions. Math. Comput. Simul.239, 823–844. 10.1016/j.matcom.2025.07.045 (2026). [DOI] [Google Scholar]
  • 47.Wendler, A., Plötzke, L., Tritzschak, H. & Kühn, M. J. A nonstandard numerical scheme for a novel secir integro-differential equation-based model allowing nonexponentially distributed stay times. Appl.Math. Comput.509, 129636. 10.1016/j.amc.2025.129636 (2026). [DOI] [Google Scholar]
  • 48.Mossong, J. et al. Social Contacts and Mixing Patterns Relevant to the Spread of Infectious Diseases. PLoS Med.5, e74. 10.1371/journal.pmed.0050074 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Fumanelli, L., Ajelli, M., Manfredi, P., Vespignani, A. & Merler, S. Inferring the structure of social contacts from demographic data in the analysis of infectious diseases spread. PLoS Comput. Biol.8, e1002673. 10.1371/journal.pcbi.1002673 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Jarvis, C. I. et al. Social contact patterns following the covid-19 pandemic: a snapshot of post-pandemic behaviour from the comix study. Epidemics48, 100778. 10.1016/j.epidem.2024.100778 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51.Koslow, W. et al. Appropriate relaxation of non-pharmaceutical interventions minimizes the risk of a resurgence in SARS-CoV-2 infections in spite of the Delta variant. PLoS Comput. Biol.18, e1010054. 10.1371/journal.pcbi.1010054 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Kühn, M. J. et al. Regional opening strategies with commuter testing and containment of new SARS-CoV-2 variants in Germany. BMC Infect. Dis.22, 333. 10.1186/s12879-022-07302-9 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Li, Y. et al. Probable airborne transmission of SARS-CoV-2 in a poorly ventilated restaurant. Build. Environ.196, 107788. 10.1016/j.buildenv.2021.107788 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Korf, S., Wagner, S. J., Köster, G. & Kühn, M. J. On the effect of missing transmission chain information in agent-based models: Outcomes of superspreading events and workplace transmission. Chaos Solitons Fractals208, 118179 (2026). 10.1016/j.chaos.2026.118179 [DOI] [Google Scholar]
  • 55.Legrand, J., Grais, R. F., Boelle, P.-Y., Valleron, A.-J. & Flahault, A. Understanding the dynamics of Ebola epidemics. Epidemiol. Infect.135, 610–621. 10.1017/s0950268806007217 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Andrieu, C., Doucet, A. & Holenstein, R. Particle Markov chain Monte Carlo methods. J. Royal Stat. Soc. Ser. B (Stat. Methodol.)72, 269–342. 10.1111/j.1467-9868.2009.00736.x (2010). [DOI] [Google Scholar]
  • 57.Buchholz, U. (GrippeWeb - Daten des Wochenberichts Data set).
  • 58.Rico, A. et al. Epidemiology of epidemic Ebola virus disease in Conakry and surrounding prefectures, Guinea, 2014–2015. Emerg. Infect. Dis.22, 178. 10.3201/eid2202.151304 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Kühmichel, L. et al. BayesFlow 2: Multi-backend amortized Bayesian inference in Python. 10.48550/arXiv.2602.07098 (2026). [DOI] [Google Scholar]
  • 60.Arruda, J., Bracher, N., Köthe, U., Hasenauer, J. & Radev, S. T. Diffusion models in simulation-based inference: A tutorial review. 10.48550/arXiv.2512.20685 (2025). [DOI]
  • 61.Keeling, M. J. & Eames, K. T. Networks and epidemic models. J. Royal Soc. Interface2, 295–307. 10.1098/rsif.2005.0051 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62.Pastor-Satorras, R., Castellano, C., Van Mieghem, P. & Vespignani, A. Epidemic processes in complex networks. Rev. Mod. Phys.87, 925–979. 10.1103/RevModPhys.87.925 (2015). [DOI] [Google Scholar]
  • 63.Schmidt, A., Zunker, H., Heinlein, A. & Kühn, M. J. Graph neural network surrogates to leverage mechanistic expert knowledge towards reliable and immediate pandemic response. Sci. Rep.16, 10.1038/s41598-026-39431-5 (2026). [DOI] [PMC free article] [PubMed]
  • 64.Zunker, H., Dönges, P., Lenz, P., Contreras, S. & Kühn, M. J. Risk-mediated dynamic regulation of effective contacts de-synchronizes outbreaks in metapopulation epidemic models. 10.48550/arXiv.2502.14428 (2025). [DOI]
  • 65.Zunker, H. Novel travel time aware metapopulation models and multi-layer waning immunity for late-phase epidemic and endemic scenarios. PLoS Comput. Biol.20, 10.1371/journal.pcbi.1012630 (2024). [DOI] [PMC free article] [PubMed]
  • 66.Schmid, N. et al. Integrative modeling of the spread of serious infectious diseases and corresponding wastewater dynamics. Epidemics51, 100836. 10.1016/j.epidem.2025.100836 (2025). [DOI] [PubMed] [Google Scholar]
  • 67.Bicker, J. et al.: Coupled epidemiological and wastewater modeling at the urban scale: A case study for Munich. iScience29 (2026). 10.1016/j.isci.2026.116891. [DOI] [PMC free article] [PubMed]
  • 68.Kerkouche, R., Zunker, H., Fritz, M. & Kühn, M. J. Differentially private federated learning for localized control of infectious disease dynamics. Sci. Rep.16, 10.1038/s41598-026-60725-1 (2026). [DOI] [PMC free article] [PubMed]
  • 69.Weber, A., Weber, M. & Milligan, P. Modeling epidemics caused by respiratory syncytial virus (RSV). Math. Biosci.172, 95–113. 10.1016/S0025-5564(01)00066-9 (2001). [DOI] [PubMed] [Google Scholar]
  • 70.Weidemann, F. et al. Is the impact of childhood influenza vaccination less than expected: a transmission modelling study. BMC Infect. Dis.17, 258. 10.1186/s12879-017-2344-6 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71.Rodrigues, H. S., Monteiro, M. T. T. & Torres, D. F. Vaccination models and optimal control strategies to dengue. Math. Biosci.247, 1–12. 10.1016/j.mbs.2013.10.006 (2014). [DOI] [PubMed] [Google Scholar]
  • 72.Ndii, M. Z., Hickson, R., Allingham, D. & Mercer, G. Modelling the transmission dynamics of dengue in the presence of wolbachia. Math. Biosci.262, 157–166. 10.1016/j.mbs.2014.12.011 (2015). [DOI] [PubMed] [Google Scholar]
  • 73.Reich, N. G. et al.: Accuracy of real-time multi-model ensemble forecasts for seasonal influenza in the U.S. PLoS Comput. Biol.15, e1007486. 10.1371/journal.pcbi.1007486 (2019). [DOI] [PMC free article] [PubMed]
  • 74.Cramer, E. Y. et al. Evaluation of individual and ensemble probabilistic forecasts of COVID-19 mortality in the United States. Proc. Natl. Acad. Sci. U. S. A.119, e2113561119. 10.1073/pnas.2113561119 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 75.Gerstein, C. & Zunker, H. & Kühn, M High-performance metapopulation models with implicit and explicit mobility: Simulation and performance analysis on CPU and GPU (2026). To be submitted. [Google Scholar]
  • 76.Schälte, Y. et al.: pyPESTO: a modular and scalable tool for parameter estimation for dynamic models. Bioinformatics39, btad711. 10.1093/bioinformatics/btad711 (2023). [DOI] [PMC free article] [PubMed]
  • 77.Schälte, Y., Klinger, E., Alamoudi, E. & Hasenauer, J. pyABC: Efficient and robust easy-to-use approximate Bayesian computation. J. Open Source Softw.7, 4304. 10.21105/joss.04304 (2022). [DOI]
  • 78.Razavi, S. & Gupta, H. V. A new framework for comprehensive, robust, and efficient global sensitivity analysis: 1. Theory. Water Resour. Res.52, 423–439. 10.1002/2015WR017558 (2016). [DOI] [Google Scholar]
  • 79.Herman, J. & Usher, W. SALib: An open-source Python library for Sensitivity Analysis. J.Open Source Softw.2, 97. 10.21105/joss.00097 (2017). [DOI] [Google Scholar]
  • 80.Schmieding, R., Zunker, H. & Kühn, M. Simultaneous computations of flows for new infections and hospitalizations in compartmental models and further performance-oriented aspects (2026). To be submitted.
  • 81.Zunker, H., Schmieding, R., Hasenauer, J. & Kühn, M. J. Efficient numerical computation of traveler states in explicit mobility-based metapopulation models: Mathematical theory and application to epidemics. (2026).
  • 82.d’Onofrio, A. Mixed pulse vaccination strategy in epidemic model with realistically distributed infectious and latent times. Appl. Math. Comput.151 10.1016/S0096-3003(03)00331-X (2004). [DOI]
  • 83.Lloyd, A. L. Realistic distributions of infectious periods in epidemic models: changing patterns of persistence and dynamics. Theor. Popul. Biol.60, 10.1006/tpbi.2001.1525 (2001). [DOI] [PubMed]
  • 84.Wearing, H. J., Rohani, P. & Keeling, M. J. Appropriate Models for the Management of Infectious Diseases. PLoS Med.2, e174. 10.1371/journal.pmed.0020174 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 85.Hurtado, P. J. & Richards, C. Building mean field ODE models using the generalized linear chain trick & Markov chain theory. J. Biol. Dyn.15 (2021). 10.1080/17513758.2021.1912418. [DOI] [PubMed]
  • 86.Allen, L. J. An introduction to stochastic epidemic models. In Mathematical Epidemiology 81–130. 10.1007/978-3-540-78911-6_3 (Springer, 2008). [DOI]
  • 87.Allen, E. J., Allen, L. J., Arciniega, A. & Greenwood, P. E. Construction of equivalent stochastic differential equation models. Stochastic Anal. Appl.26, 274–297. 10.1080/07362990701857129 (2008). [DOI] [Google Scholar]
  • 88.BMAS. Pendlerverflechtungen der sozialversicherungspflichtig Beschäftigten nach Kreisen - Deutschland (Jahreszahlen). https://statistik.arbeitsagentur.de/SiteGlobals/Forms/Suche/Einzelheftsuche_Formular.html?topic_f=beschaeftigung-sozbe-krpenddwww.bmas.de (2020).
  • 89.Vestergaard, C. L. & Génois, M. Temporal Gillespie Algorithm: Fast Simulation of Contagion Processes on Time-Varying Networks. PLOS Comput. Biol.11, e1004579. 10.1371/journal.pcbi.1004579 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 90.Winkelmann, S., Zonker, J., Schütte, C. & Conrad, N. D. Mathematical modeling of spatio-temporal population dynamics and application to epidemic spreading. Math. Biosci.336, 108619. 10.1016/j.mbs.2021.108619 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 91.Gillespie, D. T. Approximate accelerated stochastic simulation of chemically reacting systems. J. Chem. Phys.115, 1716–1733. 10.1063/1.1378322 (2001). [DOI] [Google Scholar]
  • 92.Jülich Supercomputing Centre. JURECA: data centric and booster modules implementing the modular supercomputing architecture at Jülich Supercomputing Centre. J. Large Scale Res. Facilities7, A182 (2021). 10.17815/jlsrf-7-182 [DOI]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The pre-trained model weights for the GNN surrogate used in the benchmarks are available on Zenodo at https://doi.org/10.5281/zenodo.18507331. Contact patterns are fully integrated in the MEmilio software framework. Raw data for mobility matrices and reported case data is provided publicly by the data owners such as the Federal Employment Agency of Germany or the Robert Koch-Institute – download and transformation to correct formats was done with memilio-epidata.

The MEmilio software framework is publicly available on GitHub under https://github.com/SciCompMod/memilio. MEmilio’s documentation is available at https://memilio.readthedocs.io/. The specific simulation code for this manuscript is available at https://github.com/SciCompMod/memilio-simulations/tree/main/2026_Bicker_et_al_Memilio_paper.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES