HyperAIHyperAI

Command Palette

Search for a command to run...

Analytical Efficiency Improved by Over 200 Times! Argonne National Laboratory Proposes a Nanobeam Diffraction Analysis Method Based on Unsupervised Training, Enabling DONUT to Accurately Extract Material features.

Featured Image

Improving material properties essentially depends on a precise understanding of the material's internal structure.

Scanning X-ray diffraction microscopy (SXDM) is an advanced characterization technique that uses diffraction contrast to spatially resolve material structure information, and has become an important tool for resolving nanoscale structures in recent years. However, a key challenge in SXDM data analysis lies in the convolution relationship between beam shape and local lattice information. Traditional methods typically separate these coupled structural parameters by fitting the data to simulated data.However, this process is computationally expensive and highly dependent on data preprocessing steps.

Meanwhile, artificial intelligence technology is gradually entering the field of X-ray science—supervised learning models have already demonstrated significant data processing advantages in areas such as Bragg coherence diffraction (BCDI), X-ray ptychography, and electron microscopy analysis. However, supervised learning has a core limitation:It requires a large amount of high-quality labeled training dataset, but this is not an easy task.On the one hand, generating simulated data requires deep domain knowledge; on the other hand, manually analyzing experimental data often requires significant time and computational resources. Furthermore, there may be differences between simulated data and real experimental environments, limiting the model's generalization ability.

In this context,A research team from Argonne National Laboratory of the U.S. Department of Energy has proposed DONUT (Diffraction with Optics for Nanobeam by Unsupervised Training), a nanobeam diffraction analysis method based on unsupervised training.This is a physically-aware neural network for rapid, automated nanobeam diffraction data analysis. This method overcomes the fundamental limitations of supervised machine learning methods in X-ray science applications by eliminating the need for labeled datasets or pre-trained models. Experimental results demonstrate that DONUT accurately extracts all features from the data, achieving an analysis efficiency more than 200 times higher than traditional fitting methods.

The related research findings, titled "DONUT: physics-aware machine learning for real-time X-ray nanodiffraction analysis," have been published in npj Computational Materials.

Research highlights:

* By directly embedding a differentiable geometric diffraction model into the network architecture, DONUT is able to learn and predict crystal lattice strain and orientation information in real time.

* DONUT can be trained entirely on experimental data, and its analysis speed is more than 200 times faster than traditional methods. It also separates the structural parameters of convolutions with higher accuracy.

The new framework provides a flexible and robust technical approach for real-time, automated analysis of SXDM data, and is expected to accelerate the exploration and research of complex material systems under dynamic conditions.

Paper address:
https://www.nature.com/articles/s41524-025-01860-7

This changes the traditional AI model training method that relies on manually labeled data.

One of DONUT's core innovations lies in changing the traditional AI model training method that relies on manually labeled data. However, for complex material systems, such labeled data is very limited. Therefore, DONUT adopts a physically constrained unsupervised learning approach, allowing the model to learn material structure information directly from diffraction data.

Simulated data

In the study, the research team first constructed a simulated diffraction dataset to validate the basic capabilities of the DONUT model. The simulation data covered three key structural parameters: lattice strain, in-plane rotation, and out-of-plane rotation.

The strain parameter ε is set to a range of -0.005 to 0.005;

The in-plane lattice rotation angle ω ranges from -0.05° to 0.05°.

The out-of-plane lattice rotation angle χ ranges from -0.1° to 0.1°.

Researchers generated 68,921 simulated diffraction images, each 64×64 pixels. Each simulated diffraction pattern was first scaled to match its intensity distribution to experimental measurements, and then sampled using a Poisson distribution to simulate noise levels in real-world experiments. The experimental dataset consisted of a single sample scan covering 165 × 165 locations on the sample. A 128 × 128 pixel region of interest (ROI) was selected on the detector and further downsampled to 64 × 64 pixels to improve the signal-to-noise ratio.

Experimental data

Experimental data were used to evaluate the performance of DONUT compared to current state-of-the-art traditional data analysis methods.

