Explainable Machine Learning for Mental Health Detection Using NLP
Open Access
- 10 November 2025
- journal article
- Published by Ediciones Universidad de Salamanca in ADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal
- Vol. 14, e32449
Abstract
Humans’ mental conditions are often revealed through their social media activity, facilitated by the anonymity of the internet. Early detection of psy- chiatric issues through these activities can lead to timely interventions, po- tentially preventing severe mental health disorders such as depression and anxiety. However, the complexity of state-of-the-art machine learning (ML) models has led to challenges in interpretability, often resulting in these models being viewed as «black boxes». This paper provides a comprehensive analysis of explainable AI (XAI) within the framework of Natural Language Processing (NLP) and ML. Thus, NLP techniques improve the performance of learning-based methods by incorporating the semantic and syntactic features of the text. The application of ML in healthcare is gaining traction, particularly in extracting novel scientific insights from observational or simulated data. Domain knowledge is crucial for achieving scientific consistency and explainability. In our study, we implemented Naïve Bayes and Random Forest algorithms, achieving accuracies of 92 % and 99 %, respectively. To further explore transparency, interpretability, and explainability, we applied explainable ML techniques, with LIME emerging as a popular tool. Our findings underscore the importance of integrating XAI methods to better understand and interpret the decisions made by complex ML models.Keywords
This publication has 48 references indexed in Scilit:
- Explainable Machine-Learning Model for Prediction of In-Hospital Mortality in Septic Patients Requiring Intensive Care Unit ReadmissionInfectious Diseases and Therapy, 2022
- Explainable artificial intelligence to evaluate industrial internal security using EEG signals in IoT frameworkAd Hoc Networks, 2021
- Efficient English text classification using selected Machine Learning TechniquesAlexandria Engineering Journal, 2021
- Advanced machine-learning techniques in drug discoveryDrug Discovery Today, 2021
- Tell me why are you using social media (SM)! Relationship between reasons for use of SM, SM flow, daily stress, depression, anxiety, and addictive SM use – An exploratory investigation of young adults in GermanyComputers in Human Behavior, 2020
- Investigating the links between fear of missing out, social media addiction, and emotional symptoms in adolescence: The role of stress associated with neglect and negative reactions on social mediaAddictive Behaviors, 2020
- Towards Explainable Artificial Intelligence2019
- Detecting depression and mental illness on social media: an integrative reviewCurrent Opinion in Behavioral Sciences, 2017
- An introduction to decision tree modelingJournal of Chemometrics, 2004
- KNN Model-Based Approach in Classification2003