Abstract
Structure learning for probabilistic graphical models (PGMs) is a critical task across diverse scientific domains, yet the field suffers from a lack of standardized benchmarking practices. We introduce Benchpress, a novel workflow management system built on Snakemake that addresses the reproducibility crisis in PGM research. By employing containerization and a modular JSON-based configuration, Benchpress enables scalable, platform-independent comparisons of structure learning algorithms across different programming languages and environments.
Introduction
Probabilistic graphical models are essential tools for mapping complex dependencies in high-dimensional data. However, the task of learning the structure of these models is computationally intensive and often NP-hard. Despite the proliferation of new algorithms, comparing their performance remains a significant challenge. Researchers frequently encounter "dependency hell" when trying to run algorithms written in different languages (e.g., R, Python, Java) or using incompatible software versions. Furthermore, inconsistent data formats and evaluation metrics lead to bespoke, non-reproducible benchmarking scripts. Benchpress aims to solve these issues by providing a unified, automated framework for large-scale algorithm evaluation.
The Benchpress Framework
Benchpress is designed with modularity and scalability as core principles. It leverages the Snakemake workflow engine to manage the execution of complex pipelines.
Modular Architecture
The workflow is decomposed into several distinct stages: graph generation, parameter sampling, data simulation, algorithm execution, and evaluation. This separation allows for efficient caching; intermediate results, such as simulated datasets, are stored and reused across different algorithm runs or evaluation modules.
Containerization and Language Agnosticism
To ensure platform independence and reproducibility, Benchpress utilizes Docker and Apptainer containers. Every algorithm module is encapsulated within its own containerized environment, allowing R-based legacy code to run seamlessly alongside modern Python deep learning frameworks. Currently, the system supports 54 algorithm modules from prominent libraries such as bnlearn, pcalg, and causal-learn.
Configuration and Scalability
Users define their experimental setup—including data generation parameters, algorithm choices, and evaluation metrics—in a single JSON configuration file. This "probabilistic programming" style of configuration separates the experimental design from the execution logic. Because it is built on Snakemake, Benchpress can scale from a single laptop to high-performance computing (HPC) clusters or cloud environments without modification.
Data and Evaluation
Benchpress provides a comprehensive suite for data generation and performance assessment:
- Data Sources: Supports synthetic data generation (e.g., Erdős-Rényi, Christmas tree graphs), standard benchmark datasets (e.g., Sachs, HEPAR II), and user-provided CSV files.
- Standardized Metrics: Automatically computes a wide range of metrics, including Structural Hamming Distance (SHD), ROC curves, F1 scores, and MCMC trajectory analysis for Bayesian methods.
Experimental Validation
The utility of Benchpress was demonstrated through several case studies. In a comparison between the classic PC algorithm and the Dual PC algorithm on Gaussian data, Benchpress facilitated a clear visualization of Dual PC's superior performance at specific significance levels. In a larger-scale simulation involving 11 algorithms on a 20-node model, the entire benchmark was completed in approximately 40 minutes on a standard laptop. The results highlighted the high performance of permutation-based algorithms like BOSS and GRaSP in specific settings, demonstrating the framework's ability to provide nuanced insights into algorithm behavior.
Conclusion
Benchpress addresses a critical need in the graphical modeling community for a reproducible and scalable benchmarking tool. By bridging the gap between different programming ecosystems and automating the evaluation pipeline, it allows researchers to focus on algorithm development rather than infrastructure management. Future work will involve extending the framework to more general statistical estimation procedures and expanding the library of community-contributed modules.
Summary updated