arXiv:2610.29821cs.SEOct 2026

Manuscript Offprint

arXiv:2610.29821

Controlling Variability in~Neuroimaging Analysis Pipelines with~Software Product Lines

Gauthier Le Bartz Lyan, Paul Temple, Boris Clenet, Mathieu Acher

Gauthier LE BARTZ LYAN 1^{1}[0000-0003-4711-6636], Paul TEMPLE 1^{1}[0000-0002-8276-0593], Boris CLENET 1^{1}[0009-0006-7727-5100], and Mathieu ACHER 1^{1}[0000-0003-1483-3858]

Univ Rennes, Inria, CNRS, IRISA

Abstract. Magnetic resonance imaging (MRI) is an acquisition technique used for medical diagnosis. It is notably used for structural and functional MRI (or fMRI) image analysis. MRI data is known to be complex and noisy, so pipelines are created to extract and enhance relevant information in retrieved images. The NARPS study highlighted the significant variability that can emerge from different pipelines set up by independent teams while trying to answer the same research question about brain functioning. Having different implementations realizing the same task is a typical playground for software product lines (SPLs), which may be out of the sight of neuroimage practitioners. Thus, proposing an SPL out of these different pipelines falls back on a typical reverse-engineering problem with its usual difficulties. In this document, we advocate for the conceptual adoption of SPL principles as a promising direction to improve reproducibility and consistency in neuroimaging research.

Keywords: fMRI, Medical Imaging, Variability, Reproducibility, Software Product Line, Software Engineering

1 Introduction

Magnetic Resonance Imaging (MRI), a non-invasive medical imaging technique, has highly improved medical diagnosis as a complement to X-ray and other kinds of analyses. MRI is used mostly for two types of brain studies: structural analysis and functional analysis. Structural analysis involves combining images from one or multiple subjects to highlight specific anatomical regions of the brain. Functional analysis, on the other hand, aggregates brain images over time, introducing a temporal dimension. This allows researchers to identify regions of the brain that become active (or inactive) in response to specific events. For example, functional MRI (fMRI) can reveal what happens in the brain when a human subject is asked to answer a question or move a part of their body. Despite many advantages, MRI data present significant challenges in terms of analysis and interpretation. A variety of noise sources can compromise data quality, including biological variability (such as differences in brain structure between individuals), subject movement during acquisition, and technical artifacts arising from image processing, such as interpolation or rescaling.

G. LE BARTZ LYAN et. al

To extract meaningful signals from complex MRI data and minimize noise, neuroscientists rely on software suites that assemble different components that we call pipelines. However, no formal conventions exist to describe these pipelines, despite initiatives like COBIDAS [14] that are promoting standardized best practices for analysis. The NARPS study conducted by Botvinik-Nezer et al. [3] investigated how different research teams process a single fMRI dataset in response to a set of closed binary research questions (i.e., with possible answers being only 'yes' or 'no'). The pipelines were unconstrained, letting research teams use their usual software suites and create the pipeline they want. The NARPS study revealed that even when using the same data and hypotheses, widely used software tools can produce non-consistent results. This means that, when aggregating the different results to answer the research questions, observations could lead to half the research teams answering 'yes' while the other half would answer 'no'. These concerns were later reinforced by Bowring et al. [4].

In a similar vein, Germani [8] examined the analytical variability arising from different processing methods and proposed several improvements to enhance the validity of neuroimaging studies. Vila et al. [17] demonstrated that variations in computing hardware can significantly affect the output of neuroimaging pipelines, showing that the same analysis can yield different results when run on different systems. Chatelain et al. [5] investigated numerical variability in FMRIPrep [7,6], a widely used data preprocessing framework, and showed that changes in its configuration can alter the final preprocessed images. Finally, Sokolowski et al. [16] explored how software versioning impacts brain structural analysis. They revealed that different versions of the same software can produce statistically significant discrepancies in the results.

Figure

Fig. 1: Different sources of variability in neuroimaging studies as shown by Germani [8], Licensed under CC BY 4.0

With so many layers of variability as shown in Figure 1, it is essential to understand what happens in each of them. To achieve this, establishing a mapping of the impact of each layer is a necessary first step. This requires the ability to explore every layer using appropriate protocols and tools. In particular, the layer representing the ability to choose between different software is one of the most challenging. These software have no codebase in common or do not neces-sarily share coding conventions, thus reasoning and associating the realization of different functionalities is difficult. In addition, once the association is done, comparing the same functionality in different software requires numerous dedicated pipelines, extensive runs, and the generation of large volumes of data.

In this paper, we demonstrate that NARPS Open Pipelines, an open source pipeline suite, exhibits SPL-like characteristics and supports a structured variability analysis. While we do not formally define the SPL architecture, our observations suggest shared components, variation points, and modular structure, key hallmarks of SPLs. We share our experience in trying to replicate pipelines from NARPS and exhibit the challenges we faced that could be alleviated by moving to a SPL structure. We also propose discussions about the specificities of SPL in the current neuro-imaging world. Furthermore, neuro-imaging could be a playground to further push the exploration of layers of variability as proposed by Lesoil [11].

The rest of the paper is structured as follows: first, we explain how neuroimaging pipelines are designed and highlight the room for variability management in Section 2. Then, Section 3 reports our experience in replicating some of the pipelines from the NARPS study and the challenges we have faced. Section 4 summarizes our experience and draws some future directions and challenges to adopt a variability-aware strategy in the development of neuroimaging pipelines.