An Active Learning-Based Streaming Pipeline for Reduced Data Training of Structure Finding Models in Neutron Diffractometry

Tianle Wang, Jorge Ramirez, Cristina García–Cardona, Thomas Proffen, Shantenu Jha, Sudip K. Seal

Abstract

Structure determination workloads in neutron diffractometry are computationally expensive and routinely require several hours to many days to determine the structure of a material from its neutron diffraction patterns. The potential for machine learning models trained on simulated neutron scattering patterns to significantly speed up these tasks have been reported recently. However, the amount of simulated data needed to train these models grows exponentially with the number of structural parameters to be predicted and poses a significant computational challenge. To overcome this challenge, we introduce a novel batch-mode active learning (AL) policy that uses uncertainty sampling to simulate training data drawn from a probability distribution that prefers labelled examples about which the model is least certain. We confirm its efficacy in training the same models with ∼ 75% less training data while improving the accuracy. We then discuss the design of an efficient stream-based training workflow that uses this AL policy and present a performance study on two heterogeneous platforms to demonstrate that, compared with a conventional training workflow, the streaming workflow delivers ∼ 20% shorter training time without any loss of accuracy.

Introduction

Determining the crystal structure of a material—the specific arrangement of its atoms—is a cornerstone of materials science. Traditionally, this is achieved through neutron diffractometry, where a sample is bombarded with neutrons to produce a "Bragg profile" scattering pattern. Analyzing these patterns typically involves iterative "loop refinement," a manual and computationally intensive process that can span days.

While Machine Learning (ML) models can predict structural parameters almost instantaneously, training them requires vast amounts of simulated data. As crystal complexity increases, the data requirements grow exponentially, creating a massive computational bottleneck in the simulation phase. This paper introduces a streaming active learning pipeline designed to mitigate this bottleneck.

Methodology

To address these challenges, the researchers introduced two primary innovations: a data-efficient selection policy and a high-performance streaming architecture.

Active Learning with Uncertainty Sampling

Instead of generating a massive uniform dataset, the system employs an Active Learning (AL) policy. It begins with a small initial training batch. Using heteroscedastic uncertainty estimation, the model predicts both a structural value and its own confidence level. The system then identifies regions of high uncertainty and directs the physics engine (GSAS-II) to simulate new data specifically in those "confusing" areas.

The Streaming Pipeline

Conventional ML workflows are often serial: data is simulated on CPUs, then training occurs on GPUs. This leads to significant hardware idle time. The proposed pseudo-streaming workflow overlaps these operations. While the GPU trains on data from the current phase, the CPUs simultaneously simulate the most informative examples for the next phase based on the model's current uncertainty.

The pseudo-streaming workflow overlaps simulation (S) and training (T) phases to maximize hardware utilization.

To further optimize performance on supercomputers like Polaris and Perlmutter, the team implemented NUMA-aware orchestration, ensuring efficient data movement between CPU cores and GPUs.

Key Results

The study, focused on Barium Titanate across various symmetry classes (Cubic, Trigonal, and Tetragonal), yielded significant improvements in both efficiency and accuracy.

Data and Time Efficiency

The AL policy demonstrated a "less is more" effect, achieving target accuracy with approximately 75% less training data than traditional bulk methods. Furthermore, the streaming workflow reduced total wall-clock training time by ~20% by eliminating idle periods between simulation and training.

Active Learning (AL) achieves lower error (L2-difference) with significantly fewer samples compared to traditional bulk training.

Scalability and Accuracy

The pipeline showed strong scaling across multiple GPU ranks on leading HPC platforms. Notably, AL-trained models often outperformed baseline models. By focusing on difficult edge cases, the models developed a more robust understanding of the physical parameter space, as evidenced by the lower error bands achieved in later phases of the active learning process.

Conclusion and Future Work

This research demonstrates that optimizing the data pipeline is as critical as the model architecture itself for scientific ML. By treating the supercomputer as a continuous assembly line, the researchers successfully mitigated the simulation bottleneck. Future work will expand this approach to more complex crystallographic systems, such as monoclinic and triclinic structures, and explore its application in X-ray diffractometry and other inverse problems in physics.

Reference: Wang, T., et al. "An Active Learning-Based Streaming Pipeline for Reduced Data Training of Structure Finding Models in Neutron Diffractometry." arXiv:2506.11100v1 [cs.LG].

Summary updated

Abstract

Structure determination workloads in neutron diffractometry are computationally expensive and routinely require several hours to many days to determine the structure of a material from its neutron diffraction patterns. The potential for machine learning models trained on simulated neutron scattering patterns to significantly speed up these tasks have been reported recently. However, the amount of simulated data needed to train these models grows exponentially with the number of structural parameters to be predicted and poses a significant computational challenge. To overcome this challenge, we introduce a novel batch-mode active learning (AL) policy that uses uncertainty sampling to simulate training data drawn from a probability distribution that prefers labelled examples about which the model is least certain. We confirm its efficacy in training the same models with ∼ 75% less training data while improving the accuracy. We then discuss the design of an efficient stream-based training workflow that uses this AL policy and present a performance study on two heterogeneous platforms to demonstrate that, compared with a conventional training workflow, the streaming workflow delivers ∼ 20% shorter training time without any loss of accuracy.
BibTeX
@misc{wang2024active,
  author = {Tianle Wang and Jorge Ramirez and Cristina García–Cardona and Thomas Proffen and Shantenu Jha and Sudip K. Seal},
  title = {{An Active Learning-Based Streaming Pipeline for Reduced Data Training of Structure Finding Models in Neutron Diffractometry}},
  year = {2024},
  eprint = {2506.11100},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.11100},
}
Figure