Fast-PGM: Fast Probabilistic Graphical Model Learning and Inference
Jiantong Jiang, Zeyi Wen, Peiyu Yang, Atif Mansoor, Ajmal Mian
TL;DR
The paper tackles efficiency and usability barriers in probabilistic graphical models by introducing Fast-PGM, a fast, open-source library for PGM learning and inference. It implements PC-stable structure learning, maximum-likelihood parameter learning, and both exact (junction tree, variable elimination) and multiple approximate inference methods (LBP, PLS, LW, SIS, AIS-BN, EPIS-BN). It introduces a suite of performance optimizations—dynamic work pools, cache-friendly layouts, computation reuse, and hybrid parallelism—along with modular building blocks and Python interfaces to broaden accessibility. The results suggest competitive performance against existing libraries and demonstrate the potential of Fast-PGM to scale PGM methods to larger or more complex problems across domains.
Abstract
Probabilistic graphical models (PGMs) serve as a powerful framework for modeling complex systems with uncertainty and extracting valuable insights from data. However, users face challenges when applying PGMs to their problems in terms of efficiency and usability. This paper presents Fast-PGM, an efficient and open-source library for PGM learning and inference. Fast-PGM supports comprehensive tasks on PGMs, including structure and parameter learning, as well as exact and approximate inference, and enhances efficiency of the tasks through computational and memory optimizations and parallelization techniques. Concurrently, Fast-PGM furnishes developers with flexible building blocks, furnishes learners with detailed documentation, and affords non-experts user-friendly interfaces, thereby ameliorating the usability of PGMs to users across a spectrum of expertise levels. The source code of Fast-PGM is available at https://github.com/jjiantong/FastPGM.