First, a region of interest (ROI) is selected in the detector image, ensuring that the region fully covers the measured diffraction peaks. Then, the pixels within the ROI are binned, where each 2 × 2 pixel array is aggregated into a single pixel value to improve the signal-to-noise ratio. Using a physically based forward scattering model, a simulated diffraction library covering the lattice parameter space is generated.

For each experimentally measured diffraction pattern, it is multiplied by each simulated pattern in the simulated diffraction pattern library to generate a series of correlation matrices. Subsequently, the correlation matrices are projected along each lattice parameter axis, and the highest correlation value for each parameter is obtained by weighted summation interpolation of the center of mass of the projection results.

The final dataset (simulated data, experimental data, or a combination of both) was randomly divided into: training set (80%), validation set (10%), and test set (10%).

Integrating physical laws from materials science directly into neural network structures

The DONUT architecture is built upon a physics-aware autoencoder. However, a significant challenge facing autoencoders is the interpretability of the latent space, as fully data-driven embedding representations may lack direct physical meaning. To address this issue,Researchers often introduce physical constraints into network architecture or loss functions.Examples include enforced symmetry, conservation laws, or domain-specific prior knowledge. DONUT employs a similar approach, with the overall process shown in the following diagram:


Schematic diagram of DONUT model architecture and self-supervised training process

The network takes a two-dimensional diffraction pattern as input. This image is first processed by a convolutional neural network (CNN) encoder (Figure b below), and compressed into a low-dimensional latent space vector. By design, this latent vector contains three elements, representing the physical quantities of interest: strain (ε, the relative magnitude of the momentum transfer vector Q), in-plane rotation (ω, the relative rotation angle of Q within the horizontal scattering plane), and out-of-plane rotation (χ, the relative rotation angle of Q perpendicular to the scattering plane). These three independent physical quantities influence the intensity distribution simulated based on the physical model, thus constraining the encoder to predict only physically meaningful values.

Schematic diagram of the structure of each layer of an autoencoder based on a convolutional neural network (CNN).

Then,The latent vector is simultaneously input into two parallel branches:

* A decoder branch symmetrical to the encoder structure, used to reconstruct a denoised version of the input diffraction intensity based on the latent vector;

* A forward model branch based on a physical model that uses latent parameters (ε, ω, and χ) to simulate diffraction intensity.

The network is trained by minimizing a composite loss function. This loss function is the weighted average absolute error (MAE) between the original input image and the outputs of the two branches, namely the decoder reconstruction result and the simulation result based on the physical model (the latter does not contain trainable parameters). During training, the network iteratively adjusts the autoencoder weights to gradually match the generated image with the input experimental data. This bi-objective optimization strategy ensures that the encoder can learn in the latent space and generate a physically accurate and robust numerical representation corresponding to the target structural parameters.

The complete DONUT model has three final outputs:

* Input the latent space tensor corresponding to the diffraction data, which includes information on strain, in-plane lattice rotation, and out-of-plane lattice rotation.

* The image reconstructed from the input image by the decoder (i.e., the denoised result of the input image).

* Simulated diffraction patterns generated based on physically constrained diffraction models

By embedding complete, differentiable physical processes into a neural network architecture, DONUT forces latent space variables to correspond to specific physical quantities, thereby ensuring that the model's predictions are not only computationally efficient but also scientifically interpretable.

DONUT analysis efficiency is significantly improved compared to traditional fitting methods.

To verify DONUT's actual capabilities, the research team tested it on both simulated and real experimental data, and compared the results with traditional correlation fitting methods and previously developed supervised deep learning models.

Performance on simulated data

The figure below shows a comparison between DONUT prediction results and traditional correlation fitting analysis methods:

Feature extraction of simulated scanning X-ray nanoprobe diffraction microscopy data was performed using traditional fitting methods and DONUT.

Figure b above shows that traditional analysis methods cannot completely and systematically distinguish between strain characteristics and in-plane lattice rotation characteristics. Specifically, the periodic structure of strain characteristics is clearly visible in the in-plane lattice rotation diagram (middle image), and vice versa, indicating a significant cross-coupling between the two types of structural information. In contrast, DONUT (Figure c above) can clearly separate the strain signal and the in-plane lattice rotation signal, and can accurately predict the strain amplitude, while traditional analysis methods overestimate the strain value.

