Bachelor Thesis: Numerical Stability of Functional MRI Connectivity Biomarkers

Note

This page was mainly generated by OpenCode using the Kimi k2.7-code model.

Project Overview

This bachelor thesis investigates the numerical stability of functional MRI (fMRI) connectivity biomarkers. It reproduces the results of Alizadeh et al. 2025 (biorxiv), which introduces the Numerical-Population Variability Ratio (NPVR), first through a synthetic simulation, then for functional connectivity (FC) matrices and graph-theoretical metrics by perturbing the entire fMRIPrep preprocessing pipeline with a custom fuzzy-fmriprep Docker container built on Verificarlo and the Fuzzy libmath library.

It then extends this work in two directions: examining FC matrix edge NPVR directly, and assessing the numerical stability of the PCA-based feature extraction introduced by Yamashita et al. 2026 (doi:10.1162/IMAG.a.1121) by perturbing the np.corrcoef function used to build the FC matrices and forcing the PCA inputs to 32-bit floating-point precision.

The project is organized around four interactive Marimo notebooks in bachelor-thesis-project/notebooks/:

  1. NPVR Simulation: Creates a synthetic simulation exploring how sample size and numerical-to-population variability ratios affect NPVR and Cohen’s d.

  2. Fuzzy fMRIPrep Graph Metrics Analysis: Generates FC matrices from fuzzy-fMRIPrep outputs, thresholds them, and computes local and global graph metrics, then resolves the NPVR across Monte Carlo repetitions.

  3. Fuzzy fMRIPrep FC Matrices Analysis: Focuses on the FC matrices themselves, computing edge-wise NPVR and comparing confound-regression strategies through heatmaps, scatter plots, histograms, and regional brain maps.

  4. Fuzzy PCA Dimensionality Reduction Analysis: Reproduces and extends a PCA-based feature-selection pipeline on the SRPB and BMB public datasets, linking FC features to diagnosis (HC vs. MDD), age, BDI, sex, site, and motion. It perturbs FC matrix extraction (np.corrcoef) and forces PCA inputs to 32-bit floating-point, then compares regular vs. fuzzy PCA feature-selection results with consensus maps and a robustness analysis.

Together, these notebooks provide a systematic exploration of numerical variability at successive stages of the fMRI connectivity analysis pipeline.

Resources

Planification

The diagram below has been updated from the original proposed workplan to reflect the actual progress recorded in the daily journal.

gantt
    title Updated Workplan (as of 27-08-2026)
    dateFormat  YYYY-MM-DD
    axisFormat  %d/%m
    excludes weekends

    section 0. Settlement
    Settle in Japan :done, settlement, 2026-05-08, 2026-05-14

    section Meetings
    Okito and Ayumu san first meeting :done, milestone, meet1, 2026-05-18, 0d
    Okito and Ayumu san second meeting :done, milestone, meet2, 2026-05-25, 0d
    Prof. Esteban intermediate meeting :done, milestone, meet3, 2026-06-01, 0d
    Okito and Ayumu san third meeting :done, milestone, meet4, 2026-06-09, 0d
    Prof. Esteban and PhD. Chatelain meeting :done, milestone, meet5, 2026-06-11, 0d
    Okito and Ayumu san fourth meeting :done, milestone, meet6, 2026-07-14, 0d

    section 1. Onboarding
    Familiarize with fMRI dataset       :done, p1t1, 2026-05-15, 2026-05-28
    Set up fuzzy-fMRIPrep container     :done, p1t2, 2026-05-15, 2026-05-28
    Select subjects & define pipeline   :done, p1t3, 2026-05-15, 2026-05-28
    Milestone Design Finalized          :done, milestone, m1, 2026-05-28, 0d

    section 2. Preprocessing
    First 15 perturbed fMRIPrep runs    :done, p2t1, 2026-05-15, 2026-05-29
    Additional fMRIPrep runs            :done, p2t2, 2026-06-01, 2026-06-10
    Milestone fMRIPrep Runs Complete    :done, milestone, m2, 2026-06-10, 0d

    section 3. Analysis
    FC matrices & graph metrics         :done, p3t1, 2026-06-02, 2026-06-12
    SRPB PCA reproduction & analysis    :done, p3t2, 2026-06-15, 2026-07-03
    SRPB FC extraction                  :done, p3t3, 2026-06-23, 2026-06-25
    SRPB harmonization                  :done, p3t4, 2026-06-26, 2026-07-02
    BMB data collection & extraction    :done, p3t5, 2026-07-06, 2026-07-10
    BMB harmonization                   :done, p3t6, 2026-07-06, 2026-07-10
    Robust PCA extraction               :done, p3t7, 2026-07-15, 2026-07-21
    Complete pipeline run & debug       :done, p3t8, 2026-07-16, 2026-07-21
    Noise consensus & fuzzy perturbations impact :done, p3t9, 2026-07-23, 1d
    PCA perturbations & single precision analysis :done, p3t10, 2026-07-27, 2026-07-28
    Fuzzy PCA Notebook cleaning         :done, p3t11, 2026-07-29, 2d
    Global signal regression fix         :done, p3t12, 2026-08-12, 2026-08-13
    NPVR across brain regions fix       :done, p3t13, 2026-08-12, 1d

    section 4. Presentations & Documentation
    AI usage presentation               :done, p4t0, 2026-07-07, 2026-07-08
    CBI presentation preparation        :done, p4t1, 2026-07-21, 2026-07-23
    CBI presentation                    :done, milestone, meet7, 2026-07-24, 0d
    First code cleaning                 :done, p4t2, 2026-07-10, 1d
    Project first version               :done, p4t3, 2026-05-16, 2026-07-11
    Project second version              :done, p4t4, 2026-07-11, 2026-07-30
    Project code submission             :done, milestone, crit, p4t5, 2026-07-31, 0d
    Report writing (abstract, intro)    :done, p4t6, 2026-07-27, 2026-07-28
    Report State of the Art             :done, p4t7, 2026-08-03, 2026-08-04
    Report Methodology                  :done, p4t8, 2026-08-04, 2026-08-11
    Report Results                      :done, p4t9, 2026-08-11, 2026-08-13
    Report First Draft                  :done, p4t10, 2026-08-13, 1d
    Report Executive Summary            :done, p4t11, 2026-08-14, 1d
    Report Abstract & Wording Refinement :done, p4t12, 2026-08-16, 2026-08-17
    Report Final Cleaning               :done, p4t13, 2026-08-17, 1d
    Report Submission                   :done, milestone, crit, m5, 2026-08-17, 0d
    Final Presentation Slides           :done, p4t14, 2026-08-18, 2026-08-26
      Milestone Final Defense             :milestone, done, crit, m4, 2026-08-27, 0d

Please note that this diagram was originally generated by OpenCode (powered by the kimi-k2.7-code model), finetuned based on the proposed workplan, and later updated to reflect actual progress from the daily journal.