paper

BEAGLE in Action: Phylogenetic Likelihoods for Very Large State Spaces

arXiv:2611.03873

Abstract

Computing phylogenetic likelihoods becomes challenging when the continuous-time Markov chain has a large state space. At each branch, pruning algorithms require terms of the form , where is an rate matrix (e.g., for states), is a branch length, and the columns of matrix (e.g., ) are partial-likelihood vectors for site patterns. Many implementations calculate the dense transition matrix via eigendecomposition and multiply it by . This strategy is efficient for small state spaces, but it can be inefficient for large sparse rate matrices because forming or its eigen vector matrices destroys sparsity and its cost may not be well amortized when is small. We implement an alternative likelihood kernel based on the Al-Mohy and Higham (2011) algorithm for computing the action of the matrix exponential directly, avoiding explicit construction of or its eigen vector matrices. The resulting method takes full advantage of the sparsity of . We implement this method as a CPU-based extension to the BEAGLE library and evaluate it on two large-state molecular models: a Markov-modulated codon model of heterotachy with selective regimes and possible states, and a codon-pair model of interlocus gene conversion between two paralogs with possible states. Our results characterize when action-based likelihood computation improves performance over calculating directly. We show that this method enables fast, scalable inference for complex models, removing a key computational barrier to the study of evolution with large state space models.

arXiv comment35 pages, 8 figures, including appendix