TL;DR
This paper introduces the Depression and Anxiety Prediction (DAP) model, a deep learning framework that leverages contrastive pre-training on heterogeneous electronic health records (EHRs) to predict depression and anxiety risk in type 2 diabetes mellitus (T2DM) patients. The DAP model significantly outperforms baseline methods, demonstrating its potential for early detection and intervention in primary healthcare settings.
What Problem Does This Paper Address?
Patients with type 2 diabetes mellitus (T2DM) have a significantly higher risk of experiencing depression and anxiety compared to the general population. These mental health conditions can negatively impact diabetes self-management, glycemic control, and overall health outcomes, leading to increased healthcare costs and a higher risk of complications. Primary healthcare services (PHS) are crucial for managing T2DM and are increasingly expected to play a role in mental health identification. However, assessing psychological risk in PHS is challenging due to:
- Data Heterogeneity and Scarcity: EHRs contain a mix of structured (e.g., demographics, lab results) and unstructured (e.g., clinical notes) data, making it difficult for traditional models to capture the full picture. Furthermore, PHS often have limited data availability compared to larger hospital systems.
- Limitations of Existing Tools: Standardized questionnaires for depression and anxiety can be prone to subjective interpretation and may not fully capture the nuances of a patient's condition.
- Lack of Mental Health Specialists: PHS often lack dedicated mental health professionals, leading to delays in identifying and addressing these issues.
This paper aims to bridge this gap by developing a robust, data-driven model that can effectively predict depression and anxiety risk in T2DM patients within the PHS context, even with fragmented and limited data.
Methods
The core innovation of this work lies in the application of contrastive pre-training for EHR data. The proposed DAP model consists of two main stages:
- Contrastive Pre-training (DAPCP):
- Unsupervised Learning: The model is first pre-trained on a large, unlabeled dataset of T2DM patient discharge records from a major hospital (First Affiliated Hospital of Nanjing Medical University - FAHNMU).
- Heterogeneous Data Encoding: Separate encoders are used for structured (demographics, lab results) and unstructured (medical history, diagnoses, medications) data. A fusion encoder then combines these representations.
- Contrastive Objective: The pre-training uses a contrastive loss function to learn representations that maximize similarity between related parts of a patient's record (e.g., diagnosis and medication) while minimizing similarity with unrelated parts. This helps the model learn meaningful embeddings from the heterogeneous EHR data without explicit labels.
- Supervised Fine-tuning (DAPFT):
- Task-Specific Training: The pre-trained DAPCP model is then fine-tuned on a smaller, labeled case-control dataset from the Nanjing Health Information Platform (NHIP) and PHS.
- Prediction: The fine-tuned model (DAPFT) is trained to predict the occurrence of depression or anxiety within specific time intervals (30, 180, and 365 days) after discharge.
- Validation: The model is validated internally on NHIP data and externally on PHS data, including various types of primary care facilities.
This two-stage approach allows the model to learn generalizable representations from a large unlabeled dataset, which then improves performance on the specific prediction task with limited labeled data.
Datasets
- Pre-training Dataset: Discharge records from 85,085 T2DM patients (183,662 records) from the First Affiliated Hospital of Nanjing Medical University (FAHNMU). This dataset was used for unsupervised contrastive learning.
- Fine-tuning and Internal Validation Dataset: Case-control cohorts of T2DM patients from the Nanjing Health Information Platform (NHIP), totaling 149,596 patients (251,361 discharge records).
- External Validation Dataset: Primary healthcare services (PHS) data, including 78 PHS facilities, and specific sub-cohorts (GHSL, GHSM, TCM-HS) from NHIP.
Key Insights and Ideas
- Contrastive Pre-training for EHRs is Effective: The study demonstrates that contrastive learning is a powerful technique for learning robust representations from heterogeneous EHR data, especially when labeled data is scarce. This approach helps overcome the limitations of traditional methods that rely on manual feature engineering or solely structured data.
- Bridging the Gap Between Hospital and Primary Care: By pre-training on large hospital data and fine-tuning on PHS data, the DAP model effectively addresses the data fragmentation and scarcity issues prevalent in primary care settings.
- Early Detection Potential: The model's ability to predict risk at multiple time points post-discharge highlights its potential for proactive intervention and personalized care for T2DM patients.
- Feature Importance for Mental Health: Integrated Gradients (IG) analysis revealed that diagnoses (e.g., postherpetic neuralgia, burn and corrosion) and medications (e.g., finasteride, telmisartan) are key predictors, suggesting potential links between specific conditions and mental health outcomes.
Key Results
- Superior Performance: The fine-tuned DAP model significantly outperformed baseline models (logistic regression, extreme gradient boosting, and random forest) in both internal and external validation.
- Internal Validation (PHS): ROC-AUC of 0.91±0.028 and PR-AUC of 0.80±0.067.
- External Validation (PHS): ROC-AUC of 0.75±0.045 and PR-AUC of 0.47±0.081.
- Faster Convergence: The pre-training step allowed the DAP model to converge at a faster rate during training.
- Clinical Utility: Decision Curve Analysis (DCA) indicated that the DAP model has significant clinical potential for identifying patients at risk of depression and anxiety.
- Feature Insights: The top features contributing to predictions included specific diagnoses like postherpetic neuralgia and burn/corrosion, and medications like finasteride.
Limitations and Future Work
- False Positives: The study acknowledges a possibility of false positives in control groups, a common issue in mental health prediction models.
- Data Integration: Future work could involve integrating with larger medical data platforms (e.g., Jiangsu Province) to enhance model generalizability.
- Hospitalized vs. Non-Hospitalized Patients: The current model focuses on hospitalized patients. Future research could explore differences and generalize to patients who do not require hospitalization.
- Prospective Clinical Validation: The authors emphasize the need for prospective clinical validation to confirm the model's long-term effectiveness and its benefits for glycemic management.
- Hierarchical Structure for Diagnoses: The model could be improved by incorporating hierarchical relationships between diagnoses to better capture their associations.
Summary updated