Bayesian neural networks enable inference of complex phylodynamic processes
Journal:
bioRxiv
Published Date:
Feb 4, 2026
Abstract
Phylogenetic branching patterns carry essential information about population and diversification dynamic processes, including speciation, extinction, and epidemiological transmission. Phylodynamic models offer a rigorous mathematical framework for quantifying these dynamics from phylogenetic trees. Extensions of these models enable the incorporation of external covariates as predictors of phylodynamic parameters, for instance allowing us to link traits or environmental variables with changes in speciation, extinction, or transmission rates. However, the dependencies between predictors and phylodynamic parameters are typically restricted to linear, additive effects and may thus fail to capture complex, potentially non-linear relationships underlying evolutionary dynamics. To address this limitation, we propose a new framework, BELLA, which leverages unsupervised Bayesian neural networks (BNNs) to flexibly model functional relationships between key phylodynamic parameters and a broad set of predictors, including categorical traits, quantitative variables, and time series data. Based on these covariates, the BNN weights are estimated through Markov chain Monte Carlo and can be inferred jointly with the phylogenetic tree topology and branching times, obtained directly from sequence alignment data. Using extensive simulations, we demonstrate that this approach accurately recovers predictor-parameter relationships, mitigates overfitting, and remains robust across both macroevolutionary and epidemiological contexts. By incorporating tools from explainable artificial intelligence, we further show that our framework reliably identifies the most influential predictors and yields interpretable descriptions of their impact on phylodynamic rates. Finally, we apply our method to two empirical analyses: linking SARS-CoV-2 migration dynamics with travel data during its early spread in Europe, and inferring trait and time-dependent speciation and extinction rates in the Cenozoic diversification of platyrrhines. Our unsupervised BNN framework substantially expands the capabilities of phylodynamic inference providing a powerful and flexible approach to model complex macroevolutionary and epidemiological processes.