Informatics & Technology

Optimising Particle Accelerators with Adaptive Machine Learning

Machine learning has become a staple of research into many of today’s most cutting-edge technologies. Until now, however, it has not been widely considered as a useful tool for online optimisation of the performance of particle accelerators. Through his research, Dr Alexander Scheinker at the Los Alamos National Laboratory in New Mexico, USA, introduces new techniques based on machine learning, which can adaptively tune the bewilderingly complex controls of particle accelerators in real time without human input. His team’s work could ultimately make it far easier for researchers across many different academic fields to make ground-breaking new discoveries.

Today’s particle accelerators are some of the greatest feats of human engineering ever achieved, enabling researchers to answer fundamental questions in fields ranging from medicine to cosmology. With such a diverse and complex array of experiments being carried out at accelerator facilities, different research groups may require radically different characteristics in the particle beams they produce. To accommodate such variation, every last intricate component of a particle accelerator must be adjustable, without sacrificing the overall performance of the device.

“Accelerators are kilometre-scale machines with thousands of coupled components that accelerate, turn, and focus their beams”, Dr Alexander Scheinker, researcher at the Los Alamos National Laboratory in New Mexico, USA, describes. “Beams must be precisely controlled to achieve desired beam energies and lengths, and to preserve the quality of the beam over time.” Traditionally, achieving these optimised conditions has required researchers and engineers to spend many hours on manual tuning. With many research groups jostling for use of the apparatus, this eats into valuable time which could be spent gathering data, ultimately making it far more difficult for scientists to resolve their most pressing issues.

Particle dynamics live in 6D space. Particle locations (x,y,z) are shown in black and the angles at which they are flying relative to the z-axis and their energies (x’,y’,E) are shown in red.

The power of machine learning
To overcome this problem, Dr Scheinker proposes that the role of particle accelerator tuning can be aided by adaptive machine learning algorithms. Where even the brightest of human minds are limited in their abilities to simultaneously take into account the role of every tuneable component (out of thousands) in a particle accelerator, these artificial intelligence algorithms build up their own models of highly intricate systems based on real data. After being ‘trained’ in this way, machine learning algorithms can almost instantaneously make their own predictions of how these systems will behave in certain situations. More specifically, ‘neural networks’ are machine learning algorithms which can mimic the decisions made by human brains. They can be trained using information detailing the varying outcomes of different tasks as they are performed on a system.

Dr Scheinker proposes that the role of particle accelerator tuning can be aided by adaptive machine learning algorithms.

Crucially, neural networks then learn by themselves how a certain task should be carried out in order to produce the best possible outcome, without being programmed beforehand. “Machine learning tools such as neural networks have recently grown in popularity for a wide range of applications, from identifying cats to developing antibiotics”, explains Dr Scheinker. “Neural networks are useful because of their ability to learn input-output relationships of complex systems.” Dr Scheinker believes that these tools provide researchers with ideal solutions to the problems posed by particle accelerator control. All the same, implementing them for use in real experiments would bring about significant challenges.

Accounting for wandering particles
The underlying challenge posed by accurate beam control involves the unwanted yet inevitable deviations in the motions of its particles. Ideally, they would all closely follow a central axis oriented along the direction of the acceleration of a particle beam and would have relatively uniform energies. If not controlled properly, however, particles will also travel in both perpendicular directions to the axis, fly off at different angles, and adopt more widely spread energies. Together, these distortions will quickly build up over time, and severely limit the quality of the beam.

A trained convolutional neural network relates electron bunch images to accelerator parameter settings; these estimates are then fine-tuned by model-independent adaptive feedback.

These problematic movements are exacerbated by the convoluted webs of interactions between individual particles, which are all but impossible to map out using conventional machine learning approaches and uncertain and time-varying accelerator components. As Dr Scheinker describes, “one of the main challenges of applying a data-based model such as a neural network to the real time active control of a particle accelerator is the fact that both the accelerator components and the beams themselves drift and change unpredictably with time. This means that the predictive power of any model based on a set of data will degrade quickly.” With no clear way of knowing how these unwanted motions will play out, researchers must find innovative ways to deal with them while the equipment is running, without relying on models built around previously gathered data.

Real-time tuning
As part of his PhD, Dr Scheinker and his colleagues aimed to devise a model-independent feedback technique for the control of time-varying systems. Dr Scheinker’s technique has been implemented for a device named a free electron laser (FEL) – in which groups of electrons travel at close to the speed of light through a specialised arrangement of magnets. These devices are highly tuneable and create brighter and more coherent flashes of light, by many orders of magnitude, than any other type of laser, making them incredibly useful for material science and biology studies. However, because of the random nature of the FEL process and the many interactions that take place within groups of such rapidly moving electrons, the detailed particle distributions are notoriously unpredictable. This means that FELs are inherently noisy even when their tuning parameters are kept constant – degrading the repeatability and accuracy of experimental outcomes and making tuning and optimisation using traditional approaches difficult.

