At facilities like SLAC's upgraded Linac Coherent Light Source (LCLS-II), making X-rays means passing laser light through a chain of transformations: infrared to green, green to ultraviolet, and finally onto a cathode that releases the electrons which produce X-ray pulses. Predicting how the light shifts at each step is what lets operators tune the machine — and it is expensive.

The culprit is a branch of physics called second-order nonlinear optics, or χ2 processes, and the nonlinear Schrödinger equation that describes them. Conventionally solved with the split-step Fourier method, that single calculation accounts for roughly 95 percent of the total processing time in a complete laser simulation.

A team from Stanford University, the University of California, Los Angeles (UCLA) and SLAC National Accelerator Laboratory replaced the bottleneck with deep learning. Their model, described in the journal Advanced Photonics, is a long short-term memory (LSTM) recurrent network adapted from earlier work predicting laser pulses in optical fibres, but extended to the harder case of multiple interacting light waves.

The key trick is representational: instead of repeatedly converting between the time and frequency domains the way conventional methods do, the network works throughout in a compressed representation of the light's frequency characteristics. That removes most of the repetitive computation.

Tested on noncollinear sum frequency generation (SFG) — three coupled light fields evolving together inside a crystal — the model reproduced pulse evolution across a wide range of shapes, including pulses with pronounced gaps in their frequency spectra and strong phase variation. Run in batches on GPUs, the average time per simulation fell to a few milliseconds, an improvement of orders of magnitude with little loss of accuracy. A further check: when it predicted the main SFG output correctly, its predictions for the other interacting fields were generally accurate too — evidence that it learned the interaction, not just a single output.

The team's design is modular, with each physical process represented by a separately trained network. That raises the prospect of digital twins for live experiments and, eventually, adaptive control that adjusts laser settings in real time.