Abstract
Small-angle X-ray scattering (SAXS) is a powerful analytical technique for probing dynamic size evolution and structural heterogeneity of nanomaterials (NMs). The increasing demand for high-throughput analysis has motivated the development of automated pipelines for efficient SAXS data processing. Here, we present RgFormer, a physics-aware hybrid machine learning framework that integrates convolutional neural network (CNN) and transformer architectures for automated and accurate prediction of the radius of gyration (Rg) directly from SAXS profiles. By combining local feature extraction with global context modeling across the full q-range, RgFormer achieves a low loss, root mean squared error (RMSE), mean absolute error (MAE), and mean relative error (MRE) and a high R2 on the training set and validation set. The method is intended for profiles whose measured low-q region supports Guinier analysis. Agreement with conventional fitting does not, by itself, establish that the predicted Rg represents the overall size of a heterogeneous or multiscale system. We further adopt interpretable attention maps and feature visualizations to examine the model’s decision-making process, which demonstrates qualitative consistency with fundamental SAXS principles. RgFormer also exhibits outstanding computational efficiency, delivering over 20,700 predictions per second with sub-millisecond latency, outperforming the frame rate of modern SAXS detectors. Compared with established automated Guinier analysis tools, our approach provides a high-speed alternative for Rg estimation. Overall, RgFormer provides rapid prediction of Guinier-derived Rg from SAXS profiles within established applicability conditions, while assessment of those conditions remains external to the model.
Funding Information
  • National Key Research and Development Program of China Stem Cell and Translational Research (2022YFA1207600)
  • National Key Research and Development Program of China Stem Cell and Translational Research (2022YFA1603802)
  • Beijing Municipal Natural Science Foundation (Z230008)
  • National Natural Science Foundation of China (NSFC) (12275300)
  • National Natural Science Foundation of China (NSFC) (12275302)
  • National Natural Science Foundation of China (NSFC) (12535020)
  • Institute of High Energy Physics (E4545CU2)

This publication has 36 references indexed in Scilit: