Storchastic: A Framework for General Stochastic Automatic Differentiation
Emile van Krieken, Jakub M. Tomczak, Annette ten Teije
Abstract
Modelers use automatic differentiation (AD) of computation graphs to implement complex Deep Learning models without defining gradient computations. Stochastic AD extends AD to stochastic computation graphs with sampling steps, which arise when modelers handle the intractable expectations common in Reinforcement Learning and Variational Inference. However, current methods for stochastic AD are limited: They are either only applicable to continuous random variables and differentiable functions, or can only use simple but high variance score-function estimators. To overcome these limitations, we introduce Storchastic, a new framework for AD of stochastic computation graphs. Storchastic allows the modeler to choose from a wide variety of gradient estimation methods at each sampling step, to optimally reduce the variance of the gradient estimates. Furthermore, Storchastic is provably unbiased for estimation of any-order gradients, and generalizes variance reduction techniques to higher-order gradient estimates. Finally, we implement Storchastic as a PyTorch library at https://github.com/HEmile/storchastic.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Probabilistic Programming with Programmable Variational Inference cites Automatic Differentiation of Programs with Discrete Randomness
- Probabilistic Programming with Programmable Variational Inference cites ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs
- Automatic Differentiation of Programs with Discrete Randomness cites ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs
- ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs cites Automatic Differentiation of Programs with Discrete Randomness
- Efficient Marginalization of Discrete and Structured Latent Variables via Sparsity cites Estimating Gradients for Discrete Random Variables by Sampling without Replacement
- Neurosymbolic Diffusion Models cites A-NeSI: A Scalable Approximate Method for Probabilistic Neurosymbolic Inference
Cited by top-tier papers9
- A-NeSI: A Scalable Approximate Method for Probabilistic Neurosymbolic InferenceEmile van Krieken, Thiviyan Thanapalasingam, Jakub M. Tomczak, Frank van Harmelen et al.NeurIPS 2023 · 62 citations
- Automatic Differentiation of Programs with Discrete RandomnessGaurav Arya, Moritz Schauer, Frank Schäfer, Christopher RackauckasNeurIPS 2022 · 56 citations
- ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic ProgramsAlexander K. Lew, Mathieu Huot, Sam Staton, Vikash K. MansinghkaPOPL 2023 · 16 citations
- Neurosymbolic Diffusion ModelsEmile van Krieken, Pasquale Minervini, Edoardo Maria Ponti, Antonio VergariNeurIPS 2025 · 12 citations
- Probabilistic Programming with Programmable Variational InferenceMcCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami et al.PLDI 2024 · 8 citations
Builds on3
- Estimating Gradients for Discrete Random Variables by Sampling without ReplacementWouter Kool, Herke van Hoof, Max WellingICLR 2020 · 59 citations
- DisARM: An Antithetic Gradient Estimator for Binary Latent VariablesZhe Dong, Andriy Mnih, George TuckerNeurIPS 2020 · 43 citations
- Efficient Marginalization of Discrete and Structured Latent Variables via SparsityGonçalo M. Correia, Vlad Niculae, Wilker Aziz, André F. T. MartinsNeurIPS 2020 · 25 citations
Related papers
- GO Hessian for Expectation-Based ObjectivesYulai Cong, Miaoyun Zhao, Jianqiao Li, Junya Chen et al.AAAI 2021
- Randomized Automatic DifferentiationDeniz Oktay, Nick McGreivy, Joshua Aduol, Alex Beatson et al.ICLR 2021 · 31 citations
- Marginalized Stochastic Natural Gradients for Black-Box Variational InferenceGeng Ji, Debora Sujono, Erik B. SudderthICML 2021 · 9 citations
- Proppo: a Message Passing Framework for Customizable and Composable Learning AlgorithmsPaavo Parmas, Takuma SenoNeurIPS 2022 · 5 citations
- Generalized Doubly Reparameterized Gradient EstimatorsMatthias Bauer, Andriy MnihICML 2021 · 15 citations
