# Explainable MRI-Based Ensemble Learnable Architecture for Alzheimer's Disease Detection
## 3 Methodology  
The step-by-step XAI workflow for AD detection is illustrated in Algorithm 1. This workflow begins with the acquisition providing detailed information about the pre-processing steps applied to the dataset. _The dataset_ used for the study was acquired from the Alzheimer's Disease Neuroimaging Initiative [25]. The dataset comprises 21,976 DICOM files, divided into 17,580 training images, 2198 validation images, and 2198 testing images, each annotated with key demographic and diagnostic information. Participants are categorized into three diagnostic groups: CN, MCI, and AD. Longitudinal data collected over multiple visits (baseline, year 1, and year 2) enables the analysis of disease progression and structural brain changes over time. This longitudinal aspect supports the study of transitions from MCI to AD, a critical area of research for developing early intervention strategies. ```
Data Acquisition:
* Access DICOM files from GCP (Google Cloud)
* Extract subject information from filenames
* Match image files with diagnostic labels from metadata file
* Filter invalid or unmatched data entries
* Split data into training (64%), validation (16%), and test (20%) sets Data Preprocessing:
* Convert DICOM files to readable format using PyDICOM
* Convert grayscale images to RGB using CV2
* Normalize pixel values to range [0, 1]
* Resize all images to consistent dimensions (224 \(\times\) 224)
* Create optimized TensorFlow datasets with prefetching
* Batch images for efficient processing (BATCH_SIZE = 128) Model Development: Develop three parallel model architectures: Multi-Classifier CNN:
* Initialize CNN architecture with multiple convolutional blocks
* Add dropout layers for regularization
* Configure for multi-class classification (CN, MCI, AD) Transfer Learning Models:
* Category 1 (Fully Frozen): MobileNetV2, VGG19
* Category 2 (Partially Unfrozen): ResNet50, EfficientNetB0, DenseNet201
* Add custom classification layers with regularization
* Fine-tune with appropriate learning rates Vision Transformer:
* Use pre-trained ViT with fine-tuning of later layers
* Add custom classification head with BatchNormalization
* Optimize with AdamW and learning rate scheduler Ensemble Techniques: Combine predictions using two methods: Hard Voting:
* For each test image, collect class predictions from all models
* Select final class based on majority vote Stacking:
* Train meta-model using base model predictions as features
* Use validation set to train meta-model
* Generate final predictions using meta-model Model Evaluation:
* Calculate accuracy, precision, recall, F1-score
* Generate confusion matrices
* Compute ROC curves and AUC
* Compare performance across individual models and ensemble Model Interpretation: Apply three explanation techniques: LIME:
* For each test image, generate perturbed samples
* Get model predictions for perturbed samples
* Fit local interpretable model (e.g., linear regression)
* Visualize feature importance Saliency Map:
* Compute gradient of output with respect to input image
* Visualize gradient magnitude to highlight important pixels
* Generate heatmap overlay on original image GradCAM:
* Identify target convolutional layer
* Compute gradients of target class with respect to feature maps
* Weight feature maps by gradient importance
* Generate class activation map
* Resize and overlay on original image The dataset features advanced MRI modalities and sequences tailored to investigate neurodegenerative changes. Key sequences include Sagitttal 3D FLAIR for detecting white matter lesions, High-Resolution Hippocamp Imaging for assessing hippocampal atrophy, and Axial 3 TE T2 STAR for identifying microhemorrhages and iron deposition. Perfusion-Weighted Imaging (PWI) and Axial 3D PASL measure cerebral blood flow dynamics, providing insights into hypoperfusion associated with AD progression.