一句话:提出梯度推断,将概率程序梯度估计归约为概率推断,并实现 GradInf 系统自动构造高效估计器。
概率程序期望值的梯度估计在科学计算中应用广泛,但受高维积分、离散随机选择与复杂随机依赖影响而十分困难。本文提出梯度推断(gradient inference),将梯度估计问题形式化归约为一个密切相关的概率推断问题:对输入概率程序施以耦合与因式分解两种统计操作,所得推断问题的解可被微分以得到梯度估计器。这一归约使现有概率推断算法工具包可用于设计新的梯度估计器。作者实现概率编程系统 GradInf,支持对高阶概率程序进行可编程源到源变换,并用指称语义证明其可靠性;其中信息流类型系统用于因式分解与部分求值随机选择。案例研究表明,GradInf 能表达文献中的著名估计器,并能构造超越最佳基线的新的最优估计器。
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.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{AryaHSLS26,
title = {GradInf: Gradient Estimation as Probabilistic Inference},
author = {Gaurav Arya and Mathieu Huot and Moritz Schauer and Alexander K. Lew and Feras A. Saad},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {PLDI},
year = {2026},
doi = {10.1145/3808321}
}