RISK FORMER: TOWARDS TRANSPARENT AI IN MENTAL HEALTH—AN EXPLAINABLE TRANSFORMER MODEL FOR SUICIDE RISK DETECTION FROM DIGITAL LANGUAGE
Keywords:
Explainable AI (XAI), Transformer, Suicide Risk Detection, Mental HealthAbstract
The worldwide public health crisis of suicide remains critical; the ability to detect the risk of suicide early based on digital footprints, that is, the words and language used on social media, is one method of providing proactive intervention for suicide prevention. Deep Learning is the mechanism that has proven effective; however, they are typically viewed as "black boxes," which raises questions regarding their potential adoption in clinical settings, as we cannot determine how they have come to their conclusion. This study discusses the development of RiskFormer, a new and robust Transformer-based architecture that allows for the explainable prediction of suicide risk from digital text. RiskFormer combines a streamlined approach to Multi-Head Attention (MHA) with post-hoc approaches to explainability (i.e., gradient- weighted class activation mapping for transformers) to provide interpretable, clinically relevant results. The model was demonstrated to perform comparably to leading-edge baselines on a curated dataset of social media posts while providing visual and textual rationales for its predictions. Therefore, the study indicates that RiskFormer offers an opportunity for Explainable AI (XAI) to enhance the ability to create trustworthy digital mental health applications and bridge the gap between high-performing algorithms and clinical applicability.












