A highly scalable deep learning language model for common risks prediction among psychiatric inpatients
- PMID: 40437564
- PMCID: PMC12121029
- DOI: 10.1186/s12916-025-04150-7
A highly scalable deep learning language model for common risks prediction among psychiatric inpatients
Abstract
Background: There is a lack of studies exploring the performance of Transformers-based language models in common risks assessment among psychiatric inpatients. We aim to develop a scalable risk assessment model using multidimensional textualized data and test the stability, robustness, and benefit of this approach.
Methods: In this real-world cohort study, a deep learning language model was developed and validated using first hospitalized cases diagnosed with schizophrenia, bipolar disorder, and depressive disorder between January 2016 and March 2023 in three hospitals. The algorithm was externally validated on an independent testing cohort comprising 1180 patients. A total of 140 features, including first medical records (FMR), laboratory examinations, medical orders, and psychological scales, were assessed for analysis. The outcomes were short- and long-term impulsivity (STI and LTI), risk of suicide (STSS and LTSS), and need of physical restraint (STPR and LTPR) assessed by qualified nurses or clinicians. Analysis was carried out between August 2024 and June 2024. Models with different architectures and input settings were compared with each other. The area under the receiver operating characteristic curve (AUROC) was used to assess the primary performance of models. The clinical utility was determined by the net benefit under Youden's threshold.
Results: Of 7451 patients included in this study, 2982 (47.6%) were male, and the median (interquartile range) age was 42 (28-57) years. The overall incidence of outcomes was 635 (8.5%), 728 (10.5%), 659 (8.8%), 803 (10.8%), 588 (7.9%), and 728 (9.8%) for STPR, LTPR, STSS, LTSS, STI, and LTI, respectively. The multitask semi-structured Transformers-based language (SSTL) model showed more promising AUROCs (STPR: 0.915; LTPR: 0.844; STSS: 0.867; LTSS: 0.879; STI: 0.899; LTI: 0.894) in the prediction of these outcomes than single-tasked or multimodal language models and traditional structured data models. Combining FMR with other data from electronic health records led to significant improvements in the performance and clinical utility of SSTL models based on demographic, diagnosis, laboratory tests, treatment, and psychological scales.
Conclusions: The SSTL model shows potential advantages in prognostic evaluation. FMR is a strong predictor for common risks prediction and may benefit other tasks in psychiatry with minimum requirements for data and data processing.
Keywords: Deep learning; Impulsivity; Physical restraint; Suicide risk; Transformers.
© 2025. The Author(s).
Conflict of interest statement
Declarations. Ethics approval and consent to participate: This study was approved by the Ethics Committee of Tongji University Mental Health Center (Approval No. PDJW-IIT-2023-017CS). The requirement for informed consent was waived due to the retrospective and de-identified nature of the data. All procedures were conducted in accordance with the Declaration of Helsinki and relevant local regulations. Consent for publication: Not applicable. This study does not contain any individual person’s data in any form (including individual details, images, or videos). Competing interests: The authors declare no competing interests.
Figures





Similar articles
-
Comprehensive Symptom Prediction in Inpatients With Acute Psychiatric Disorders Using Wearable-Based Deep Learning Models: Development and Validation Study.J Med Internet Res. 2024 Nov 13;26:e65994. doi: 10.2196/65994. J Med Internet Res. 2024. PMID: 39536315 Free PMC article.
-
Short-term Suicide Risk After Psychiatric Hospital Discharge.JAMA Psychiatry. 2016 Nov 1;73(11):1119-1126. doi: 10.1001/jamapsychiatry.2016.2035. JAMA Psychiatry. 2016. PMID: 27654151 Free PMC article.
-
Predicting Diagnostic Progression to Schizophrenia or Bipolar Disorder via Machine Learning.JAMA Psychiatry. 2025 May 1;82(5):459-469. doi: 10.1001/jamapsychiatry.2024.4702. JAMA Psychiatry. 2025. PMID: 39969874
-
Systematic reviews of the effectiveness of day care for people with severe mental disorders: (1) acute day hospital versus admission; (2) vocational rehabilitation; (3) day hospital versus outpatient care.Health Technol Assess. 2001;5(21):1-75. doi: 10.3310/hta5210. Health Technol Assess. 2001. PMID: 11532238 Review.
-
Risk Prediction Models in Psychiatry: Toward a New Frontier for the Prevention of Mental Illnesses.J Clin Psychiatry. 2017 May;78(5):572-583. doi: 10.4088/JCP.15r10003. J Clin Psychiatry. 2017. PMID: 27337225 Review.
References
-
- Miller JN, Black DW. Bipolar disorder and suicide: a review. Curr Psychiatry Rep. 2020;22(2):6. - PubMed
-
- Richard-Lepouriel H, Kung AL, Hasler R, Bellivier F, Prada P, Gard S, Ardu S, Kahn JP, Dayer A, Henry C, et al. Impulsivity and its association with childhood trauma experiences across bipolar disorder, attention deficit hyperactivity disorder and borderline personality disorder. J Affect Disord. 2019;244:33–41. - PubMed
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Medical