Optimizing the expected values of probabilistic processes is a central problem in computer science and its applications, arising in fields ranging from artificial intelligence to operations research to statistical computing. Unfortunately, automatic differentiation techniques developed for deterministic programs do not in general compute the correct gradients needed for widely used solutions based on gradient-based optimization. In this paper, we present ADEV, an extension to forward-mode AD that correctly differentiates the expectations of probabilistic processes represented as programs that make random choices. Our algorithm is a source-to-source program transformation on an expressive, higher-order language for probabilistic computation, with both discrete and continuous probability distributions. The result of our transformation is a new probabilistic program, whose expected return value is the derivative of the original program's expectation. This output program can be run to generate unbiased Monte Carlo estimates of the desired gradient, which can then be used within the inner loop of stochastic gradient descent. We prove ADEV correct using logical relations over the denotations of the source and target probabilistic programs. Because it modularly extends forward-mode AD, our algorithm lends itself to a concise implementation strategy, which we exploit to develop a prototype in just a few dozen lines of Haskell (https://github.com/probcomp/adev).
翻译:优化概率过程的预期值是计算机科学及其应用的一个中心问题,从人工智能到操作研究到统计计算等各个领域。 不幸的是,为确定性程序开发的自动区分技术一般并不计算基于梯度优化的广泛使用解决方案所需的正确梯度。 在本文中,我们介绍了前方模式ADEV, 这是前方模式ADV的延伸, 它正确地区分了作为随机选择程序所代表的概率过程的预期值。我们的算法是一种源到源程序转换,它来自一种表达式、更高顺序的语言,用于概率计算,具有离散和连续的概率分布。我们转型的结果是一个新的概率性程序,其预期的回报值是原始程序预期的衍生物。这个输出程序可以运行生成对理想梯度的不偏倚的蒙特卡洛估计值,然后可以在随机梯度梯度下降的内循环中使用。我们证明ADEV的逻辑关系是正确的,它来自源和目标的分辨度和概率计算。 因为它扩展了一个新的概率方案, 因为它是模块化的扩展了前方/ 方/ 方位/ 方位 方位 方位 方位 方位 方位 方位 方位