bayesgm is a toolkit providing a AI-driven Bayesian generative modeling framework for various Bayesian inference tasks in complex, high-dimensional data.
The framework is built upon Bayesian principles combined with modern AI models, enabling flexible modeling of complex dependencies with principled uncertainty estimation.
Currently, the bayesgm package includes two model families:
- BGM: Bayesian generative modeling for arbitrary conditional inference (foundational model).
- CausalBGM: Bayesian generative modeling for causal effect estimation.
bayesgm toolkit can be used for a wide range of tasks based on Bayesian principle with Uncertainty Quantification, including:
- Data Generation
- Bayesian Posterior Prediction
- Missing Data Imputation
- Counterfactual Prediction
- Causal Effect Estimation
We provide an overview in the user guide. All model implementations have a high-level API that supports model instantiation, training, inference, save/load functions, etc.
See detailed in our Installation Page. Briefly, bayesgm Python package can be installed via
pip install bayesgm- Tutorials, API reference, and installation guides are available in the Documentation.
If you use bayesgm tool in your work, please consider citing the corresponding publications:
-
Qiao Liu and Wing Hung Wong, A Bayesian Generative Modeling Approach for Arbitrary Conditional Inference [J]. arXiv preprint arXiv:2601.05355, 2026
-
Qiao Liu and Wing Hung Wong. An AI-powered Bayesian generative modeling approach for causal inference in observational studies [J]. arXiv preprint arXiv:2501.00755, 2025 (JASA, in press).
-
Qiao Liu, Zhongren Chen, and Wing Hung Wong. An encoding generative modeling approach to dimension reduction and covariate adjustment in causal inference with observational studies [J]. PNAS, 121 (23) e2322376121, 2024.
Found a bug or would like to see a feature implemented? Feel free to submit an issue.
Have a question or would like to start a new discussion? You can also send me an e-mail.