GradInf: Gradient Estimation as Probabilistic Inference
Gaurav Arya, Mathieu Huot, Moritz Schauer, Alexander K. Lew, Feras A. Saad
Abstract
Gradient estimation —the task of computing the gradient of the expected value of a probabilistic program—has diverse applications in scientific computing, but is notoriously difficult because of issues such as highdimensional integration, discrete random choices, and complex stochastic dependencies. This article introduces gradient inference, a new approach to developing sound and efficient gradient estimators for probabilistic programs. Gradient inference rests on a formal reduction from a gradient estimation problem to a closely related probabilistic inference problem, whose solution can be differentiated to obtain a gradient estimator. This inference problem is obtained by applying two powerful statistical operations— coupling and factorization —to the input probabilistic program. Our reduction lets us leverage the rich toolkit of probabilistic inference algorithms to design novel gradient estimators that extend and improve upon existing methods. We introduce GradInf, a probabilistic programming system that facilitates the sound and automated implementation of gradient inference. GradInf is centered around programmable source-to-source transformations for coupling and factorizing higher-order probabilistic programs, whose soundness is proven in terms of a denotational semantics. Key to our development is the use of information-flow typing to allow random choices in a probabilistic program to be factored out and partially evaluated , which improves our ability to deploy sophisticated probabilistic inference algorithms. The resulting system offers practitioners a principled framework for designing gradient estimators. We apply GradInf to several challenging case studies, showing that it can express prominent gradient estimators from the literature and enables the construction of new state-of-the-art estimators that outperform the best existing baselines.
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 5d2931a2-d8ff-4a10-ad4c-419365d73946Builds on17
- Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 citations
- Automatic Differentiation of Programs with Discrete RandomnessGaurav Arya, Moritz Schauer, Frank Schäfer, Christopher RackauckasNeurIPS 2022 · 56 citations
- On Correctness of Automatic Differentiation for Non-Differentiable FunctionsWonyeol Lee, Hangyeol Yu, Xavier Rival, Hongseok YangNeurIPS 2020 · 50 citations
- DisARM: An Antithetic Gradient Estimator for Binary Latent VariablesZhe Dong, Andriy Mnih, George TuckerNeurIPS 2020 · 43 citations
- SPPL: probabilistic programming with fast exact symbolic inferenceFeras A. Saad, Martin C. Rinard, Vikash K. MansinghkaPLDI 2021 · 38 citations
Related papers
- ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic ProgramsAlexander K. Lew, Mathieu Huot, Sam Staton, Vikash K. MansinghkaPOPL 2023 · 16 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
- Compiling Probabilistic Programs for Variable Elimination with Information FlowJianlin Li, Eric Wang, Yizhou ZhangPLDI 2024 · 6 citations
- A Gradual Probabilistic Lambda CalculusWenjia Ye, Matías Toro, Federico OlmedoOOPSLA 2023 · 3 citations
- Guaranteed bounds for posterior inference in universal probabilistic programmingRaven Beutner, C.-H. Luke Ong, Fabian ZaiserPLDI 2022 · 18 citations
