Compositional neural networks for multimodal X-ray and neutron scattering inversion
Authors: Valentin Munteanu, Alexander Hinderhofer, Dmitry Lapkin, Vladimir Starostin, Frank Schreiber
Organizations: Institute of Applied Physics, University of Tübingen, Auf der Morgenstelle 10, 72076 Tübingen, Germany · Cluster of Excellence ”Machine Learning” - new perspectives for science, University of Tübingen, Germany
X-ray and neutron scattering are indispensable for structural characterization across condensed-matter physics and materials science. Yet, because scattering experiments generally record intensities without phase information, distinct structures can yield similar scattering patterns, rendering the corresponding inverse problems non-unique. This ambiguity can be reduced by combining complementary measurements, but their integration into machine-learning frameworks remains challenging. Here we introduce a modular framework for probabilistic multi-measurement analysis based on prior-amortized flow matching. Single-observation posterior estimators are trained separately for individual observation types or physical probes and combined only at inference time through a compositional sampler. This late fusion approach allows pretrained single-observation models to be reused without dedicated joint retraining. As a case in point, we consider reflectometry, which provides depth-resolved, nanometer-scale information about thin films and interfaces. Our single-observation demonstrations span X-ray, time-of-flight neutron and polarized neutron reflectometry. In separate co-refinement studies, task-matched estimators enable homogeneous composition across multiple neutron contrasts and heterogeneous multimodal composition of X-ray and neutron measurements. Together, these results establish compositional flow matching as a modular approach to uncertainty-aware inversion and co-refinement, with potential applicability to other scattering problems in which multiple observations constrain a common physical structure while retaining measurement-specific parameters.
Figures & tables
Figure 1: Prior-amortized flow matching posterior estimation and compositional co-refinement for reflectometry. (a) Schematic X-ray reflectometry (XRR) geometry. The reflectivity RXRR is measured by varying the incident angle αi at fixed wavelength λ , giving access to RXRR(q(αi,λ)) . (b) Schematic time-of-flight neutron reflectometry (TOF-NR) geometry. The incident angle is fixed, while the wavelength dependence is resolved from neutron time of flight, giving RNR(q(αi,λ)) . (c) Compositional flow matching posterior estimation. Each observation yj , together with the corresponding prior bounds bj , defines a conditioning context Cj . A single-observation flow matching model maps the relevant latent coordinates Θt(j)=(θtsh,θj,tloc) to a local vector-field contribution. The local contributions are embedded into a common shared/local parameter space, combined into a composed vector field, and integrated from a normal base distribution to obtain samples from the joint posterior over the global parameter vector Θ=(θsh,θ1loc,…,θnloc) . (d) Schematic two-dimensional posterior representation for parameters θi and θj . The dashed lines indicate the user-supplied prior bounds, and the blue region denotes posterior density retained within the selected bounded parameter domain. Grey regions indicate density outside the selected bounds that is excluded by the bounded prior. (e) Posterior parameter samples can be propagated through the physical sample parameterization to obtain depth-dependent SLD profiles. In multimodal XRR/NR co-refinement, shared structural parameters determine the common layer geometry, while probe-specific local parameters determine the electronic SLD profile ρe(z) and the nuclear SLD profile ρn(z) .
Figure 2: Single-curve posterior inference for XRR, TOF-NR and polymer-brush NR data. (a) Experimental XRR curve for a one-layer PTCDI-C 3 film on a Si substrate, shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. (b) SLD profiles for the PTCDI-C 3 film reconstructed from the FMPE-MCMC posterior. (c) Experimental TOF-NR curve for a two-layer PS:Bis-PCBM/Bis-PCBM structure on Si, with data from Ref. [ 31 ] , shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. (d) SLD profiles reconstructed from the FMPE-MCMC posterior for the TOF-NR data. (e) Experimental NR curve for the polymer-brush structure, with data from Ref. [ 37 ] , shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. (f) Solvent volume-fraction profiles reconstructed from the FMPE-MCMC posterior for the polymer-brush structure.
Figure 3: Multichannel posterior inference for full spin-resolved PNR and compositional co-refinement of multiple-contrast NR data. (a) Synthetic full spin-resolved PNR data, shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. The curves corresponding to different spin channels are shifted vertically for clarity. (b) Nuclear and magnetic SLD profiles reconstructed from the FMPE-MCMC posterior. (c) Magnetization-angle profiles reconstructed from the FMPE-MCMC posterior. (d) Experimental NR curves corresponding to three solvent contrasts, D 2 O, H 2 O and CM, with data from Ref. [ 55 ] , shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. The curves are shifted vertically for clarity. (e) SLD profiles for the three solvent contrasts reconstructed from the FMPE-MCMC posterior.
Figure 4: Multimodal compositional co-refinement of XRR and PNR data. (a) Experimental XRR and PNR data for the Pt/Fe structure, with data from Ref. [ 37 ] , shown together with posterior-predictive simulations generated from FMPE-MCMC posterior samples. (b) Reconstructed real and imaginary electronic SLD profiles. (c) Reconstructed nuclear and magnetic SLD profiles.
Figure 5: Neural network architecture. The reflectivity data is first mapped to a fixed-dimensional representation by an embedding network. This embedding is processed by a residual MLP with GELU activations and layer-normalized residual blocks. Conditioning is applied through FiLM layers using t , θt , the prior bounds b , and optional auxiliary variables η . For the neutron-reflectometry models considered here, η includes the linear smearing coefficient dq/q . The network outputs the conditional vector field v(θt,t;C) .
Figure 6: Experimental XRR data for a one-layer PTCDI-C 3 film on a Si substrate are shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 7: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the XRR data of the PTCDI-C 3 film. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise layer thicknesses di , interfacial roughnesses σi , SLDs ρi , the q -shift offset qsh and the reflectivity scale factor rsc . Units: di and σi are in A˚ , ρi in 10−6A˚−2 , qsh in A˚−1 , and rsc is dimensionless. The subscript B denotes the backing medium. The plot ranges correspond to the prior bounds.
Figure 8: Experimental XRR data for a one-layer C 60 film on a Si substrate are shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 9: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the XRR data of the C 60 film. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise layer thicknesses di , interfacial roughnesses σi , SLDs ρi , the q -shift offset qsh and the reflectivity scale factor rsc . Units: di and σi are in A˚ , ρi in 10−6A˚−2 , qsh in A˚−1 , and rsc is dimensionless. The subscript B denotes the backing medium. The plot ranges correspond to the prior bounds.
Figure 10: Experimental TOF-NR data for the PS:Bis-PCBM/Bis-PCBM structure, shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 11: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the NR data from the time-of-flight reflectometer. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise layer thicknesses di , interfacial roughnesses σi , SLDs ρi , the reflectivity scale factor rsc and the log10 background. Units: di and σi are in A˚ , ρi in 10−6A˚−2 , while rsc and the log10 background are dimensionless. The subscript B denotes the backing medium. The plot ranges correspond to the prior bounds.
Figure 12: Experimental NR data for the polymer-brush structure, shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 13: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the NR data of the polymer-brush structure (data sourced from [ 37 ] ). Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the polymer volume fraction at the grafting interface ϕ0 , the length of the brush L , the polymer-brush exponent n , the thickness of the reactive layer drl , the SLD of the polymer ρpol , the roughness of the substrate σsub and the roughness of the reactive layer σrl . Units: L , drl , σsub and σrl are in A˚ , ρpol is in 10−6A˚−2 , and ϕ0 and n are dimensionless. The plot ranges correspond to the prior bounds.
Figure 14: Synthetic full spin-resolved PNR data, shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 15: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the synthetic full spin-resolved PNR data. The displayed parameters comprise layer thicknesses di , nuclear SLDs ρin , magnetic SLDs ρim and magnetization angles ψim . Units: di are in A˚ , ρin and ρim are in 10−6A˚−2 , and ψim is in degrees. The subscript B denotes the backing medium. The plot ranges correspond to the prior bounds.
Figure 16: Experimental NR data corresponding to three solvent contrasts (D 2 O, H 2 O and CM), shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 17: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the three-contrast NR data. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the layer thicknesses di , the SLD of the polymer ρ2 without the solvent, the solvent volume fraction in the polymer layer ϕ2solv and the reflectivity scale factors rsc and log10 backgrounds for each curve. Units: di are in A˚ , ρ2 is in 10−6A˚−2 , and ϕ2solv , rsc and the log10 backgrounds are dimensionless. The plot ranges correspond to the prior bounds.
Figure 18: Experimental XRR and PNR data for the Pt/Fe structure, shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 19: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the Pt/Fe structure. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the layer thicknesses di , interfacial roughnesses σi , the reflectivity scale factors rsc , the log10 backgrounds and, for PNR, the mixing coefficient α . Units: di and σi are in A˚ , while rsc , the log10 backgrounds and α are dimensionless. The plot ranges correspond to the prior bounds.
Figure 20: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior, in the case of an alternative inference where the SLDs are not fixed, for the Pt/Fe structure. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the layer thicknesses di , interfacial roughnesses σi , real electronic SLDs, imaginary electronic SLDs, nuclear SLDs, magnetic SLDs, reflectivity scale factors rsc , log10 backgrounds and, for PNR, the mixing coefficient α . Units: di and σi are in A˚ , all SLDs are in 10−6A˚−2 , while rsc , the log10 backgrounds and α are dimensionless. The plot ranges correspond to the prior bounds.
Figure 21: Experimental XRR and PNR data for the Pt/Co structure, shown together with posterior-predictive simulations generated from parameter samples. (a) Posterior-predictive curves obtained directly from the raw FMPE posterior. (b) Posterior-predictive curves obtained after FMPE-initialized MCMC refinement.
Figure 22: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior inferred for the Pt/Co structure. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the layer thicknesses di , interfacial roughnesses σi , the magnetic SLD of the Co layer ρ2m , the reflectivity scale factors rsc , the log10 backgrounds and, for PNR, the mixing coefficient α . Units: di and σi are in A˚ , ρ2m is in 10−6A˚−2 , while rsc , the log10 backgrounds and α are dimensionless. The plot ranges correspond to the prior bounds.
Figure 23: Corner plot of the raw FMPE (green) and FMPE-MCMC (red) posterior, in the case of an alternative inference where the SLDs are not fixed, for the Pt/Co structure. Filled contours show the 68% and 95% credible regions. The displayed parameters comprise the layer thicknesses di , interfacial roughnesses σi , real electronic SLDs, imaginary electronic SLDs, nuclear SLDs, magnetic SLDs, reflectivity scale factors rsc , log10 backgrounds and, for PNR, the mixing coefficient α . Units: di and σi are in A˚ , all SLDs are in 10−6A˚−2 , while rsc , the log10 backgrounds and α are dimensionless. The plot ranges correspond to the prior bounds.
Parameter type
Training range
Physical unit
Thickness
[0,500]
Å
Roughnesses
[0,60]
Å
SLDs
[0,50]
10 -6 Å -2
q-shift
[−0.002,0.002]
Å -1
Intensity scale
[0.9,1.1]
-
Table 1: Training ranges for the XRR model with standard slab parameterization
Parameter type
Training range
Physical unit
Thicknesses
[0,1500]
Å
Roughnesses
[0,60]
Å
SLDs
[−8,16]
10 -6 Å -2
Intensity scale
[0.9,1.1]
-
Background ( log10 )
[−10,−4]
-
Table 2: Training ranges for the NR model with standard slab parameterization
Parameter type
Training range
Physical unit
Thicknesses
[0,500]
Å
Roughnesses
[0,60]
Å
SLDs
[−8,16]
10 -6 Å -2
Solvent volume fractions
[0,1]
-
Intensity scale
[0.9,1.1]
-
Background ( log10 )
[−10,−4]
-
Table 3: Training ranges for the NR model with parameterization incorporating solvent penetration
Parameter type
Training range
Physical unit
Thicknesses
[1,500]
Å
Roughnesses
[0,20]
Å
Re. SLDs
[0,150]
10 -6 Å -2
Im. SLDs
[0,30]
10 -6 Å -2
Intensity scale
[0.8,1.2]
-
Background ( log10 )
[−10,−4]
-
Table 4: Training ranges for the XRR model with absorption parameterization
Parameter type
Training range
Physical unit
Thicknesses
[1,500]
Å
Roughnesses
[0,20]
Å
Nuclear SLDs
[0,10]
10 -6 Å -2
Magnetic SLDs
[0,10]
10 -6 Å -2
Channel mixing factor
[0,0.2]
-
Intensity scale
[0.9,1.1]
-
Table 5: Training ranges for the non–spin-flip PNR model
Parameter type
Training range
Physical unit
Thicknesses
[1,500]
Å
Nuclear SLDs
[0,10]
10 -6 Å -2
Magnetic SLDs
[0,10]
10 -6 Å -2
Magnetization angles
[0,180]
degrees
Table 6: Training ranges for the full spin-resolved PNR model
Figure 24: Relation between the real and imaginary SLD components for different elements in the periodic table and different X-ray beam energies computed using the periodictable package. The dashed line indicates the threshold used to restrict the training distribution of absorption parameters.
Scanning probe microscopy provides nanoscale access to structural, electrical, electromechanical, magnetic, and mechanical properties of materials. Its increasing use for wafer-scale characterization and combinatorial materials exploration creates a need to distribute measurements efficiently across large spatial domains. This is particularly important when available modalities differ in acquisition time and potential for tip and sample damage, making exhaustive multimodal mapping over spatial grids impractical. Here, we demonstrate multitask scanning probe microscopy, a live, closed-loop workflow in which a multitask Gaussian process learns spatial and cross-modal relationships and autonomously selects both the next measurement location and the next experimental protocol. The approach is implemented on an automated large-sample atomic force microscope and demonstrated on a composition-spread AlScN wafer using tapping-mode and Dual AC Resonance Tracking (DART) measurements. Paired initial measurements establish the relation between the tasks, after which noncoincident measurements are used to update both response landscapes. The resulting workflow extends active learning in scanning probe microscopy from spatial sampling to autonomous allocation of measurement modalities and provides a basis for combining rapid, weakly perturbative imaging with slower contact, electrical, electromechanical, magnetic, or spectroscopic measurements.
Aditya Raghavan, Yu Liu, Ian Mercer +2
University of Tennessee, Knoxville, TN, USA · 2Pennsylvania State University, University Park, PA, USA
Designing an effective electromagnetic inverse-scattering solver requires faithful enforcement of nonlinear full-wave physics together with an expressive prior on the unknown permittivity contrast. We propose ScoreField, a neural inverse scattering framework that integrates coupled implicit neural representations (INRs) with a pretrained score-based generative prior. ScoreField employs two INRs to parameterize the permittivity contrast and the induced current fields, and jointly optimize them under the Lippmann-Schwinger equations. In addition to the implicit regularization by the INR architecture, the score model provides a learned prior gradient on the contrast, which is propagated to the contrast INR through the chain rule. This formulation enables ScoreField to effectively handle strong multiple scattering, where nonlinear wave interactions require accurate modeling of the coupled full-wave physics. We evaluate ScoreField on simulated weak- and strong-scattering benchmarks, the canonical Austria phantom, and experimental Fresnel measurements. We note that ScoreField significantly improves reconstruction fidelity and suppresses artifacts relative to classical full-wave methods and deep learning baselines, achieving an average PSNR improvement of 1.8dB over the best competing method on real Fresnel data.
Wenhan Guo, Yuan Gao, Yu Sun
Hopkins Computational Imaging Group · Johns Hopkins University
Many dielectric targets encountered in 3-D electromagnetic inverse scattering exhibit piecewise-homogeneous material distributions, which provide useful structural information for inversion. To exploit this property, this paper proposes a structured multi-level-set inversion (SMLSI) method within a physics-driven neural network (PDNN) framework. Instead of directly parameterizing the contrast distribution, SMLSI represents it in terms of object support and material distribution. Multiple level-sets are mapped to soft-support functions and combined through a soft-union operation to construct the object support. The normalized contributions of these soft-support functions, together with trainable complex relative permittivities, determine the material distribution within the support. The level-set residuals are parameterized by a coordinate-based neural network, and the trainable parameters are optimized from scattered field data. Structure-aware regularization terms are introduced to promote binary object support and spatially coherent material regions while reducing material mixing and redundant activation of level-set supports. Adaptive regularization weighting is further employed to reduce the dependence on manual parameter tuning. Numerical experiments demonstrate that SMLSI improves reconstruction accuracy over direct contrast parameterization and enables the recovery of irregular 3-D geometries, closely spaced objects, and multiple material regions. Compared with CSI and L2/3-FBE-WCIE, SMLSI achieves more accurate reconstructions on representative synthetic targets. Experimental validation using 3-D Fresnel data further demonstrates its applicability to measured scattering data.
Yutong Du, Zicheng Liu, Bo Qi +3
Department of Electronic Engineering, School of Electronics and Information, Northwestern Polytechnical University, Xi’an 710029, China