RxInfer: A Julia package for reactive real-time Bayesian inference

Abstract

Bayesian inference realizes optimal information processing through a full commitment to reasoning by probability theory. The Bayesian framework is positioned at the core of modern AI technology for applications such as speech and image recognition and generation, medical analysis, robot navigation, and more. The framework describes how a rational agent should update its beliefs when new information is revealed by the agent’s environment. Unfortunately, perfect Bayesian reasoning is generally intractable, since calculations of (often) very high-dimensional integrals are required for many models of interest. As a result, a number of numerical algorithms for approximating Bayesian inference have been developed and implemented in probabilistic programming packages. Successful methods include the Laplace approximation (Gelman et al., 2015), variants of Monte Carlo (MC) sampling (Salimans et al., n.d.), Variational Inference (VI) (Blei et al., 2017), Automatic-Differentiation Variational Inference (ADVI) (Kucukelbir et al., 2017), and Black-Box Variational Inference (BBVI) (Bamler & Mandt, 2017). We present RxInfer.jl, which is a Julia (Jeff Bezanson et al., 2012; J. Bezanson et al., 2017) package for real-time variational Bayesian inference based on reactive message passing in a factor graph representation of the model under study (Bagaev & Vries, 2021). RxInfer.jl provides access to a powerful model specification language that translates a textual description of a probabilistic model into a corresponding factor graph representation. In addition, RxInfer.jl supports hybrid variational inference processes, where different Bayesian inference methods can be combined in different parts of the model, resulting in a straightforward mechanism to trade off accuracy for computational speed. The underlying implementation relies on a reactive programming paradigm and supports by design the processing of infinite asynchronous data streams. In the proposed framework, the inference engine reacts to new data and automatically updates relevant posteriors

Publication
Journal of Open Source Software
Dmitry Bagaev
Dmitry Bagaev
Postdoctoral researcher

Researcher at BIASlab.

Albert Podusenko
Albert Podusenko
Chief Executive Officer LazyDynamics

Albert Podusenko is a founder & CEO of Lazy Dynamics.

Bert de Vries
Bert de Vries
Professor

I am a professor at TU Eindhoven and team leader of BIASlab.