Spatiotemporal modeling of COVID-19 dynamics: a hybrid compartmental machine learning approach with application to Sierra Leone district level surveillance data
Compartmental epidemic models offer mechanistic interpretability but assume time-homogeneous transmission, while machine learning forecasters capture nonlinear dynamics at the cost of epidemiological meaning. We develop and evaluate a time-inhomogeneous hybrid framework that couples a covariate driven Susceptible–Exposed–Infectious–Removed (SEIR) model with a residual learning Long Short Term Memory (LSTM) network implemented from scratch (H=8 hidden units, deliberately compact for full auditability), and apply it to a 1,401 day (1 March 2020–31 December 2023) district level COVID-19 surveillance panel for Sierra Leone (16 districts). Transmission, progression and recovery rates are modeled as exponential link functions of six lagged, time varying covariates vaccination coverage, lockdown status, mask mandates, mobility, healthcare capacity and variant intensity and the resulting discrete time mean field recursion is shown to conserve population size and remain non-negative by construction. We further formulate the corresponding continuous time Markov jump process, derive its Kolmogorov forward equation, and obtain a Fokker–Planck diffusion approximation whose full (diagonal and off-diagonal) diffusion coefficients quantify compartment specific demographic noise. Model parameters are estimated by constrained least squares (nine parameters; biologically informed bounds on latent and infectious periods), achieving a coefficient of determination of \(R^2=0.642\) against national daily confirmed cases. The residual series \(r_t=Y_t-\hat{Y}_t^{(M)}\) exhibits strong serial dependence (24 of 30 ACF lags significant), motivating the LSTM residual learner trained under a corrected rolling origin (walk forward) validation protocol in which both the mechanistic SEIR parameters and the LSTM are refit at each fold origin using only past data, eliminating a look ahead leakage issue present in an earlier version of this evaluation. Over a pooled 555 day genuinely out of sample horizon, the mechanistic SEIR model alone attained the lowest error on every metric we examined ( \(\textrm{RMSE}=2.39\) , \(\textrm{MAPE}=47.0\%\) , \(R^2=0.32\) ), outperforming the SEIR-LSTM hybrid ( \(\textrm{RMSE}=2.69\) , \(\textrm{MAPE}=50.2\%\) , \(R^2=0.14\) ) and an ARIMA baseline refit per fold ( \(\textrm{RMSE}=2.57\) , \(R^2=0.22\) ); a simple, assumption light Cori renewal equation forecast benchmark matched or exceeded all three model-based approaches ( \(\textrm{RMSE}=2.29\) , \(R^2=0.37\) ). District level extensions reveal substantial spatial heterogeneity in the effective reproduction number, with the capital district (Western Area Urban) showing the highest mean \(\mathcal {R}(t)=2.43\) under the primary case share based partial pooling scheme, although a population-adjusted robustness check shows this ranking is sensitive to how “transmission intensity” is operationalised. We discuss why residual learnability is limited in this low incidence, non-stationary count series attributing it jointly to the series’ statistical properties and to the compact LSTM architecture used and outline further uncertainty aware extensions for future work.
Authors
- Antony Ngunyi (ORCID: https://orcid.org/0009-0002-1089-6392)
- Oscar Ngesa
- Abass Jah (ORCID: https://orcid.org/0009-0001-4751-0265)
- Charity Wamwea
Institutions
- Jomo Kenyatta University of Agriculture and Technology (KE)
- Dedan Kimathi University of Technology (KE)
Publication Details
- Journal
- BMC Public Health
- Published
- 2026-09-28
- DOI
- https://doi.org/10.1186/s12889-026-29588-z
- Primary Topic
- COVID-19 epidemiological studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00