[ANN] RxInfer.jl v6.0: faster startup, modular rule packages and Reactant support

Hi everyone,

We’re glad to announce RxInfer 6, the new major release of our package for Bayesian inference by reactive message passing.

We have been running it internally in BIASlab for a while before the release. On our tests, cold-start performance on a Raspberry Pi is nearly twice as fast as before, and we see overall performance improvements.

Highlights

  • Precompiled common models. The first infer call on common model types drops from about 7 s to under 0.5 s. Other models start 40 to 70% faster.
  • Modular rule packages. RxInfer now runs on ReactiveMP v7. Message passing rules live in separate registered packages built on MessagePassingRulesBase.jl, so you only load the nodes you use. You can also reuse these well-tested update rules to build your own message passing engine.
  • Reactant.jl support. infer can now be compiled with Reactant. In our Kalman filter example, a compiled step runs in about 10 μs, 20× faster than standard RxInfer: Compiling Rxinfer With Reactant · RxInfer.jl Examples
  • Cleaner internals. The internal API was revised, unused features were removed, and previously unspecified behaviour is now documented and tested.
  • New options. logscales = true, engine diagnostics, a rule context (e.g. a custom rng for sampling rules), and free energy tracing via callbacks and TensorBoard.

Breaking changes

Models that only use built-in nodes mostly run as before. Notable changes:

  • meta is renamed to algorithm (where { algorithm = ... }, @algorithm). The old names still work with a deprecation warning.
  • where { dependencies = ... } is replaced by where { initial_messages = ... }.
  • Optim.jl is now an extension. Load using Optim for continuous point-mass constraints.
  • ContinuousTransition, Pólya, BIFM and Flow nodes need their package loaded explicitly.
  • Custom nodes and rules use the new @define_factor_node and @define_message_update_rule macros.

If you’re coming from v5, please read the migration guides first:

Links

Feedback, issues and questions are very welcome here or on GitHub!

2 Likes