Optimising Density Computations in Probabilistic Programs via Automatic Loop Vectorisation
Sangho Lim, Hyoungjin Lim, Wonyeol Lee, Xavier Rival, Hongseok Yang
摘要
Probabilistic programming languages (PPLs) are a popular tool for high-level modelling across many fields. They provide a range of algorithms for probabilistic inference, which analyse models by learning their parameters from a dataset or estimating their posterior distributions. However, probabilistic inference is known to be very costly. One of the bottlenecks of probabilistic inference stems from the iteration over entries of a large dataset or a long series of random samples. Vectorisation can mitigate this cost, but manual vectorisation is error-prone, and existing automatic techniques are often ad-hoc and limited, unable to handle general repetition structures, such as nested loops and loops with data-dependent control flow, without significant user intervention. To address this bottleneck, we propose a sound and effective method for automatically vectorising loops in probabilistic programs. Our method achieves high throughput using speculative parallel execution of loop iterations, while preserving the semantics of the original loop through a fixed-point check.
We formalise our method as a translation from an imperative PPL into a lower-level target language with primitives geared towards vectorisation. We implemented our method for the Pyro PPL and evaluated it on a range of probabilistic models. Our experiments show significant performance gains against an existing vectorisation baseline, achieving 1.1-6× speedups and reducing GPU memory usage in many cases. Unlike the baseline, which is limited to a subset of models, our method effectively handled all the tested models.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- Probabilistic Programming with Vectorized Programmable InferenceMcCoy R. Becker, Mathieu Huot, George Matheos, Xiaoyan Wang 等POPL 2026 · 被引用 1 次
- Incremental Computation for Efficient Programmable Inference in Probabilistic ProgramsFabian Zaiser, Jack Czenszak, Martin C. Rinard, Vikash K. Mansinghka 等PLDI 2026
它引用的顶会 Paper4
- Diffusive Gibbs SamplingWenlin Chen, Mingtian Zhang, Brooks Paige, José Miguel Hernández-Lobato 等ICML 2024 · 被引用 21 次
- Compiling Stan to generative probabilistic languages and extension to deep probabilistic programmingGuillaume Baudart, Javier Burroni, Martin Hirzel, Louis Mandel 等PLDI 2021 · 被引用 13 次
- Probabilistic Programming with Programmable Variational InferenceMcCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami 等PLDI 2024 · 被引用 8 次
- Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational InferenceWonyeol Lee, Xavier Rival, Hongseok YangPOPL 2023 · 被引用 8 次
相关 Paper
- Static Factorisation of Probabilistic Programs with User-Labelled Sample Statements and While LoopsMarkus Böck, Jürgen CitoOOPSLA 2026 · 被引用 1 次
- Nonparametric Involutive Markov Chain Monte CarloCarol Mak, Fabian Zaiser, Luke OngICML 2022 · 被引用 2 次
- Automatically marginalized MCMC in probabilistic programmingJinlin Lai, Javier Burroni, Hui Guan, Daniel SheldonICML 2023 · 被引用 4 次
- Automatic Reparameterisation of Probabilistic ProgramsMaria I. Gorinova, Dave Moore, Matthew D. HoffmanICML 2020 · 被引用 33 次
- Programmable MCMC with Soundly Composed Guide ProgramsLong Pham, Di Wang, Feras A. Saad, Jan HoffmannOOPSLA 2024 · 被引用 1 次
