Neutron Reflectometry by Gradient Descent
Max D. Champneys, Andrew J. Parnell, Philipp Gutfreund, Maximilian W. A. Skoda, . Patrick A. Fairclough, Timothy J. Rogers, Stephanie L. Burg
TL;DR
Neutron reflectometry data analysis suffers from an ill-posed inverse problem: the measured reflectivity $R(Q)$ depends on a forward model $\hat{R}(Q,\theta)$ with unknown slab and instrument parameters $\theta$. The authors introduce gradient-based inversion by leveraging automatic differentiation to obtain exact gradients $\nabla_{\theta} e(R,\hat{R})$, enabling both gradient-based optimisation and Bayesian inference. They demonstrate two case studies—the crystalline quartz benchmark and a four-device OLED multilayer system—showing state-of-the-art performance and robust uncertainty quantification, and they release an open-source library refjax for differentiable forward reflectivity calculations. Collectively, the work delivers faster, uncertainty-aware NR analysis and a framework that can extend to other indirect measurement techniques, with potential for real-time and high-throughput applications.
Abstract
Neutron reflectometry (NR) is a powerful technique to probe surfaces and interfaces. NR is inherently an indirect measurement technique, access to the physical quantities of interest (layer thickness, scattering length density, roughness), necessitate the solution of an inverse modelling problem, that is inefficient for large amounts of data or complex multiplayer structures (e.g. lithium batteries / electrodes). Recently, surrogate machine learning models have been proposed as an alternative to existing optimisation routines. Although such approaches have been successful, physical intuition is lost when replacing governing equations with fast neural networks. Instead, we propose a novel and efficient approach; to optimise reflectivity data analysis by performing gradient descent on the forward reflection model itself. Herein, automatic differentiation techniques are used to evaluate exact gradients of the error function with respect to the parameters of interest. Access to these quantities enables users of neutron reflectometry to harness a host of powerful modern optimisation and inference techniques that remain thus far unexploited in the context of neutron reflectometry. This paper presents two benchmark case studies; demonstrating state-of-the-art performance on a thick oxide quartz film, and robust co-fitting performance in the high complexity regime of organic LED multilayer devices. Additionally, we provide an open-source library of differentiable reflectometry kernels in the python programming language so that gradient based approaches can readily be applied to other NR datasets.
