Related Experiment Video
Updated: Jun 29, 2025

Following the Dynamics of Structural Variants in Experimentally Evolved Populations
Published on: February 3, 2023
Scalable gradients enable Hamiltonian Monte Carlo sampling for phylodynamic inference under episodic
Yucai Shao1, Andrew F Magee2, Tetyana I Vasylyeva3,4
1Department of Biostatistics, University of California, Los Angeles, California, United States of America.
Abstract:
Birth-death models play a key role in phylodynamic analysis for their interpretation in terms of key epidemiological parameters. In particular, models with piecewise-constant rates varying at different epochs in time, to which we refer as episodic birth-death-sampling (EBDS) models, are valuable for their reflection of changing transmission dynamics over time. A challenge, however, that persists with current time-varying model inference procedures is their lack of computational efficiency. This limitation hinders the full utilization of these models in large-scale phylodynamic analyses, especially when dealing with high-dimensional parameter vectors that exhibit strong correlations. We present here a linear-time algorithm to compute the gradient of the birth-death model sampling density with respect to all time-varying parameters, and we implement this algorithm within a gradient-based Hamiltonian Monte Carlo (HMC) sampler to alleviate the computational burden of conducting inference under a wide variety of structures of, as well as priors for, EBDS processes. We assess this approach using three different real world data examples, including the HIV epidemic in Odesa, Ukraine, seasonal influenza A/H3N2 virus dynamics in New York state, America, and Ebola outbreak in West Africa. HMC sampling exhibits a substantial efficiency boost, delivering a 10- to 200-fold increase in minimum effective sample size per unit-time, in comparison to a Metropolis-Hastings-based approach. Additionally, we show the robustness of our implementation in both allowing for flexible prior choices and in modeling the transmission dynamics of various pathogens by accurately capturing the changing trend of viral effective reproductive number.
Related Concept Videos
Genetic Drift
Mechanistic Models: Compartment Models in Algorithms for Numerical Problem Solving
In individual population analyses, different algorithms are employed, such as Cauchy's method, which uses a...
Mutation, Gene Flow, and Genetic Drift
Gene Evolution - Fast or Slow?
In contrast, regions which code...
Evolutionary Relationships through Genome Comparisons
Genetics of Speciation

