Skip to content

Repository files navigation

Stable Dev Build Status Coverage Zenodo Code style: Runic

Overview

ReactiveMP.jl is a Julia package that provides an efficient reactive message passing based Bayesian inference engine on a factor graph. The package is a part of the bigger and user-friendly ecosystem for automatic Bayesian inference called RxInfer. While ReactiveMP.jl exports only the inference engine, RxInfer provides convenient tools for model and inference constraints specification as well as routines for running efficient inference both for static and dynamic datasets.

ReactiveMP.jl is designed for advanced users who need fine-grained control over message passing, custom factor nodes, and custom update rules. It does not create a specific message passing schedule in advance, but rather reacts on changes in the data source (hence reactive in the name of the package).

The engine holds no update rules of its own. Nodes and rules are declared with MessagePassingRulesBase, and the rules live in packages of their own, each in its repository ReactiveBayes/<Package>.jl: StandardMessagePassingRules for the standard distributions, arithmetic, logic and mixtures, and a package for each other node (Delta, GaussianCoupling, Autoregressive, SoftDot, ContinuousTransition, Polya, BIFM, Flow, DiscreteTransition and GCV). Loading a rule package is enough for the engine to find its rules. A new rule package starts from MessagePassingRulesTemplate.jl.

Installation

Most users want RxInfer, which installs ReactiveMP together with every rule package. To use the engine directly, add it from Julia's General registry:

import Pkg
Pkg.add("ReactiveMP")

The engine on its own runs your nodes and rules. To use the standard distributions, arithmetic and logic nodes, also add their rules, and any other rule package your model needs:

Pkg.add("StandardMessagePassingRules")

Version 7 changed how nodes and rules are defined; the migration guide explains how to port code written for version 6.

Documentation

For more information about ReactiveMP.jl please refer to the documentation.

Examples and tutorials

The ReactiveMP.jl package is intended for advanced users with a deep understanding of message passing principles. Accessible tutorials and examples are available in the RxInfer documentation.

Ecosystem

The RxInfer framework consists of five core packages developed by ReactiveBayes:

  • ReactiveMP.jl - the underlying message passing-based inference engine (this package)
  • RxInfer.jl - user-friendly modeling and inference layer
  • GraphPPL.jl - model and constraints specification package
  • ExponentialFamily.jl - package for exponential family distributions
  • Rocket.jl - reactive extensions package for Julia

References

License

MIT License Copyright (c) 2021-2024 BIASlab, 2024-present ReactiveBayes

Releases

Packages

Used by

Contributors

Languages