Authors:
Megha R. Narayanan、Thomas W. Morris
Paper:
https://arxiv.org/abs/2408.06540
Introduction
Background
The National Synchrotron Light Source II (NSLS-II) at Brookhaven National Laboratory (BNL) is a premier facility that produces high-quality beams essential for scientific research. The alignment of these beamlines involves adjusting a series of precision optical components such as crystals, mirrors, and aperture shutters, each with multiple degrees of freedom. This alignment is crucial for achieving optimal beam quality, characterized by a small size and high intensity. However, the sensitivity of these components to environmental changes and the increasing complexity of beamlines make manual alignment challenging and error-prone.
Autonomous Methods
To address these challenges, autonomous alignment methods using machine learning, specifically Gaussian Processes and Bayesian Optimization, are being explored. These methods are well-suited for high-dimensional, expensive-to-sample optimization problems. The goal is to find the input settings that maximize beam quality by treating the optimization function as a stochastic process and using Bayesian inference to create a posterior distribution. This distribution helps in predicting the beam quality for given input settings and guides the selection of the best points to sample.
Low-Fidelity Data
One significant complication in autonomous alignment is the presence of noisy and faulty data from beam sensors. These low-fidelity data points can impair the optimization model, leading to slower convergence. This study investigates methods to identify and exclude such untrustworthy readings dynamically, aiming to improve the quality of the beams and the efficiency of the alignment process.
Methods and Results
Image Processing
The first step in optimizing beam quality is processing the beam images to extract meaningful outputs. Given the high noise levels in the images, Singular Value Decomposition (SVD) is used to reduce the images to their most significant features. The reconstructed images are then analyzed to identify the beam edges and calculate the objective flux, height, width, and position of the beam.
Exclusion Based on Loss from Size and Position Models
The dynamic pruning method involves training models on the beam’s width, height, x-position, and y-position based on assumed “good” data. These models predict how the beam should change with input adjustments. Points that deviate significantly from these predictions are considered low-fidelity and excluded from the dataset. This exclusion is dynamic, allowing points to be re-included if the model changes.
This method was initially tested on a single-task Gaussian Process optimizing for flux. While it found optima, convergence was slow due to the complexity of the function. Switching to true multi-objective Bayesian optimization for flux, width, and height, combined with dynamic pruning, led to faster convergence.
Genetic Algorithms
Another approach explored is using genetic algorithms for binary classification to find the optimal subset of data points to exclude. The genetic algorithm simulates evolution, starting with a population of individuals, each representing a unique subset of data points. The fitness of each individual is measured by the lengthscale of the model trained on its subset, favoring smooth functions with large lengthscales.
This algorithm was tested on functions with noisy and non-noisy bad data. It was more successful at excluding noisy data, which is common in beam image datasets. When combined with the dynamic pruning method, the genetic algorithm yielded similar results but with a longer runtime.
Conclusions
This study successfully investigated methods for excluding low-fidelity data to optimize model training for beamline alignment. The dynamic pruning method proved effective in distinguishing high and low-quality data, leading to faster convergence to optimal beam configurations. The genetic algorithm also showed promise, particularly for noisy data exclusion. These methods have been integrated into the beamline alignment code at NSLS-II, advancing the goal of autonomous, reliable, and efficient beamline alignment.
Future work will focus on refining these techniques, exploring their applicability across different beamlines, and investigating ways to further reduce runtime. These advancements will enhance the reproducibility of experiments and the overall scientific output at NSLS-II and other synchrotron facilities.
Acknowledgement
This project was supported in part by the U.S. Department of Energy, Office of Science, Office of Workforce Development for Teachers and Scientists (WDTS) under the Science Undergraduate Laboratory Internships Program (SULI).
References
- Morris, T. W., M. Rakitin, A. Islegen-Wojdyla, Y. Du, M. Fedurin, A. C. Giles, D. Leshchev et al. “A General Bayesian Algorithm for the Autonomous Alignment of Beamlines.” https://arxiv.org/abs/2402.16716v1 (2024).