Back to Search Start Over

Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational Inference

Authors :
Wonyeol Lee
Xavier Rival
Hongseok Yang
Stanford University
Analyse Statique par Interprétation Abstraite (ANTIQUE)
Département d'informatique - ENS Paris (DI-ENS)
École normale supérieure - Paris (ENS-PSL)
Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Institut National de Recherche en Informatique et en Automatique (Inria)-Centre National de la Recherche Scientifique (CNRS)-École normale supérieure - Paris (ENS-PSL)
Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Institut National de Recherche en Informatique et en Automatique (Inria)-Centre National de la Recherche Scientifique (CNRS)-Inria de Paris
Institut National de Recherche en Informatique et en Automatique (Inria)
Department of Computer Science [KAIST] (CS)
Korea Advanced Institute of Science and Technology (KAIST)
Yang was supported by the Engineering Research Center Program through the National Research Foundation of Korea (NRF) funded by the Korean Government MSIT (NRF-2018R1A5A1059921) and also by the Institute for Basic Science (IBS-R029-C1). Rival was supported by the French ANR VeriAMOS project
ANR-18-CE25-0010,VeriAMOS,Vérification de Machines Abstraites pour les Systèmes d'Exploitation(2018)
Source :
Proceedings of the ACM on Programming Languages, Proceedings of the ACM on Programming Languages, 2023, 7, pp.335-366. ⟨10.1145/3571205⟩
Publication Year :
2023
Publisher :
HAL CCSD, 2023.

Abstract

We present a static analysis for discovering differentiable or more generally smooth parts of a given probabilistic program, and show how the analysis can be used to improve the pathwise gradient estimator, one of the most popular methods for posterior inference and model learning. Our improvement increases the scope of the estimator from differentiable models to non-differentiable ones without requiring manual intervention of the user; the improved estimator automatically identifies differentiable parts of a given probabilistic program using our static analysis, and applies the pathwise gradient estimator to the identified parts while using a more general but less efficient estimator, called score estimator, for the rest of the program. Our analysis has a surprisingly subtle soundness argument, partly due to the misbehaviours of some target smoothness properties when viewed from the perspective of program analysis designers. For instance, some smoothness properties are not preserved by function composition, and this makes it difficult to analyse sequential composition soundly without heavily sacrificing precision. We formulate five assumptions on a target smoothness property, prove the soundness of our analysis under those assumptions, and show that our leading examples satisfy these assumptions. We also show that by using information from our analysis instantiated for differentiability, our improved gradient estimator satisfies an important differentiability requirement and thus computes the correct estimate on average (i.e., returns an unbiased estimate) under a regularity condition. Our experiments with representative probabilistic programs in the Pyro language show that our static analysis is capable of identifying smooth parts of those programs accurately, and making our improved pathwise gradient estimator exploit all the opportunities for high performance in those programs.<br />Comment: To appear at POPL 2023 (camera-ready version with the appendix)

Details

Language :
English
ISSN :
24751421
Database :
OpenAIRE
Journal :
Proceedings of the ACM on Programming Languages, Proceedings of the ACM on Programming Languages, 2023, 7, pp.335-366. ⟨10.1145/3571205⟩
Accession number :
edsair.doi.dedup.....92671b5a7df3c233a608953832a7ffaf
Full Text :
https://doi.org/10.1145/3571205⟩