Lune

PLDI2026Top-tier venue

Incremental Computation for Efficient Programmable Inference in Probabilistic Programs

Fabian Zaiser, Jack Czenszak, Martin C. Rinard, Vikash K. Mansinghka, Alexander K. Lew

Abstract

Inference in probabilistic programs generally requires evaluating many possible program executions to find those of high posterior density. To scale inference to large datasets, it is crucial that expensive intermediate results are shared across these many evaluations, rather than recomputed from scratch. This paper presents a new approach to realizing this sharing, based on incremental computation , a technique for efficiently recomputing (deterministic) program outputs when program inputs change. First, we show how expressive probabilistic programs can be compiled to deterministic ones that compute their density functions. Then, building on the incremental λ -calculus, we develop a general technique for compositionally incrementalizing expressive functional programs, and apply it to these densities. The resulting incremental densities can be used to accelerate a broad range of Monte Carlo inference algorithms, including for nonparametric models not well supported by existing systems. Furthermore, our decomposition of incremental density computation into separate density and incrementalization steps allows for modular reasoning about correctness—a key pain point in existing systems, where ad-hoc incrementalization features are a known source of soundness bugs. We develop denotational logical relations arguments for the correctness of each step independently, and implement the approach in a Julia prototype, finding that it leads to asymptotic runtime improvements in the size of the dataset on a range of models and inference algorithms.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Affine Monads and Lazy Structures for Bayesian Programming cites Trace types and denotational semantics for sound programmable inference in probabilistic languages
  • Trace types and denotational semantics for sound programmable inference in probabilistic languages cites Towards verified stochastic variational inference for probabilistic programs
  • Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic Inference cites Towards verified stochastic variational inference for probabilistic programs
  • Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic Inference cites Trace types and denotational semantics for sound programmable inference in probabilistic languages
  • Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic Inference cites Sound probabilistic inference via guide types
  • Sound probabilistic inference via guide types cites Towards verified stochastic variational inference for probabilistic programs
  • Sound probabilistic inference via guide types cites Trace types and denotational semantics for sound programmable inference in probabilistic languages
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on11

  1. 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
  2. Towards verified stochastic variational inference for probabilistic programsWonyeol Lee, Hangyeol Yu, Xavier Rival, Hongseok YangPOPL 2020 · 22 citations
  3. Affine Monads and Lazy Structures for Bayesian ProgrammingSwaraj Dash, Younesse Kaddar, Hugo Paquet, Sam StatonPOPL 2023 · 12 citations
  4. Sound probabilistic inference via guide typesDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 9 citations
  5. Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic InferenceJianlin Li, Leni Aniva, Pengyuan Shi, Yizhou ZhangPOPL 2023 · 7 citations

Related papers

  1. Probabilistic Programming with Stochastic ProbabilitiesAlexander K. Lew, Matin Ghavamizadeh, Martin C. Rinard, Vikash K. MansinghkaPLDI 2023 · 9 citations
  2. Nonparametric Hamiltonian Monte CarloCarol Mak, Fabian Zaiser, Luke OngICML 2021 · 7 citations
  3. DeCo: A Core Calculus for Incremental Functional Programming with Generic Data TypesTimon Böhler, Tobias Reinhard, David Richter, Mira MeziniOOPSLA 2026
  4. Incremental Inference for Probabilistic DatalogXuyang Li, Weiyi Chen, Isil Dillig, Jingbo WangCAV 2026
  5. Compiling Probabilistic Programs for Variable Elimination with Information FlowJianlin Li, Eric Wang, Yizhou ZhangPLDI 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines