跨条件分支自动微分的平滑方法
Smoothing Methods for Automatic Differentiation Across Conditional Branches
AI总结:
本文将平滑解释与自动微分结合计算平滑程序梯度,并提出Monte Carlo估计器避免近似假设,通过DiscoGrad工具验证了其在分支程序参数合成优化中的高效性。
摘要:
由控制流结构(如条件分支)引入的不连续性给数学优化方法带来了挑战,这些方法假设目标函数响应面具有一定程度的平滑性。平滑解释(SI)是一种抽象解释形式,它通过近似程序输出与高斯核的卷积,从而以有原则的方式平滑程序输出。在此,我们将SI与自动微分(AD)相结合,以高效计算平滑程序的梯度。与常规程序执行中的AD不同,这些梯度还能捕获替代控制流路径的影响。SI与AD的结合使得能够直接对分支程序进行基于梯度的参数合成,例如允许校准仿真模型或在机器学习流程中将其与神经网络模型结合。我们详细说明了SI中为可处理性而做出的近似效果,并提出了一种新颖的Monte Carlo估计器,该估计器通过结合AD和采样来估计平滑程序的梯度,从而避免了底层假设。使用DiscoGrad(我们用于自动将简单C++程序转换为平滑可微形式的工具),我们进行了广泛的评估。我们在四个非平凡且原本不连续的问题上,将SI与AD的结合以及我们的Monte Carlo估计器与现有的无梯度和随机方法进行了比较,这些问题涵盖从经典的基于仿真的优化到神经网络驱动的控制。虽然基于SI的估计器的优化进度取决于程序控制流的复杂性,但我们的Monte Carlo估计器在所有问题中均具竞争力,并在我们最高维的问题中表现出显著最快的收敛速度。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。