Affiliation:
1. Massachusetts Institute of Technology, USA
2. University of Oxford, UK
Abstract
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, that can 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).
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference53 articles.
1. A simple differentiable programming language
2. Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types
3. A very modal model of a modern, major, general type system
4. Gaurav Arya , Moritz Schauer , Frank Schäfer , and Chris Rackauckas . 2022. Automatic Differentiation of Programs with Discrete Randomness. CoRR, abs/2210.08572 ( 2022 ), https://doi.org/10.48550/arXiv.2210.08572 arXiv:2210.08572. 10.48550/arXiv.2210.08572 Gaurav Arya, Moritz Schauer, Frank Schäfer, and Chris Rackauckas. 2022. Automatic Differentiation of Programs with Discrete Randomness. CoRR, abs/2210.08572 (2022), https://doi.org/10.48550/arXiv.2210.08572 arXiv:2210.08572.
5. Systematically differentiating parametric discontinuities
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献