A few questions

Hello,

The light has come back to my eyes and I’m fiddling with Bayesian stuff again.

couple of technical questions:

  1. would Bayesian Inference (BI) in any method benefit from its own ASIC? I’m not totally convinced that GPUs are the next generation for BI. Exact and Approximation methods are probably fine with CPU only. I don’t see the need to have thousands of chains, unless I’m totally wrong on that.

  2. what’s state of the art (SOTA) now? I’m reading about ChEES, and now I see a paper from Jan 2026 on LAPS? Whatever happened to INLA?

  3. Is sampling the best that can be done? I’m challenging myself to have the lowest possible memory and cpu footprint on my container apps in production and porting it all to rust is helping, and I love MCMC, but can we do better? I mean at the end of the day, you have what…: BI is just that you have a prior, a likelihood, a posterior. Distributions. So…X number of points “fit” to data. I don’t know where I’m going with this, I ran out of coffee 2 hours ago and my subscription doesn’t get here until 4 pm >.<

  4. I’m not sure that designing a language from the ground up is worth the hassle to squeeze out performance. I was messing around with Claude and built a “language” that lets you write a model in like 20 lines of code and then the compiler does all of the work in optimizing it but I’m not sure scientists, engineers, etc want a compiler doing all of the work for them. Sure I can have it print out all of the optimizations and stuff but I’m not convinced. The speedup it finds for time series models is phenomenal, the binary is very small, I’m just not convinced yet. The language is called Martin and it’s on my GitHub at tbosier/martinLang if you feel like messing around with it.

  5. is it worth creating a new LLVM just for BI? This seems like a colossal amount of effort for very little gain.

TLDR: how much juice can we actually get out of Bayesian inference? What’s SOTA for BI?

That’s basically the premise of pymc+pytensor.

These days you can also use an existing PPL as grouth-truth and tell LLMs to write something that matches it as fast as possible in whatever low level language you want (if you care about a specific model enough).

You can trade parallelism, with the limit of 4k chains each taking a single draw after tuning :slight_smile:

Otherwise GPU isn’t the friendliest to algorithms like NUTS. Something that can be coordinate from a CPU like machine but doesn’t pay the syncrhonization costs with a GPU would be great, for those models whose likelihood /data is expensive enough to benefit from a GPU (quite common)

It’s not, it’s just the most general. If you have closed form solutions you shouldn’t sample at all. Other algorithms / approaches have their own trade-offs. You can spend a lot of pre-compute training likelihood approximation neural networks to amortize sampling, or use algorithms with less clear properties / convergence criteria (VI obviously comes to mind)

Whatever happened to INLA?

It’s around. It solves a special case of problem that is of interest to a lot of people (anything that can be written as a gaussian random field, which I guess is like most GLMs and a lot of spatial/timeseries models). There’s a group of devs working on providing it for PyMC, I don’t know if that’s currently active. It’s not a general-purpose algorithm like MCMC, so it will never be king of the hill. Like Ricardo said though, you often want to find a special-purpose tool for your specific problem if performance becomes extremely important to you.

One SOTA-ish thing that you didn’t mention is SBI, which people are excited for because it’s more GPU native. BayesFlow is the leader here I think, and they can consume PyMC models. But their compute backend is Keras, not Pytensor (boo! boo!)

Re GPU: NUTS isn’t GPU friendly but often the evaluation of the logp_dlogp function becomes so much more expensive than the leapfrog steps that it’s worth it to go to GPU anyway. There’s also MCLMC which is more GPU friendly, I’ve had mixed success with it, see here for some benchmarks I ran on an Apple GPU native implementation.

The main problem we run into that isn’t well supported by current GPU architecture and libraries is sparseness.

Nutpie in PyMC. INLA is still SotA in problems it can fit, which is much more limited.

For what? If you want to calculate expectations, i.e., high dimensional integrals, then yes, it’s the most general black box method that can get the right answer. You can fit variational methods in some settings.

Normalizing flows and diffusions are what I consider to be on the horizon with the potential of dethroning MCMC methods, but very little is known about them in theory or practice.

No. We just need fast math.

1 Like