TuringLang/Turing.jl

Bayesian inference with probabilistic programming.

What it solves

Turing.jl provides a way to perform Bayesian inference using a probabilistic programming language. It allows users to define complex probabilistic models and then apply various inference algorithms to estimate the parameters of those models based on observed data.

How it works

Users define models using the @model macro, which specifies priors and likelihoods. The library then integrates with the broader Julia ecosystem to perform inference. It uses DynamicPPL.jl for model specification and connects to various backends for sampling and optimization:

  • Markov Chain Monte Carlo (MCMC): Uses an abstract interface (AbstractMCMC.jl) and specific samplers like AdvancedHMC.jl and AdvancedMH.jl.
  • Variational Inference: Handled via AdvancedVI.jl.
  • Maximum Likelihood/MAP Estimation: Leverages the Optimization.jl interface from SciML.
  • Automatic Differentiation: Supports backends like ForwardDiff.jl and Mooncake.jl via DifferentiationInterface.jl.

Who it’s for

Researchers and data scientists who need a flexible, general-purpose probabilistic programming language for Bayesian modeling and statistical inference.

Highlights

  • Unified Interface: Acts as a main entry point for a suite of tools in the TuringLang ecosystem.
  • Flexible Model Specification: Uses the @model macro for intuitive model definition.
  • Diverse Inference Algorithms: Supports MCMC, Variational Inference, and optimization-based estimation.
  • Julia-native: Built on the Julia language for high-performance numerical computing.

Related

  • Project
  • Project
  • Project
  • Project
  • Project