GradInf: Gradient Estimation as Probabilistic Inference
Carnegie Mellon University Pittsburgh USA;Massachusetts Institute of Technology Cambridge USA;Chalmers University of Technology \& University of Gothenburg Gothenburg Sweden;Yale University New Haven USA;Carnegie Mellon University;Massachusetts Institute of Technology;Chalmers University of Technology \& University of Gothenburg;Yale University
Gaurav Arya, Mathieu Huot, Moritz Schauer, Alexander K. Lew, Feras A. Saad
发表信息:
Proc. ACM Program. Lang. 10, PLDI, Article 243 (June 2026)
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 high-dimensional 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.
Control-Data Separation and Logical Condition Propagation for Efficient Inference on Probabilistic Programs
National Institute of Informatics(国立信息学研究所);SOKENDAI (The Graduate University for Advanced Studies)(综合研究大学院大学(高级研究研究生院));Ernst & Young ShinNihon LLC(安永新日本有限责任公司);Kyoto University(京都大学)
本文提出融合控制-数据分离与逻辑条件传播的概率程序采样框架,并基于 Anglican 实现,显著提升含 while 循环和稀有观测程序的推理效率。