Mathieu Fourment, Matthew Macaulay, Christiaan J Swanepoel, Xiang Ji, Marc A Suchard, Frederick A Matsen IV
{"title":"Torchtree:使用 PyTorch 进行灵活的系统发生模型开发和推断","authors":"Mathieu Fourment, Matthew Macaulay, Christiaan J Swanepoel, Xiang Ji, Marc A Suchard, Frederick A Matsen IV","doi":"arxiv-2406.18044","DOIUrl":null,"url":null,"abstract":"Bayesian inference has predominantly relied on the Markov chain Monte Carlo\n(MCMC) algorithm for many years. However, MCMC is computationally laborious,\nespecially for complex phylogenetic models of time trees. This bottleneck has\nled to the search for alternatives, such as variational Bayes, which can scale\nbetter to large datasets. In this paper, we introduce torchtree, a framework\nwritten in Python that allows developers to easily implement rich phylogenetic\nmodels and algorithms using a fixed tree topology. One can either use automatic\ndifferentiation, or leverage torchtree's plug-in system to compute gradients\nanalytically for model components for which automatic differentiation is slow.\nWe demonstrate that the torchtree variational inference framework performs\nsimilarly to BEAST in terms of speed and approximation accuracy. Furthermore,\nwe explore the use of the forward KL divergence as an optimizing criterion for\nvariational inference, which can handle discontinuous and non-differentiable\nmodels. Our experiments show that inference using the forward KL divergence\ntends to be faster per iteration compared to the evidence lower bound (ELBO)\ncriterion, although the ELBO-based inference may converge faster in some cases.\nOverall, torchtree provides a flexible and efficient framework for phylogenetic\nmodel development and inference using PyTorch.","PeriodicalId":501215,"journal":{"name":"arXiv - STAT - Computation","volume":"43 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-06-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Torchtree: flexible phylogenetic model development and inference using PyTorch\",\"authors\":\"Mathieu Fourment, Matthew Macaulay, Christiaan J Swanepoel, Xiang Ji, Marc A Suchard, Frederick A Matsen IV\",\"doi\":\"arxiv-2406.18044\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Bayesian inference has predominantly relied on the Markov chain Monte Carlo\\n(MCMC) algorithm for many years. However, MCMC is computationally laborious,\\nespecially for complex phylogenetic models of time trees. This bottleneck has\\nled to the search for alternatives, such as variational Bayes, which can scale\\nbetter to large datasets. In this paper, we introduce torchtree, a framework\\nwritten in Python that allows developers to easily implement rich phylogenetic\\nmodels and algorithms using a fixed tree topology. One can either use automatic\\ndifferentiation, or leverage torchtree's plug-in system to compute gradients\\nanalytically for model components for which automatic differentiation is slow.\\nWe demonstrate that the torchtree variational inference framework performs\\nsimilarly to BEAST in terms of speed and approximation accuracy. Furthermore,\\nwe explore the use of the forward KL divergence as an optimizing criterion for\\nvariational inference, which can handle discontinuous and non-differentiable\\nmodels. Our experiments show that inference using the forward KL divergence\\ntends to be faster per iteration compared to the evidence lower bound (ELBO)\\ncriterion, although the ELBO-based inference may converge faster in some cases.\\nOverall, torchtree provides a flexible and efficient framework for phylogenetic\\nmodel development and inference using PyTorch.\",\"PeriodicalId\":501215,\"journal\":{\"name\":\"arXiv - STAT - Computation\",\"volume\":\"43 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-06-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - STAT - Computation\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2406.18044\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - STAT - Computation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2406.18044","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Torchtree: flexible phylogenetic model development and inference using PyTorch
Bayesian inference has predominantly relied on the Markov chain Monte Carlo
(MCMC) algorithm for many years. However, MCMC is computationally laborious,
especially for complex phylogenetic models of time trees. This bottleneck has
led to the search for alternatives, such as variational Bayes, which can scale
better to large datasets. In this paper, we introduce torchtree, a framework
written in Python that allows developers to easily implement rich phylogenetic
models and algorithms using a fixed tree topology. One can either use automatic
differentiation, or leverage torchtree's plug-in system to compute gradients
analytically for model components for which automatic differentiation is slow.
We demonstrate that the torchtree variational inference framework performs
similarly to BEAST in terms of speed and approximation accuracy. Furthermore,
we explore the use of the forward KL divergence as an optimizing criterion for
variational inference, which can handle discontinuous and non-differentiable
models. Our experiments show that inference using the forward KL divergence
tends to be faster per iteration compared to the evidence lower bound (ELBO)
criterion, although the ELBO-based inference may converge faster in some cases.
Overall, torchtree provides a flexible and efficient framework for phylogenetic
model development and inference using PyTorch.