HMN 2026: How A new algorithm can spot who may be headed for self-harm before warning signs become obvious

Credit: Gadiel Lazcano, Unsplash.com.

Depression, one of the most widespread mental health disorders, is characterized by a persistent low mood and a loss of interest in everyday activities, along with possible sleep disruptions and/or changes in appetite. Some people diagnosed with this disorder can harm themselves and, in most serious and severe cases, attempt suicide.

Identifying patients who are at a higher risk of harming themselves is of great importance, as it allows mental health professionals to intervene and better support these patients at critical times. So far, however, accurately predicting the risk of self-harm has proved to be challenging.

Researchers at the University of Hong Kong have developed a new model that was found to predict the risk that individuals with depression will harm themselves with good accuracy. This model, introduced in a paper published in Molecular Psychiatry, could help to devise more effective and personalized depression treatment plans.

“We acknowledge that depression is a highly prevalent mental disorder and is associated with significant disability,” Wing Chung Chang, senior author of the paper, told Medical Xpress.

“Importantly, self-harm and suicide are closely associated with depression, representing a major public health concern. Thus far, there is a paucity of data regarding developing an accurate prediction model of self-harm in people with newly diagnosed depression. We recognized that the electronic health-record database (EHR), which captures routinely collected clinical data, is a powerful resource for risk prediction model development in self-harm.”

Training risk prediction algorithms on a large dataset

To develop their risk prediction model, Chang and his colleagues leveraged the EHR database, a large dataset that contains the health records of over 100,000 people living in Hong Kong who were diagnosed with depression.

This database was compiled by public health care services in Hong Kong and includes 20 years of clinical data. Using EHR data, the researchers developed and tested a one-year prediction model to estimate the risk of self-harm among people who were recently diagnosed with depression.

“We developed risk prediction algorithms for self-harm using the least absolute shrinkage and selection operator (LASSO) method and backward regression model, utilizing the clinical data of 102,863 individuals with newly diagnosed depression from a territory-wide electronic health-record database of public health care services in Hong Kong,” said Chang.

“We included a comprehensive array of candidate predictor variables of patients in the model development, encompassing basic socio-demographics, history of childhood abuse, physical and psychiatric comorbidities, history of self-harm, psychiatric service utilization, and psychotropic medication use.”

Chang and his colleagues tracked cases of self-harm and suicide in the data they analyzed, using statistical methods to identify relevant risk factors. They then developed two similar models that predicted the risk of self-harm based on the identified risk factors, at one- and three-year intervals respectively.

“We derived risk prediction models based on data from six of the seven catchment areas of public health care services in Hong Kong, and validated the developed models in the remaining catchment area,” said Chang.

“Our results showed that the models achieved good discrimination and calibration with high accuracy. Notably, their performance remained robust in age-, sex-stratified, and one-year vs. three-year prediction windows.”

New strategies to predict and prevent self-harm

The risk factors linked to self-harm uncovered by the researchers included past self-inflicted pain or self-destructive behaviors, previous psychiatric hospitalizations and substance use disorders. In contrast, the use of anti-depressants or lithium were linked to a lower risk of self-harm.

“Our validated risk prediction model based on these factors accurately identifies individuals at elevated self-harm risk after depression diagnosis,” said Chang. “Our models may thus facilitate personalized risk stratification and timely interventions for those patients at risk of self-harm.”

In the future, the model developed by this research team could potentially be refined to further improve its prediction accuracy. Eventually, it could be introduced in clinical settings, helping psychiatrists to identify patients who are at a higher risk of harming themselves and devise timely treatment strategies aimed at best supporting them.

“We can explore further external validation of our developed self-harm risk prediction models in patient samples of other regions, to verify and enhance the validity of our models in different populations,” added Chang.

“This will also facilitate translation of our research findings into potential implementation of the risk prediction models in real-world clinical practice to benefit the patients with depression.”

Publication details

Heidi Ka Ying Lo et al, Prediction of self-harm in people with newly-diagnosed depression: development and validation of risk prediction models, Molecular Psychiatry (2026). DOI: 10.1038/s41380-026-03555-x.

Journal information:
Molecular Psychiatry