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.
翻译:机器学习已成为解决加速器物理现代挑战的有力工具。然而,束流时间的有限可用性、仿真的计算成本以及优化问题的高维特性,为生成训练先进机器学习模型所需的数据带来了重大挑战。本研究介绍了Cheetah,一种基于PyTorch的高速可微分线性束流动力学代码。Cheetah通过将计算时间降低多个数量级来实现大型数据集的快速收集,并支持有效的基于梯度的优化,用于加速器调谐和系统辨识。这使得Cheetah成为一种用户友好且易于扩展的工具,能够与广泛采用的机器学习工具无缝集成。我们通过五个示例展示了Cheetah的实用性,包括强化学习训练、基于梯度的束线调谐、基于梯度的系统辨识、物理信息贝叶斯优化先验以及空间电荷效应的模块化神经网络代理建模。使用这种高速可微分仿真代码将简化粒子加速器基于机器学习的方法开发,并加速其融入加速器设施的日常运行。