Neural network analysis of neutron and X-ray reflectivity data: automated analysis using mlreflect, experimental errors and feature engineering

J Appl Crystallogr. 2022 Apr 2;55(Pt 2):362-369. doi: 10.1107/S1600576722002230. eCollection 2022 Apr 1.

Abstract

The Python package mlreflect is demonstrated, which implements an optimized pipeline for the automated analysis of reflectometry data using machine learning. The package combines several training and data treatment techniques discussed in previous publications. The predictions made by the neural network are accurate and robust enough to serve as good starting parameters for an optional subsequent least-mean-squares (LMS) fit of the data. For a large data set of 242 reflectivity curves of various thin films on silicon substrates, the pipeline reliably finds an LMS minimum very close to a fit produced by a human researcher with the application of physical knowledge and carefully chosen boundary conditions. The differences between simulated and experimental data and their implications for the training and performance of neural networks are discussed. The experimental test set is used to determine the optimal noise level during training. The extremely fast prediction times of the neural network are leveraged to compensate for systematic errors by sampling slight variations in the data.

Keywords: Python; data analysis; machine learning; reflectometry.

Grants and funding

Funding for this research was provided by Bundesministerium für Bildung und Forschung (grant No. 05K19VTC) and Deutsche Forschungsgemeinschaft (grant No. SCHR700/20-2) through the Cluster of Excellence ‘Machine Learning – New Perspectives for Science’. FS is a member of the Machine Learning Cluster of Excellence, funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy – EXC No. 2064/1– Project No. 390727645.