ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs
Not on the map. Why?
Abstract (arXiv)
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).
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Dec 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 6; 2024: 4; 2025: 0; 2026: 2.
12 papers.
- 2024Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systemscited by 96
- 2024Building Machines that Learn and Think with Peoplecited by 73
- 2023Smoothing Methods for Automatic Differentiation Across Conditional Branchescited by 7
- 2023Differentiating Metropolis-Hastings to Optimize Intractable Densitiescited by 6
- 2023Branches of a Tree: Taking Derivatives of Programs with Discrete and Branching Randomness in High Energy Physicscited by 6
- 2024Automated Efficient Estimation using Monte Carlo Efficient Influence Functionscited by 4
- 2024Probabilistic Programming with Programmable Variational Inferencecited by 4
- 2023ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable Programscited by 3
- 2023Understanding Automatic Differentiation Pitfallscited by 1
- 2023Beyond Bayesian Model Averaging over Paths in Probabilistic Programs with Stochastic Supportcited by 0
- 2026GradInf: Gradient Estimation as Probabilistic Inferencecited by 0
- 2026Sample-Smooth Spaces: A Convenient Category for Differentiable Probabilistic Programmingcited by 0
- 2026Sample-Smooth Spaces: A Convenient Category for Differentiable Probabilistic Programming14 Aug 2026
- 2026GradInf: Gradient Estimation as Probabilistic Inference8 Jul 2026
- 2024Building Machines that Learn and Think with People22 Jul 2024
- 2024Probabilistic Programming with Programmable Variational Inference22 Jun 2024
- 2024Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systems10 May 2024
- 2024Automated Efficient Estimation using Monte Carlo Efficient Influence Functions29 Feb 2024
- 2023Beyond Bayesian Model Averaging over Paths in Probabilistic Programs with Stochastic Support23 Oct 2023
- 2023Smoothing Methods for Automatic Differentiation Across Conditional Branches5 Oct 2023
- 2023Branches of a Tree: Taking Derivatives of Programs with Discrete and Branching Randomness in High Energy Physics31 Aug 2023
- 2023Differentiating Metropolis-Hastings to Optimize Intractable Densities13 Jun 2023
- 2023Understanding Automatic Differentiation Pitfalls12 May 2023
- 2023ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable Programs21 Feb 2023