Hostname: page-component-7b7567c8c-ccngd Total loading time: 0 Render date: 2026-12-02T10:01:35.993Z Has data issue: false hasContentIssue false

AI-based algorithms trained with real-world data for suicide risk prevention in adult mental health patients: The IDICIUS Project

Published online by Cambridge University Press:  31 July 2026

M. Fradera
Affiliation:
Research Support Unit, Institut d’Investigació i Innovació Parc Taulí (I3PT-CERCA)Unitat Mixta de Neurociències Traslacional I3PT-CERCA-INc-UAB, Universitat Autònoma de Barcelona, SabadellCentro de Investigación Biomédica en Red de Salud Mental (CIBERSAM), Instituto de Salud Carlos III, Madrid
C. Peña-Gómez
Affiliation:
Institut d’Investigació i Innovació Parc Taulí (I3PT-CERCA), Sabadell
X. Sánchez Corrales
Affiliation:
Institut d’Investigació i Innovació Parc Taulí (I3PT-CERCA), Sabadell
M. Caravaca
Affiliation:
Institut d’Investigació i Innovació Parc Taulí (I3PT-CERCA), Sabadell
D. Roche
Affiliation:
Research Institute for Evaluation and Public Policies (IRAPP), Universitat Internacional de Catalunya (UIC)
C. Pontes
Affiliation:
Digitalization for the Sustainability of the Healthcare System (DS3)Departament de Farmacologia, de Toxicologia i de Terapèutica, Universitat Autònoma de BarcelonaServei de Farmacologia Clínica, Hospital de la Santa Creu i de Sant Pau, Barcelona
E. Barberia
Affiliation:
School of Medicine and Health Sciences, Forensic Pathology Department. Institut de Medicina Legal i Ciències Forenses de Catalunya (IMLCFC), Reus
J. Giraldo
Affiliation:
Unitat Mixta de Neurociències Traslacional I3PT-CERCA-INc-UAB, Universitat Autònoma de Barcelona, SabadellCentro de Investigación Biomédica en Red de Salud Mental (CIBERSAM), Instituto de Salud Carlos III, MadridLaboratory of Molecular Neuropharmacology and Bioinformatics, Unitat de Bioestadística and Institut de Neurociències, Universitat Autònoma de Barcelona, Bellaterra
D. Palao*
Affiliation:
Unitat Mixta de Neurociències Traslacional I3PT-CERCA-INc-UAB, Universitat Autònoma de Barcelona, SabadellCentro de Investigación Biomédica en Red de Salud Mental (CIBERSAM), Instituto de Salud Carlos III, MadridDepartment of Mental Health, Institut d’Investigació i Innovació Parc Taulí (I3PT-CERCA), SabadellDepartment of Psychiatry and Forensic Medicine, Medical School, Universitat Autònoma de Barcelona, Bellaterra, Spain
*
*Corresponding author.

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.
Introduction

Suicidal behaviour is a major public health challenge, characterized by heterogeneity and limited predictability in clinical practice. Approximately 50-80% of suicide victims had prior healthcare contact, with 60% within the previous month. Electronic health records (EHRs) provide longitudinal data that, when analysed with artificial intelligence (AI), can uncover complex patterns preceding suicidal behaviour. The IDICIUS project aims to translate this potential into a hospital-based early warning system to support clinical decision-making.

Objectives

To develop machine learning models for suicide risk prediction using real-world data from EHRs, creating a hospital-based early warning system to complement clinical assessment.

Methods

We conducted a retrospective, population-based study including 41,557 adult patients followed in Parc Taulí Mental Health Service between January 1, 2018, and June 1, 2024. Four RWD sources were integrated: mental health EHRs, Catalonia Suicide Risk Code registry, forensic suicide death records, and outpatient medication data. The final dataset comprised 112 variables and 32,661 adult patients (age range 18–95 years, mean 47.08±19.39, 55.9% female), of whom 2,764 exhibited suicidal behaviour (suicide attempt, active ideation, or death). Models were trained using multiple machine learning algorithms, including logistic regression, support vector machines, ensemble methods (Gradient Boosting, XGBoost, CatBoost, Random Forest, AdaBoost), and deep learning. Performance was assessed on a separate test set using ROC-AUC, precision, recall, accuracy, and F1-score. Hyperparameters were tuned with cross-validation, prioritising recall to minimise false negatives. To address class imbalance, under-sampling was applied.

Results

As shown in Image 1, ensemble methods outperformed traditional statistical models. Gradient Boosting and XGBoost achieved the best overall performance with ROC-AUC >0.95, accuracy >0.91, recall 0.84–0.85, and F1-scores around 0.68. While precision was moderate (0.51–0.58), high recall ensured that most true positive cases were captured. Deep learning models showed acceptable performance (ROC-AUC 0.90, recall 0.69), but did not surpass ensemble methods. Logistic regression and elastic net yielded lower ROC-AUC (<0.85) and F1-scores (<0.40). The most important features of the two best-performing models are presented in Images 2 and 3.Image 1:

A line graph showing R O C curves for eleven machine learning models comparing True Positives against False Positives. See long description.Image 2:

A S H A P summary plot for a Gradient Boosting model showing feature importance and impact on model output. See long description.Image 3:

A SHAP summary plot for an XGBoost model showing feature importance and impact on model output. See long description.

Conclusions

Integrating multiple RWD sources enabled the development of robust AI-based models for suicide risk prediction. Ensemble methods, particularly Gradient Boosting and XGBoost, demonstrated the best trade-off between recall and precision, supporting their use in early warning systems. Future steps include prospective clinical validation and large-scale implementation in hospital EHRs to assess real-world impact on suicide prevention.

Disclosure of Interest

None Declared

Information

Type
Abstract
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of European Psychiatric Association
Submit a response

Comments

No Comments have been published for this article.