Unsupervised Bayesian neural networks enable inference of complex epidemiological and macroevolutionary processes
Birth–death models quantify macroevolutionary and epidemiological processes, including speciation, extinction, and transmission, based on phylogenetic trees. Extensions of these models incorporate external covariates as predictors of these parameters, for instance linking traits or environmental variables with changes in these rates. However, the dependencies between predictors and model parameters are typically restricted to linear, additive effects and may thus fail to capture complex, nonlinear relationships underlying evolutionary dynamics. To address this limitation, we propose a framework that leverages unsupervised Bayesian neural networks to flexibly model functional relationships between these parameters and a broad set of predictors, including categorical traits, quantitative variables, and time series data. Based on these covariates, the network weights and thus the resulting birth–death dynamics are estimated jointly with the phylogenetic tree, obtained directly from sequence alignment data. Extensive simulations show that this approach accurately recovers predictor–parameter relationships, mitigates overfitting, and remains robust across both macroevolutionary and epidemiological contexts. Using explainable AI, we further show that our framework reliably identifies the most influential predictors and yields interpretable descriptions of their impact on the inferred rates. Finally, we apply our method in 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 diversification of platyrrhines. Our framework substantially expands the capabilities of birth–death models, providing a powerful and flexible approach to infer complex epidemiological and macroevolutionary processes.
Authors
- Daniele Silvestro (ORCID: https://orcid.org/0000-0003-0100-0961)
- Cecilia Valenzuela Agüí (ORCID: https://orcid.org/0000-0002-2774-4822)
- Gabriele Marino (ORCID: https://orcid.org/0000-0001-6519-406X)
- Ugnė Stolz (ORCID: https://orcid.org/0000-0001-8610-9397)
- Tanja Stadler (ORCID: https://orcid.org/0000-0001-6431-535X)
Institutions
- SIB Swiss Institute of Bioinformatics (CH)
- ETH Zurich (CH)
Publication Details
- Journal
- Proceedings of the National Academy of Sciences
- Published
- 2026-11-23
- DOI
- https://doi.org/10.1073/pnas.2603996123
- Citations
- 1
- Primary Topic
- Evolution and Genetic Dynamics
- Type
- article
- Field-Weighted Citation Impact
- 1.66
Funders
- European Commission
- Eidgenössische Technische Hochschule Zürich