Machine Learning Reveals Hidden Components of X-ray Pulses

Neural networks determine the amplitude and phase of X-ray pulses, enabling new, high-resolution quantum studies.

Image courtesy of SLAC National Accelerator Laboratory
An X-ray pulse (white line) is built from ‘real’ and ‘imaginary’ components (red and blue dashes) that determine quantum effects. A neural network analyzes low resolution measurements (black shadow) to reveal the high-resolution pulse and its components.

The Science

Ultrafast pulses from X-ray lasers reveal how atoms move at timescales of a femtosecond. That’s a quadrillionth of a second. However, measuring the properties of the pulses themselves is challenging. While determining a pulse’s maximum strength, or ‘amplitude,’ is straightforward, the time at which the pulse reaches the maximum, or ‘phase,’ is often hidden. A new study trains neural networks to analyze the pulse to reveal these hidden sub-components. Physicists also call these sub-components ‘real’ and ‘imaginary.’ Starting from low-resolution measurements, the neural networks reveal finer details with each pulse, and they can analyze pulses millions of times faster than previous methods.

The Impact

The new analysis method up to three times more accurate and millions of times faster than existing methods. Knowing the components of each X-ray pulse leads to better, crisper data. This will expand the science possible using ultrafast X-ray lasers, including fundamental research in chemistry, physics, and materials scienceand applications in fields such as quantum computing. For example, the additional pulse information could enable simpler and higher-resolution time-resolved experiments, reveal new areas of physics, and open the door to new investigations of quantum mechanics. The neural network approach used here could also have broad applications in X-ray and accelerator science, including learning the shape of proteins or the properties of an electron beam.


Characterization of system dynamics are important applications for X-ray free-electron lasers (XFELs), but measuring the time-domain properties of the X-ray pulses used in those experiments is a long-standing challenge. Diagnosing the properties of each individual XFEL pulse could enable a new class of simpler and potentially higher-resolution dynamics experiments. This research by scientists from SLAC National Accelerator Laboratory and the Deutsches Elektronen-Synchrotron is a step toward that goal. The new approach trains neural networks, a form of machine learning, to combine low-resolution measurements in both the time and frequency domains and recover the properties of X-ray pulses at high resolution. The model-based ‘physics-informed’ neural-network architecture can be trained directly on unlabeled experimental data and is fast enough for real-time analysis on the new generation of megahertz XFELs. Critically, the method also recovers the phase, opening the door to coherent-control experiments with XFELs, shaping the intricate motion of electrons in molecules and condensed-matter systems.


Daniel Ratner
Head of Machine Learning Initiative
SLAC National Accelerator Laboratory


Primary support for this research was provided by the Department of Energy (DOE) Office of Science, Basic Energy Sciences Scientific User facilities division, with secondary support from the Basic Energy Sciences Chemical Sciences, Geosciences, and Biosciences Division. The research used resources at the Linac Coherent Light Source, a DOE Office of Science user facility operated by SLAC National Accelerator Laboratory.


Ratner, D., et al., Recovering the phase and amplitude of X-ray FEL pulses using neural networks and differentiable models. Optics Express, 29, 20336, (2021) [DOI: 10.1364/OE.432488]

Highlight Categories

Program: BES , CSGB , SUF

Performer: DOE Laboratory , SC User Facilities , BES User Facilities , LCLS