Graph Neural Networks for Likelihood-Free Inference in Diversification Models
Preprint
Abstract
A common approach to infer the processes that gave rise to past speciation and extinction rates across taxa, space and time is to formulate hypotheses in the form of probabilistic diversification models and estimate their parameters from extant phylogenies using Maximum Likelihood or Bayesian inference. A drawback of this approach is that likelihoods can easily become computationally intractable, limiting our ability to extend current diversification models with new hypothesized mechanisms. Neural networks have been proposed as a likelihood-free alternative for parameter inference of stochastic models, but so far there is little experience in using this method for diversification models, and the quality of the results is likely to depend on finding the right network architecture and data representation. As phylogenies are essentially graphs, graph neural networks (GNNs) appear to be the most natural architecture but previous results on their performance are conflicting, with some studies reporting poor accuracy of GNNs in practice. Here, we show that this underperformance was likely caused by optimization issues and inappropriate pooling operations that flatten the information along the phylogeny and make it harder to extract relevant information about the diversification parameters. When equipped with PhyloPool, a new time-informed pooling procedure, GNNs show similar or better performance compared to all other architectures and data representations (including Maximum Likelihood Estimation) that we tested for two common diversification models, the Constant Rate Birth-Death and the Binary State Speciation and Extinction. We conclude that GNNs could serve as a generic tool for estimating diversification parameters of complex diversification models with intractable likelihoods.
What the paper shows and why it matters
(AI-generated)
Speciation and extinction rates are estimated by fitting probabilistic diversification models to phylogenies, but the likelihood of richer models can quickly become intractable. Neural estimation does not need the likelihood: a network is trained on simulated trees to return the parameters. Because a phylogeny is a graph, graph neural networks (GNNs) look like the natural choice. Earlier attempts gave conflicting results; two, an earlier version of this work (Lajaaiti et al. 2023) and a trial by Perez and Gascuel (2024), reported poor accuracy. The paper takes on the assumption that this shows GNNs to be unsuited to phylogenies.
The paper argues that graph neural networks are not inherently poor at estimating diversification parameters: the earlier failures likely came, at least in part, from two fixable problems. One was overly restrictive training settings (strong weight decay, a penalty on large weights, left the network predicting one extinction rate for every tree). The other was the final averaging over all nodes, which discards their order in time. That order gives the lineage-through-time curve, which carries the information on the rates in a constant-rate birth–death model. The paper introduces PhyloPool, which sorts nodes by age, applies a learned filter along that order and averages over ten equal segments. On two models with computable likelihoods, a constant-rate birth–death model and a constrained model with rates that depend on a binary trait (BiSSE), the GNN with PhyloPool was at least as accurate as maximum likelihood and the other networks tested, and mostly more accurate (under BiSSE comparable to maximum likelihood), except for the relative error of one BiSSE rate.
The results suggest that GNNs could serve as a general tool for diversification models whose likelihoods are intractable, provided the architecture keeps the information that bears on the parameters and the network is properly trained, which the paper suggests checking by whether it can almost perfectly fit a small training set. Limits remain: a smaller advantage of PhyloPool under BiSSE, point estimates instead of full posteriors, untested diffuse priors, and tests only on data simulated under the same models as the estimators. A later study on mass extinctions (Du et al. 2026) cites it as prior evidence that pooling tailored to trees improves graph networks. It is a bioRxiv preprint, not peer reviewed.
References
- Lajaaiti et al. (2023). A Comparison of Deep Learning Architectures for Inferring Parameters of Diversification Models from Extant Phylogenies. bioRxiv. doi:10.1101/2023.03.03.530992
- Perez & Gascuel (2024). PhyloCNN: Improving tree representation and neural network architecture for deep learning from trees in phylodynamics and diversification studies. bioRxiv. doi:10.1101/2024.12.13.628187
- Du et al. (2026). Deep learning for mass extinction detection on fossilized phylogenies: power, limitations and lessons for simulation-based birth–death inference. Royal Society Open Science 13, 252096. doi:10.1098/rsos.252096