name: title layout: true class: center --- layout: false count: false .center[
https://oesteban.github.io/talks/20260510-ISMRM/
# Functional MRI Data Analysis Pipelines ## Five rules from preprocessing to reproducibility
Oscar Esteban <
phd@oscaresteban.es
> #### ISMRM 2026 · *Analysis Pipelines: Demos* · Cape Town · May 10
th
, 2026 ] ??? Welcome. This is the *Functional MRI* slot of the *Analysis Pipelines: Demos* session. --- name: newsection layout: true .perma-sidebar[
fMRI Data Analysis Pipelines · ISMRM 2026
] --- count: false # CoI disclosure & Open Access
.right-column3.center[
Link to slides
] .pad-top.left-column3[ .large[ **No financial interests or relationships** may pose a conflict of interest.
All materials related to this talk are openly available under a **CC-By license**. ] ] --- count: false # ISMRM 2026 · Internet Access
.right-column3.center[
] .pad-top.left-column3.center[ .large.large[
ISMRM2026
springbok ] ] --- # About me .large[ **Data scientist** who plays with brain data & **open science** advocate. ] .right-column3.center[
Link to slides
] .pad-top.left-column3[ .people-table.larger[ | | | |---:|---| |  | **Oscar Esteban**
Associate Professor & Head of [AxonLab](https://www.axonlab.org)
School of Engineering
HES-SO Valais/Wallis | ] .larger[ * Research & Teaching FNS Fellow (2025) @ CHUV * PD (2020) @ Stanford University * Ph.D. (2015) @ Universidad Politécnica de Madrid
ESKAS (2012) @ EPFL ] ] ??? Quick context: I lead *fMRIPrep* and *MRIQC* and coordinate the NiPreps community. --- .center[
.small[ *The Turing Way project* illustration by Scriberia. Used under a CC-BY 4.0 licence. doi:
10.5281/zenodo.3332807
.] ] --- # More reliable measurements .center[ .boxed-content[
[Esteban (2025)](https://doi.org/10.1007/978-1-0716-4260-3_8) [[Methods for analyzing large neuroimaging datasets](https://doi.org/10.1007/978-1-0716-4260-3)] ] ] --- count: false # More reliable measurements .center[ .boxed-content[
[Esteban (2025)](https://doi.org/10.1007/978-1-0716-4260-3_8) [[Methods for analyzing large neuroimaging datasets](https://doi.org/10.1007/978-1-0716-4260-3)] ] ] --- count: false # More reliable measurements .center[ .boxed-content[
[Esteban (2025)](https://doi.org/10.1007/978-1-0716-4260-3_8) [[Methods for analyzing large neuroimaging datasets](https://doi.org/10.1007/978-1-0716-4260-3)] ] ] --- count: false # More reliable measurements .center[ .boxed-content[
[Esteban (2025)](https://doi.org/10.1007/978-1-0716-4260-3_8) [[Methods for analyzing large neuroimaging datasets](https://doi.org/10.1007/978-1-0716-4260-3)] ] ] ??? --- .boxed-content[
.center[
Click here to participate
] ] ??? --- # The research workflow of brain networks .boxed-content[
.center[ [Esteban et al. (2020)](http://doi.org/10.1038/s41596-020-0327-3); [Niso et al. (2022)](https://doi.org/10.1016/j.neuroimage.2022.119623) ] ] ??? In broad strokes, this is the MRI-based network analysis pipeline. Interestingly, it looks like any machine learning pipeline: we acquire data, perform quality control, preprocess it, define features, and then apply statistical modeling to extract insights. For a deeper dive into the details of the neuroimaging worflow, I've participated in several efforts such as the two references given below. --- count:false # The research workflow of brain networks .boxed-content[
.center[ [Esteban et al. (2017)](https://doi.org/10.1371/journal.pone.0184661); [Provins et al. (2023)](https://doi.org/10.3389/fnimg.2022.1073734);
[Provins et al. (2025)](https://doi.org/10.1371/journal.pbio.3003149); [Hagen et al. (2025, *accepted*)](https://doi.org/10.1101/2024.10.21.619532) ]
.no-bullet[ * .larger[
Run the **MRI experiment** following Standard Operating Procedures (SOPs)] *
.larger[**Standardized data structure** (BIDS—Brain Imaging Data Structure)] * .larger[
**QA/QC** (Quality assurance / control)] ] ] ??? The pipeline starts with data acquisition, management and quality assurance and control (QA/QC). My early work on QA/QC applied machine learning to automatically assess MRI images of the brain, and raised awareness over issues like “site effects”—where data from different scanners or labs can systematically vary, much like “batch effects” in genomics. One key principle in AI is that models are only as good as their data and neuroimaging is no exception. This is why my group and I have been deeply involved in BIDS, produced version-controlled, machine-readable standard operating procedures, developed comprehensive QA/QC protocols and created ready-to-use applications to detect suboptimal data early. --- count:false # The research workflow of brain networks .boxed-content[
.center[ [Esteban et al. (2019)](https://doi.org/10.1038/s41592-018-0235-4); [Ciric et al. (2022)](https://doi.org/10.1038/s41592-022-01681-2); [Adebimpe et al. (2022)](https://doi.org/10.1038/s41592-022-01458-7) ]
.no-bullet[ * .larger[
Detection of **nuisance sources**] * .larger[
Spatiotemporal **location** of signals] * .larger[
Definition of **brain units** of analysis (regions)] ] ] ??? Next in the pipeline is preprocessing, which transforms raw data into something models can reliably interpret. For example, it identifies signals of no interest for their cleaning or accounting within modeling. In neuroimaging, preprocessing also deals with accurately locating signals and objects in space and time, and often the definition of relevant brain regions that focus the analysis. A decade ago, we might have called it “feature engineering.” Regardless of the term, it’s crucial: “preprocessing” is now a keyword in job posts at major players like Anthropic, DeepMind, and OpenAI. --- # fMRIPrep: despite minimal, a complex workflow .boxed-content.center[
] ??? Here I'm showing a very much simplified overview of fMRIPrep's design. Despite it being just "minimal" preprocessing and just one step of the pipeline, its complexity is evident. Rather than delving into each of these steps, I'll just say that there's a current need to update and improve computer vision algorithms and approaches (segmentation, image registration, dimensionality reduction, etc.) with AI/ML all across the dataflow. --- count:false class: stepwise-svg # fMRIPrep: despite minimal, a complex workflow .boxed-content.center[
] ??? --- # fMRIPrep: generalizing further .boxed-content.center[
] ??? --- # TemplateFlow: FAIR access to templates .boxed-content.center[
] ??? --- # The research workflow of brain networks .boxed-content[
.center[ [Thompson et al. (2021, *under review*)](https://doi.org/10.1101/2021.01.16.426941); [Rodrigue et al. (2021)](https://doi.org/10.1016/j.bpsc.2020.12.002). ] ] .pull-right[
**Functional Connectivity (FC)**
.gray-text[Synchronized BOLD co-variation between brain regions] ] .pull-left.align-right[
**Structural Connectivity (SC)**
.gray-text[Tracked water diffusion pathways between brain regions] ] ??? Once data are ready for analysis, we formalize connectivity as undirected acyclic graphs, represented with symmetric matrices. In the case of structural connectivity, we use diffusion MRI to track pathways of white-matter bundles connecting brain regions. For functional connectivity we measure synchronized functional MRI signal fluctuations sensitive to the dynamic oxygen content in blood. I’ve been involved in several works applying structural and functional connectivity. For instance, in Rodrigue 2021, we explored ML approaches to identify clinical biomarkers. Unfortunately, we had to conclude that, despite promising data quality and reliability remain insufficient for robust biomarker discovery. --- # Despite active research, scarce clinical application .boxed-content[ .center[
] .no-bullet[ * .large[
Alarming **analytical variability**:] * .larger[Diffusion MRI [[Maier-Hein et al. (2015)](https://doi.org/10.1038/s41467-017-01285-x)]] * .larger[Functional MRI [[Botvinik-Nezer et al. (2020)](https://doi.org/10.1038/s41586-020-2314-9)]]
* .large[
**Like genomics**
Somewhere along NGS's standardization (2005-2015)] ] ] ??? Therefore, although simple on the surface, the workflow is highly-complex and each step introduces potential variability. Complicating matters further, every lab around the world might use a slightly different pipeline. Different tools, different parameters—lead to inconsistent results. This fragmentation hinders progress and precludes between-study comparisons. The consequence is an acute scarcity of real-world applications of connectivity analyses. Let's compare to genomics. Neuroimaging is today in an early stage of standardization akin to genomics at the conclusion of the Human Genome Project in 2003. One key aspect for the remarkable advance of genomics is precisely the comprehensive standardization process of the pipeline that culminated some 10 years ago. For that reason, I advocate for replicating this success experience in neuroscience. --- # Analytical variability in fMRI (NARPS)

From
Botvinik-Nezer et al. 2020
; doi: | NARPS = Neuroimaging Analysis Replication and Prediction Study
??? NARPS — 70 teams, one fMRI dataset, nine a-priori hypotheses. For 5 of 9 hypotheses, >20% of teams disagreed with the consensus. The pipeline IS the experiment. --- # Pipeline-induced variance (Li et al., 2024)

From
Li et al. 2024
; doi:
??? Where NARPS quantified the *spread* across teams, Li, Milham et al. quantify the *attribution*: how much of that spread comes from the pipeline alone. The answer is "a lot". Pipeline is not noise — it's signal of the wrong kind. If preprocessing reproducibility upper-bounds analysis reproducibility, then preprocessing is where you spend the engineering effort. --- count: false # Despite active research, no real-world application .boxed-content[ .center[
] .no-bullet[ * .large[
Alarming **analytical variability**:] * .larger[Diffusion MRI [[Maier-Hein et al. (2015)](https://doi.org/10.1038/s41467-017-01285-x)]] * .larger[Functional MRI [[Botvinik-Nezer et al. (2020)](https://doi.org/10.1038/s41586-020-2314-9)]]
* .large[
Insufficient **test-retest reliability** at the finer scales of brain units] * .larger[[Nakuci et al. (2023)](https://doi.org/10.1038/s41598-023-33441-3)]] ] ??? On top of all that methodological variability, there’s also inherent unreliability in measuring connectivity from session to session. If you scan the same participant twice, back-to-back, you can still get different connectivity measurements, indicating limited test-retest reliability. Despite all these concerns, more than 20 thousand papers were published focusing on functional connectivity and 10 thousand on structural connectivity in 2024, as per Pubmed. ---
??? --- .section-mark.center[ ## Five simple rules for fMRI data analysis pipelines ] --- .section-mark[ .center[ ## **\#1** Prefer a paring knife to a Swiss army knife. ] .left.larger.gray-text[
* Do not reinvent the wheel * Do not bake in assumptions about downstream analyses * Flee from *nose-to-tail* pipelines * Use modularity to your advantage ...
but watch out for re-introducing variability! [Lindquist et al. (2019)](https://doi.org/10.1002/hbm.24528) ] ] --- class: stepwise-svg .boxed-content.center[
] ??? Rule 1 — the design stance. The pipeline's job is not to be "complete". It's to be **minimal in modeling commitments** while being **maximal in interoperability**. The sushi analogy: the fish is gutted, scaled, deboned — but not cooked, marinated, or seasoned. Whatever the analyst wants to do *next*, the fish is ready. --- # **\#2** Copy demonstrated patterns. .boxed-content.center[
] ??? Rule 3 — *fit* once, *transform* many. Why it matters: - **One** resampling step (registrations composed analytically), not five — interpolation blur is a real, accumulating cost. - The expensive bit (registrations, brain extraction, surfaces) is computed *once* and **reused** across runs, sessions, even projects. - If you re-analyse in another space tomorrow, you don't rerun the whole pipeline — you re-*transform*. This is the lesson I'd take forward to *every* MR pipeline, fMRI or otherwise. --- .section-mark[ .center[ ## **\#3** Engage with the community ] .left.larger.gray-text[
* Adopt standards (BIDS in, BIDS-Derivatives out) * Build your own tools only if no other initiative has done it already * Don't be your only user: share, document, support, and engage * Build trust by being open, transparent, responsive to feedback, and honest about limitations ] ] --- # **\#3** Engage with the community (fMRIPrep) .boxed-content.center[
] ??? --- .section-mark[ .center[ ## **\#4** Best engineering practices ] .left.larger.gray-text[
* Version control everything (code, data, parameters, templates) - Check out DataLad today! * Use containers (Docker, Apptainer) * Use semantic versioning and LTS releases * Open your code and your processes (code review, governance, CoC, contributor docs) * Increase the bus factor of your project ] ] --- # **\#4** Best engineering practices (fMRIPrep) .boxed-content.center[
] ??? --- .section-mark[ .center[ ## **\#5** QA/QC is as tedious as it is critical ] .left.larger.gray-text[
* Understand the difference between QA (quality assurance) and QC (quality control) * QA/QC is not a one-time step, but a layered process * Build comprehensive SOPs for data acquisition and preprocessing, and make them machine-readable ] ] --- # **\#5** QA/QC is as tedious as it is critical .boxed-content[ .center[
] .align-right[ ([Provins et al., 2023](http://doi.org/10.3389/fnimg.2022.1073734)) ] ] ??? --- class: stepwise-svg # **\#5** QA/QC is as tedious as it is critical .boxed-content[ .center[
] .align-right[ ([Provins et al., 2023](http://doi.org/10.3389/fnimg.2022.1073734)) ] ] --- # **\#5** QA/QC is as tedious as it is critical .boxed-content[ .center[
.small[ [BenAveling @ wikipedia](https://en.wikipedia.org/wiki/Swiss_cheese_model#/media/File:Swiss_cheese_model_textless.svg) ] ] ] ??? For those with knowledge about security protocols, this approach will surely evoke the Swiss cheese model. The model assumes that all QC checkpoints will have holes through which data progresses toward analysis. By layering several QC checkpoints looking at the data in different ways, we make sure that images with potential to bias the results do not make all the way through the workflow. --- # Recap
.boxed-content.large.no-bullet[ *
Prefer a paring knife to a Swiss army knife. *
Copy demonstrated patterns. *
Engage with the community. *
Best engineering practices. *
QA/QC is as tedious as it is critical. ] ??? --- # Resources
.boxed-content.no-bullet[ *
*fMRIPrep* documentation · [fmriprep.org](https://fmriprep.org) *
*NiPreps Book* · [www.nipreps.org/book](https://www.nipreps.org/book/) *
*BIDS* & *BIDS-Derivatives* · [bids.neuroimaging.io](https://bids.neuroimaging.io) *
*TemplateFlow* · [templateflow.org](https://www.templateflow.org) ] .pull-left.center[
**NiPreps** · nipreps.org
] .pull-right.center[
**These slides**
] ??? Pointers for after the session. The *NiPreps Book* walks through the same workflow hands-on, with code. --- layout: false count: false .center[
https://oesteban.github.io/talks/20260510-ISMRM/
# Thank you! ## Questions?
.gray-text[ Thanks to Akshay Chaudhari, Francesco Santini & the *Analysis Pipelines: Demos* organizers,
to the **NiPreps community**, and to *you* for the Slido answers. ] ] ??? Open the floor — 5 minutes for questions.