bioRxiv Science⌕ Search

bioRxiv · 10.64898/2026.02.03.703458

Bayesian neural networks enable inference of complex phylodynamic processes

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Marino, G., Stolz, U., Valenzuela Agui, C., Stadler, T., Silvestro, D.. 2026-02-04. Bayesian neural networks enable inference of complex phylodynamic processes. https://doi.org/10.64898/2026.02.03.703458

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Denisovan introgression left differential selection regimes in Humans and Neanderthals on the SLC30A9 gene

Signals of positive selection around the SLC30A9 gene have been reported in human populations outside Africa. Selection likely acted on a highly differentiated single-nucleotide polymorphism, rs1047626, leading to a non-synonymous substitution in the encoded zinc transporter. Because of the striking similarity between the putatively selected SLC30A9 haplotype observed in several current human populations and the Denisovan individual, previous work has proposed adaptive introgression. Yet alternative explanations, including ancient human variation, and the precise archaic source -Neanderthal or Denisovan- remained unresolved. Considering the potentially complex evolution of SLC30A9, we applied Approximate Bayesian Computation (ABC) algorithms coupled to machine learning to investigate the most plausible evolutionary origin of this substitution. After modelling different evolutionary scenarios with forward-in-time simulations, our results highlight that the most probable scenario is a Denisovan origin of the rs1047626 polymorphism. However, the allele likely introgressed into Neanderthals first and was then passed into non-African modern humans. Moreover, the derived allele frequency for rs1047626 across several African populations is consistent with back-to-Africa migrations. Finally, our ABC analyses indicate strong positive selection in East Asian populations and other out-of-Africa populations, whereas in Neanderthal populations, the selection coefficient was probably neutral or slightly deleterious.

evolutionary biology↗

RELAX does not reproduce its own estimates at default settings, and its output does not show it

Selection-intensity estimates from RELAX are reported as a point value of K with a likelihood-ratio P. We report that, at default settings and on data of ordinary size, the program does not reproduce its own fits. Of 27 enzyme entries refitted under two optimiser configurations, none reproduced its log-likelihood to within 0.01 units; the median change was 103 units, the largest over 3,400, and four verdicts reversed. Eighty null orthologues reproduced none. A byte-identical command returned a distinct likelihood on every repetition, single-threaded, across three releases, and on alignments simulated under the fitted model, where 3.3 per cent of replicates reproduced. The documented random-number seed never reaches the generator when assigned on the command line, yet reads back as the value supplied. PAML localises the cause: its two-ratio model, without site classes, reproduced its log-likelihood for all 288 genes; its site-class models agreed for 27 to 67 per cent. The instability follows the mixture over sites, not the program. The output does not show it: 46 of 410 fits ended with a negative likelihood-ratio statistic, impossible under convergence, and 123 of 410 report a K re-estimated under a domain restriction rather than the unconstrained maximum. Of 234 published studies using RELAX, none reported a seed. Seeding while holding the thread count at one reproduced sixty of sixty runs on twenty genes under two releases; the seed alone reproduced none of five, and no documentation states the second condition. We recommend that fits be repeated and their dispersion published.

evolutionary biology↗

Sequential accumulation of adaptive alleles forms an inversion supergene in deer mice

Supergenes are clusters of co-inherited loci that affect multiple or complex phenotypes. Despite the growing number of chromosomal inversions identified as supergenes in natural populations, their molecular basis and evolutionary history often remain obscure. Here, we identified two candidate genes, Slc45a2 and Npr3, within a 41-Mb inversion supergene in the deer mouse (Peromyscus maniculatus) that respectively drive darker coats and longer tails - two traits associated with forest adaptation. Mice homozygous for the inversion (inv/inv) exhibit elevated Slc45a2 expression in melanocytes relative to the congenic standard genotype (std/std), disrupting pheomelanin production. In parallel, downregulation of Npr3 in inv/inv mouse growth plates prolongs postnatal growth of caudal vertebrae, resulting in tail elongation. Population-level analyses further implicate that this supergene arose through the subsequent accumulation of the Npr3 allele within the inversion, rather than by capturing all beneficial mutations at its origin.

evolutionary biology↗