Using Deep Learning to Identify Patients with Cognitive Impairment in Electronic Health Records

Tanish Tyagi, Colin G. Magdamo, Ayush Noori, Zhaozhi Li, Xiao Liu, Mayuresh Deodhar, Zhuoqiao Hong, Wendong Ge, Elissa M. Ye, Yi-han Sheu, Haitham Alabsi, Laura Brenner, Gregory K. Robbins, Sahar Zafar, Nicole Benson, Lidia M. V. R. Moura, John Hsu, Alberto Serrano-Pozo, Dimitry Prokopenko, Rudolph E. Tanzi, Bradley T. Hyman, Deborah Blacker, Shibani S. Mukerji, M. Brandon Westover, Sudeshna DasarXiv 2021

Introduction

Dementia is a significant global health challenge, yet it remains chronically underdiagnosed. Current statistics suggest that only one in four people with dementia receive a formal diagnosis. A major barrier to tracking and treating the disease is that even when a clinician recognizes cognitive decline, this information often fails to appear in structured "claims data," such as ICD-10 codes. In fact, over 50% of older adults with probable dementia lack a formal code in their electronic health records (EHR).

The true clinical status of a patient is frequently buried within the free-text narrative of clinician notes. However, the sheer volume of these notes makes manual review impossible at scale. This research presents an automated, scalable Natural Language Processing (NLP) tool designed to "read" these notes and identify early signs of cognitive impairment (CI), facilitating earlier intervention and improved clinical trial recruitment.

Methods

The study compared two distinct NLP methodologies to classify patient sequences from clinician notes:

  1. TF-IDF Baseline Model: A traditional "bag-of-words" approach that counts term frequencies and utilizes logistic regression for classification. While computationally efficient, this model struggles with linguistic context—for example, it may incorrectly flag a patient for dementia if the note mentions a family member's history.
  2. ClinicalBERT Deep Learning Model: The proposed approach involves fine-tuning a pre-trained transformer model, ClinicalBERT, on labeled medical notes. This model utilizes "attention" mechanisms to understand the specific context surrounding keywords, allowing it to distinguish between the patient and other entities mentioned in the text.

To streamline the creation of a gold-standard dataset, the researchers employed an "Always Pattern" annotation scheme. By defining specific regular expressions that consistently indicate a specific class (e.g., specific MOCA scores), they automatically labeled thousands of sequences, which were then supplemented by expert manual review.

Figure 1: Overview of the study workflow, from EHR data extraction and pre-processing to model comparison.

Datasets

Data was sourced from the Mass General Brigham (MGB) Biobank, focusing on a cohort of 16,428 patients aged 60 and older. The researchers extracted 279,224 text sequences containing 18 dementia-related keywords (such as "memory," "MCI," and "Alzheimer"). From this, a final annotated dataset of 8,656 sequences from 2,487 unique patients was used for training and validation.

Results and Key Insights

The deep learning approach significantly outperformed the traditional baseline across all performance metrics:

Metric TF-IDF (Baseline) ClinicalBERT (Proposed)
AUC 0.95 0.98
Accuracy 0.84 0.93
Sensitivity 0.83 0.91
Specificity 0.92 0.96

Identifying the "Undiagnosed"

A primary finding of the study was the model's ability to identify "hidden" patients. When applied to unlabeled data, the NLP tool identified a substantial number of patients predicted to have CI who lacked any dementia-related ICD codes or medications in their structured records. This highlights a massive gap between clinical reality captured in text and the structured data used for administrative and research purposes.

Figure 2: Confusion matrix illustrating the discrepancy between NLP-predicted cognitive impairment and the presence of structured ICD codes or medications.

Furthermore, the model's utility was validated against genetic data; patients carrying the APOE ε4 allele (a known genetic risk factor for Alzheimer's) were significantly more likely to be flagged for CI by the NLP model, even in the absence of formal diagnosis codes.

Conclusion and Future Work

While the sequence-level classification is highly accurate, the researchers acknowledge the current lack of comprehensive patient-level annotations. Future work will focus on active learning to improve edge-case performance and the development of clinical integration tools. Such tools could alert primary care physicians to perform formal cognitive evaluations when the NLP model flags specific indicators in a patient's narrative notes, potentially closing the gap in dementia diagnosis.

Summary updated

BibTeX
@misc{tyagi2021using,
  author = {Tanish Tyagi and Colin G. Magdamo and Ayush Noori and Zhaozhi Li and Xiao Liu and Mayuresh Deodhar and Zhuoqiao Hong and Wendong Ge and Elissa M. Ye and Yi-han Sheu and Haitham Alabsi and Laura Brenner and Gregory K. Robbins and Sahar Zafar and Nicole Benson and Lidia M. V. R. Moura and John Hsu and Alberto Serrano-Pozo and Dimitry Prokopenko and Rudolph E. Tanzi and Bradley T. Hyman and Deborah Blacker and Shibani S. Mukerji and M. Brandon Westover and Sudeshna Das},
  title = {{Using Deep Learning to Identify Patients with Cognitive Impairment in Electronic Health Records}},
  year = {2021},
  eprint = {2111.09115},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.09115},
}
Figure