Filima Patrick

FILIMA PATRICK

Research Software Engineer & Technical Product Lead

© 2026 Filima Patrick
Back to Projects & Experience
Functional Neuroimaging & Methodological Machine LearningActive Methodological Study / Project 8
License: MIT

GLM vs. Deep Learning Behavior in Small-Sample Task-Based fMRI of Cognitive Control

A Controlled Methodological Study of Predictive Generalization, Overfitting Dynamics, and Spatial Representation Alignment

Python 3.8+FSL 6.0+PyTorchTensorFlowNilearnNiPypeOpenNeuro ds000102LOSO CV
Core Research Ecosystem Vision

Investigating model behavior under small-sample, high-dimensional fMRI conditions (NYU Slow Flanker task, N=26) to compare classical General Linear Models (GLM) and deep learning architectures across cross-subject generalization, statistical stability, and spatial correspondence (Pearson r / Dice).

NYU Slow Flanker fMRI Dataset (ds000102) & Setup

Source Dataset

OpenNeuro (ds000102 - NYU Slow Flanker Dataset)

26 healthy adults (ages 19-50)

Task & Acquisition

Eriksen Flanker Task (Cognitive Control paradigm: Congruent vs. Incongruent)

3T Siemens Allegra (TR=2s, 146 volumes per run, event-related design)

6 Novel Methodological Contributions
1. Cross-Paradigm Shared Evaluation Framework

Both GLM statistical inference and DL predictive classifiers evaluated under identical FSL preprocessing and Leave-One-Subject-Out (LOSO) splits.

2. Focus on Small-Sample Instability Regimes (N=26)

Explicitly characterizing failure modes, fold variance, and degradation under severe sample constraints rather than accuracy optimization.

3. Quantification of Overfitting as a Comparative Property

Measuring training-validation divergence trajectories and learning curves across statistical vs. predictive model classes.

4. Spatial Representation Correspondence

Quantifying spatial alignment between GLM Z-activation maps and DL attribution maps using Pearson r and Dice coefficients.

5. Representation-Centric Interpretation

Framing GLM as hypothesis-driven statistical inference and DL as data-driven representation learning.

6. Permutation Null Modeling

Non-parametric permutation testing (≥1,000 label shuffles) establishing empirical chance performance.

Methodological PhasePipeline Specifications & FSL Execution
Phase 1: Quality Control & MRIQCFramewise Displacement (FD < 0.5mm), DVARS (< 75), and temporal SNR (tSNR > 50) profiling.
Phase 2: FSL PreprocessingBET brain extraction, MCFLIRT motion correction, slice timing, FWHM 5mm smoothing, 100s high-pass filter, MNI152 registration.
Phase 3: Classical GLM AnalysisCanonical HRF convolution, first-level contrasts [Incongruent > Congruent], FLAME 1+2 mixed-effects group maps (Z > 3.1, p < 0.05).
Phase 4: Feature Extraction & LOSOVoxel-wise contrast maps, ROI activation summaries, and PCA/ICA embeddings with Leave-One-Subject-Out cross-validation.
Phase 5: Small-Sample Deep LearningShallow MLPs, 1D CNNs on voxel time series, and 3D CNNs on full-brain volumes with explicit L2 & dropout regularization.
Phase 6: Spatial Attribution EvaluationPearson spatial correlation & Dice coefficient overlap measuring alignment between GLM Z-maps and DL attributions.

Execution Commands & Pipeline Workflow

# 1. Train MONAI 3D DenseNet-121 Benchmark:
python src/models/cnn.py --model densenet121 --task task4 --epochs 50 --batch_size 4 --out_dir ./checkpoints/densenet
# 2. Evaluate Degradation Robustness & RRI Metrics:
python src/evaluation/metrics.py --evaluate_robustness --model_dir ./checkpoints/ --out_dir ./results/
# 3. Generate Grad-CAM Explainability Heatmaps under Perturbation:
python src/evaluation/explain.py --model_path ./checkpoints/densenet/best.pth --method gradcam --out_dir ./results/explanations/