Dynamic SIR/SEIR-like models comprising a time-dependent transmission rate: Hamiltonian Monte Carlo approach with applications to COVID-19
Pith reviewed 2026-05-24 10:02 UTC · model grok-4.3
The pith
SIKR and SEMIKR models with Bayesian P-spline time-dependent transmission rates recover plausible COVID-19 patterns via HMC sampling.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The SIKR and SEMIKR models, enriched with a time-dependent transmission rate parameterised using Bayesian P-splines, are embedded in a probabilistic model that relies on the solutions of the underlying ODEs; this construction can be differentiated efficiently, which makes Hamiltonian Monte Carlo sampling feasible after careful initialisation and tuning, and when applied to COVID-19 data it recovers plausible temporal patterns in transmission while making explicit the dependence of results on modelling choices and convergence diagnostics.
What carries the argument
Bayesian P-splines used to parameterise the time-dependent transmission rate inside the ODE-based SIKR and SEMIKR compartmental models, enabling both flexibility and differentiability for HMC sampling within the probabilistic model that incorporates under-reporting.
If this is right
- The models capture effects of non-pharmacological measures, population behaviour changes and random events without resorting to a priori or ad-hoc specifications.
- Information about under-reporting of new infected cases improves estimates for diseases with large asymptomatic fractions.
- Hamiltonian Monte Carlo sampling becomes practical in settings that otherwise present weakly identified directions.
- Results on transmission dynamics are presented together with explicit diagnostics of their dependence on modelling choices.
Where Pith is reading between the lines
- The same differentiable embedding strategy could be tested on other infectious diseases that exhibit high under-reporting.
- Persistent challenges with posterior geometry point toward possible gains from reparameterisation or additional regularisation not explored in the current work.
- Ensemble comparisons across different spline knot numbers or compartment counts would quantify how sensitive recovered patterns are to those specific choices.
- Real-time updating of the P-spline coefficients as new data arrive might allow ongoing tracking of transmission shifts.
Load-bearing premise
The solutions of the ODEs can be embedded directly into a differentiable probabilistic model that remains well-behaved under HMC sampling despite weakly identified directions and challenging posterior geometries.
What would settle it
If the HMC sampler, after the described initialisation and tuning, produces non-convergent chains or transmission-rate trajectories that fail to reflect documented changes in COVID-19 spread in the Basque Country data, the claim that the models recover plausible patterns would be falsified.
Figures
read the original abstract
A study of changes in the transmission of a disease, in particular, a new disease like COVID-19, requires very flexible models which can capture, among others, the effects of non-pharmacological and pharmacological measures, changes in population behaviour and random events. We favour data-driven approaches over a priori and ad-hoc methods and introduce a generalised family of epidemiologically informed mechanistic models, guided by Ordinary Differential Equations and embedded in a probabilistic model. The mechanistic models SIKR and SEMIKR which divide the population into disjoint compartments for individuals Susceptible to infection, Infectious (K sub-compartments), Exposed (M sub-compartments), and Removed from the pool of susceptible are enriched with a time-dependent transmission rate, parameterised using Bayesian P-splines. Such a parameterisation enables an extensive flexibility in the transmission dynamics, without resorting to ad-hoc specifications. Our probabilistic model relies on the solutions of a mechanistic model and benefits from access to the information about under-reporting of new infected cases, a crucial property when studying diseases with a large fraction of asymptomatic infections. Such a model can be differentiated efficiently, which makes Hamiltonian-based Monte Carlo sampling feasible after a careful initialisation and tuning strategy. This is particularly important in the present setting with weakly identified directions and challenging posterior geometries. Furthermore, we apply our methodology to study the transmission dynamics of COVID-19 in the Basque Country (Spain) from mid February 2020 to the end of January 2021, showing how the framework can recover plausible temporal patterns in transmission while making explicit the dependence of the results on modelling choices and convergence diagnostics.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces the SIKR and SEMIKR compartmental models (extensions of SIR/SEIR with K infectious and M exposed sub-compartments) that incorporate a time-dependent transmission rate parameterized via Bayesian P-splines. These are embedded in a differentiable probabilistic model that uses ODE solutions and accounts for under-reporting, enabling Hamiltonian Monte Carlo sampling after careful initialization and tuning. The framework is applied to COVID-19 case data from the Basque Country (mid-February 2020 to end-January 2021), with the central claim being that it recovers plausible temporal transmission patterns while making the dependence on modeling choices explicit and providing convergence diagnostics.
Significance. If the HMC inference is reliable, the approach supplies a flexible, data-driven alternative to ad-hoc transmission specifications that quantifies uncertainty and under-reporting effects, which could aid in evaluating intervention impacts in emerging diseases.
major comments (2)
- [Abstract and §3] Abstract and §3 (probabilistic model and sampling strategy): The central claim requires reliable HMC sampling of the P-spline coefficients despite 'weakly identified directions and challenging posterior geometries.' The manuscript describes a 'careful initialisation and tuning strategy' but reports no quantitative diagnostics (effective sample size, R-hat, or divergent transitions) for the COVID-19 application; without these, the recovered transmission trajectories cannot be trusted as more than artifacts of poor mixing.
- [Results (Basque Country application)] Results section on Basque Country application: The claim that results 'make explicit the dependence of the results on modelling choices' is load-bearing, yet the manuscript provides no sensitivity analysis (e.g., varying the P-spline order, knot placement, or smoothing-parameter prior) with quantitative metrics comparing inferred transmission rates across specifications; plausibility alone does not establish robustness.
minor comments (2)
- [Model definition] Notation for the transmission-rate function β(t) should be introduced with an explicit equation number in the model-definition section to improve traceability when discussing its P-spline expansion.
- [Figures] Figure captions for the transmission-rate trajectories should include the specific HMC settings (chains, iterations, adaptation phase) used to generate each panel.
Simulated Author's Rebuttal
We thank the referee for the constructive feedback, which highlights important aspects for strengthening the credibility of our results. We address each major comment below and commit to revisions that directly respond to the concerns raised.
read point-by-point responses
-
Referee: [Abstract and §3] Abstract and §3 (probabilistic model and sampling strategy): The central claim requires reliable HMC sampling of the P-spline coefficients despite 'weakly identified directions and challenging posterior geometries.' The manuscript describes a 'careful initialisation and tuning strategy' but reports no quantitative diagnostics (effective sample size, R-hat, or divergent transitions) for the COVID-19 application; without these, the recovered transmission trajectories cannot be trusted as more than artifacts of poor mixing.
Authors: We agree that the absence of specific numerical convergence diagnostics in the Basque Country application limits the ability to fully substantiate the reliability of the HMC samples. Although the manuscript describes the initialization and tuning strategy and references convergence diagnostics in the abstract, quantitative metrics such as effective sample sizes, R-hat values, and divergent transition counts were not reported for the application. In the revised manuscript we will add these diagnostics for the reported chains to allow direct assessment of mixing and sampling quality. revision: yes
-
Referee: [Results (Basque Country application)] Results section on Basque Country application: The claim that results 'make explicit the dependence of the results on modelling choices' is load-bearing, yet the manuscript provides no sensitivity analysis (e.g., varying the P-spline order, knot placement, or smoothing-parameter prior) with quantitative metrics comparing inferred transmission rates across specifications; plausibility alone does not establish robustness.
Authors: We acknowledge that the manuscript discusses modeling choices but does not present a formal sensitivity analysis with quantitative metrics comparing transmission-rate inferences across specifications such as P-spline order, knot placement, or smoothing-parameter priors. To strengthen the claim that dependence on modeling choices is made explicit, we will perform and report such a sensitivity analysis in the revised version, including quantitative comparisons of the resulting transmission trajectories. revision: yes
Circularity Check
No circularity: transmission rate learned from external data via P-splines
full rationale
The paper parameterizes time-dependent transmission rates in the SIKR/SEMIKR ODE models using Bayesian P-splines, then embeds the ODE solutions into a differentiable probabilistic model for HMC sampling. This is a standard data-driven fitting procedure applied to external COVID-19 case counts; the recovered trajectories are outputs of inference on observed data rather than inputs redefined as predictions. No equation or section shows a self-definitional loop, a fitted parameter renamed as a prediction, or a load-bearing claim resting solely on self-citation. The derivation chain is self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
free parameters (1)
- P-spline coefficients and smoothing parameter
axioms (2)
- domain assumption The population can be partitioned into the stated disjoint compartments whose flows obey the given ODEs.
- domain assumption The transmission rate function is sufficiently smooth for the spline representation and the resulting ODE system remains numerically stable.
Forward citations
Cited by 1 Pith paper
-
Adaptive tuning of Hamiltonian Monte Carlo methods
ATune combines Gaussian theoretical analysis with burn-in simulation data to select system-specific splitting integrators and hyperparameter credible intervals for improved HMC stability and performance.
Reference graph
Works this paper leans on
- [1]
-
[2]
D. Anderson and R. Watson. On the spread of a disease with gamma distributed latent and infectious periods. Biometrika, 67:191–198, 1980
work page 1980
-
[3]
J. Arino and S. Portet. A simple model for COVID-19. Infectious Disease Modelling, 5:309–315, 2020
work page 2020
-
[4]
M. Baguelin, G. F. Medley, E. S. Nightingale, K. M. O’Reilly, E. M. Rees, N. R. Waterlow, and M. Wagner. Tooling-up for infectious disease transmission modelling. Epidemics, 32, 2020
work page 2020
-
[5]
N. T. J. Bailey. Some stochastic models for small epidemics in large populations. Journal of the Royal Statistical Society. Series C , 13(1):9–19, 1964
work page 1964
-
[6]
A. L. Bertozzia, E. Franco, G. Mohler, M. B. Short, and D. Sledge. The challenges of modeling and forecasting the spread of COVID-19. PNAS, 117:16732–16738, 2020. 22
work page 2020
-
[7]
General methods for monitoring convergence of iter- ative simulations
Stephen P Brooks and Andrew Gelman. General methods for monitoring convergence of iter- ative simulations. Journal of computational and graphical statistics , 7(4):434–455, 1998
work page 1998
-
[8]
T. Carletti, D. Fanelli, and F. Piazza. COVID-19: The unreasonable effectiveness of simple models. Chaos, Solitons & Fractals: X , 5, 2020
work page 2020
-
[9]
C. Carroll, S. Bhattacharjee, Y. Chen, P. Dubey, J. Fan, ´A. Gajardo, X. Zhou, H.-G. M¨ uller, and J.-L. Wang. Time dynamics of COVID-19. Scientific Reports, 2020
work page 2020
-
[10]
A. Chatzilena, E. van Leeuwen, O. Ratmann, M. Baguelin, and N. Demiris. Contemporary statistical inference for infectious disease models using Stan. Epidemics, 29, 2019
work page 2019
- [11]
-
[12]
J.-P. Chretien, D. George, J. Shaman, R. A. Chitale, and F. E. McKenzie. Influenza forecasting in human populations: A scoping review. PLOS ONE, 9(4), 2014
work page 2014
-
[13]
F. C. Coelho, C. T. Codec, and M. G. M. Gomes. A Bayesian framework for parameter estimation in dynamical models. PLoS ONE, 6(5), 2011
work page 2011
-
[14]
A. Cori, N. M. Ferguson, C. Fraser, and S. Cauchemez. A new framework and software to esti- mate time-varying reproduction numbers during epidemics.American Journal of Epidemiology, 178(9):1505–1512, 2013
work page 2013
-
[15]
P. Dierckx, editor. Curve and Surface Fitting with Splines . Oxford University Press, 1993
work page 1993
- [16]
-
[17]
D. Faranda, I. P´ erez Castillo, O. Hulme, A. Jezequel, J. S. W. Lamb, Y. Sato, and E. L. Thompson. Asymptotic estimates of SARS-CoV-2 infection counts and their sensitivity to stochastic perturbation. Chaos, 30, 2020
work page 2020
-
[18]
N. M. Ferguson, D. Laydon, and G. Nedjati-Gilani et al. Impact of non-pharmaceutical in- terventions (NPIs) to reduce COVID-19 mortality and healthcare demand , volume Report 9. Imperial College London, 2020
work page 2020
-
[19]
S. Flaxman, S. Mishra, A. Gandy, H. J. T. Unwin, T. A. Mellan, H. Coupland, C. Whit- taker, H. Zhu, T. Berah, J. W. Eaton, M. Monod, A. C. Ghani, C. A. Donnelly, S. Riley, M. A. C. Vollmer, N. M. Ferguson, L. C. Okell, and S. Bhatt. Estimating the effects of non-pharmaceutical interventions on COVID-19 in Europe. Nature, 584, 2020
work page 2020
-
[20]
G. Frasso and P. Lambert. Bayesian inference in an extended SEIR model with nonparametric disease transmission rate: an application to the Ebola epidemic in Sierra Leone. Biostatistics, 17(4):779–792, 2016
work page 2016
-
[21]
S. Funk, A. Camacho, A. J. Kucharski, R. M. Eggo, and W. J. Edmunds. Real-time forecasting of infectious disease dynamics with a stochastic semi-mechanistic model. Epidemics, 22:56–61, 2018. 23
work page 2018
-
[22]
P. Girardi and C. Gaetan. An SEIR model with time-varying coefficients for analyzing the SARS-CoV-2 epidemic. Risk Analysis, 2021
work page 2021
- [23]
-
[24]
H. Heesterbeek, R. M. Anderson, V. Andreasen, S. Bansal, D. De Angelis, C. Dye, K. T. D. Eames, W. John Edmunds, S. D. W. Frost, S. Funk, T. Deirdre Hollingsworth, T. House, V. Isham, P. Klepac, J. Lessler, J. O. Lloyd-Smith, C. J. E. Metcalf, D. Mollison, L.Pellis, J. R. C. Pulliam, M. G. Roberts, and C. Viboud. Modeling infectious disease dynamics in th...
work page 2015
-
[25]
A. C. Hindmarsh and R. Serban. User Documentation for cvodes v5.3.0 (sundials v5.3.0) . Center for Applied Scientific Computing Lawrence Livermore National Laboratory, USA, 2020
work page 2020
-
[26]
H. G. Hong and Y. Li. Estimation of time-varying reproduction numbers underlying epidemi- ological processes: A new statistical tool for the COVID-19 pandemic. PLOS ONE , 15(7), 2020
work page 2020
-
[27]
Pierre E. Jacob and Sebastian Funk. rbi: Interface to ’LibBi’ , 2021. R package version 0.10.4
work page 2021
-
[28]
A. D. Kennedy and B. Pendleton. Cost of the generalised hybrid Monte Carlo algorithm for free field theory. Nuclear Physics B , 607:456–510, 2001
work page 2001
-
[29]
W. O. Kermack and A. G. McKendrick. A contribution to the mathematical theory of epi- demics. Proc. R. Soc. Lond. A , 115:700–721, 1927
work page 1927
-
[30]
S. Khailaie, T. Mitra, A. Bandyopadhyay, M. Schips, P. Mascheroni, P. Vanella, B. Lange, S. C. Binder, and M. Meyer-Hermann. Development of the reproduction number from coronavirus SARS-CoV-2 case data in Germany and implications for political measures. BMC Medicine, 2021
work page 2021
-
[31]
T. Kneib. Mixed model based inference in structured additive regression. Ludwig–Maximilians– Universit¨ at M¨ unchen, 2005
work page 2005
- [32]
-
[33]
O. Krylova and D. J. D. Earn. Effects of the infectious period distribution on predicted transitions in childhood disease dynamics. Journal of the Royal Society Interface , 10, 2013
work page 2013
-
[34]
A. J. Kucharski, T. W. Russell, C. Diamond, Y. Liu, J. Edmunds, S. Funk, and R. M. Eggo. Early dynamics of transmission and control of COVID-19: a mathematical modelling study. Lancet Infect Dis, 20:536–558, 2020
work page 2020
-
[35]
S. Lang and A. Brezger. Bayesian P-Splines. Journal of Computational and Graphical Statistics, 13 (1):183–212, 2004. 24
work page 2004
-
[36]
A. Leitao and C. V´ azquez. The stochastic θ-SEIHRD model: Adding randomness to the COVID-19 spread. Communications in Nonlinear Science and Numerical Simulation , 115:106731, 2022
work page 2022
-
[37]
M. Y. Li. An Introduction to Mathematical Modeling of Infectious Diseases . Springer, 2018
work page 2018
-
[38]
Z. Liu, P. Magal, O. Seydi, and G. Webb. A COVID-19 epidemic model with latency period. Infectious Disease Modelling, 5:323–337, 2020
work page 2020
-
[39]
A. L. Lloyd. Realistic distributions of infectious periods in epidemic models: Changing patterns of persistence and dynamics. Theoretical Population Biology, 60:59–71, 2001
work page 2001
-
[40]
T.T. Marinov and R. S. Marinova. Dynamics of COVID-19 using inverse problem for coefficient identification in SIR epidemic models. Chaos, Solitons & Fractals: X , 2020
work page 2020
-
[41]
Ministerios de Ciencia e Innovaci´ on y de Sanidad, Madrid.Estudio ENE-COVID: Cuarta ronda estudio nacional de sero-epidemiolog´ ıa de la infecci´ on por SARS-COV-2 en Espa˜ na, 2020
work page 2020
-
[42]
M. Mofijur, I. M. R. Fattah, A. Alam, A. B. M. S. Islam, H. C. Ong, S. M. A. Rahman, G. Najafie, S. F. Ahmed, A. Uddin, and T. M. I. Mahlia. Impact of COVID-19 on the so- cial, economic, environmental and energy domains: Lessons learnt from a global pandemic. Sustainable Production and Consumption , 26:343–359, 2021
work page 2021
-
[43]
L. M. Murray. Bayesian state-space modelling on high-performance hardware using LibBi. Journal of Statistical Software , 67 (10), 2015
work page 2015
-
[44]
R. F. Neal. MCMC using Hamiltonian dynamics. In S. Brooks, A. Gelman, G. Jones, and X.-L. Meng, editors, Handbook of Markov Chain Monte Carlo , chapter 5, pages 136–162. Chapman and Hall/CRC, 2011
work page 2011
-
[45]
E. O. Nsoesie, J. S. Brownstein, N. Ramakrishnan, and M. V. Marathe. A systematic review of studies on forecasting the dynamics of influenza outbreaks. Influenza and other respiratory viruses, 8(3):309–316, 2014
work page 2014
- [46]
-
[47]
G. Pillonetto, M. Bisiacco, G. Pal` u, and C. Cobelli. Tracking the time course of reproduction number and lockdown’s effect on human behaviour during SARS-CoV-2 epidemic: nonpara- metric estimation. Scientific Reports, 11, 2021
work page 2021
-
[48]
M. Poll´ an, B. P´ erez-G´ omez, R. Pastor-Barriuso, J. Oteo, M. A. Hern´ an, M. P´ erez-Olmeda, J. L. Sanmart´ ın, A. Fern´ andez-Garc´ ıa, I. Cruz, N. Fern´ andez de Larrea, M. Molina, F. Rodr´ ıguez- Cabrera, M. Mart´ ın, P. Merino-Amador, J. Le´ on Paniagua, J. F. Mu˜ noz-Montalvo, F. Blanco, and R. Yotti. Prevalence of SARS-CoV-2 in Spain (ENE-COVID)...
work page 2020
-
[49]
R: A Language and Environment for Statistical Computing
R Core Team. R: A Language and Environment for Statistical Computing . R Foundation for Statistical Computing, Vienna, Austria, 2023. 25
work page 2023
-
[50]
T. Radivojevic and E. Akhmatskaya. Modified Hamiltonian Monte Carlo for Bayesian inference. Statistics and Computing , 30:377–404, 2020
work page 2020
-
[51]
A. Smirnova, L. deCamp, and G. Chowell. Forecasting epidemics through nonparametric esti- mation of time-dependent transmission rates using the SEIR model. Bulletin of Mathematical Biology, 81:4343–4365, 2019
work page 2019
-
[52]
C. Souto-Maior. Multiple-serotype models of dengue virus transmission: simulation study and perspectives for the application of inference in epidemiological surveillance. bioRxiv, 2019
work page 2019
- [53]
-
[54]
Q. Wang, S. Xie, Y. Wang, and D. Zeng. Survival-convolution models for predicting COVID-19 cases and assessing effects of mitigation strategies. Frontiers in public health, page 325, 2020
work page 2020
-
[55]
X. Xu, T. Kypraios, and P. D. O’Neill. Bayesian non-parametric inference for stochastic epidemic models using Gaussian processes. Biostatistics, 17(4):619–633, 2016
work page 2016
-
[56]
T. Yue, Z. Fan, B. Fan, Z. Du, J. P. Wilson, X. Yin, N. Zhao, Y. Wang, and C. Zhou. A new approach to modeling the fade-out threshold of coronavirus disease. Science Bulletin, 65, 2020
work page 2020
- [57]
-
[58]
J. Zhu and B. Gallego. Evolution of disease transmission during the COVID-19 pandemic: patterns and determinants. Scientific Reports, 11, 2021. 26 Appendix A SI KR model The dynamics for the SIKR model can be described by the following system of ODEs: dS(t) dt = − exp ( m∑ i=1 βiBi(t) ) S(t) ∑K j=1 Ij(t) N = −β(t)S(t) I(t) N , dI1(t) dt = exp ( m∑ i=1 βiBi...
work page 2021
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.