19–25 Oct 2024
Europe/Zurich timezone

Taking derivatives of Geant4 - closer than you might think?

24 Oct 2024, 17:45
18m
Large Hall A

Large Hall A

Talk Track 5 - Simulation and analysis tools Parallel (Track 5)

Speakers

David Lange David Lange (Princeton University (US))

Description

Built on algorithmic differentiation (AD) techniques, differentiable programming allows to evaluate derivatives of computer programs. Such derivatives are useful across domains for gradient-based design optimization and parameter fitting, among other applications. In high-energy physics, AD is frequently used in machine learning model training and in statistical inference tasks such as maximum likelihood estimation. Recently, AD has begun to be explored for the end-to-end optimization of particle detectors, with potential applications ranging from HEP to medical physics to astrophysics. To that end, the ability to estimate derivatives of the Geant4 simulator for the passage of particles through matter would be a huge step forward.

The complexity of Geant4, its programmatic control flow, and its underlying stochastic sampling processes, introduce challenges that cannot all be addressed by current AD tools. As such, the application of current AD tools to Geant4-like simulations can provide invaluable insights into the accuracy and errors of the AD gradient estimates and into how to address remaining challenges.

In this spirit, we have applied the operator-overloading AD tool CoDiPack to the compact G4HepEm/HepEmShow package for the simulation of electromagnetic showers in a simple sampling calorimeter. Our AD-enabled simulator allows to estimate derivatives of energy depositions with respect to properties of the geometry and the incoming particles. The derivative estimator comes with a small bias, which however proved unproblematic in a simple optimization study. In this talk, we will report on our methodology and encouraging results, and demonstrate how a next-generation AD tool, Derivgrind, can be used to bring these results to the scale of Geant4.

Primary authors

Max Aehle Max Aehle (Fachhochschule Worms (DE))

Co-authors

David Lange David Lange (Princeton University (US)) Lukas Alexander Heinrich (Technische Universitat Munchen (DE)) Michael Kagan (SLAC National Accelerator Laboratory (US)) Mihaly Novak (CERN) Nicolas Gauger Vassil Vasilev (Princeton University (US)) Vassil Vasilev (Princeton University (US))

Presentation materials