SPFlow: An Easy and Extensible Library for Deep Probabilistic Learning using Sum-Product Networks

Alejandro Molina, Antonio Vergari, Karl Stelzner, Robert Peharz, Pranav Subramani +3 more
1/11/2019
cs.LGstat.ML

Official code: SPFlow/SPFlow (314 stars, Python, Apache-2.0, last commit 2026-04-14).

Abstract

We introduce SPFlow, an open-source Python library providing a simple interface to inference, learning and manipulation routines for deep and tractable probabilistic models called Sum-Product Networks (SPNs). The library allows one to quickly create SPNs both from data and through a domain specific language (DSL).

Show full abstract

It efficiently implements several probabilistic inference routines like computing marginals, conditionals and (approximate) most probable explanations (MPEs) along with sampling as well as utilities for serializing, plotting and structure statistics on an SPN. Moreover, many of the algorithms proposed in the literature to learn the structure and parameters of SPNs are readily available in SPFlow. Furthermore, SPFlow is extremely extensible and customizable, allowing users to promptly distill new inference and learning routines by injecting custom code into a lightweight functional-oriented API framework. This is achieved in SPFlow by keeping an internal Python representation of the graph structure that also enables practical compilation of an SPN into a TensorFlow graph, C, CUDA or FPGA custom code, significantly speeding-up computations.

View on arXivView PDF

Code Implementations(1)

SPFlow/SPFlowOfficial100%
Apache-2.0

Sum Product Flow: An Easy and Extensible Library for Sum-Product Networks

31483Python, HTMLMar 20, 20187 months agoApache-2.0
deep-learninggraphical-modelsmachine-learningmixture-modelprobabilistic-circuits+3 more

Similar Papers

Cite this paper

@article{molina2019spflow,
  title  = {SPFlow: An Easy and Extensible Library for Deep Probabilistic Learning using Sum-Product Networks},
  author = {Alejandro Molina and Antonio Vergari and Karl Stelzner and Robert Peharz and Pranav Subramani and Nicola Di Mauro and Pascal Poupart and Kristian Kersting},
  year   = {2019},
  eprint = {1901.03704},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1901.03704}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1901.03704.svg)](https://codeofpaper.com/paper/1901.03704)

Discussion