Skip to content

OpenBNSL is a unified, open-source, and comprehensive framework for evaluating Bayesian Network Structure Learning (BNSL) methods

License

Notifications You must be signed in to change notification settings

hal-lab-u-tokyo/OpenBNSL

Repository files navigation

Note: This repository is currently under active development. Please be aware that functionalities and features are still being finalized.

OpenBNSL is an open framework designed to enable fair and highly reproducible comparisons of Bayesian Network Structure Learning (BNSL) algorithms. A Bayesian network is a powerful probabilistic model that represents conditional independence relationships among variables using directed acyclic graphs (DAGs). Learning the structure of a large Bayesian Network from data is computationally intensive, and optimization techniques, including parallelization, can significantly improve performance.

This framework provides an environment for systematically and fairly comparing various BNSL techniques, supporting the further advancement of Bayesian Network research.

Component Description
OpenBNSL Core Library C++ library for BNSL methods with OpenMP and CUDA support
OpenBNSL Evaluation Suite Python scripts for evaluating the OpenBNSL core library
OpenBNSL Experiment Environment Docker-based environment for reproducible experiments

OpenBNSL Architecture

OpenBNSL ensures transparency by adopting the MIT License and maintaining a strong commitment to the Open Science principle.

  1. Set Up
    1. Using Docker
    2. Using Bare Metal
  2. Build and Install
  3. Features
  4. Tutorial and Examples
  5. Contributing
  6. License
  7. Acknowledgments

Set Up

Using Docker

git clone --recurse-submodules git@github.com:hal-lab-u-tokyo/OpenBNSL.git # for pybind11 submodule
cd OpenBNSL
docker compose build \
  [--build-arg BASE_IMAGE=nvidia/cuda:12.6.2-devel-ubuntu22.04] \  # Nvidia GPU
  [--build-arg INSTALL_R=true] \                                   # R & bnlearn
  [--build-arg INSTALL_GUROBI=true]                                # Gurobi (requires license)
docker compose up

Using Bare Metal

⚠️ Under construction ⚠️


Build and Install

pip install . # build and install the package
python3 setup.py build_ext --inplace # build in place

Features Tracker

  • Core Library (C++)
    • Score-based Structure Learning
      • Exhaustive Search
    • Constraint-based Structure Learning
      • Peter-Clark algorithm (PC)
      • Recursive Autonomy Identification (RAI) [paper]
    • local-to-global learning
      • [ ]
  • Evaluation Suite (Python)
    • Evaluation Metrics
      • Structural Hamming Distance
      • Marginal Likelihood
        • Bayesian Dirichlet equivalent uniform (BDeu) score
      • Inference accuracy
      • memory usage
      • runtime
    • Benchmarking Senarios
      • scalability for number of variables
      • scalability for number of samples
    • Generate Synthetic Data
  • Experiment Environment (Docker)
    • OpenMP support (default)
    • Nvidia GPU and CUDA toolkit support
    • R and bnlearn support
    • Gurobi support
    • MPI?

⚠️ Under construction ⚠️


Tutorial and Examples

⚠️ Under construction ⚠️


Contributing

Please feel free to create a new issue for any bugs, questions etc. If you want to contribute code, please follow the instructions in CONTRIBUTING


License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

This work was supported by JSPS KAKENHI, Grant Number 24KJ0578, JST CREST, Grant Number JPMJCR21D2, and JST SPRING, Grant Number JPMJSP2108.

About

OpenBNSL is a unified, open-source, and comprehensive framework for evaluating Bayesian Network Structure Learning (BNSL) methods

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published