GithubHelp home page GithubHelp logo

mjbajwa / bnns Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 96.21 MB

Benchmarking performance of various BNNs on different probabilistic programming frameworks (Neal's FBM, Stan, etc.)

R 1.24% Shell 0.01% Stan 0.68% Jupyter Notebook 98.08%

bnns's Introduction

BNNs

This repository benchmarks the performance of various probabilistic programming packages on hierarchical models (specifically hierarchical Bayesian Neural Networks). We are particularly interested in how Hamiltonian Monte Carlo (HMC) methods can be used to sample higher-level hyperparameters in such networks, without the need to compose different sampling methods by parameter group.

Implementations in the following packages are available:

  • Stan (centered and non-centered parametrization)
  • PyMC3
  • TF Probability
  • Pyro/NumPyro

The results for all these packages are benchmarked against Radford Neal's Flexible Bayesian Modelling (FBM) implementation (the details of which can be found in his thesis). Because conditional distributions of hyperparameters given weights are analytically tractable, Neal's FBM uses Gibbs sampling to sample hyperparameters, and uses HMC for the weights and biases of the network. A set of intelligent heuristics is used to adapt the stepsize of HMC on weights and biases, while retaining the detailed balance and reversibility.

Sample Results

For the simple 1-D example being considered, the following plots highlight the key differences of interest between FBM and Stan implementation:

Posterior Predictive Checks on Test Set

Hyperparameter trace comparison from the different methods

A summary of all experiments is under development.

bnns's People

Contributors

mjbajwa avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.