SPFlow  by SPFlow

Python library for Sum-Product Networks (SPNs)

created 7 years ago
301 stars

Top 89.6% on sourcepulse

GitHubView on GitHub
Project Summary

SPFlow is a Python library for building, learning, and performing inference on Sum-Product Networks (SPNs), a class of deep probabilistic models that allow for tractable inference. It is designed for researchers and practitioners in machine learning and probabilistic modeling who need efficient tools for complex probability distributions.

How It Works

SPFlow represents SPNs as a hierarchical structure of Sum and Product nodes, with various leaf node types (e.g., Categorical, Gaussian, PiecewiseLinear). It supports both a domain-specific language (DSL) and programmatic construction of SPNs. The library offers efficient implementations for inference tasks like marginalization, computing conditionals, and approximate Most Probable Explanation (MPE), as well as sampling and visualization utilities. Its functional-oriented API framework is designed for extensibility, allowing users to integrate custom inference and learning routines.

Quick Start & Requirements

  • Install: pip3 install spflow
  • Dependencies: TensorFlow (GPU support available via spn.gpu.TensorFlow), NumPy.
  • Arch Linux: yay -S python-spflow (includes a patch for TensorFlow 2 compatibility).
  • Documentation: https://github.com/SPFlow/SPFlow

Highlighted Details

  • Supports learning SPNs from data using various algorithms (e.g., learn_parametric, learn_classifier, learn_mspn, learn_cnet).
  • Enables GPU acceleration for inference and parameter optimization via TensorFlow integration.
  • Allows for custom leaf node types and inference functions, promoting extensibility.
  • Includes utilities for SPN structure validation and statistical analysis.

Maintenance & Community

The project lists several academic institutions and researchers as authors and contributors, indicating active development and research backing. Links to community resources are not explicitly provided in the README.

Licensing & Compatibility

  • License: Apache License, Version 2.0.
  • Compatibility: Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The README does not explicitly mention limitations such as unsupported platforms, known bugs, or performance bottlenecks. The project's reliance on specific TensorFlow versions might require careful dependency management.

Health Check
Last commit

1 month ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 90 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), and
45 more.

tensorflow by tensorflow

0.1%
191k
Open-source ML framework
created 9 years ago
updated 10 hours ago
Feedback? Help us improve.