An interpretable Machine Learning framework for early detection of Autism Spectrum Disorder (ASD) using structural T1-weighted MRI scans from the ABIDE II dataset.
Autism Spectrum Disorder (ASD) is a neurodevelopmental disorder characterized by difficulties in social communication, repetitive behaviors, and restricted interests. Early diagnosis is essential for timely intervention, yet current clinical diagnosis primarily depends on behavioral assessments.
This project presents an interpretable Machine Learning pipeline that analyzes structural MRI (T1-weighted) brain scans to classify individuals as ASD or Neurotypical. Instead of relying on deep learning, the project focuses on conventional machine learning models combined with explainable AI to identify anatomically significant brain regions contributing to the diagnosis.
- Detect Autism Spectrum Disorder using structural MRI images.
- Extract meaningful anatomical features from brain MRI scans.
- Compare Random Forest and XGBoost classifiers.
- Improve interpretability using SHAP feature importance.
- Identify brain regions that contribute significantly to ASD prediction.
Dataset: ABIDE II (Autism Brain Imaging Data Exchange II)
- Structural MRI (T1-weighted)
- NIfTI (.nii/.nii.gz) brain scans
- Phenotypic metadata (DX_GROUP)
| Label | Description |
|---|---|
| 0 | Neurotypical Control |
| 1 | Autism Spectrum Disorder |
ABIDE II Dataset
│
▼
Load MRI (.nii)
│
▼
Skull Stripping
│
▼
Brain Mask Generation
│
▼
Morphological Operations
│
▼
Gaussian Smoothing
│
▼
Atlas-Based Brain Parcellation (AAL)
│
▼
ROI Feature Extraction
│
▼
Feature Scaling
│
▼
SHAP Feature Selection
│
▼
Machine Learning Models
│
┌───────────────┐
│ Random Forest │
└───────────────┘
│
┌───────────────┐
│ XGBoost │
└───────────────┘
│
▼
Performance Evaluation
│
▼
Brain Region Importance Visualization
The preprocessing pipeline consists of:
- MRI Loading using Nilearn
- Brain Mask Extraction
- Skull Stripping
- Binary Opening
- Binary Closing
- Gaussian Smoothing
- Noise Removal
- Normalization
Brain regions are extracted using the Automated Anatomical Labeling (AAL) Atlas.
116 Anatomical Brain Regions
For every subject:
- Mean intensity is computed for each ROI.
- Features are stored as a 116-dimensional feature vector.
- Diagnostic labels are matched using the phenotypic metadata.
Explainable AI is incorporated using SHAP (SHapley Additive Explanations).
SHAP identifies the most influential anatomical regions contributing to ASD classification.
Some important brain regions include:
- Thalamus (Left)
- Heschl Gyrus (Left)
- Frontal Inferior Operculum (Right)
- Cerebellum Crus II (Left)
- 100 Decision Trees
- Random State for reproducibility
- 80:20 Train-Test Split
- 5-Fold Cross Validation
- Learning Rate = 0.1
- 100 Estimators
- Maximum Depth = 4
- Stratified Train-Test Split
The models were evaluated using:
- Accuracy
- Precision
- Recall
- F1 Score
- Confusion Matrix
| Metric | Score |
|---|---|
| Accuracy | 66.84% |
| Precision | 65.31% |
| Recall | 69.57% |
| F1 Score | 66.9% |
| Metric | Score |
|---|---|
| Accuracy | 60.43% |
| Precision | 63.44% |
| Recall | 59.60% |
| F1 Score | 61.46% |
| Model | Accuracy | Precision | Recall | F1 Score |
|---|---|---|---|---|
| Random Forest | 66.84% | 65.31% | 69.57% | 66.9% |
| XGBoost | 60.43% | 63.44% | 59.60% | 61.46% |
✅ Random Forest outperformed XGBoost across all evaluation metrics.
- Python
- NumPy
- Pandas
- Scikit-Learn
- XGBoost
- SHAP
- Nilearn
- NiBabel
- SciPy
- Matplotlib
- Seaborn
- Nilearn
- NIfTI
- AAL Atlas
├── dataset/
│
├── preprocessing/
│
├── skull_stripping/
│
├── feature_extraction/
│
├── feature_selection/
│
├── models/
│ ├── random_forest.py
│ ├── xgboost.py
│
├── results/
│ ├── confusion_matrix_rf.png
│ ├── confusion_matrix_xgb.png
│ ├── shap_summary.png
│
├── notebooks/
│
├── README.md
│
└── requirements.txt
- Increase dataset diversity.
- Integrate volumetric brain analysis.
- Compare with FreeSurfer-based measurements.
- Incorporate multimodal MRI (Structural + Functional).
- Explore Graph Neural Networks and Vision Transformers.
- Deploy as a clinical decision-support system.
- ABIDE II Dataset
- Nilearn Documentation
- SHAP Explainability
- Scikit-Learn
- XGBoost
- Mythri Kodela
- Murari Vedha Smitha
- Hemanth Kumar Mandala
Faculty Guide
- Debanjali Bhattacharya
This project is developed for academic and research purposes.