Bayesian Algorithm Execution for Tuning Particle Accelerator Emittance with a Virtual Objective

Traditional black-box optimization methods are inefficient when dealing with multi-point queries, i.e. when each query of the objective requires multiple secondary measurements, simulations, or other tasks. Existing approaches, including Bayesian optimization (BO), acquire the full series of measurements at each iteration, making the queries slow and information-poor. We propose applying Bayesian Algorithm Execution (BAX) to instead query and model individual measurements. BAX avoids the slow multi-point query by acquiring points through a virtual objective, i.e. calculating the multi-point objective from the learned model rather than from the experiment. As a result, queries in BAX are faster and retain more information compared to those in BO. In this work, we use BAX to minimize emittance at the Linac Coherent Light Source (LCLS) and the Facility for Advanced Accelerator Experimental Tests II (FACET-II) particle accelerators. Although the emittance is a critical parameter for the performance of high-brightness machines, including X-ray lasers and linear colliders, optimization is often limited by the time required for tuning. In an LCLS simulation environment, we show that BAX is 20× faster while also being more robust to noise compared to existing optimization methods. In live tests, BAX performed the first fully-automated emittance tuning at both LCLS and FACET-II, matching the hand-tuned emittance at FACETII and achieving an optimal emittance 24% lower than that obtained by hand-tuning at LCLS. We anticipate that our approach can readily be adapted to other types of optimization problems involving multi-point queries commonly found in scientific instruments.