Toward explainable AI (XAI) for mental health detection based on language behavior
- PMID: 38144474
- PMCID: PMC10748510
- DOI: 10.3389/fpsyt.2023.1219479
Toward explainable AI (XAI) for mental health detection based on language behavior
Abstract
Advances in artificial intelligence (AI) in general and Natural Language Processing (NLP) in particular are paving the new way forward for the automated detection and prediction of mental health disorders among the population. Recent research in this area has prioritized predictive accuracy over model interpretability by relying on deep learning methods. However, prioritizing predictive accuracy over model interpretability can result in a lack of transparency in the decision-making process, which is critical in sensitive applications such as healthcare. There is thus a growing need for explainable AI (XAI) approaches to psychiatric diagnosis and prediction. The main aim of this work is to address a gap by conducting a systematic investigation of XAI approaches in the realm of automatic detection of mental disorders from language behavior leveraging textual data from social media. In pursuit of this aim, we perform extensive experiments to evaluate the balance between accuracy and interpretability across predictive mental health models. More specifically, we build BiLSTM models trained on a comprehensive set of human-interpretable features, encompassing syntactic complexity, lexical sophistication, readability, cohesion, stylistics, as well as topics and sentiment/emotions derived from lexicon-based dictionaries to capture multiple dimensions of language production. We conduct extensive feature ablation experiments to determine the most informative feature groups associated with specific mental health conditions. We juxtapose the performance of these models against a "black-box" domain-specific pretrained transformer adapted for mental health applications. To enhance the interpretability of the transformers models, we utilize a multi-task fusion learning framework infusing information from two relevant domains (emotion and personality traits). Moreover, we employ two distinct explanation techniques: the local interpretable model-agnostic explanations (LIME) method and a model-specific self-explaining method (AGRAD). These methods allow us to discern the specific categories of words that the information-infused models rely on when generating predictions. Our proposed approaches are evaluated on two public English benchmark datasets, subsuming five mental health conditions (attention-deficit/hyperactivity disorder, anxiety, bipolar disorder, depression and psychological stress).
Keywords: artificial intelligence; automated mental health detection; deep learning; digital NLP-derived biomarkers; digital phenotyping; explainable AI (XAI); machine learning; natural language processing.
Copyright © 2023 Kerz, Zanwar, Qiao and Wiechmann.
Conflict of interest statement
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Figures






Similar articles
-
Explainable Predictive Model for Suicidal Ideation During COVID-19: Social Media Discourse Study.J Med Internet Res. 2025 Jan 17;27:e65434. doi: 10.2196/65434. J Med Internet Res. 2025. PMID: 39823631 Free PMC article.
-
Investigating Protective and Risk Factors and Predictive Insights for Aboriginal Perinatal Mental Health: Explainable Artificial Intelligence Approach.J Med Internet Res. 2025 Apr 30;27:e68030. doi: 10.2196/68030. J Med Internet Res. 2025. PMID: 40306634 Free PMC article.
-
Model-agnostic explainable artificial intelligence tools for severity prediction and symptom analysis on Indian COVID-19 data.Front Artif Intell. 2023 Dec 4;6:1272506. doi: 10.3389/frai.2023.1272506. eCollection 2023. Front Artif Intell. 2023. PMID: 38111787 Free PMC article.
-
Exploring Explainable AI Techniques for Text Classification in Healthcare: A Scoping Review.Stud Health Technol Inform. 2024 Aug 22;316:846-850. doi: 10.3233/SHTI240544. Stud Health Technol Inform. 2024. PMID: 39176925
-
Utilization of model-agnostic explainable artificial intelligence frameworks in oncology: a narrative review.Transl Cancer Res. 2022 Oct;11(10):3853-3868. doi: 10.21037/tcr-22-1626. Transl Cancer Res. 2022. PMID: 36388027 Free PMC article. Review.
Cited by
-
Diagnosis of mental disorders using machine learning: Literature review and bibliometric mapping from 2012 to 2023.Heliyon. 2024 Jun 8;10(12):e32548. doi: 10.1016/j.heliyon.2024.e32548. eCollection 2024 Jun 30. Heliyon. 2024. PMID: 38975193 Free PMC article. Review.
-
Artificial Intelligence in Psychiatry: A Review of Biological and Behavioral Data Analyses.Diagnostics (Basel). 2025 Feb 11;15(4):434. doi: 10.3390/diagnostics15040434. Diagnostics (Basel). 2025. PMID: 40002587 Free PMC article. Review.
-
A CNN-Transformer Fusion Model for Proactive Detection of Schizophrenia Relapse from EEG Signals.Bioengineering (Basel). 2025 Jun 12;12(6):641. doi: 10.3390/bioengineering12060641. Bioengineering (Basel). 2025. PMID: 40564457 Free PMC article.
-
Choosing the right treatment - combining clinicians' expert knowledge with data-driven predictions.Front Psychiatry. 2024 Sep 3;15:1422587. doi: 10.3389/fpsyt.2024.1422587. eCollection 2024. Front Psychiatry. 2024. PMID: 39290309 Free PMC article.
-
From Serendipity to Precision: Integrating AI, Multi-Omics, and Human-Specific Models for Personalized Neuropsychiatric Care.Biomedicines. 2025 Jan 12;13(1):167. doi: 10.3390/biomedicines13010167. Biomedicines. 2025. PMID: 39857751 Free PMC article. Review.
References
-
- American Psychiatric Association . Diagnostic and Statistical Manual of Mental Disorders: DSM-5. Washington, DC: American Psychiatric Association. (2013).
-
- Chan SF, La Greca AM. Perceived stress scale (PSS). In: Encyclopedia of Behavioral Medicine. Springer. (2020) p. 1646–8. 10.1007/978-3-030-39903-0_773 - DOI
LinkOut - more resources
Full Text Sources
Research Materials
Miscellaneous