TY - JOUR
T1 - Optimization using pathwise algorithmic derivatives of electromagnetic shower simulations
AU - Aehle, Max
AU - Novák, Mihály
AU - Vassilev, Vassil
AU - Gauger, Nicolas R.
AU - Heinrich, Lukas
AU - Kagan, Michael
AU - Lange, David
N1 - Publisher Copyright:
© 2024
PY - 2025/4
Y1 - 2025/4
N2 - Among the well-known methods to approximate derivatives of expectancies computed by Monte-Carlo simulations, averages of pathwise derivatives are often the easiest one to apply. Computing them via algorithmic differentiation typically does not require major manual analysis and rewriting of the code, even for very complex programs like simulations of particle-detector interactions in high-energy physics. However, the pathwise derivative estimator can be biased if there are discontinuities in the program, which may diminish its value for applications. This work integrates algorithmic differentiation into the electromagnetic shower simulation code HepEmShow based on G4HepEm, allowing us to study how well pathwise derivatives approximate derivatives of energy depositions in a sampling calorimeter with respect to parameters of the beam and geometry. We found that when multiple scattering is disabled in the simulation, means of pathwise derivatives converge quickly to their expected values, and these are close to the actual derivatives of the energy deposition. Additionally, we demonstrate the applicability of this novel gradient estimator for stochastic gradient-based optimization in a model example.
AB - Among the well-known methods to approximate derivatives of expectancies computed by Monte-Carlo simulations, averages of pathwise derivatives are often the easiest one to apply. Computing them via algorithmic differentiation typically does not require major manual analysis and rewriting of the code, even for very complex programs like simulations of particle-detector interactions in high-energy physics. However, the pathwise derivative estimator can be biased if there are discontinuities in the program, which may diminish its value for applications. This work integrates algorithmic differentiation into the electromagnetic shower simulation code HepEmShow based on G4HepEm, allowing us to study how well pathwise derivatives approximate derivatives of energy depositions in a sampling calorimeter with respect to parameters of the beam and geometry. We found that when multiple scattering is disabled in the simulation, means of pathwise derivatives converge quickly to their expected values, and these are close to the actual derivatives of the energy deposition. Additionally, we demonstrate the applicability of this novel gradient estimator for stochastic gradient-based optimization in a model example.
KW - Automatic differentiation
KW - Differentiable programming
KW - Gradient estimation
KW - High-energy physics
KW - Monte-Carlo algorithm
KW - Sampling calorimeter
UR - http://www.scopus.com/inward/record.url?scp=85214308354&partnerID=8YFLogxK
U2 - 10.1016/j.cpc.2024.109491
DO - 10.1016/j.cpc.2024.109491
M3 - Article
AN - SCOPUS:85214308354
SN - 0010-4655
VL - 309
JO - Computer Physics Communications
JF - Computer Physics Communications
M1 - 109491
ER -