Cargando…
Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation
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 librarie...
Autores principales: | , , , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Oxford University Press
2023
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10282121/ https://www.ncbi.nlm.nih.gov/pubmed/37265233 http://dx.doi.org/10.1093/gbe/evad099 |
_version_ | 1785061127704543232 |
---|---|
author | Fourment, Mathieu Swanepoel, Christiaan J Galloway, Jared G Ji, Xiang Gangavarapu, Karthik Suchard, Marc A Matsen IV, Frederick A |
author_facet | Fourment, Mathieu Swanepoel, Christiaan J Galloway, Jared G Ji, Xiang Gangavarapu, Karthik Suchard, Marc A Matsen IV, Frederick A |
author_sort | Fourment, Mathieu |
collection | PubMed |
description | 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 likelihood and ratio transformation operations. We conclude that a mixed approach combining phylogenetic libraries with machine learning libraries will provide the optimal combination of speed and model flexibility moving forward. |
format | Online Article Text |
id | pubmed-10282121 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2023 |
publisher | Oxford University Press |
record_format | MEDLINE/PubMed |
spelling | pubmed-102821212023-06-22 Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation Fourment, Mathieu Swanepoel, Christiaan J Galloway, Jared G Ji, Xiang Gangavarapu, Karthik Suchard, Marc A Matsen IV, Frederick A Genome Biol Evol Letter 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 likelihood and ratio transformation operations. We conclude that a mixed approach combining phylogenetic libraries with machine learning libraries will provide the optimal combination of speed and model flexibility moving forward. Oxford University Press 2023-06-02 /pmc/articles/PMC10282121/ /pubmed/37265233 http://dx.doi.org/10.1093/gbe/evad099 Text en © The Author(s) 2023. Published by Oxford University Press on behalf of Society for Molecular Biology and Evolution. https://creativecommons.org/licenses/by/4.0/This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted reuse, distribution, and reproduction in any medium, provided the original work is properly cited. |
spellingShingle | Letter Fourment, Mathieu Swanepoel, Christiaan J Galloway, Jared G Ji, Xiang Gangavarapu, Karthik Suchard, Marc A Matsen IV, Frederick A Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title | Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title_full | Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title_fullStr | Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title_full_unstemmed | Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title_short | Automatic Differentiation is no Panacea for Phylogenetic Gradient Computation |
title_sort | automatic differentiation is no panacea for phylogenetic gradient computation |
topic | Letter |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10282121/ https://www.ncbi.nlm.nih.gov/pubmed/37265233 http://dx.doi.org/10.1093/gbe/evad099 |
work_keys_str_mv | AT fourmentmathieu automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT swanepoelchristiaanj automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT gallowayjaredg automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT jixiang automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT gangavarapukarthik automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT suchardmarca automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation AT matsenivfredericka automaticdifferentiationisnopanaceaforphylogeneticgradientcomputation |