Brian Ward, Matthijs Vákár, Mitzi Morris, Andrew Gelman, Bob Carpenter 2026-02-18
- Brian Ward (Flatiron Institute)
- Matthijs Vákár (Utrecht University)
- Mitzi Morris (Independent Contractor)
- Andrew Gelman (Columbia Univesity)
- Bob Carpenter (Flatiron Institute)
We introduce a methodology for coding Bayesian statistical models in Python with JAX that follows the design pattern of the Stan probabilistic programming language. This allows a direct, line-by-line translation into JAX of all of the courses, textbooks, and case studies for Stan across the physical, biological, and social sciences, engineering, business, health, education, policy, economics, and sports. It also provides a transparent framework for further model development. Coupled with modern hardware (e.g., multi-core, graphics processing units, and tensor processing units), compiled JAX far exceeds the efficiency and scalabilty of Stan for computing the log densities and gradients needed by state-of-the-art inference algorithms. JAX’s implementation of NumPy and SciPy, along with the packages TensorFlow (including TensorFlow Probability) and Distrax, provide a much wider range of special function support than Stan, including partial and stochastic differential equations and neural networks. The package ArviZ provides the same posterior analysis tools as Stan, Blackjax provides a wider range of inference algorithms, and TensorFlow Probability provides a wider range of variable transforms. Together, these tools provide an environment to code models in the style of Stan targeting modern hardware without leaving an integrated Python programming environment.
- GitHub pages: Jax à la Stan