Performance on experimental data

Next, the researchers evaluated DONUT using experimental SXDM data of SrIrO₃ thin films and compared its performance with traditional correlation fitting methods and a previously developed supervised deep learning model.

As shown in the figure below, the prediction results of DONUT (Figure b) are qualitatively consistent with the results of traditional analysis (Figure a), but achieve significant improvements. The key is that traditional methods suffer from obvious cross-interference artifacts—for example, rotational features appear incorrectly in the strain distribution map—while DONUT is able to clearly and independently separate different parameters.


Performance comparison of traditional fitting methods with DONUT on experimental data

Meanwhile, DONUT exhibits higher fidelity: it can resolve the fine fringe structure between two large rotating domains in the diffraction centroid spatial distribution map, something supervised methods cannot achieve. This result demonstrates that physically constrained unsupervised methods not only eliminate the need for labeled data but also achieve higher accuracy in feature extraction.

Researchers further expanded the analytical capabilities of SXDM, adding a film thickness prediction dimension to the existing strain and lattice rotation parameters. SXDM can detect the inhomogeneity of crystalline film thickness through changes in local total intensity and periodic variations in Laue oscillations (i.e., changes in the position of interference fringes in the detector coordinate system). The figure below shows DONUT's film thickness prediction results for simulated samples (left) and experimentally measured samples (right):

Contrast characteristics of SrIrO₃ 002pc diffraction peaks measured using scanning X-ray nanoprobe diffraction microscopy.

Unlike strain and lattice rotation analyses, the results of traditional film thickness analysis differ significantly from those inferred by neural networks (Figure a above, right side), and each method has its advantages. The correlation fitting results show that the film thickness distribution is highly uniform, consistent with the expectation of high-crystallinity films prepared using molecular beam epitaxy. However, this method significantly overestimates the film thickness, predicting a value of 136 Å, while the actual thickness is only 120 Å corresponding to 30 unit cells. In contrast, DONUT's prediction of the film thickness is more reasonable, averaging approximately 110 Å.

Although there is still some uncertainty in the prediction of film thickness, this result proves that the DONUT framework has the ability to be expanded and can achieve more material structure information prediction by adding potential spatial parameters.

Besides improved accuracy, DONUT's most significant advantage is its computational efficiency. Researchers' tests revealed that, under the same NVIDIA GeForce RTX 3090 GPU hardware conditions, traditional correlation fitting analysis methods require 5.6 ± 0.4 ms to process each frame of data, which is 64 × 64 pixels in single-precision floating-point format (32 bits). In contrast, the DONUT encoder completes one inference cycle in just 0.024 ± 0.001 ms, more than 230 times faster than traditional analysis methods under the same GPU hardware conditions. Its performance is comparable to the previously reported supervised deep learning method NanobeamNN (0.019 ± 0.001 ms).

Conclusion

DONUT is a physically-aware unsupervised deep learning framework for the rapid and accurate analysis of scanning X-ray nanodiffraction microscopy data. By directly integrating a differentiable geometric diffraction model into an autoencoder architecture, DONUT successfully achieves real-time extraction of crystal lattice strain and orientation information. Its analysis speed significantly surpasses traditional correlation fitting methods without requiring labeled training data. This method significantly lowers the technical barrier to achieving real-time feedback in complex nanodiffraction experiments, providing a new path to accelerate the understanding of fundamental material properties and potentially advancing research on nanoscale dynamic processes across various scientific fields.

Of course, DONUT currently focuses primarily on scanning X-ray nanodiffraction scenarios, and its application scope is limited by experimental geometry and model assumptions. For example, for X-ray ptychography tasks requiring higher spatial resolution, further development of a suitable physical AI framework is needed. However, from a broader perspective, DONUT demonstrates a representative path: the future development of scientific artificial intelligence is not necessarily about making models larger, but about enabling models to better understand scientific laws.

References:
https://www.nature.com/articles/s41524-025-01860-7
https://phys.org/news/2026-08-real-ray-analysis-donut-materials.html