# Branches of a Tree: Taking Derivatives of Programs with Discrete and Branching Randomness in High Energy Physics

arXiv: https://arxiv.org/abs/2308.16680 · HTML: https://mlsanity.com/paper/2308.16680/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- Builds on 18 of its 41 references that are in the map.
- First posted on arXiv 31 Aug 2023.

## Builds on (most cited first, 18 of 18)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Monte Carlo Gradient Estimation in Machine Learning](https://mlsanity.com/paper/1906.10652/) (2019)
- [Gradient Estimation Using Stochastic Computation Graphs](https://mlsanity.com/paper/1506.05254/) (2015)
- [Automatic Differentiation of Programs with Discrete Randomness](https://mlsanity.com/paper/2210.08572/) (2022)
- [New directions for surrogate models and differentiable programming for High Energy Physics detector simulation](https://mlsanity.com/paper/2203.08806/) (2022)
- [Graph Neural Networks in Particle Physics: Implementations, Innovations, and Challenges](https://mlsanity.com/paper/2203.12852/) (2022)
- [ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs](https://mlsanity.com/paper/2212.06386/) (2022)
- [Storchastic: A Framework for General Stochastic Automatic Differentiation](https://mlsanity.com/paper/2104.00428/) (2021)
- [neos: End-to-End-Optimised Summary Statistics for High Energy Physics](https://mlsanity.com/paper/2203.05570/) (2022)
- [Differentiable Matrix Elements with MadJax](https://mlsanity.com/paper/2203.00057/) (2022)
- [Hierarchical clustering in particle physics through reinforcement learning](https://mlsanity.com/paper/2011.08191/) (2020)
- [Differentiating Metropolis-Hastings to Optimize Intractable Densities](https://mlsanity.com/paper/2306.07961/) (2023)
- [PDFFlow: parton distribution functions on GPU](https://mlsanity.com/paper/2009.06635/) (2020)
- [Jet grooming through reinforcement learning](https://mlsanity.com/paper/1903.09644/) (2019)
- [Novel Light Field Imaging Device with Enhanced Light Collection for Cold Atom Clouds](https://mlsanity.com/paper/2205.11480/) (2022)

## Built on by (most cited first, 6 of 6)

- [Deep Generative Models for Detector Signature Simulation: A Taxonomic Review](https://mlsanity.com/paper/2312.09597/) (2023)
- [Finetuning Foundation Models for Joint Analysis Optimization](https://mlsanity.com/paper/2401.13536/) (2024)
- [Generalizing Stochastic Smoothing for Differentiation and Gradient Estimation](https://mlsanity.com/paper/2410.08125/) (2024)
- [Differentiable Vertex Fitting for Jet Flavour Tagging](https://mlsanity.com/paper/2310.12804/) (2023)
- [End-to-End Optimal Detector Design with Mutual Information Surrogates](https://mlsanity.com/paper/2503.14342/) (2025)
- [Gradient estimators for parameter inference in discrete stochastic kinetic models](https://mlsanity.com/paper/2604.02121/) (2026)

## Abstract (arXiv)

We propose to apply several gradient estimation techniques to enable the differentiation of programs with discrete randomness in High Energy Physics. Such programs are common in High Energy Physics due to the presence of branching processes and clustering-based analysis. Thus differentiating such programs can open the way for gradient based optimization in the context of detector design optimization, simulator tuning, or data analysis and reconstruction optimization. We discuss several possible gradient estimation strategies, including the recent Stochastic AD method, and compare them in simplified detector design experiments. In doing so we develop, to the best of our knowledge, the first fully differentiable branching program.
