Probabilistic Programming with Vectorized Programmable Inference
McCoy R. Becker, Mathieu Huot, George Matheos, Xiaoyan Wang, Karen Chung, Colin Smith, Sam Ritchie, Rif A. Saurous, Alexander K. Lew, Martin C. Rinard, Vikash K. Mansinghka
Abstract
We present GenJAX, a new language and compiler for vectorized programmable probabilistic inference. GenJAX integrates the vectorizing map (vmap) operation from array programming frameworks such as JAX into the programmable inference paradigm, enabling compositional vectorization of features such as probabilistic program traces, stochastic branching (for expressing mixture models), and programmable inference interfaces for writing custom probabilistic inference algorithms. We formalize vectorization as a source-to-source program transformation on a core calculus for probabilistic programming ( λ GEN ), and prove that it correctly vectorizes both modeling and inference operations. We have implemented our approach in the GenJAX language and compiler, and have empirically evaluated this implementation on several benchmarks and case studies. Our results show that our implementation supports a wide and expressive set of programmable inference patterns and delivers performance comparable to hand-optimized JAX code.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7745c3d5-5ca8-4382-aff1-34e71b1c9045Cited by top-tier papers1
Ask how each one uses itBuilds on11
- Online Bayesian Goal Inference for Boundedly Rational Planning AgentsTan Zhi-Xuan, Jordyn L. Mann, Tom Silver, Josh Tenenbaum et al.NeurIPS 2020 · 122 citations
- 3DP3: 3D Scene Perception via Probabilistic ProgrammingNishad Gothoskar, Marco F. Cusumano-Towner, Ben Zinberg, Matin Ghavamizadeh et al.NeurIPS 2021 · 59 citations
- Trace types and denotational semantics for sound programmable inference in probabilistic languagesAlexander K. Lew, Marco F. Cusumano-Towner, Benjamin Sherman, Michael Carbin et al.POPL 2020 · 30 citations
- ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic ProgramsAlexander K. Lew, Mathieu Huot, Sam Staton, Vikash K. MansinghkaPOPL 2023 · 16 citations
- Sequential Monte Carlo Learning for Time Series Structure DiscoveryFeras Saad, Brian Patton, Matthew Douglas Hoffman, Rif A. Saurous et al.ICML 2023 · 14 citations
Related papers
- Probabilistic Programming with Programmable Variational InferenceMcCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami et al.PLDI 2024 · 8 citations
- Probabilistic Programming with Programmable Divide-Conquer-Combine Inference on Modern HardwareMarkus Böck, Jürgen CitoOOPSLA 2026 · 1 citation
- Probabilistic Programming with Stochastic ProbabilitiesAlexander K. Lew, Matin Ghavamizadeh, Martin C. Rinard, Vikash K. MansinghkaPLDI 2023 · 9 citations
- Exact Bayesian Inference on Discrete Models via Probability Generating Functions: A Probabilistic Programming ApproachFabian Zaiser, Andrzej S. Murawski, Chih-Hao Luke OngNeurIPS 2023 · 17 citations
- Compiling Stan to generative probabilistic languages and extension to deep probabilistic programmingGuillaume Baudart, Javier Burroni, Martin Hirzel, Louis Mandel et al.PLDI 2021 · 13 citations
