RepositoryJuliaNLNetherlands
biaslab

biaslab/ForneyLab.jl

Julia package for automatically generating Bayesian inference algorithms through message passing on Forney-style factor graphs.

154stars
34forks
11issues
2views

ForneyLab.jl

Build Status Documentation Code coverage

ForneyLab.jl is a Julia package for automatic generation of (Bayesian) inference algorithms. Given a probabilistic model, ForneyLab generates efficient Julia code for message-passing based inference. It uses the model structure to generate an algorithm that consists of a sequence of local computations on a Forney-style factor graph (FFG) representation of the model. For an excellent introduction to message passing and FFGs, see The Factor Graph Approach to Model-Based Signal Processing by Loeliger et al. (2007). Moreover, for a comprehensive overview of the underlying principles behind this tool, see A Factor Graph Approach to Automated Design of Bayesian Signal Processing Algorithms by Cox et. al. (2018).

We designed ForneyLab with a focus on flexible and modular modeling of time-series data. ForneyLab enables a user to:

  • Conveniently specify a probabilistic model;
  • Automatically generate an efficient inference algorithm;
  • Compile the inference algorithm to executable Julia code.

The current version supports belief propagation (sum-product message passing), variational message passing and expectation propagation.

The ForneyLab project page provides more background on ForneyLab as well as pointers to related literature and talks. For a practical introduction, have a look at the demos.

Documentation

Full documentation is available at BIASlab website.

It is also possible to build documentation locally. Just execute

$ julia make.jl

in the docs/ directory to build a local version of the documentation.

Installation

Install ForneyLab through the Julia package manager:

] add ForneyLab

If you want to be able to use the graph visualization functions, you will also need to have GraphViz installed. On Linux, just use apt-get install graphviz or yum install graphviz. On Windows, run the installer and afterwards manually add the path of the GraphViz installation to the PATH system variable. On MacOS, use for example brew install graphviz. The dot command should work from the command line.

Some demos use the PyPlot plotting module. Install it using ] add PyPlot.

Optionally, use ] test ForneyLab to validate the installation by running the test suite.

Getting started

There are demos available to get you started. Additionally, the ForneyLab project page contains a talk and other resources that might be helpful.

License

MIT License, Copyright (c) 2022 BIASlab http://biaslab.org see LICENSE.md file for details.

Similar Projects

Discover other similar projects and AI models.

RepositoryJulia
ReactiveBayes/ReactiveMP.jl

High-performance reactive message-passing based Bayesian inference engine

119
Nov 26, 2026
RepositoryJupyter Notebook
tensorflow/probability

Probabilistic reasoning and statistical analysis in TensorFlow

4.4k
Nov 9, 2026
RepositoryPython
google/uncertainty-baselines

High-quality implementations of standard and SOTA methods on a variety of tasks.

1.6k
Nov 12, 2026
RepositoryJupyter Notebook
google/edward2

A simple probabilistic programming language.

718
Oct 5, 2026
RepositoryC++
nimble-dev/nimble

The base NIMBLE package for R

200
Aug 31, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryJupyter Notebook
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

109.4k
Nov 26, 2026
RepositoryPython
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

105.8k
Dec 1, 2026