Abstract
Dementia and mild cognitive impairment (MCI) are frequently under-diagnosed and under-coded in electronic health records (EHRs), often leaving critical diagnostic signals buried within unstructured clinician notes. This study presents a deep learning approach using the Longformer architecture to identify patients with cognitive concerns by processing long-form clinical text. Our model achieved an Area Under the Curve (AUC) of 0.93, significantly outperforming traditional methods based on structured diagnosis codes. These results demonstrate that the most valuable diagnostic indicators are often found in the narrative text of medical records, and that advanced NLP techniques can bridge the "information gap" for early dementia detection.
Introduction
Dementia is a major public health challenge that is notoriously difficult to track within healthcare systems. It is frequently under-diagnosed by clinicians and under-coded in insurance claims; research suggests that over 50% of older adults with probable dementia lack a formal diagnosis code in their records.
While structured data—such as ICD-10 codes or specific prescriptions—is easily processed by automated systems, it often misses early, subtle signs of cognitive decline. These "red flags," including subjective memory complaints or observations by family members, are typically documented in unstructured clinician progress notes. Manually reviewing these notes at scale is prohibitively time-consuming, creating a massive gap in data that prevents early intervention and care planning.
Methods and Data
The researchers evaluated four distinct modeling approaches to identify "cognitive concerns," defined as signs of dementia or mild cognitive impairment:
- Structured Baseline (Model 1): Regularized logistic regression using counts of specific ICD codes and dementia-related medications.
- Regex Model (Model 2): Logistic regression based on the frequency of 15 categories of keywords/regular expressions (e.g., "memory," "confusion").
- TF-IDF Model (Model 3): A standard NLP approach weighting words based on frequency and uniqueness.
- Longformer (Model 4): An attention-based Transformer model capable of processing long sequences. Using a "sliding window" strategy, the model aggregated predictions across lengthy clinical notes to make patient-level assessments.
The study utilized a "gold-standard" dataset of 1,000 randomly sampled patients from the Mass General Brigham healthcare system. Every record was manually reviewed and labeled by expert clinicians (neurologists, psychiatrists, or geriatricians). After filtering for patients with available progress notes, the final cohort consisted of 767 patients, split 90/10 for training/validation and testing.
Key Results and Insights
The deep learning model (Model 4) was the superior performer across nearly all metrics, achieving a high AUC of 0.93 and near-perfect specificity (0.98).
The "Hidden" Signal in Clinical Notes
The baseline model, which relied solely on structured data, produced 14 false negatives in the test set. Upon manual review, 8 of these patients had subjective concerns or MCI mentioned in their notes, and 6 actually had dementia—yet none had the corresponding medical codes. This confirms that clinician notes are the primary source of truth for early-stage decline.
Context and Long-Form Text
While keyword matching (Model 2) improved upon the baseline, the Longformer model excelled by understanding context. It can distinguish, for example, between a patient "denying memory loss" and one "complaining of memory loss." Furthermore, by using the Longformer's ability to handle long-form text, the researchers captured signals distributed across entire clinical encounters rather than isolated sentences.
While the TF-IDF model (Model 3) achieved the highest sensitivity (0.85), the Longformer provided a more robust balance of metrics, particularly its high specificity, which ensures that healthy patients are rarely misidentified.
Conclusion and Future Directions
While the results are promising, the study was limited by a relatively small "gold standard" dataset of 767 patients. Future work will involve implementing active learning to efficiently expand the dataset by identifying "edge cases" for human labeling. Additionally, the researchers aim to move beyond binary classification to categorize the specific stage of impairment (e.g., MCI vs. severe dementia). To improve clinical utility, the team has developed an annotation tool that highlights the specific sections of a note that triggered the model's flag, providing explainability for healthcare providers.
Summary updated