Dr Scheinker’s team combated this issue using a specially designed model-independent ‘feedback control’ system, which used the noisy data describing the real-time properties of the FEL light to determine how it should be adjusted to maintain its desirable properties. This allowed up to 105 components to be tuned simultaneously from real-time data, independent of any data-based model.

Experimental results of tuning around 100 magnets simultaneously to maximise the noisy output energy of light at the European X-ray FEL.

As Dr Scheinker summarises, “we have demonstrated this method for maximising the output energy of the light produced from an FEL by tuning around 100 magnets simultaneously based on a noisy energy measurement and for adaptively tuning online models to automatically track time-varying beam and accelerator components to create non-invasive beam diagnostics.” Yet despite the clear success of this technique, it still faced further problems. With so many parameters at play, the team’s feedback control system could become ‘stuck’ in one solution which was reasonably good, but which didn’t represent the best solution overall.

This active feedback control approach could be applied universally to any complex system which varies unpredictably over time.

Considering every parameter
In their latest research, Dr Scheinker and his team aimed to develop an adaptive machine learning feedback control approach for noisy and time-varying systems. This approach combined the robustness of model-independent feedback with the global learning capabilities of neural networks. As previous studies had already shown, the algorithms are well suited to learning about every aspect of unknown systems, whose many different parameters can change unpredictably over time. They demonstrated this innovative approach using the Linac Coherent Light Source (LCLS) at Stanford University – which exploits the high tunability of FELs to produce high-quality X-ray pulses lasting just quadrillionths of a second.

“The neural network gave a first guess of the desired beam characteristics”, Dr Scheinker recounts. “Then, adaptive feedback used it as a starting point to fine-tune, zoom in on, and track the time-varying optimal machine settings, based on real-time beam measurements.” Although it focuses on just one immense and highly complex task, the inner workings of this process are comparable to the operation of the human brain. While the first guess the neural network makes is not perfect, it makes its own decisions to find better alternatives and ultimately to reach the best possible solution without any compromises. For the LCLS FEL, the team’s approach resulted in electron pulses whose characteristics could be automatically tuned to exactly match desired distributions. This was a first-of-its-kind step towards automatic tuning of FEL pulses towards creating distributions ideally suited for producing high-quality X-ray pulses.

Experimental results of applying non-invasive adaptive diagnostics to predict properties of intense short electron bunches based on non-destructive real time measurements.

New experimental opportunities
Dr Scheinker’s findings represent a significant step forward in our understanding of how machine learning can be used to optimise the performance of particle accelerators in real time. He also hopes that this active feedback control approach could be applied universally to any complex system which varies unpredictably over time, allowing each of their components to be simultaneously tuned during operation. For now, Dr Scheinker will work towards applying his adaptive neural networks to other aspects of particle accelerators beyond FELs. If his ideas become more widely adopted, they could soon open up a diverse array of new research opportunities.

Personal Response

What sparked your interest in neural networks?

I became interested in neural networks because of their ability to learn the underlying features of complex systems. However, the majority of applications that I saw utilised neural networks as static memorised maps for applications such as image classification, surrogate modelling, or anomaly detection. I was interested in dynamic, changing systems for which we cannot memorise a set of rules. I became interested in the idea of combining neural networks with adaptive model-independent feedback. The idea was that we could use the incredible power of neural networks to learn an approximation of a complex global landscape and use that as a map to guide a local model-independent feedback that could zoom in on and crawl around on the drifting changing landscape.

Which research areas would benefit from such a feedback control system the most?

I think that any system in which the input-output relationships change with time in an unpredictable way can benefit from an adaptive machine learning approach. For example, neural networks have proven to be extremely effective for applications such as self-driving cars where pressing the gas always makes the car speed up and pressing the brake makes it slow down. However, in time-varying systems, such as particle accelerators and their beams, increasing the voltage of a magnet may increase the divergence of a beam one moment and decrease it a few moments later, depending on the beam itself and on other magnet settings. For such systems, it is impossible to memorise anything other than approximations of input-output relationships and real-time data-based feedback must be used.

This feature article was created with the approval of the research team featured. This is a collaborative production, supported by those featured to aid free of charge, global distribution.

Want to read more articles like this?

Sign up to our mailing list and read about the topics that matter to you the most.
Sign Up!

Leave a Reply

Your email address will not be published. Required fields are marked *

Thank you for expressing interest in joining our mailing list and community. Below you can select how you’d like us to interact with you and we’ll keep you updated with our latest content.

You can change your preferences or unsubscribe by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at audience@researchoutreach.org at any time and if you have any questions about how we handle your data, please review our privacy agreement.

Would you like to learn more about our services?

We use MailChimp as our marketing automation platform. By clicking below to submit this form, you acknowledge that the information you provide will be transferred to MailChimp for processing in accordance with their Privacy Policy and Terms.

Subscribe to our FREE PUBLICATION