https://github.com/4ment/gradient-benchmark

automatic/analytical differentiation benchmark

https://github.com/4ment/gradient-benchmark

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary

Keywords

bayesian-inference gradient-computation phylogenetics phylostan pytorch stan tensorflow torchtree variational
Last synced: 5 months ago · JSON representation

Repository

automatic/analytical differentiation benchmark

Basic Info
  • Host: GitHub
  • Owner: 4ment
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 84 KB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Topics
bayesian-inference gradient-computation phylogenetics phylostan pytorch stan tensorflow torchtree variational
Created over 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme

README.md

autodiff-experiments

Docker Image CI

This repository contains the pipeline and data sets supporting the results of the following article:

Fourment M, Swanepoel CJ, Galloway JG, Ji X, Gangavarapu K, Suchard MA, Matsen IV FA. Automatic differentiation is no panacea for phylogenetic gradient computation. arXiv:2211.02168

This benchmark compares the efficiency (memory usage and speed) of several gradient implementations of phylogenetic models (e.g., tree likelikelihood and coalescent model). The goal of this study is to compare the efficiency of automatic differentiation (AD) and analytic gradient. The pipeline reuses parts of the treetime validation workflow.

| Program | Language | Framework | Gradient | BITO support | | ------------ | --------- | ------------ | :-------:| :-----:| | physher | C | | analytic | | | phylostan | Stan | Stan | AD | | | phylojax | python | JAX | AD | | | torchtree | python | PyTorch | AD | :whitecheckmark: | | treeflow | python | TensorFlow | AD | |

The gradient of the tree likelihood is optionaly computed by BITO, an efficient C++ library that analytically calculate the gradient using the BEAGLE library. torchtree uses the torchtree-bito plugin to access BITO.

Dependencies

You will need to install nextflow and docker to run this benchmark. Docker is not required but it is highly recommended to use it due to the numerous dependencies.

Installation

git clone 4ment/autodiff-experiments.git

Initialize treetime_validation

git submodule update --init --recursive

Running the pipeline with docker

nextflow run 4ment/autodiff-experiments -profile docker -with-trace

Since the pipeline will take weeks to run to completion one should use a high performance computer. Examples of configuration files for pbspro and slurm can be found in the configs folder.

Summarizing results

Before generating the figures, we need to extract memory usage information from the trace.txt file and work directory:

python scripts/parse-trace.py work/ trace.txt > results/trace.csv

Generate figures in a single pdf:

Rscript -e 'rmarkdown::render("plot.Rmd")'

Library versions

For reproducbility, we provide below the version or commit hash of each library/program used in the benchmark.

| Library | Version | | ------------ | -------- | | jax | 0.2.24 | | jaxlib | 0.3.7 | | numpy | 1.22 | | pystan | 2.19.1.1 | | tensorflow | 2.10.0 | | tensorflow-probability | 0.18.0 | | pytorch | 1.12.1 |

| Program | Version/hash | | ------------ | -------- | | bito | cc0806abcd0b9f2fab604e800c674c9a5c5afebe | | phylojax | a1612cae36292af76e8d24cc40d6544162c987aa | | phylostan | 1.0.5 | | physher | b19ff2f9422f29ba1ab31306a3fe29ab6a6f607b | | torchtree | f3831650a807e74cc2e9478009e57a41f47bed8d | | torchtree-bito | e2a95cefb13968f95f6e5520bd0a52d726ee7fc9 | | treeflow | e3414dcc9e764d06abc3e19c1d0f55110499e2ea |

Owner

  • Name: Mathieu Fourment
  • Login: 4ment
  • Kind: user
  • Location: Australia
  • Company: University of Technology Sydney

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 46
  • Total Committers: 3
  • Avg Commits per committer: 15.333
  • Development Distribution Score (DDS): 0.043
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mathieu Fourment m****t@g****m 44
Jared Galloway j****7@g****m 1
Christiaan Swanepoel c****s@g****m 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 months
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.75
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • jgallowa07 (3)
  • christiaanjs (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/docker-image.yml actions
  • actions/checkout v2 composite
  • docker/login-action v1 composite
Dockerfile docker
  • continuumio/anaconda3 2022.10 build