An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study (Preprint)
Preprint
- 1 July 2024
- preprint
- Published by JMIR Publications Inc. in JMIR Preprints
Abstract
BACKGROUND Suicide 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. OBJECTIVE This 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. METHODS We 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. RESULTS The 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. CONCLUSIONS Neural 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.Keywords
All Related Versions
- Published version: JMIR Public Health and Surveillance, 11, e63809.
This publication has 56 references indexed in Scilit:
- Assessing the communication gap between AI models and healthcare professionals: Explainability, utility and trust in AI-driven clinical decision-makingArtificial Intelligence, 2022
- Adolescent Suicide—Understanding Unique Risks and Opportunities for Trauma Centers to Recognize, Intervene, and Prevent a Leading Cause of DeathCurrent Trauma Reports, 2022
- Decision curve analysis in the evaluation of radiology researchEuropean Radiology, 2022
- A Review on Word Embedding Techniques for Text Classification2021
- The Explanation Game: Explaining Machine Learning Models Using Shapley Values2020
- Deep Learning Using Keras2019
- Cooperative Game Theory2016
- Evaluating Discrimination of Risk Prediction ModelsJAMA, 2015
- Online Counseling: A Narrative and Critical Review of the LiteratureJournal of Clinical Psychology, 2013
- Back-propagation neural networks for modeling complex systemsArtificial Intelligence in Engineering, 1995