# Multi-Approach Alzheimer's Disease Detection

Inspiration

Alzheimer's Disease affects over 55 million people worldwide, and those numbers are projected to triple by 2050. What struck me most during my research was that early detection can delay symptom progression by years, yet many cases go undiagnosed until significant cognitive decline has already occurred.

I was inspired by how clinicians actually diagnose Alzheimer's. They don't rely on just one test. Instead, they combine brain imaging to look for structural changes, cognitive assessments like MMSE scores, and patient history including risk factors and symptoms. I wanted to build an AI system that mirrors this multi-modal clinical workflow.

The core question driving this project was simple: Can we democratize early Alzheimer's screening by combining multiple AI approaches that work together like a team of specialists?


What I Learned

Machine Learning Insights

Building this project taught me that data quality matters far more than model complexity. My initial attempts at multimodal fusion failed spectacularly. The training loss went to NaN and accuracy dropped to random guessing. After days of debugging, I discovered the root cause was that my MRI and clinical datasets contained different patients. I was essentially adding random noise to my model.

This taught me a crucial lesson. You cannot fuse data from mismatched sources. True multimodal learning requires patient-matched data.

Technical Skills Gained

  • Transfer Learning: Using ResNet50 pretrained on 14 million ImageNet images, then fine-tuning it for brain scans.
  • Class Imbalance Handling: Implementing weighted loss functions and stratified sampling.
  • Explainable AI: Building Grad-CAM visualizations to show exactly why the model makes specific predictions.
  • Data Preprocessing: creating aggressive cleaning pipelines to handle NaN and Inf values in medical data.

Domain Knowledge

I gained a deep appreciation for the clinical complexity of Alzheimer's:

  • The disease exists on a spectrum (Non-Demented -> Very Mild -> Mild -> Moderate).
  • Distinguishing between adjacent stages is genuinely difficult, even for human experts.
  • MMSE scores and functional assessments are gold-standard clinical tools for a reason.

How I Built It

Architecture Overview

I developed a dual-model framework to handle the distinct data types.

Model 1: MRI Brain Scan Classifier

  • Input: 224 x 224 MRI Image
  • Backbone: ResNet50 (pretrained on ImageNet)
  • Custom Classification Head:
    • Dropout(0.5)
    • Linear(2048 -> 512) + ReLU + BatchNorm
    • Linear(512 -> 256) + ReLU
    • Linear(256 -> 4)
  • Output: 4-class dementia staging

Model 2: Clinical Risk Predictor

  • Input: 32 clinical features
  • Structure: MLP (32 -> 128 -> 64 -> 32 -> 2) with BatchNorm and Dropout after each layer.
  • Output: Binary Alzheimer's diagnosis

Training Strategy

For the MRI model, I had to address severe class imbalance. One class had only 49 samples compared to 2,566 for another. I used a weighted loss function:

$$w_c = \frac{N_{total}}{k \cdot N_c}$$

Here, w_c is the weight for class c, N_total is the total number of samples, k is the number of classes, and N_c is the number of samples in class c. This gave the minority class a 26x higher weight in the loss function.

Explainability with Grad-CAM

I implemented Gradient-weighted Class Activation Mapping to visualize where the model was looking. The formula for the heatmap is:

$$L^c_{Grad-CAM} = ReLU\left(\sum_k \alpha^c_k A^k\right)$$

Where alpha^c_k represents the importance weights and A^k are the feature maps from the final convolutional layer. The results were clinically meaningful. The model focused on:

  • Ventricular regions (enlargement is a key AD biomarker).
  • Hippocampal area (the primary region affected in AD).
  • Temporal/frontal cortex (where AD-related atrophy occurs).

Challenges I Faced

Challenge 1: The NaN Disaster

My first multimodal model produced NaN loss starting from epoch 1. It was a nightmare. After extensive debugging, I found extreme values in the data (some features were 10^20) and infinity values generated during preprocessing.

  • Solution: Aggressive clipping, using a RobustScaler, and final feature clamping to the range [-3, 3].

Challenge 2: Mismatched Data Sources

Even after fixing the NaN issues, my accuracy was stuck at 27%. The breakthrough came when I realized the MRI dataset (5,120 patients) and the genetic dataset (5,076 patients) were completely different people.

My "multimodal fusion" was pairing Patient A's brain scan with Patient B's genetic data. It was pure noise. This forced a strategic pivot to the dual-model approach described above.

Challenge 3: Severe Class Imbalance

The dataset distribution was incredibly skewed:

Class Samples Percentage
Mild Demented 49 0.96%
Non-Demented 724 14.1%
Very Mild 1,781 34.8%
Moderate 2,566 50.1%

The "Mild Demented" class was nearly invisible to the model. I fixed this using Weighted CrossEntropyLoss and a WeightedRandomSampler to ensure balanced batches.


Results

Model Task Accuracy F1 Score
MRI (ResNet50) 4-class staging 82.62% 83%
Clinical (MLP) Binary diagnosis 85.35% 85%

Key Findings

  • The MRI model correctly identifies structural patterns associated with dementia. Grad-CAM confirms it looks at clinically relevant regions.
  • The Clinical model's top predictors align with medical literature:
    • MMSE Score (standard cognitive test)
    • Functional Assessment
    • ADL (Activities of Daily Living)
    • Memory Complaints
  • The dual-approach mirrors real clinical practice, where physicians combine imaging with patient history.

Future Directions

  • True Multimodal Fusion: Obtain patient-matched datasets where we have both MRI and clinical data for the same individuals.
  • Genetic Integration: Incorporate the APOE genotype, which is the strongest genetic risk factor.
  • Longitudinal Prediction: Attempt to predict disease progression over time rather than just a snapshot diagnosis.
  • External Validation: Test the models on standard datasets like ADNI and OASIS.

Acknowledgments

This project taught me that AI in healthcare isn't just about accuracy numbers. It is about building systems that clinicians can trust and patients can benefit from. The journey from NaN losses to interpretable predictions was challenging, but deeply rewarding.

*Built for the Hack4Health AI for Alzheimer's Challenge, December 2025 *I am in the discord and follow you guys on linkidin

Built With

Share this project:

Updates