2026-07-24
Currently the fMRI pipelines are becoming more and more computationally heavy leveraging a lot of high dimension calculations.
However, there are several settings introducing noise instability in those pipelines:
We can artificially introduce numerical perturbations inside the floating point arithmetic with the help of tools like Verificarlo(Denis, Castro, and Petit (2018)) and Fuzzy and assess how the desired pipeline’s results change to make sure it is stable.
Verificarlo is a compiler wrapper that instruments floating point operations at the LLVM level.
Fuzzy is a Docker ecosystem that provides pre instrumented versions of common numerical libraries so you can evaluate a pipeline’s stability without recompiling your own code.
Yes, there are already several papers on the subject, like Alizadeh et al. (2026) or Chatelain et al. (2026).
But numerical instability is not transferable across pipelines, it comes from each pipeline’s specific algorithms, operation orders, software stacks etc.
Benchmarking each one is essential.
My job was to look into the numerical stability of fMRI biomarkers.
To do so, I focused on three main tasks:
A detailed summary of what I did each day is available here
The paper has two goals:
Here is the formula for the NPVR:
\[NPVR = \frac{\sigma_{num}}{\sigma_{pop}}\]
Where \(\sigma_{num}\) is the numerical variability and \(\sigma_{pop}\) is the population variability.
A summary of this paper is available here
The code used for this section is available here
Regarding the Relation between the NPVR and the Cohen’s \(d\) differences, a PR was opened and merged into the paper’s repository (see here)
Here are the different graph metrics that were computed once with and once without confounds regression
Four local graph metrics were computed:
Two global metrics:
The code used for this section is available here
The goal of this section was to take the numerically perturbed fMRIPrep runs that were made so far, and assess how the NPVR changes across the different FC matrix edges.
So this looks into the FC matrices directly rather than graph metrics like the previous section.
The code used for this section is available here
The goal of this paper is to develop a PCA-based feature selection method that robustly extracts reliable FC biomarkers for major depressive disorder (MDD), schizophrenia (SCZ), and autism spectrum disorder (ASD) across multiple independent datasets and imaging sites, overcoming the instability issues of conventional supervised feature selection approaches.
The PCA feature selection works as follows:
I made several changes to the PCA feature selection code:
The code used for this section is available here
To conduct this analysis, I performed the following steps:
np.corrcoef function)The PCA feature selection was performed on each of the perturbated runs
np.corrcoef perturbation?Effect of the np.corrcoef perturbation on \(\text{16 542 474 500}\) edges
The PC selection step of the PCA feature extraction has been improved, and the complete pipeline seems to be very stable now!
It would be interesting to perturb more steps of the FC matrices extraction other than the np.corrcoef.
The subject was very interesting and I’m very grateful to all of you and Prof. Esteban for giving me this opportunity.
I also want to thank Dr. Chatelain for his help on the Fuzzy related things.
This slide deck is available at this address:
https://olivier.amacker.dev/bachelor-thesis/site/presentations/cbi_presentation.html
Here is how the NPVR is calculated in details:
\[ \sigma_{num}^2 = \frac{1}{m} \sum_{j=1}^m \left[ \frac{1}{n-1} \sum_{i=1}^n \left( x_{i,j} - \bar x_{.,j}\right)^2\right] \]
\[ \sigma_{pop}^2 = \frac{1}{n} \sum_{i=1}^n \left[ \frac{1}{m-1} \sum_{j=1}^m \left( x_{i,j} - \bar x_{i,.}\right)^2\right] \]
\[ NPVR = \frac{\sigma_{num}}{\sigma_{pop}} \]