# Machine learning strategies for predicting pediatric suicidal behaviors in a Brazilian emergency setting

**Authors:** Isis F. Carvalho, Ana Paula Couto da Silva, Anisio M. Lacerda, Wagner Meira, Danilo Bastos Bispo Ferreira, Lys Malloy Diniz, Alexandre Luiz de Oliveira Serpa, Maria Carolina Lobato Machado, Marco A. Romano-Silva, Debora Marques de Miranda, Gisele Lobo Pappa

PMC · DOI: 10.3389/frai.2026.1662264 · Frontiers in Artificial Intelligence · 2026-02-18

## TL;DR

This paper explores using machine learning to predict suicidal behaviors in Brazilian youth emergency care settings, emphasizing social factors and model transparency.

## Contribution

The study introduces a tailored machine learning approach for predicting suicide risk in middle-income countries using social and clinical data with SHAP explanations.

## Key findings

- Random Forest with oversampling achieved high sensitivity in predicting suicidal behaviors.
- Social determinants were identified as critical predictors in middle-income contexts.
- SHAP values provided transparent insights into model predictions and risk factors.

## Abstract

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.

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.

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.

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.

## Full-text entities

- **Genes:** SHROOM4 (shroom family member 4) [NCBI Gene 57477] {aka MRXSSDS, SHAP, shrm4}
- **Diseases:** mood disorders (MESH:D019964), suicidal ideation (MESH:D001072), Self-harm (MESH:D012652), Learning difficulties (MESH:D007859), suicidal tendencies (MESH:C536965), injury (MESH:D014947), poisoning (MESH:D011041), Suicidal behavior (MESH:D001523), substance abuse (MESH:D019966), schizophrenia (MESH:D012559), anxiety (MESH:D001007), DM (MESH:D009223), Depression (MESH:D003866), TP (MESH:C579935), aggressiveness (MESH:D010554), neuro-psychomotor development delays (MESH:D002658), hallucinations (MESH:D006212), death (MESH:D003643), intellectual disability (MESH:D008607), Agitation (MESH:D011595)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12956778/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12956778/full.md

## References

36 references — full list in the complete paper: https://tomesphere.com/paper/PMC12956778/full.md

---
Source: https://tomesphere.com/paper/PMC12956778