Review: Efficient Detection of Repeating Sites to Accelerate Phylogenetic Likelihood Calculations¶
Citation
- Kobert, K., Stamatakis, A., & Flouri, T. (2017). Efficient detection of repeating sites to accelerate phylogenetic likelihood calculations. Systematic Biology, 66(2), 205–217.
- DOI
Abstract¶
The phylogenetic likelihood function (PLF) is the major computational bottleneck in several applications of evolutionary biology such as phylogenetic inference, species delimitation, model selection, and divergence times estimation. Given the alignment, a tree and the evolutionary model parameters, the likelihood function computes the conditional likelihood vectors for every node of the tree. Vector entries for which all input data are identical result in redundant likelihood operations which, in turn, yield identical conditional values. Such operations can be omitted for improving runtime and, using appropriate data structures, reducing memory usage. We present a fast, novel method for identifying and omitting such redundant operations in phylogenetic likelihood calculations, and assess the performance improvement and memory savings attained by our method. Using empirical and simulated data sets, we show that a prototype implementation of our method yields up to 12-fold speedups and uses up to 78% less memory than one of the fastest and most highly tuned implementations of the PLF currently available. Our method is generic and can seamlessly be integrated into any phylogenetic likelihood implementation.
The pruning algorithm computes a conditional likelihood vector at every node of the tree for every alignment site. Two standard savings are already in common use. Site-pattern compression evaluates each distinct alignment column once and weights it by its count. Precomputation at cherries tabulates the conditional likelihoods for every pair of tip states.
The paper generalizes the first saving to every node. The conditional likelihood of a site at a node depends only on the characters of that site at the tips of the node's subtree, and on the branch lengths and model, which are common to all sites. So two sites are repeats at a node when their characters agree on the taxa below it, even when their whole columns differ. Two sites can repeat at a node near the tips and not at its ancestors. Because branch lengths differ between subtrees, the authors count identical patterns as repeats only when they appear at the tips of the same subtree.
The repeats at each node are found by a bottom-up traversal: a node is processed once the repeats of its two children are known, starting from the tips, where every site with the same character is trivially a repeat. Only one entry per class of repeats is computed and stored at each node. Against PLL, one of the most highly tuned likelihood implementations, a prototype runs faster by a factor of 2 to 12 and uses up to 78% less memory.
Relevance to Hifuku¶
Hifuku compresses an alignment to its distinct columns and weights each pattern by its count, the first of the two standard savings. It does not detect repeats at internal nodes. The paper's method would apply to the host and device likelihood alike, since it changes which entries are computed and not how.