Differentiable simulation of a liquid argon time projection chamber

Sean Gasiorowski, Yifan Chen, Youssef S. G. Nashed, Pierre Granger, Camelia Mironov, Ka Vang Tsang, Daniel Ratner, Kazuhiro TeraoMach. Learn. Sci. Technol 2024 · DOI

TL;DR

This paper introduces a "differentiable simulator" for liquid argon time projection chambers (LArTPCs), a crucial technology for neutrino physics experiments like DUNE. By making the simulation process differentiable, they enable gradient-based optimization for simultaneously calibrating all detector parameters, a significant advancement over traditional, isolated calibration methods.

What Problem Does This Paper Address?

High-quality simulations are essential for analyzing data from particle physics detectors. However, these simulations often don't perfectly match real-world data due to discrepancies in modeling detector processes. Traditional calibration methods address these discrepancies by calibrating individual detector parameters or processes one at a time. This approach is limited because detector processes are often entangled, meaning that calibrating one parameter in isolation might not accurately reflect its impact on the overall system or might lead to biased results. The authors aim to overcome this by developing a simulator that allows for the simultaneous calibration of all detector parameters at once, leveraging the power of gradient-based optimization.

Methods

The core innovation is the development of a "differentiable simulator." This involves taking an existing LArTPC simulator (larnd-sim) and modifying its code to be compatible with automatic differentiation frameworks like PyTorch. This allows the simulator to not only produce simulated detector outputs but also to compute the gradients of these outputs with respect to its internal parameters.

Key methodological aspects include:

  • Automatic Differentiation: Leveraging libraries like PyTorch to automatically compute gradients of the simulation output with respect to model parameters.
  • Differentiable Relaxations: For operations that are inherently non-differentiable (like integer truncation or hard masking), they introduce smooth, continuous approximations (e.g., sigmoid functions) to allow gradients to flow through.
  • Analysis-by-Synthesis: A calibration approach where the simulator's output is compared to target data (either real or simulated) using a differentiable loss function. Gradients of this loss with respect to the simulator's parameters are then used to update those parameters, iteratively minimizing the loss.
  • Dynamic Time Warping (DTW) Loss: A differentiable version of DTW is used as the loss function to compare simulated detector readouts with target data. This is suitable for time-series data and handles variations in sequence lengths and patterns.

Datasets

The paper primarily uses simulated datasets for its demonstrations:

  • Simulated Closure Tests: The core of the evaluation involves generating "target" data using the simulator itself with known parameter values. The simulator is then tasked with recovering these known values. This is done using:
  • A muon sample: 100 events, each containing about 10 muons, with kinetic energies of 1 GeV. This sample is chosen for its well-defined energy deposition characteristics.
  • A mixed particle sample: Composed of muons, pions, and protons with kinetic energies uniformly sampled from 0.1 GeV to 2 GeV. This demonstrates the robustness of the method across different particle types.

Key Insights and Ideas

  • Simultaneous Calibration is Possible: The most significant insight is that it's feasible to simultaneously calibrate a complex set of entangled detector parameters using differentiable simulation and gradient-based optimization, overcoming limitations of traditional methods.
  • Gradient Information is Powerful: The gradients computed by the simulator provide direct insights into how parameter changes affect the detector output, enabling efficient and targeted optimization.
  • Differentiable Relaxations are Crucial: Making non-differentiable operations (like discrete counts or hard cuts) differentiable is essential for enabling gradient flow through the entire simulation pipeline.
  • Reduced Data Requirements: The paper suggests that this method can achieve robust calibration with a relatively small number of events, potentially reducing the burden on data acquisition.
  • Breaking Parameter Degeneracies: By fitting multiple parameters simultaneously, the method can naturally break degeneracies that might arise when fitting parameters in isolation.

Key Results

  • Successful Closure Tests: The differentiable simulator successfully recovered target parameter values in simulated closure tests, demonstrating the accuracy of the calibration method. Fits converged to within 1% of target values after 5000 mini-batch iterations.
  • Robustness Across Samples: The calibration performance was comparable for both the muon-only sample and the mixed particle sample, indicating the method's robustness to different particle types and energies.
  • Computational Overhead: The differentiable simulator incurs a computational cost. The forward simulation time is roughly 25 times longer than the original non-differentiable simulator, and gradient computation adds further overhead. However, this is a trade-off for the enhanced calibration capabilities.
  • Memory Management: Techniques like PyTorch checkpointing are used to manage memory usage, which can be significant due to the large tensors involved in automatic differentiation.

Limitations and Future Work

  • Real Data Challenges: The current work relies on simulated data. Applying this to real data will require estimating particle segments and their energy depositions from detector readouts, which itself depends on detector parameters and may require iterative refinement.
  • Electronics Noise: The current studies are performed without electronics noise. The impact of noise on calibration performance needs to be further studied, as it can degrade the clarity of parameter impact and introduce stochasticity.
  • Non-Differentiable Components: While many parts of the simulator are now differentiable, some components (like discrete pixel structures) may still require further work or relaxation techniques.
  • Computational Efficiency: The computational overhead of the differentiable simulator is a significant area for future improvement, with suggestions including exploring sparsity, JIT compilation, and alternative automatic differentiation backends.
  • Learning Inverse Models: The differentiable simulator opens avenues for learning "inverse detector simulations" that map detector outputs back to particle segments, which is a promising direction for future research.

Summary updated

BibTeX
@article{gasiorowski2024differentiable,
  author = {Sean Gasiorowski and Yifan Chen and Youssef S. G. Nashed and Pierre Granger and Camelia Mironov and Ka Vang Tsang and Daniel Ratner and Kazuhiro Terao},
  title = {{Differentiable simulation of a liquid argon time projection chamber}},
  journal = {Mach. Learn. Sci. Technol.},
  year = {2024},
  doi = {10.1088/2632-2153/ad2cf0},
}
Figure