Seeking expert stan modeler for help speeding up a complex stan model

Hi, I am looking for an expert stan modeler to work with me to speed up a complex model. The model is a time series model using Gaussian Processes. It involves several non-linear transformations of the data and is very complex to fit.

We have tried to parallelize the model, but it appears that this model / data doesn’t lend itself well to parallelization.

  • Our gradient evaluation time is ~0.3 seconds
  • We are not experiencing post-warmup divergences, but are saturating the treedepth which is leading to long-sampling times and long warmups

Based on the inv_metric, it appears we have parameters on very different scales, which apparently can lead to too-small step sizes. I am trying to reparameterize/rescale, but the parameters in question are strictly positive (e.g. with gamma or exponential priors) and the constrained<>unconstrained space transformations are tough (for me, at least) to reason about in terms of getting the unconstrained parameters onto a unit-variance scale.

Basically the task will be:

  • I’ll walk you through the model
  • We’ll give you a representative dataset
  • We’ll be available to answer questions
  • Your goal will be to make the model as efficient as possible
  • We’ll pay a competitive hourly rate

If you’re interested, DM me!

3 Likes

Are you using covariance matrix approach or basis function approach for GPs? For time series the basis function approach can be much faster, see Practical Hilbert space approximate Bayesian Gaussian processes for probabilistic programming for demonstrations and link to Stan code.

2 Likes

@avehtari I will certainly check that out! But in this case, we actually aren’t estimating the hyperparameters of the gaussian process. so that part of the model is not the bottleneck; in transformed data we create and cholesky decompose the kernel and multiply it by standard-normal variables.

Just out of curiosity, how big is the Cholesky decompose input matrix?

About 1000x1000

1 Like