A machine learning model uncovers hidden self-harm histories across 18 European emergency departments

AI Flags Hidden Self-Harm History in Europe's Emergency Rooms

Machine learning models can now flag whether a patient arriving at a European emergency room has a documented history of self-harm, using only routine triage data. The finding addresses a deadly blind spot: prior intentional self-harm remains the strongest predictor of eventual suicide, yet emergency clinicians frequently miss or never ask about that history amid the noise of a busy department.

The study, published in Frontiers in Digital Health, analyzed more than 62,000 self-harm attendances recorded across 18 countries between 2008 and 2023. Researchers hit a wall almost immediately. Over 86 percent of records lacked any notation about prior self-harm history. Rather than throwing out this incomplete data, the team asked a different question: why was the information missing, and did the pattern of absence itself carry signal?

Country of origin alone predicted whether the field would be documented with striking accuracy, reaching an area under the curve of 0.948. Documentation practices, not clinical reality, drove the gaps. Meanwhile, countries with sparser overall recording showed higher proportions of positive flags among the records they did complete. Clinicians appeared to document prior self-harm only when they had strong reason to suspect it, meaning the observed cases were not a random sample.

The researchers responded with a three-step strategy. They excluded three countries where the field never got completed, redefined the prediction target to documented flags rather than true underlying history, and retained records with known outcomes. That left 26,554 records with a 13.7 percent prevalence of documented prior self-harm, roughly triple what a complete-case analysis would have preserved.

Their XGBoost model achieved an AUC of 0.800 on held-out test data. At a sensitivity-focused threshold, it caught 80.8 percent of documented positives while correctly clearing 62.8 percent of negatives. Negative predictive value reached 95.4 percent, meaning when the model said a patient likely had no documented history, it was right more than nineteen times out of twenty.

A time-zero version restricted to triage variables scored 0.762, only modestly lower. That version could inform the first clinical encounter rather than arriving after decisions had already formed. SHAP analysis identified proximal risk factor documentation, place of occurrence, and patient age as dominant drivers. Removing the potentially circular risk factor variable barely dented performance.

But validation exposed a troubling pattern. Under random splits, the model scored 0.800. Under temporal validation it fell to 0.674. Under group-aware cross-validation holding out entire countries, it dropped to 0.658. A country prediction test revealed why: clinical features alone identified the source country with 95.3 percent accuracy. The model exploited site-specific quirks that will not transfer to new settings.

Older adults posed another concern. Sensitivity in that subgroup fell to 68.0 percent, with a wide confidence interval. Late-life self-harm carries especially high suicide risk, often with more lethal methods and less prior mental health contact. Under-detecting this group could divert attention from patients who need it most.

The path forward requires local validation, country-specific recalibration, and embedding within structured follow-up pathways. Screening alone, whether by questionnaire or algorithm, does not reduce suicidal behavior. Identification saves lives only when it connects to safety planning, rapid outpatient linkage, and repeated contact.