Random time-shift approximation enables hierarchical Bayesian inference of mechanistic within-host viral dynamics models on large datasets

Random time-shift approximation enables hierarchical Bayesian inference of mechanistic within-host viral dynamics models on large datasets
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Mechanistic mathematical models of within-host viral dynamics are tools for understanding how a virus’ biology and its interaction with the immune system shape the infectivity of a host. The biology of the process is encoded by the structure and parameters of the model that can be inferred statistically by fitting to viral load data. The main drawback of mechanistic models is that this inference is computationally expensive because the model must be repeatedly solved. This limits the size of the datasets that can be considered or the complexity of the models fitted. In this paper we develop a much cheaper inference method for this class of models by implementing a novel approximation of the model dynamics that uses a combination of random and deterministic processes. This approximation also properly accounts for process noise early in the infection when cell and virion numbers are small, which is important for the viral dynamics but often overlooked. Our method runs on a consumer laptop and is fast enough to facilitate a full hierarchical Bayesian treatment of the problem with sharing of information to allow for individual level parameter differences. We apply our method to simulated datasets and a reanalysis of COVID-19 monitoring data in an National Basketball Association cohort of 163 individuals.


💡 Research Summary

The paper addresses a long‑standing computational bottleneck in fitting mechanistic within‑host viral dynamics (WHVD) models to viral load time‑series data. Traditional mechanistic models, which explicitly track susceptible cells, infected cells, and free virus, require repeated numerical integration of stochastic or deterministic differential equations, making inference prohibitively expensive for large cohorts or complex model structures.
To overcome this, the authors develop a “random time‑shift” approximation. The key insight is that, while early infection dynamics are dominated by stochastic fluctuations because cell and virion numbers are low, this regime is typically below the detection limit of viral load assays and therefore unobserved. By taking a large‑volume (K → ∞) mean‑field limit, the stochastic continuous‑time Markov chain (CTMC) governing the Target‑Cell‑Limited (TCL) model with an eclipse phase reduces to a deterministic system of ordinary differential equations (ODEs). The stochastic effect of the unobserved early phase is then captured by a random shift in the time axis applied to the deterministic trajectory. This shift corresponds to the random time at which the viral load first crosses the detection threshold; its probability density can be derived in closed form from the underlying CTMC.
Consequently, for any given parameter vector, the full stochastic solution can be approximated by a single deterministic ODE solution plus a sample from the time‑shift distribution, eliminating the need for costly Gillespie simulations. The authors embed this approximation into a Metropolis‑Hastings‑within‑Gibbs sampler, enabling full hierarchical Bayesian inference. The hierarchical structure shares information across individuals, allowing robust estimation for subjects with sparse or noisy measurements while still permitting individual‑level parameter variation.
The underlying mechanistic model tracks four state variables: susceptible target cells S(t), eclipse‑phase cells E(t), productively infected cells I(t), and free virus V(t). Transition rates include infection (β S V), eclipse progression (σ E), infected‑cell clearance (δ I), viral production (ρ I), and viral clearance (c V). The basic reproduction number R₀ = β S₀ ρ / (δ c) is a primary quantity of interest and is estimated directly from the posterior.
Method validation proceeds in two stages. First, 50 synthetic datasets generated with known parameters are used to assess accuracy. The random‑time‑shift approach successfully recovers the true parameters, correctly separates measurement noise from process noise, and captures the variability in peak timing that deterministic fits miss. Second, the method is applied to a real‑world dataset comprising longitudinal viral load measurements from 163 NBA players collected during the 2020‑2021 COVID‑19 season. The entire hierarchical inference runs on a consumer‑grade laptop in roughly one hour, producing posterior predictive trajectories that align closely with observed data. Estimated R₀ values (≈ 2.1–2.8) are consistent with prior literature on respiratory viruses. Moreover, the hierarchical model improves inference for individuals with few observations by borrowing strength from the cohort.
In summary, the paper makes three major contributions: (1) a novel stochastic‑to‑deterministic approximation that captures early‑phase randomness via a random time shift; (2) a fast, scalable hierarchical Bayesian framework for fitting mechanistic WHVD models to large datasets; and (3) empirical demonstration of the approach on both synthetic and real COVID‑19 data, showing accurate parameter recovery and practical feasibility. The authors note that while the current work focuses on the simplest TCL model, the methodology is readily extensible to more elaborate within‑host models that incorporate immune responses or additional compartments, making it a versatile tool for future viral dynamics research.


Comments & Academic Discussion

Loading comments...

Leave a Comment