Back

Bayesian neural networks enable inference of complex phylodynamic processes

Marino, G.; Stolz, U.; Valenzuela Agui, C.; Stadler, T.; Silvestro, D.

2026-02-04 evolutionary biology
10.64898/2026.02.03.703458 bioRxiv
Show 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. Significance statementUnderstanding how species diversify or pathogens spread requires linking phylogenetic trees to biological traits and environmental characteristics. We present BELLA, an unsupervised Bayesian neural network that learns complex, nonlinear links between predictors--such as traits or environmental variables--and key rates such as speciation, extinction, transmission, and migration directly from sequence data--which in turn inform on the phylogenetic relationships. BELLA does not require any training data, enabling inferences that were previously not tractable. Across simulated epidemics and macroevolutionary histories, BELLA is more accurate than state-of-the-art linear models relating predictors and rates, while remaining interpretable through explainable artificial intelligence. Empirical applications in epidemiology reveal nonlinear effects of travel among countries on the early spread of SARS-CoV-2 in Europe, while a macroevolutionary application shows selective extinction events in the diversifcation history of New World monkeys. The BELLA framework expands the reach of phylodynamics in biology and public health.

Matching journals

The top 6 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.