Smoothing Methods for Automatic Differentiation Across Conditional Branches
Not on the map. Why?
Abstract (arXiv)
Programs involving discontinuities introduced by control flow constructs such as conditional branches pose challenges to mathematical optimization methods that assume a degree of smoothness in the objective function's response surface. Smooth interpretation (SI) is a form of abstract interpretation that approximates the convolution of a program's output with a Gaussian kernel, thus smoothing its output in a principled manner. Here, we combine SI with automatic differentiation (AD) to efficiently compute gradients of smoothed programs. In contrast to AD across a regular program execution, these gradients also capture the effects of alternative control flow paths. The combination of SI with AD enables the direct gradient-based parameter synthesis for branching programs, allowing for instance the calibration of simulation models or their combination with neural network models in machine learning pipelines. We detail the effects of the approximations made for tractability in SI and propose a novel Monte Carlo estimator that avoids the underlying assumptions by estimating the smoothed programs' gradients through a combination of AD and sampling. Using DiscoGrad, our tool for automatically translating simple C++ programs to a smooth differentiable form, we perform an extensive evaluation. We compare the combination of SI with AD and our Monte Carlo estimator to existing gradient-free and stochastic methods on four non-trivial and originally discontinuous problems ranging from classical simulation-based optimization to neural network-driven control. While the optimization progress with the SI-based estimator depends on the complexity of the program's control flow, our Monte Carlo estimator is competitive in all problems, exhibiting the fastest convergence by a substantial margin in our highest-dimensional problem.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 23 of its 66 references that are in the map. First posted on arXiv 5 Oct 2023.
Builds on
23 of 66 references.
References · 23
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2014The Loss Surfaces of Multilayer Networkscited by 278
- 2020Differentiable Rendering: A Surveycited by 123
- 2022Gradients without Backpropagationcited by 73
- 2016Programming with a Differentiable Forth Interpretercited by 33
- 2016Differentiable Programs with Neural Librariescited by 30
- 2020Learning Differentiable Programs with Admissible Neural Heuristicscited by 30
- 2022Automatic Differentiation of Programs with Discrete Randomnesscited by 28
- 2018Gradient Sampling Methods for Nonsmooth Optimizationcited by 23
- 2021Bundled Gradients through Contact via Randomized Smoothingcited by 23
- 2018NEUZZ: Efficient Fuzzing with Neural Program Smoothingcited by 19
- 2016TerpreT: A Probabilistic Programming Language for Program Inductioncited by 12
11 more
- 2019A Simple Differentiable Programming Languagecited by 11
- 2022ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programscited by 11
- 2022Learning with Differentiable Algorithmscited by 10
- 2022Safe Neurosymbolic Learning with Differentiable Symbolic Executioncited by 9
- 2020λS: Computable Semantics for Differentiable Programming with Higher-Order Functions and Datatypescited by 8
- 2016ASTRO-DF: A Class of Adaptive Sampling Trust-Region Algorithms for Derivative-Free Stochastic Optimizationcited by 7
- 2022Neurosymbolic Programming for Sciencecited by 7
- 2016Differentiable Functional Program Interpreterscited by 6
- 2023Differentiable Programming: Efficient Smoothing of Control-Flow-Induced Discontinuitiescited by 3
- 2019AlgoNet: C^∞ Smooth Algorithmic Neural Networkscited by 1
- 2022Distribution Theoretic Semantics for Non-Smooth Differentiable Programmingcited by 1
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 2.
6 papers.
- 2024Probabilistic Programming with Programmable Variational Inferencecited by 4
- 2025Resource-efficient Inference with Foundation Model Programscited by 2
- 2024Automatic Gradient Estimation for Calibrating Crowd Models with Discrete Decision Makingcited by 1
- 2024Towards Learning Stochastic Population Models by Gradient Descentcited by 1
- 2026Dimensional Peeking for Low-Variance Gradients in Zeroth-Order Discrete Optimization via Simulationcited by 0
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learningcited by 0
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learning3 Jul 2026
- 2026Dimensional Peeking for Low-Variance Gradients in Zeroth-Order Discrete Optimization via Simulation21 Jan 2026
- 2025Resource-efficient Inference with Foundation Model Programs9 Apr 2025
- 2024Probabilistic Programming with Programmable Variational Inference22 Jun 2024
- 2024Towards Learning Stochastic Population Models by Gradient Descent10 Apr 2024
- 2024Automatic Gradient Estimation for Calibrating Crowd Models with Discrete Decision Making6 Apr 2024