Stan and NIMBLE so that computer does the hard part

Erin and I made a trip out to New York last weekend so that I could catch the STAN conference. There were some great talks, especially the “come to Jesus” seminar with Michael Betancourt on typical sets of high-dimensional posteriors and the previously cryptic warnings that STAN’s sampler sometimes emits in my models. I was also pleased that STAN developers are thinking seriously about sustainability beyond its current academic home at Columbia.

STAN has some competition in the Bayesian programming language domain. NIMBLE is a project primarily based out of UC Berkeley that also offers a modern, actively developed domain-specific language for specifying Bayesian models. NIMBLE and STAN have similar goals, but differ as far as methodology.

Similarities

  • Both compile to C++
  • Both use a domain-specific modeling language

Differences

  • NIMBLE explicitly infers the directed graph of the model while STAN is imperative. So you can make pretty pictures of the model more easily with NIMBLE, but maybe more sophisticated programming in STAN.
  • NIMBLE actually does use an extended version of the BUGS/JAGS language, so if you already know that there are fewer things to learn
  • STAN offers fancy auto-tuning hamiltonian Monte Carlo. NIMBLE offers a number of samplers, but probably nothing as advanced. STAN is probably faster per effective sample (taking in account autocorrelation)
  • STAN has an API offering programmatic evaluation of log-likelihoods and gradients
  • STAN does not allow for discrete parameters (data are fine). If you’ve got a discrete parameter, you need to figure out how to marginalize it out.
  • STAN seems to have a larger library of mathematical functions (gaussian processes/matrix distributions/differential equations, and more)
  • STAN automatically handles constrained parameters (non-negativity, positive definite or interval) by transforming them to be unconstrained
  • STAN can do MAP and variational inference. NIMBLE has some interesting looking particle filters.

A rainy day in Olmsted's original