The Libra Toolkit


The Libra Toolkit is a collection of algorithms for learning and inference with discrete probabilistic models, including Bayesian networks (BNs), Markov networks (MNs), dependency networks (DNs), sum-product networks (SPNs), and arithmetic circuits (ACs). Compared to other toolkits, Libra focuses more on structure learning, especially for tractable models in which exact inference is efficient. Each algorithm in Libra is implemented as a command-line program suitable for interactive use or scripting, with consistent options and file formats throughout the toolkit.

Libra was written by Daniel Lowd and Amirmohammad (Pedram) Rooshenas.

Libra is released under a modified BSD license.

Algorithms in Libra

Learning algorithms:

Inference algorithms:

Utility methods:


The latest public release of Libra is available here: libra-tk-1.1.1.tar.gz (5/21/2015)

An even more up-to-date development version can be obtained from the source code repository:

Version 1.1.1 includes many minor fixes.

Version 1.1.0 includes library documentations and the libra script, which calls the executables.

Version 1.0.1 introduces algorithms for learning tractable Markov networks with ACs (acmn), sum-product networks (idspn), and mixtures of trees (mtlearn), along with many more minor updates. See the changelog for details.

All methods are implemented in OCaml, in order to obtain the best possible speed while keeping the code compact and easy to work with. To compile the source code, you must have a UNIX-like environment (Linux, OS X) with a recent version of OCaml installed.

For more information, see the documents below:

These are also present in the doc/ directory of the source distribution.

Older versions:

Please email Daniel Lowd or Amirmohammad (Pedram) Rooshenas with any questions, comments, or bug reports/fixes.
Last updated Friday, May 22, 2015.