New FCAI software: the open-source PyVBMC package speeds up statistical inference

Researchers from the Finnish Center for Artificial Intelligence (FCAI) have released PyVBMC, a new open-source Python package for efficient statistical inference with complex computational models.

What is PyVBMC for?

“Scientists often try to understand real-world systems via computer models, in a range of fields from climate science to engineering and neuroscience,” explains Bobby Huggins, one of the FCAI developers who worked on the PyVBMC software. “The model has input parameters that can be adjusted, and predicts an output. Bayesian inference is a statistical technique to determine all the values for the input parameters compatible with the real observations, quantifying our uncertainty over such parameters. This helps assess how much we can trust the model's future predictions and inform our decision making.”

A faster approach for Bayesian inference

The issue with Bayesian inference, says Chengkun Li, co-developer and doctoral researcher at the University of Helsinki, is that it can require many evaluations of the model to explore the range of possible inputs. Each model evaluation takes time, which could go from minutes to several hours or even days, especially for very detailed simulations such as realistic physical models or state-of-the-art models of human cognition. PyVBMC uses advanced algorithms to dramatically reduce the number of model evaluations required, making Bayesian inference feasible for complex and expensive models. With ‘sample-efficient’ PyVBMC, scientists can characterise their models using up to 100 times fewer model evaluations. This enables Bayesian inference for models that would be impractical to analyse with traditional statistical methods.

"PyVBMC overcomes a major roadblock in working with sophisticated computational models across physics, engineering, and life sciences. We are excited to provide researchers with this powerful tool for accelerating statistical inference and model exploration," says team leader Luigi Acerbi, assistant professor in the Department of Computer Science at the University of Helsinki and FCAI.

Towards new applications via curated open-source software and documentation

The release of PyVBMC coincides with its introduction in a scientific publication in The Journal of Open Source Software, documenting the software’s capabilities. The algorithm powering PyVBMC has already enabled useful applications of Bayesian inference in fields like neuroscience, cancer research, and nuclear engineering. But FCAI researchers emphasise there are many more potential uses still to be explored thanks to this new release.

"We look forward to seeing what new insights PyVBMC can provide by making Bayesian inference quick and easy for complex models. We dedicated particular attention to proper software engineering and documentation and tutorials for ease of use. Please try it out and let us know how we can improve PyVBMC for your modelling challenges," adds co-author Marlon Tobaben, an FCAI doctoral researcher at the University of Helsinki.


The PyVBMC software is freely available via PyPI (“pip install pyvbmc”) and conda-forge. Acerbi’s research group and FCAI plan to continue development to expand the software capabilities.

More information:

Image: "Bayes' Theorem MMB 01" by mattbuck (category), CC BY-SA 3.0.