Dementia Risk Prediction with Deep Learning

Machine LearningSep 2026By Tinotenda Linton

PyTorch screening models estimating dementia probability in adults 60+ from a 24,000-record Gweru cohort, comparing DNN and LSTM architectures under one evaluation protocol.

PythonPyTorchJupyterArtificial Neural NetworksHealthcare
Dementia Risk Prediction with Deep Learning

This is a research project estimating dementia probability in adults aged 60 and over from clinical cohort data — 24,000 records with 35 columns collected in Gweru, Zimbabwe, spanning 2020–2025.

The approach

Two architectures are trained, tuned, and compared under a single evaluation protocol with explicit leakage control:

  • DNN (primary) — a compact 6,465-parameter network on tabular features
  • LSTM (secondary) — a 55,985-parameter recurrent model for sequential representations

The point of running both under one protocol is honest comparison: same splits, same preprocessing, same metrics.

Artifacts

The repository carries the full research trail — the cohort CSV with a data dictionary, research notes and an analysis plan, a Jupyter notebook covering the training pipeline, committed model checkpoints with MD5 hashes, and benchmark outputs including metrics JSON and holdout predictions. Architecture diagrams live in the docs folder.

Everything is reproducible from the committed artifacts, which matters for health-adjacent work: a result you can't re-run is a result you can't trust.


The cohort and its cleaning

The data arrives deliberately noisy: five interview-date formats, categorical label chaos ("Rual", "Urbn", "maried"), per-column missingness from 0.5% to 12.8%, blood-pressure transposition errors, and roughly 7% of records under the age-60 protocol threshold. Raw dementia prevalence sits at 38.2%; after cleaning, 24,000 rows become 22,855 (1,145 rejected — 90 with unverifiable ages, 1,055 protocol violations) with a 40.0% event rate.

The 35 columns follow the Lancet Commission 2024 modifiable-factor set: demographics, vascular markers, sensory deficits, sleep problems, physical activity, depression screening (GDS-15), and cognitive screen scores — each documented with type, units, and clinical basis in a data dictionary.

Results on the untouched hold-out set

On the hold-out (n = 4,571, 1,830 events):

MetricDNNLSTM
ROC-AUC0.851090.85094
PR-AUC (chance = 0.40)0.780430.77857
Screening sensitivity0.8230.790
Screening specificity0.7340.776
Screening PPV0.6740.702

A bootstrap ΔAUC of +0.0001 (95% CI −0.0029 to +0.0033) says discrimination is statistically identical — but McNemar's test on the frozen screening decisions (p = 0.0004) shows the models disagree at the operating point: the DNN catches more cases, the LSTM raises fewer false alarms. Deployment reading: DNN for case-finding, LSTM when false alarms are costly.

Leakage control, explicitly

  1. cognitive_screen_score was quarantined from the predictor pool — it participates in how the outcome is ascertained
  2. Split-first preprocessing — imputation, standardisation, and one-hot encoding fitted on the training split only
  3. Thresholds and the isotonic calibrator were frozen on train out-of-fold predictions — the hold-out was evaluated exactly once

Permutation importance puts age first (0.103), followed by a cognitive-reserve composite (0.029) and sleep problems (0.009) — consistent with the epidemiology, which is reassuring.

Honest caveats

The repo's QA plan lists its own limits: tuned-CV numbers may be slightly optimistic, the hold-out has now been inspected, and the dataset's provenance (collected vs synthetic) is explicitly unresolved. Checkpoints ship with MD5 sidecars so every number can be verified.