probcomp/Gen.jl

A general-purpose probabilistic programming system with programmable inference

What it solves

Gen.jl provides a general-purpose system for probabilistic programming, allowing users to define generative models and perform complex Bayesian inference. It simplifies the process of implementing advanced inference algorithms by making them "programmable," meaning users can customize the underlying math and logic of the inference process without needing to manually derive the mathematics for every new model.

How it works

Embedded in the Julia language, Gen.jl allows users to write probabilistic programs using an expressive modeling language. It supports a wide range of Bayesian inference methods, including Sequential Monte Carlo (SMC), variational inference, and Markov Chain Monte Carlo (MCMC). It also enables gradient-based training of generative models through parameter optimization and wake-sleep learning, as well as Bayesian structure learning via involutive MCMC and SMCP³.

Who it’s for

This tool is designed for researchers and developers working with probabilistic models, Bayesian statistics, and generative AI, particularly those who need the flexibility to customize inference algorithms or implement complex generative models.

Highlights

  • Programmable Inference: Ability to write custom proposals, variational families, and MCMC kernels.
  • Multi-paradigm Support: Includes SMC, variational inference, and MCMC.
  • Gradient-based Training: Supports parameter optimization and wake-sleep learning for generative models.
  • Incremental Computation: Specialized modeling constructs that speed up inference.
  • Extensible API: Well-defined APIs for creating custom generative models, distributions, and gradients.