A machine learning model that can both diagnose dementia on the spot and forecast its onset up to ten years into the future has been developed by researchers working at the intersection of clinical psychiatry and artificial intelligence. The study, published in the Journal of Medical Systems, demonstrates that a single algorithm built from twenty routinely collected secondary-care variables can achieve some of the strongest sensitivity and specificity figures reported for dementia detection, while also incorporating two elements that have long been missing from medical AI: transparency and fairness testing. The work arrives at a moment when health systems, particularly the United Kingdom’s National Health Service, are struggling with long waiting lists for memory assessment services, and it suggests that a carefully engineered algorithm could help ease that burden without sacrificing clinical rigour.
The scale of the underlying problem is enormous. Nearly sixty million people worldwide live with dementia, a syndrome most commonly caused by Alzheimer’s disease and marked by progressive deterioration of memory, speech and judgment, and that figure is expected to more than double by 2050. Because irreversible brain damage typically occurs long before a clinical diagnosis is made, the most effective defence against the disease is early detection paired with risk-reducing lifestyle interventions. Yet conventional diagnostic approaches, which combine psychometric testing, imaging and lifestyle data, are time- and resource-intensive, often requiring multiple specialist referrals and producing delays that were further exacerbated by the COVID-19 pandemic. Simplified toolkits such as the CAIDE and BDSI risk scores were designed to help, but they operate over fixed, pre-specified horizons, target narrow age groups, and in some analyses add little discriminative value beyond knowing a patient’s age alone.
Previous machine learning models trained on large clinical datasets promised improvements but were typically locked into a single fixed prediction window, such as twenty-nine months or one year. The research team behind the new study hypothesised that this rigidity is itself a core limitation: defining one prediction horizon discards valuable data and can introduce sampling bias when right-censored data, meaning patients whose follow-up ended before the horizon, is handled poorly. Their solution was elegant. They introduced a feature called HORIZON, which encodes the number of months between a patient’s baseline visit and each subsequent visit, and set it to zero for immediate diagnosis. Rather than building separate models for each time frame, the algorithm treats the prediction window as just another input, learning how the relationship between risk factors and dementia changes, or does not change, as the horizon stretches out. The approach is conceptually related to a statistical technique known as survival stacking, which recasts time-to-event analysis as a classification problem, but here the researchers exploited the naturally rich multi-visit structure of their dataset instead of generating synthetic samples.
The data came from the Uniform Data Set of the National Alzheimer’s Coordinating Center, a collaboration spanning more than 42 American research centres, covering 47,400 patients between June 2005 and February 2023. After rigorous preprocessing, including the removal of variables with more than seventy percent missing values and the elimination of highly correlated features, the team arrived at 134,117 visit records from 47,017 unique patients. Critically, variable selection was clinically informed from the outset: a consultant psychiatrist working in an NHS memory assessment service reviewed candidate variables against two criteria, routine availability in secondary care and minimal reliance on subjective expert judgment, so that the final inputs could plausibly be collected by junior doctors or medical assistants. Recursive feature elimination, embedded within a nested cross-validation pipeline, then narrowed the field to the twenty most informative variables.
Six machine learning algorithms competed in the study, and the K-Nearest Neighbour classifier emerged as the strongest. Its logic is intuitively clinical: to classify a new patient, the model compares their profile against the hundred most similar patients with known dementia status and weighs each equally, effectively mimicking a clinician reasoning from a wealth of prior comparable cases. For same-visit diagnosis, the model achieved a sensitivity of 0.951 and a specificity of 0.810, with an area under the receiver operating characteristic curve of 0.959. Across future horizons from 24 to 120 months, sensitivity remained high, ranging between 0.808 at two years and 0.833 at ten years, while specificity declined from 0.856 to 0.706 as the horizon lengthened, an expected trade-off in risk prediction. Class imbalance was addressed with SMOTE-NC oversampling applied within each horizon group, and all preprocessing was confined to training folds to prevent information leakage.
The flexible-horizon model was also benchmarked against a Cox proportional hazards survival model, the conventional statistical approach for time-to-event outcomes. The comparison revealed complementary strengths: the KNN model achieved a higher geometric mean of sensitivity and specificity at four of the five evaluated horizons and substantially greater specificity from 48 months onwards, whereas the Cox model delivered greater sensitivity at longer horizons. Importantly, the machine learning approach offers practical advantages beyond raw performance, supporting point-of-assessment diagnosis, something a survival model cannot do, and fitting into standard supervised learning pipelines without requiring assumptions such as proportional hazards or non-informative censoring.
Transparency was built into the analysis through Shapley additive explanations, a technique that assigns each feature a contribution value for every individual prediction. Globally, the two most influential features were functional independence and the prediction horizon itself, followed by cognitive measures including the animal naming test, the Mini-Mental State Examination and the geriatric depression scale. The explanations aligned with established clinical understanding: lower cognitive test scores, loss of functional independence, poorer recall of significant dates and difficulty assembling tax records all pushed the model’s risk estimate upward. Local explanations, presented as waterfall plots, showed how individual features shifted the risk score for specific patients, the kind of case-by-case interpretability that clinicians increasingly demand before trusting an algorithm. Notably, age ranked lower than expected, likely because its effect is partially absorbed by the horizon feature.
Fairness received equally serious attention. The team evaluated performance across subgroups defined by sex, race and age, computing equal opportunity, predictive equality and a novel G-mean equality ratio. Balanced discrimination proved broadly similar across most groups, but the trade-offs differed: males showed higher sensitivity but lower specificity than females, Asian and Other race subgroups showed high sensitivity with lower specificity, and the small 18-44 age group showed lower sensitivity but very high specificity. The authors are careful to frame these results as an initial internal fairness assessment rather than proof of equity, noting that some subgroup estimates rested on small sample counts, and they caution that false negatives and false positives carry different clinical consequences, from delayed assessment to unnecessary anxiety and referral burden.
The researchers have deployed the model as an interactive web application built with Streamlit, intended strictly for demonstration, clinician feedback and future validation rather than autonomous diagnosis. The app runs password-protected on a small cloud instance, retains no user data after each session, and has not yet undergone formal cybersecurity assessment, clinical safety review or regulatory evaluation. They estimate that collecting the model’s twenty inputs, many of which are brief: the MMSE takes roughly five to ten minutes, the short-form geriatric depression scale five to seven, and the animal naming task just sixty seconds, could be completed in around thirty minutes within a suitably prepared secondary-care workflow, compared with a conventional memory clinic appointment of an hour and a half or more. Because the feature set includes modifiable risk factors such as blood pressure, body mass index and depression measures, clinicians could in principle use local explanations to simulate how changing specific factors might alter a patient’s projected risk.
The team is candid that the model is not clinically ready. All training and validation data originate from the American NACC cohort, which may not fully represent demographics, referral pathways or assessment procedures in UK secondary care or other health systems. The raw KNN outputs are not fully calibrated as absolute probabilities, particularly at shorter horizons, and should be interpreted as model-estimated risk scores. The model also treats all-cause dementia as a single label, collapsing distinctions between Alzheimer’s, vascular and other subtypes. The authors’ staged pathway forward is methodical: retrospective evaluation on historical data from a real NHS memory clinic, silent prospective testing in which outputs are generated but not acted upon, clinician usability assessment, workflow impact analysis, and finally governance, cybersecurity and regulatory review. If those hurdles are cleared, a flexible-horizon, explainable and fairness-tested algorithm could become a genuine decision-support companion, one that complements rather than replaces clinical judgment, concentrates specialist time on the hardest cases, and helps bring dementia detection closer to the moment when intervention still matters most.
Subject of Research: A flexible-horizon machine learning model for dementia early detection and risk prediction in secondary care using responsible AI principles
Article Title: A Flexible-Horizon Clinical Decision Support Model for Dementia Early Detection and Risk Prediction in Secondary Care: A Responsible AI Approach
Article References: Ez-zizi, A., Seelam, K., Leggett, L., & Malik, B. R. (2026). A Flexible-Horizon Clinical Decision Support Model for Dementia Early Detection and Risk Prediction in Secondary Care: A Responsible AI Approach. Journal of Medical Systems, 50(1), Article 132. https://doi.org/10.1007/s10916-026-02458-2
Image Credits: AI Generated
DOI: 10.1007/s10916-026-02458-2
Keywords: dementia, machine learning, responsible AI, clinical decision support, risk prediction, NACC Uniform Data Set, K-nearest neighbours, SHAP explainability, algorithmic fairness, secondary care, survival analysis, early detection
Cite Scienmag News
Cassandra Pierce. (September 20, 2026). AI Model Detects Dementia Early and Predicts Risk Over Flexible Timelines. Scienmag. https://scienmag.com/ai-model-detects-dementia-early-and-predicts-risk-over-flexible-timelines/
Cassandra Pierce. "AI Model Detects Dementia Early and Predicts Risk Over Flexible Timelines." Scienmag, 20 September 2026, https://scienmag.com/ai-model-detects-dementia-early-and-predicts-risk-over-flexible-timelines/. Accessed 20 September 2026.
Cassandra Pierce. "AI Model Detects Dementia Early and Predicts Risk Over Flexible Timelines." Scienmag. September 20, 2026. https://scienmag.com/ai-model-detects-dementia-early-and-predicts-risk-over-flexible-timelines/

