Machine learning predicts suicide risk from electronic health records

Multidimensional Suicide Risk Assessment with Machine Learning using Electronic Health Records

Machine Learning

Summary

Suicide prevention is an important health challenge, and electronic health records contain lots of information that can help identify people at risk. The authors used machine learning on hospital data to predict suicide risks by combining many types of health and social information. They adjusted their methods to fairly compare people of the same age and found that a specific machine learning model worked best. Their approach also helps explain which health factors contribute most to suicide risk predictions.

What this means in practice

  • For hospital data teams: Integrate machine learning models into clinical data systems to flag patients with elevated suicide risk based on broad health and social features.
  • For mental health care providers: Use risk predictions derived from patient records to inform clinical decision-making and prioritize interventions for suicide prevention.

Authors

Nathan Scollar, Kemal Davaslioglu, Nathan Conger, Sastry Kompella, Yalin E. Sagduyu, Nathaniel D. Bastian

Abstract

Suicide prevention remains a critical public health challenge, and electronic health records (EHRs) provide an opportunity to characterize suicide-related risk indicators using documented clinical, behavioral, medical, and social-contextual information. This paper presents a multidimensional machine learning framework to model and estimate suicide-related outcomes using MIMIC-IV EHR data. We construct clinically motivated diagnosis categories and define a composite outcome from documented codes corresponding to suicidal ideation, suicide attempt, prior suicidal behavior, and intentional self-harm. To address severe class imbalance and reduce age-related confounding, we apply age-matched resampling that retains all positive patients and samples comparison-cohort patients from the same age group. Logistic regression, random forest, and XGBoost classifiers are evaluated before and after resampling with isotonic calibration. The calibrated XGBoost model achieves the strongest matched-cohort performance, outperforming the other evaluated classifiers. SHAP-based interpretation shows that diagnostic burden, depression-related features, age, personality-disorder history, social determinants related to violence, and medical comorbidity contribute to elevated predicted probabilities. Our results demonstrate that combining broad EHR-derived features, age-matched cohort construction, calibration, and feature-level interpretation provides a practical framework for retrospective suicide-related risk modeling.