Tanguyvans/alzheimer

1

stars

323

commits

Python

primary language

Apr 25, 2026

updated

README

Alzheimer's Disease Classification — Multi-Cohort Multimodal Fusion

CN (Cognitively Normal) vs AD (Alzheimer's Disease) classification using 3D brain MRI and clinical tabular features from 3 cohorts (ADNI, OASIS, NACC).

Key Results

Best model: MLP Late Weighted Fusion — AUC 0.950 +/- 0.003 (5 seeds)

MethodAcc %Bal Acc %AUCSeeds
MLP Late Wt90.9 +/- 1.589.1 +/- 0.50.950 +/- 0.0034
XGB Late Wt92.0 +/- 0.888.6 +/- 0.70.949 +/- 0.0025
MLP Early91.9 +/- 0.889.1 +/- 0.70.946 +/- 0.0065
XGB Early89.6 +/- 1.385.3 +/- 2.30.931 +/- 0.0185
Tab only (XGB)88.8 +/- 0.286.0 +/- 0.30.937 +/- 0.0025
MRI only86.7 +/- 0.782.7 +/- 0.60.901 +/- 0.0105

Full results: experiments/report_multi_seed/

Datasets

CohortPatientsMRI ScansCNMCIAD
ADNI2,31117,82739%42%19%
OASIS1,3407,79468%3%16%
NACC55,0048,16349%18%29%

Combined test set: 910 samples (78.2% CN, 21.8% AD)

Architecture

4 fusion strategies combining ResNet50 3D (MedicalNet pretrained) with 16 clinical features:

  • MLP Early Fusion: ResNet3D (2048-d) + Tabular MLP (32-d) → concat → MLP classifier
  • MLP Late Fusion: ResNet3D classifier + Tabular MLP → probability fusion
  • XGBoost Early Fusion: ResNet3D features + tabular → XGBoost
  • XGBoost Late Fusion: ResNet3D classifier + Tabular XGBoost → probability fusion

16 Tabular Features

CategoryFeatures
DemographicsAGE, PTGENDER, PTEDUCAT, PTMARRY
Cognitive testsCATANIMSC, TRAASCOR, TRABSCOR, DSPANFOR, DSPANBAC, BNTTOTAL
Medical historyMH14ALCH, MH16SMOK, MH4CARD, MH2NEURL
PhysicalVSWEIGHT, BMI

Project Structure

alzheimer/
├── experiments/
│   ├── resnet3d_mlp/                  # MLP Early + Late Fusion
│   │   ├── model.py                   # ResNet3DBackbone + EarlyFusionModel
│   │   ├── train.py                   # Early fusion training
│   │   ├── train_late_fusion.py       # Late fusion training
│   │   └── config.yaml
│   ├── resnet3d_xgboost/             # XGBoost Early + Late Fusion
│   │   ├── train_finetuned.py         # Early fusion (finetune + XGB)
│   │   ├── train_late_fusion.py       # Late fusion
│   │   └── config.yaml
│   ├── multimodal_fusion/             # Dataset + preprocessing
│   │   ├── dataset.py                 # MultiModalDataset (MRI + tabular)
│   │   └── data/combined_trajectory/  # Train/val/test CSV splits
│   ├── analyze_multi_seed.py          # Multi-seed analysis + Integrated Gradients
│   ├── generate_ig_all_models.py      # IG for all 4 models
│   ├── generate_report_docx.py        # Word report generator
│   ├── run_all_seeds.sh               # Run all experiments (15 seeds)
│   └── report_multi_seed/             # Results and reports
│       ├── summary_table.csv
│       ├── per_seed_metrics.csv
│       ├── delong_pvalues.csv
│       ├── boxplots.png
│       ├── roc_curves.png
│       ├── confusion_matrices.png
│       ├── delong_test.png
│       ├── resnet3d_fusion_report.docx
│       └── interpretability/          # Integrated Gradients maps
│           ├── mlp_early_fusion/      # 5 AD + 5 CN individual maps
│           ├── mlp_late_fusion/
│           ├── xgb_early_fusion/
│           ├── xgb_late_fusion/
│           ├── cross_model_comparison.png
│           ├── group_average_AD.png
│           ├── group_average_CN.png
│           ├── group_difference_AD_minus_CN.png
│           └── summary_figure.png
├── preprocessing/                     # MRI preprocessing pipelines
├── data/                              # Clinical/tabular CSV data
│   ├── adni/, oasis/, nacc/
│   └── combined/
└── paper/                             # Research paper (LaTeX)

Reports

Quick Start

source env/bin/activate

# Train MLP Early Fusion (single seed)
cd experiments/resnet3d_mlp
python train.py --config config.yaml --output-dir results_early/seed_0 --seed 0

# Train MLP Late Fusion
python train_late_fusion.py --config config.yaml --output-dir results_late_fusion/seed_0 --seed 0

# Run multi-seed analysis
cd experiments
python analyze_multi_seed.py --gradcam

# Generate Integrated Gradients for all 4 models
cd experiments/resnet3d_mlp
python ../generate_ig_all_models.py --seed 2 --n-individual 5 --n-steps 100

# Generate Word report
cd experiments
python generate_report_docx.py

Technology Stack

  • Python 3.12 with virtual environment
  • Deep Learning: PyTorch, MONAI (ResNet50 3D, MedicalNet pretrained)
  • ML: XGBoost, scikit-learn
  • Medical Imaging: SimpleITK, nibabel, ANTsPy, nilearn
  • Interpretability: Integrated Gradients (custom implementation)

Contributors

Tanguyvans

302 commits

MaximeGloesener

21 commits

Tanguyvans/alzheimer

1

stars

323

commits

Python

primary language

Apr 25, 2026

updated

README

Alzheimer's Disease Classification — Multi-Cohort Multimodal Fusion

CN (Cognitively Normal) vs AD (Alzheimer's Disease) classification using 3D brain MRI and clinical tabular features from 3 cohorts (ADNI, OASIS, NACC).

Key Results

Best model: MLP Late Weighted Fusion — AUC 0.950 +/- 0.003 (5 seeds)

MethodAcc %Bal Acc %AUCSeeds
MLP Late Wt90.9 +/- 1.589.1 +/- 0.50.950 +/- 0.0034
XGB Late Wt92.0 +/- 0.888.6 +/- 0.70.949 +/- 0.0025
MLP Early91.9 +/- 0.889.1 +/- 0.70.946 +/- 0.0065
XGB Early89.6 +/- 1.385.3 +/- 2.30.931 +/- 0.0185
Tab only (XGB)88.8 +/- 0.286.0 +/- 0.30.937 +/- 0.0025
MRI only86.7 +/- 0.782.7 +/- 0.60.901 +/- 0.0105

Full results: experiments/report_multi_seed/

Datasets

CohortPatientsMRI ScansCNMCIAD
ADNI2,31117,82739%42%19%
OASIS1,3407,79468%3%16%
NACC55,0048,16349%18%29%

Combined test set: 910 samples (78.2% CN, 21.8% AD)

Architecture

4 fusion strategies combining ResNet50 3D (MedicalNet pretrained) with 16 clinical features:

  • MLP Early Fusion: ResNet3D (2048-d) + Tabular MLP (32-d) → concat → MLP classifier
  • MLP Late Fusion: ResNet3D classifier + Tabular MLP → probability fusion
  • XGBoost Early Fusion: ResNet3D features + tabular → XGBoost
  • XGBoost Late Fusion: ResNet3D classifier + Tabular XGBoost → probability fusion

16 Tabular Features

CategoryFeatures
DemographicsAGE, PTGENDER, PTEDUCAT, PTMARRY
Cognitive testsCATANIMSC, TRAASCOR, TRABSCOR, DSPANFOR, DSPANBAC, BNTTOTAL
Medical historyMH14ALCH, MH16SMOK, MH4CARD, MH2NEURL
PhysicalVSWEIGHT, BMI

Project Structure

alzheimer/
├── experiments/
│   ├── resnet3d_mlp/                  # MLP Early + Late Fusion
│   │   ├── model.py                   # ResNet3DBackbone + EarlyFusionModel
│   │   ├── train.py                   # Early fusion training
│   │   ├── train_late_fusion.py       # Late fusion training
│   │   └── config.yaml
│   ├── resnet3d_xgboost/             # XGBoost Early + Late Fusion
│   │   ├── train_finetuned.py         # Early fusion (finetune + XGB)
│   │   ├── train_late_fusion.py       # Late fusion
│   │   └── config.yaml
│   ├── multimodal_fusion/             # Dataset + preprocessing
│   │   ├── dataset.py                 # MultiModalDataset (MRI + tabular)
│   │   └── data/combined_trajectory/  # Train/val/test CSV splits
│   ├── analyze_multi_seed.py          # Multi-seed analysis + Integrated Gradients
│   ├── generate_ig_all_models.py      # IG for all 4 models
│   ├── generate_report_docx.py        # Word report generator
│   ├── run_all_seeds.sh               # Run all experiments (15 seeds)
│   └── report_multi_seed/             # Results and reports
│       ├── summary_table.csv
│       ├── per_seed_metrics.csv
│       ├── delong_pvalues.csv
│       ├── boxplots.png
│       ├── roc_curves.png
│       ├── confusion_matrices.png
│       ├── delong_test.png
│       ├── resnet3d_fusion_report.docx
│       └── interpretability/          # Integrated Gradients maps
│           ├── mlp_early_fusion/      # 5 AD + 5 CN individual maps
│           ├── mlp_late_fusion/
│           ├── xgb_early_fusion/
│           ├── xgb_late_fusion/
│           ├── cross_model_comparison.png
│           ├── group_average_AD.png
│           ├── group_average_CN.png
│           ├── group_difference_AD_minus_CN.png
│           └── summary_figure.png
├── preprocessing/                     # MRI preprocessing pipelines
├── data/                              # Clinical/tabular CSV data
│   ├── adni/, oasis/, nacc/
│   └── combined/
└── paper/                             # Research paper (LaTeX)

Reports

Quick Start

source env/bin/activate

# Train MLP Early Fusion (single seed)
cd experiments/resnet3d_mlp
python train.py --config config.yaml --output-dir results_early/seed_0 --seed 0

# Train MLP Late Fusion
python train_late_fusion.py --config config.yaml --output-dir results_late_fusion/seed_0 --seed 0

# Run multi-seed analysis
cd experiments
python analyze_multi_seed.py --gradcam

# Generate Integrated Gradients for all 4 models
cd experiments/resnet3d_mlp
python ../generate_ig_all_models.py --seed 2 --n-individual 5 --n-steps 100

# Generate Word report
cd experiments
python generate_report_docx.py

Technology Stack

  • Python 3.12 with virtual environment
  • Deep Learning: PyTorch, MONAI (ResNet50 3D, MedicalNet pretrained)
  • ML: XGBoost, scikit-learn
  • Medical Imaging: SimpleITK, nibabel, ANTsPy, nilearn
  • Interpretability: Integrated Gradients (custom implementation)

Contributors

Tanguyvans

302 commits

MaximeGloesener

21 commits

Languages

Python

93.2%

TeX

5.0%