Automatic differentiation is no panacea for phylogenetic gradient computation
Mathieu Fourment, Christiaan J. Swanepoel, Jared G. Galloway, Xiang, Ji, Karthik Gangavarapu, Marc A. Suchard, Frederick A. Matsen IV

TL;DR
Automatic differentiation, while flexible, is significantly slower than specialized phylogenetic algorithms, suggesting a hybrid approach is best for efficient phylogenetic likelihood computations.
Contribution
This study compares automatic differentiation with traditional methods for phylogenetic likelihood gradients, highlighting their relative performance and proposing a hybrid approach.
Findings
Automatic differentiation scales linearly with tree size.
It is slower than specialized phylogenetic gradient calculations.
A mixed approach offers optimal speed and flexibility.
Abstract
Gradients of probabilistic model likelihoods with respect to their parameters are essential for modern computational statistics and machine learning. These calculations are readily available for arbitrary models via automatic differentiation implemented in general-purpose machine-learning libraries such as TensorFlow and PyTorch. Although these libraries are highly optimized, it is not clear if their general-purpose nature will limit their algorithmic complexity or implementation speed for the phylogenetic case compared to phylogenetics-specific code. In this paper, we compare six gradient implementations of the phylogenetic likelihood functions, in isolation and also as part of a variational inference procedure. We find that although automatic differentiation can scale approximately linearly in tree size, it is much slower than the carefully-implemented gradient calculation for tree…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsGenomics and Phylogenetic Studies · Genetics, Bioinformatics, and Biomedical Research · Bioinformatics and Genomic Networks
MethodsVariational Inference · SPEED: Separable Pyramidal Pooling EncodEr-Decoder for Real-Time Monocular Depth Estimation on Low-Resource Settings
