An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study

BackgroundSuicide represents a critical public health concern, and machine learning (ML) models offer the potential for identifying at-risk individuals. Recent studies using benchmark datasets and real-world social media data have demonstrated the capability of pretrained lar...

Full description

Saved in:
Bibliographic Details
Main Authors: Julia Thomas, Antonia Lucht, Jacob Segler, Richard Wundrack, Marcel Miché, Roselind Lieb, Lars Kuchinke, Gunther Meinlschmidt
Format: Article
Language:English
Published: JMIR Publications 2025-01-01
Series:JMIR Public Health and Surveillance
Online Access:https://publichealth.jmir.org/2025/1/e63809
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1832582476030017536
author Julia Thomas
Antonia Lucht
Jacob Segler
Richard Wundrack
Marcel Miché
Roselind Lieb
Lars Kuchinke
Gunther Meinlschmidt
author_facet Julia Thomas
Antonia Lucht
Jacob Segler
Richard Wundrack
Marcel Miché
Roselind Lieb
Lars Kuchinke
Gunther Meinlschmidt
author_sort Julia Thomas
collection DOAJ
description BackgroundSuicide represents a critical public health concern, and machine learning (ML) models offer the potential for identifying at-risk individuals. Recent studies using benchmark datasets and real-world social media data have demonstrated the capability of pretrained large language models in predicting suicidal ideation and behaviors (SIB) in speech and text. ObjectiveThis study aimed to (1) develop and implement ML methods for predicting SIBs in a real-world crisis helpline dataset, using transformer-based pretrained models as a foundation; (2) evaluate, cross-validate, and benchmark the model against traditional text classification approaches; and (3) train an explainable model to highlight relevant risk-associated features. MethodsWe analyzed chat protocols from adolescents and young adults (aged 14-25 years) seeking assistance from a German crisis helpline. An ML model was developed using a transformer-based language model architecture with pretrained weights and long short-term memory layers. The model predicted suicidal ideation (SI) and advanced suicidal engagement (ASE), as indicated by composite Columbia-Suicide Severity Rating Scale scores. We compared model performance against a classical word-vector-based ML model. We subsequently computed discrimination, calibration, clinical utility, and explainability information using a Shapley Additive Explanations value-based post hoc estimation model. ResultsThe dataset comprised 1348 help-seeking encounters (1011 for training and 337 for testing). The transformer-based classifier achieved a macroaveraged area under the curve (AUC) receiver operating characteristic (ROC) of 0.89 (95% CI 0.81-0.91) and an overall accuracy of 0.79 (95% CI 0.73-0.99). This performance surpassed the word-vector-based baseline model (AUC-ROC=0.77, 95% CI 0.64-0.90; accuracy=0.61, 95% CI 0.61-0.80). The transformer model demonstrated excellent prediction for nonsuicidal sessions (AUC-ROC=0.96, 95% CI 0.96-0.99) and good prediction for SI and ASE, with AUC-ROCs of 0.85 (95% CI 0.97-0.86) and 0.87 (95% CI 0.81-0.88), respectively. The Brier Skill Score indicated a 44% improvement in classification performance over the baseline model. The Shapley Additive Explanations model identified language features predictive of SIBs, including self-reference, negation, expressions of low self-esteem, and absolutist language. ConclusionsNeural networks using large language model–based transfer learning can accurately identify SI and ASE. The post hoc explainer model revealed language features associated with SI and ASE. Such models may potentially support clinical decision-making in suicide prevention services. Future research should explore multimodal input features and temporal aspects of suicide risk.
format Article
id doaj-art-c26454eba90c41d6bcf01b5c84776dd9
institution Kabale University
issn 2369-2960
language English
publishDate 2025-01-01
publisher JMIR Publications
record_format Article
series JMIR Public Health and Surveillance
spelling doaj-art-c26454eba90c41d6bcf01b5c84776dd92025-01-29T17:30:36ZengJMIR PublicationsJMIR Public Health and Surveillance2369-29602025-01-0111e6380910.2196/63809An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation StudyJulia Thomashttps://orcid.org/0000-0002-2444-3389Antonia Luchthttps://orcid.org/0000-0002-5106-0340Jacob Seglerhttps://orcid.org/0000-0001-6694-5507Richard Wundrackhttps://orcid.org/0000-0003-2121-0982Marcel Michéhttps://orcid.org/0000-0001-8838-1749Roselind Liebhttps://orcid.org/0000-0002-2039-2262Lars Kuchinkehttps://orcid.org/0000-0001-8248-1167Gunther Meinlschmidthttps://orcid.org/0000-0002-3488-193X BackgroundSuicide represents a critical public health concern, and machine learning (ML) models offer the potential for identifying at-risk individuals. Recent studies using benchmark datasets and real-world social media data have demonstrated the capability of pretrained large language models in predicting suicidal ideation and behaviors (SIB) in speech and text. ObjectiveThis study aimed to (1) develop and implement ML methods for predicting SIBs in a real-world crisis helpline dataset, using transformer-based pretrained models as a foundation; (2) evaluate, cross-validate, and benchmark the model against traditional text classification approaches; and (3) train an explainable model to highlight relevant risk-associated features. MethodsWe analyzed chat protocols from adolescents and young adults (aged 14-25 years) seeking assistance from a German crisis helpline. An ML model was developed using a transformer-based language model architecture with pretrained weights and long short-term memory layers. The model predicted suicidal ideation (SI) and advanced suicidal engagement (ASE), as indicated by composite Columbia-Suicide Severity Rating Scale scores. We compared model performance against a classical word-vector-based ML model. We subsequently computed discrimination, calibration, clinical utility, and explainability information using a Shapley Additive Explanations value-based post hoc estimation model. ResultsThe dataset comprised 1348 help-seeking encounters (1011 for training and 337 for testing). The transformer-based classifier achieved a macroaveraged area under the curve (AUC) receiver operating characteristic (ROC) of 0.89 (95% CI 0.81-0.91) and an overall accuracy of 0.79 (95% CI 0.73-0.99). This performance surpassed the word-vector-based baseline model (AUC-ROC=0.77, 95% CI 0.64-0.90; accuracy=0.61, 95% CI 0.61-0.80). The transformer model demonstrated excellent prediction for nonsuicidal sessions (AUC-ROC=0.96, 95% CI 0.96-0.99) and good prediction for SI and ASE, with AUC-ROCs of 0.85 (95% CI 0.97-0.86) and 0.87 (95% CI 0.81-0.88), respectively. The Brier Skill Score indicated a 44% improvement in classification performance over the baseline model. The Shapley Additive Explanations model identified language features predictive of SIBs, including self-reference, negation, expressions of low self-esteem, and absolutist language. ConclusionsNeural networks using large language model–based transfer learning can accurately identify SI and ASE. The post hoc explainer model revealed language features associated with SI and ASE. Such models may potentially support clinical decision-making in suicide prevention services. Future research should explore multimodal input features and temporal aspects of suicide risk.https://publichealth.jmir.org/2025/1/e63809
spellingShingle Julia Thomas
Antonia Lucht
Jacob Segler
Richard Wundrack
Marcel Miché
Roselind Lieb
Lars Kuchinke
Gunther Meinlschmidt
An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
JMIR Public Health and Surveillance
title An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
title_full An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
title_fullStr An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
title_full_unstemmed An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
title_short An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study
title_sort explainable artificial intelligence text classifier for suicidality prediction in youth crisis text line users development and validation study
url https://publichealth.jmir.org/2025/1/e63809
work_keys_str_mv AT juliathomas anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT antonialucht anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT jacobsegler anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT richardwundrack anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT marcelmiche anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT roselindlieb anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT larskuchinke anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT gunthermeinlschmidt anexplainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT juliathomas explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT antonialucht explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT jacobsegler explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT richardwundrack explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT marcelmiche explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT roselindlieb explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT larskuchinke explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy
AT gunthermeinlschmidt explainableartificialintelligencetextclassifierforsuicidalitypredictioninyouthcrisistextlineusersdevelopmentandvalidationstudy