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
infercall 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.
infercan 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, enginediagnostics, a rulecontext(e.g. a customrngfor 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:
metais renamed toalgorithm(where { algorithm = ... },@algorithm). The old names still work with a deprecation warning.where { dependencies = ... }is replaced bywhere { initial_messages = ... }.- Optim.jl is now an extension. Load
using Optimfor 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_nodeand@define_message_update_rulemacros.
If you’re coming from v5, please read the migration guides first:
- RxInfer v5 to v6: Migration from v5 to v6 · RxInfer.jl
- ReactiveMP v6 to v7 (for custom nodes and rules): v6 to v7 · ReactiveMP.jl
Links
- Docs: https://docs.rxinfer.com
- Code: GitHub - ReactiveBayes/RxInfer.jl: Julia package for automated Bayesian inference on a factor graph with reactive message passing · GitHub
- Changelog: RxInfer.jl/CHANGELOG.md at main · ReactiveBayes/RxInfer.jl · GitHub
Feedback, issues and questions are very welcome here or on GitHub!