DEpiABS: Differentiable Epidemic Agent-Based Simulator
Zhijian Gao, Shuxin Li, Bo An
TL;DR
This work tackles the triad of fidelity, efficiency, and interpretability in epidemic modelling by introducing DEpiABS, a structure-centric differentiable ABM that captures fine-grained dynamics including resource constraints, mutation, and reinfection within a fully transparent framework. It couples end-to-end differentiability with a z-score-based scaling method to calibrate micro-level mechanisms to real data and to project outputs to large populations without losing granularity. Through sensitivity analyses and cross-regional calibration, DEpiABS demonstrates improved forecasting accuracy and data efficiency relative to state-of-the-art data-centric DABMs, while maintaining mechanistic interpretability. The approach achieves linear scalability with population size and forecast horizon, offering a practical and generalisable tool for future epidemic response planning.
Abstract
The COVID-19 pandemic highlighted the limitations of existing epidemic simulation tools. These tools provide information that guides non-pharmaceutical interventions (NPIs), yet many struggle to capture complex dynamics while remaining computationally practical and interpretable. We introduce DEpiABS, a scalable, differentiable agent-based model (DABM) that balances mechanistic detail, computational efficiency and interpretability. DEpiABS captures individual-level heterogeneity in health status, behaviour, and resource constraints, while also modelling epidemic processes like viral mutation and reinfection dynamics. The model is fully differentiable, enabling fast simulation and gradient-based parameter calibration. Building on this foundation, we introduce a z-score-based scaling method that maps small-scale simulations to any real-world population sizes with negligible loss in output granularity, reducing the computational burden when modelling large populations. We validate DEpiABS through sensitivity analysis and calibration to COVID-19 and flu data from ten regions of varying scales. Compared to the baseline, DEpiABS is more detailed, fully interpretable, and has reduced the average normal deviation in forecasting from 0.97 to 0.92 on COVID-19 mortality data and from 0.41 to 0.32 on influenza-like-illness data. Critically, these improvements are achieved without relying on auxiliary data, making DEpiABS a reliable, generalisable, and data-efficient framework for future epidemic response modelling.
