Scientists at research facilities including the MARIA reflectometer at the Heinz Maier-Leibnitz Zentrum (MLZ) now have access to a new open-source tool designed to make machine-learning analysis of experimental data faster, more reproducible, and easier to share. The software, called VIPR, is a modular, plugin-based framework for data-driven inverse problem workflows, and it is described in a paper published in the journal SoftwareX. Rather than introducing a new machine-learning model, VIPR provides a standardized platform that connects existing models behind a common interface, both within automated data pipelines and through a shared user interface.
The problem VIPR addresses is familiar to experimentalists in materials science and particle physics. In scattering experiments such as neutron and X-ray reflectometry, detectors measure the intensity of a reflected beam, which corresponds to the squared magnitude of a complex wavefield. Because of this measurement principle, phase information is lost, and direct inversion of the measured intensity data is generally not possible without additional assumptions. Multiple sets of physical parameters can lead to an identical intensity measurement, a phenomenon known as the phase problem. This makes the mapping from measurement space to parameter space ambiguous, rendering the recovery of underlying physical parameters non-convex and ill-posed. Limited detector resolution or detector noise can compound the difficulty by causing further information loss.
Traditionally, researchers have tackled such problems through manual or iterative fitting-based reconstructions, which demand careful and time-consuming initialization by domain experts. Bayesian inference offers an alternative by combining the data with prior knowledge to estimate a full posterior distribution over the parameters rather than a single point estimate, but this makes the analysis even more computationally demanding. Either approach is often impractical in large-scale research facilities, where detectors can produce high-throughput data streams and in-situ analysis is required. Machine-learning-based inference capable of delivering rapid analysis and uncertainty quantification during measurements would be especially valuable in these scenarios.
Several established open-source packages already serve the reflectometry community. GenX employs the differential evolution algorithm to avoid local minima when fitting X-ray and neutron reflectivity data. Refl1D offers fitting via the Bayesian uncertainty analysis framework Bumps, which includes Markov chain Monte Carlo sampling to quantify parameter uncertainty and correlations. Refnx provides least-squares and MCMC-based fitting methods, and BornAgain supports simulation and fitting of reflectometry and related scattering data using analytical models and a range of numerical optimizers, including simulated annealing and genetic algorithms. Anaklasis focuses on parameter-uncertainty quantification via bootstrap analysis and MCMC sampling. While these tools are widely used and highly effective, the reconstruction process remains iterative and computationally expensive for large parameter spaces, and MCMC-based approaches are often not well suited to rapid analysis in high-throughput settings.
Machine-learning approaches have recently been applied to X-ray and neutron reflectometry, but such solutions often rely on project-specific code and analysis pipelines that are difficult to adapt, compare, and reproduce across research facilities. Applying a different method to the same experimental dataset typically requires substantial manual adaptation of complex pipelines. Simply sharing trained models is not sufficient either, because it does not capture important steps such as the preprocessing transformations needed for accurate parameter estimation. VIPR was built to close this gap: complete inference workflows, including data loading, preprocessing, model execution, and postprocessing, can be defined through YAML configuration files, so different methods can be applied to the same dataset without modifying the underlying code.
Architecturally, VIPR is built upon the Cement application framework and NF4IP and follows a layered microkernel design divided into two primary layers. The core, called vipr-core, provides the fundamental infrastructure: a command-line interface, API generation, configuration management, and orchestration of the inference pipeline through abstract handler base classes for data loading, model loading, and prediction, while containing no domain logic. Domain-specific functionality lives in external Python packages, such as vipr-reflectometry, that register handlers, filters, and hooks with the core. Filters are chainable functions that transform data passing through the pipeline, executed in a deterministic, weight-sorted order, while hooks are callbacks for non-transforming tasks such as logging, validation, or real-time visualization. A built-in HuggingFace plugin synchronizes required model artifacts, including configuration files and weights, into local model directories.
At the heart of the framework is a generic five-step inference pipeline: load data, load model, preprocess, predict, and postprocess. Data is standardized into a unified DataSet structure that supports single and multiple independent samples with a batch-first convention and extends naturally from one-dimensional spectral curves to higher-dimensional data such as images and three-dimensional volumes. Each pipeline step exposes seven extension points arranged symmetrically around the handler execution, which, combined with three workflow-level hooks, yields 38 extension points across the pipeline that plugins can use to insert domain-specific behavior. Plugins write result artifacts such as images, tables, and diagrams into a shared DataCollector, which is serialized to a uniquely addressed result directory upon pipeline completion. The development, training, and scientific validation of the underlying models remain outside the scope of the framework itself.
To demonstrate domain adaptation, the authors implemented a reflectometry plugin that maps the workflow to X-ray and neutron reflectometry. It supports column-based text files, including ORSO-compatible formats, and HDF5 files for batch processing. Three model families address different analysis needs: Reflectorch produces deterministic point estimates from a neural network that receives the reflectivity curve together with user-defined prior bounds, with optional polishing via least-squares optimization; normalizing-flow models generate posterior samples from learned conditional distributions, enabling uncertainty quantification and multimodal solution detection; and the PANPE model accepts user-specified prior bounds as network input at inference time, so a single trained model covers varying experimental constraints without retraining. In a demonstration on experimental neutron reflectometry data from the MARIA reflectometer, a pre-trained Neural Spline Flow model analyzed the spin-down reflectivity curve of a two-layer Pt/Fe film. Gaussian mixture clustering of the predicted posterior distribution over eight physical parameters revealed two well-separated modes, with 86 percent of samples corresponding to a thick first layer with a thinner second layer and 14 percent to the inverse configuration. Both parameter combinations produced good agreement with the measured curve, illustrating the ill-posed nature of the inverse problem, and the probabilistic approach achieved full posterior characterization in a single inference step.
The framework’s cross-domain flexibility was further demonstrated on simulated sensor data from a polymer electrolyte membrane fuel cell. A conditional invertible neural network infers probability distributions for nine PEMFC operating parameters from eleven measurable or derived input quantities, including voltage losses, maximum current densities, and mass flow rates. The fuel-cell plugin maps this problem to the same generic inference workflow without requiring modifications to the core, registering domain-specific handlers for sensor-data ingestion, model loading, and posterior sampling. Beyond the command line, VIPR ships as a containerized web application with a Nuxt.js frontend, a FastAPI backend, Redis as a message broker, and a Celery worker pool, so that long-running inference tasks such as generating thousands of posterior samples do not block the user interface. Automated unit, integration, and end-to-end tests run in GitLab CI pipelines, and the code is released under the GNU Lesser General Public License v3.0 or later, with a reproducible capsule available through RODARE.
According to the authors, VIPR is currently deployed at the MARIA reflectometer at MLZ, where it provides fast data analysis with uncertainty estimation and near real-time parameter inference. Because probabilistic generative models such as normalizing flows can recover full posterior parameter distributions within seconds, whereas traditional MCMC-based approaches would require significant computation time, the framework is positioned for high-throughput experiments and in-situ measurements at modern X-ray and neutron facilities. The command-line interface enables automated execution within post-processing scripts triggered upon measurement completion, while the web application serves as an interactive environment for configuring and validating inference pipelines. By making the entire pipeline of preprocessing, model selection, prediction, and result generation portable in a single YAML configuration file, VIPR aims to let researchers reproduce analyses across different computing environments simply by sharing configuration files, and the team plans to expand the range of domain-specific plugins to support further inverse-problem applications.
Subject of Research: A modular software framework for machine-learning-based inference on scientific inverse problems such as X-ray and neutron reflectometry
Article Title: VIPR: Versatile inverse problem software framework
Article References: Rustamov, J., Creutzburg, S., Bornschein, J., Bussmann, M., Ganeva, M., Gerlach, A., Häusler, S., Helm, B., Hinderhofer, A., Juzak, R., Koutsioubas, A., Löser, R., Munteanu, V., Pandit, V., Schramm, U., Schreiber, F., Mothes, N., & Kelling, J. (2026). VIPR: Versatile inverse problem software framework. SoftwareX, 36, Article 103163. https://doi.org/10.1016/j.softx.2026.103163
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103163
Keywords: VIPR, inverse problems, machine learning, X-ray reflectometry, neutron reflectometry, uncertainty quantification, normalizing flows, Bayesian inference, open-source software, reproducibility, MARIA reflectometer, fuel cells
Cite Scienmag News
Teresa Odom. (October 29, 2026). VIPR Software Framework Brings Machine Learning to Scientific Inverse Problems. Scienmag. https://scienmag.com/vipr-software-framework-brings-machine-learning-to-scientific-inverse-problems/
Teresa Odom. "VIPR Software Framework Brings Machine Learning to Scientific Inverse Problems." Scienmag, 29 October 2026, https://scienmag.com/vipr-software-framework-brings-machine-learning-to-scientific-inverse-problems/. Accessed 30 October 2026.
Teresa Odom. "VIPR Software Framework Brings Machine Learning to Scientific Inverse Problems." Scienmag. October 29, 2026. https://scienmag.com/vipr-software-framework-brings-machine-learning-to-scientific-inverse-problems/








