Cheetah: Bridging the Gap Between Machine Learning and Particle Accelerator Physics with High-Speed, Differentiable Simulations
Jan Kaiser, Chenran Xu, Annika Eichler, Andrea Santamaria Garcia
TL;DR
Cheetah tackles data and computation bottlenecks in accelerator ML by delivering a PyTorch-based, differentiable, linear-beam dynamics simulator that runs orders of magnitude faster than existing codes. By supporting two beam representations, dynamic transfer-map reduction, and seamless integration with ML workflows, it enables efficient gradient-based optimization, system identification, and RL-driven control. The paper demonstrates five concrete use cases, including zero-shot RL transfer to real accelerators, gradient-based tuning and identification, Bayesian optimisation priors, and modular NN surrogates for space-charge effects, highlighting both speed gains and practical applicability. The work argues that fast differentiable simulations can accelerate ML development for accelerators and accelerate real-world adoption, while outlining future directions like more modular surrogates and JAX-based backends to push speeds further.
Abstract
Machine learning has emerged as a powerful solution to the modern challenges in accelerator physics. However, the limited availability of beam time, the computational cost of simulations, and the high-dimensionality of optimisation problems pose significant challenges in generating the required data for training state-of-the-art machine learning models. In this work, we introduce Cheetah, a PyTorch-based high-speed differentiable linear-beam dynamics code. Cheetah enables the fast collection of large data sets by reducing computation times by multiple orders of magnitude and facilitates efficient gradient-based optimisation for accelerator tuning and system identification. This positions Cheetah as a user-friendly, readily extensible tool that integrates seamlessly with widely adopted machine learning tools. We showcase the utility of Cheetah through five examples, including reinforcement learning training, gradient-based beamline tuning, gradient-based system identification, physics-informed Bayesian optimisation priors, and modular neural network surrogate modelling of space charge effects. The use of such a high-speed differentiable simulation code will simplify the development of machine learning-based methods for particle accelerators and fast-track their integration into everyday operations of accelerator facilities.
