ZhuSuan is an open-source probabilistic programming library for Bayesian deep learning and generative models, built on TensorFlow by Tsinghua University’s machine learning group. It lets researchers express Bayesian models in a flexible, Pythonic way and run scalable inference on them with modern deep-learning machinery. The project has 2,218 stars on GitHub and is MIT licensed.
Named after the ancient Chinese art of calculation, ZhuSuan was designed to feel like a native TensorFlow library rather than a separate language bolted on top. It provides abstractions for stochastic tensors and Bayesian networks, and ships implementations of key inference techniques โ variational inference, Monte Carlo methods and Bayesian neural networks among them โ so researchers can prototype probabilistic models and benchmark new algorithms without rebuilding the scaffolding each time.
ZhuSuan’s design philosophy was to expose the building blocks of inference rather than hide them behind a single ‘fit’ call. Models are constructed by composing stochastic and deterministic operations, and inference algorithms are provided as reusable components, which made the library popular in university courses and papers that needed a hackable reference implementation of Bayesian deep learning techniques.
ZhuSuan is completely free and open source under the MIT license. You supply your own compute for training and inference, whether that is a local GPU or cloud instances.
ZhuSuan is for researchers and advanced practitioners working on Bayesian methods and probabilistic modelling. Development has been quiet since 2022 and it targets the TensorFlow ecosystem, so it best serves research codebases and readers of the Bayesian deep learning literature rather than new production projects.