Inspiration

Alzheimer's disease affects over 55 million people worldwide, with numbers projected to triple by 2050. What struck us most is that early detection can significantly improve patient outcomes — yet current diagnostic methods rely heavily on subjective clinical assessments and expert radiologists, who are scarce in many regions.

We were inspired by the potential of AI to democratize healthcare access. Imagine a screening tool that could help identify early signs of cognitive decline in underserved communities, giving patients and families precious time to plan and seek treatment.

This hackathon gave us the opportunity to build something that could genuinely save lives.


What It Does

Our AI model classifies brain MRI scans into four stages of Alzheimer's disease progression:

Stage Label Description
🟢 NonDemented Healthy brain with no cognitive impairment
🟡 VeryMildDemented Very early stage — subtle changes detectable
🟠 MildDemented Mild cognitive impairment (MCI)
🔴 ModerateDemented Moderate-stage Alzheimer's disease

Key Capabilities

  • Automated Classification
    Upload an MRI scan and receive instant predictions with confidence scores.

  • Explainable AI
    Grad-CAM visualizations show exactly which brain regions influenced the prediction.

  • Class Imbalance Handling
    Robust performance even on rare disease stages.

  • Reproducible Pipeline
    Fully documented Jupyter notebook runnable on Google Colab.


How We Built It

Architecture

We used EfficientNet-B0 with transfer learning, a state-of-the-art CNN architecture known for its optimal accuracy-to-parameter efficiency.
The model was pre-trained on ImageNet and fine-tuned on our medical imaging dataset.


Tech Stack

  • Framework: PyTorch 2.0+
  • Model: EfficientNet-B0 with a custom classification head
  • Explainability: Grad-CAM
  • Data Processing: torchvision transforms with augmentation
  • Evaluation: scikit-learn metrics (Accuracy, Precision, Recall, F1-score, AUC-ROC)

Training Strategy

  • Optimizer: AdamW with weight decay
    $$ \lambda = 10^{-4} $$

  • Learning Rate:
    $$ 10^{-4} $$
    with ReduceLROnPlateau scheduler

  • Class Imbalance:

    • Weighted CrossEntropy loss
    • Weighted random sampling
  • Regularization:

    • Dropout
    • Early stopping (patience = 7)
    • Gradient clipping

Challenges We Ran Into

1. Severe Class Imbalance

The dataset was extremely skewed:

  • ModerateDemented: 64 samples (~1%)
  • NonDemented: 3,200 samples (~50%)

Solutions:

  • Inverse-frequency class weights in the loss function
  • Weighted random sampling during training
  • Strategic data augmentation

2. Medical Imaging Constraints

MRI scans differ significantly from natural images:

  • Grayscale images with subtle anatomical variations
  • Over-aggressive augmentation risks anatomical distortion

Adjustments:

  • Carefully tuned augmentation parameters
  • Normalization using ImageNet statistics for transfer learning compatibility

3. Interpretability Requirements

Medical AI must be explainable.

  • Implemented Grad-CAM from scratch
  • Visualized attention over clinically relevant regions:
    • Hippocampus
    • Temporal lobe
    • Ventricles

This ensured predictions were clinically meaningful, not artifact-driven.


4. Reproducibility

Ensuring the notebook runs seamlessly on both local machines and Google Colab required:

  • Careful dependency management
  • Robust path handling
  • Fixed random seeds

Accomplishments We’re Proud Of

  • High Performance
    Strong classification accuracy with robust minority-class handling

  • Explainable AI
    Grad-CAM confirms focus on clinically relevant brain regions

  • Production-Ready Code
    Modular architecture separating data loading, modeling, training, and evaluation

  • Comprehensive Documentation

    • Model Card with bias and fairness considerations
    • Technical report covering methodology and limitations
    • Fully documented Jupyter notebook
  • Ethical Considerations
    Clearly defined as a screening aid, not a diagnostic tool, with responsible-use guidelines


What We Learned

Technical

  • Transfer Learning Works
    Pre-trained models dramatically reduce data requirements for medical imaging tasks

  • Class Imbalance Strategies
    Combining weighted loss and weighted sampling outperforms either alone

  • Grad-CAM Internals
    Building explainability from scratch deepened our understanding of CNNs


Domain

  • Medical AI Responsibility
    False negatives can delay treatment, while false positives can cause unnecessary anxiety

  • Alzheimer’s Pathology
    Understanding hippocampal atrophy and ventricular enlargement helped validate model attention


Process

  • Documentation Matters
    A well-documented notebook is more valuable than marginal accuracy gains

  • Reproducibility First
    Fixed seeds and multi-environment testing saved significant debugging time


What’s Next for Early Alzheimer’s Detection AI

Short-Term

  • 🔄 Validate on external datasets (ADNI, OASIS)
  • 📊 Add uncertainty quantification using MC Dropout
  • 🧪 Explore ensemble methods

Medium-Term

  • 🧊 3D Volumetric Analysis using 3D CNNs
  • 🔗 Multi-modal Fusion combining imaging and clinical data
  • 📱 Simple web interface for radiologist workflow integration

Long-Term Vision

  • 🏥 Clinical Validation through partnerships with medical institutions
  • 🌍 Accessibility in low-resource regions lacking specialist radiologists
  • 🔬 Research Publication to contribute to the scientific community

Built With

Share this project:

Updates