- Research Article
- 10.3389/frai.2026.1662264
Machine learning strategies for predicting pediatric suicidal behaviors in a Brazilian emergency setting
- Feb 18, 2026
- Frontiers in Artificial Intelligence
- Isis F Carvalho + 10 more +10
Background Suicide is a leading cause of death worldwide, yet its prediction remains a challenge. This difficulty arises not only because suicidal behavior is a rare event in the general population, leading to significant class imbalance in datasets, but also due to its complex, multi-causal nature involving a non-linear interplay of sociodemographic and clinical factors. Furthermore, while the majority of suicides occur in middle-income countries, there is a lack of predictive models tailored to these specific social contexts. This study evaluates machine learning strategies in an enriched clinical setting: a pediatric psychiatric emergency center in Brazil. Methods We analyzed a comprehensive database of 2,365 youth seeking emergency care. We benchmarked three machine learning algorithms, namely Logistic Regression, Random Forest, and XGBoost, to predict three outcomes: self-harm, suicidal ideation, and suicide attempts. To address class imbalance, we applied oversampling techniques to the training data. We also used SHapley Additive exPlanations (SHAP) values to quantify each feature's contribution to the predictions. Findings and interpretation In this setting, suicide-related behaviors represented 28.7% of the clinical demand. The Random Forest model combined with oversampling was the most effective strategy, achieving sensitivities of 78.04% for suicidal ideation, 71.18% for suicide attempts, and 69.37% for self-harm. Specificity remained consistently above 75%. SHAP value analysis revealed that social determinants were critical predictors, highlighting that social conditions in middle-income populations introduce unique variables that significantly influence suicidal risk. While accuracy for suicide attempts remained a challenge, SHAP provided clear clinical insights into the drivers of risk. Conclusions Machine learning, specifically Random Forest models together with oversampling and SHAP, demonstrates strong potential for identifying suicidal risk in pediatric emergency settings. By integrating clinical data with social determinants, these models provide a transparent and scalable strategy for early identification in regions with limited specialized psychiatric resources.
Read more