Explainable AI-driven depression detection from social media using natural language processing and black box machine learning models
Top Cited Papers
Open Access
- 11 September 2025
- journal article
- research article
- Published by Frontiers Media SA in Frontiers in Artificial Intelligence
- Vol. 8, 1627078
Abstract
Introduction: Mental disorders are highly prevalent in modern society, leading to substantial personal and societal burdens. Among these, depression is one of the most common, often exacerbated by socioeconomic, clinical, and individual risk factors. With the rise of social media, user-generated content offers valuable opportunities for the early detection of mental disorders through computational approaches.Methods: This study explores the early detection of depression using black-box machine learning (ML) models, including Support Vector Machines (SVM), Random Forests (RF), Extreme Gradient Boosting (XGB), and Artificial Neural Networks (ANN). Advanced Natural Language Processing (NLP) techniques TF-IDF, Latent Dirichlet Allocation (LDA), N-grams, Bag of Words (BoW), and GloVe embeddings were employed to extract linguistic and semantic features. To address the interpretability limitations of black-box models, Explainable AI (XAI) methods were integrated, specifically the Local Interpretable Model-Agnostic Explanations (LIME).Results: Experimental findings demonstrate that SVM achieved the highest accuracy in detecting depression from social media data, outperforming RF and other models. The application of LIME enabled granular insights into model predictions, highlighting linguistic markers strongly aligned with established psychological research.Discussion: Unlike most prior studies that focus primarily on classification accuracy, this work emphasizes both predictive performance and interpretability. The integration of LIME not only enhanced transparency and interpretability but also improved the potential clinical trustworthiness of ML-based depression detection models.Keywords
This publication has 91 references indexed in Scilit:
- Explainable AI for Text Classification: Lessons from a Comprehensive Evaluation of Post Hoc MethodsCognitive Computation, 2024
- Depression Detection on Social Media: A Classification Framework and Research Challenges and OpportunitiesJournal of Healthcare Informatics Research, 2023
- Modified term frequency-inverse document frequency based deep hybrid framework for sentiment analysisMultimedia Tools and Applications, 2023
- Applying Latent Dirichlet Allocation Technique to Classify Topics on Sustainability Using Arabic Text2022
- Comparison of Machine Learning Techniques on Twitter Emotions ClassificationSN Computer Science, 2021
- Suicidal ideation and mental disorder detection with attentive relation networksNeural Computing and Applications, 2021
- Explainable Natural Language Processing2021
- Artificial Neural Networks Interpretation Using LIME for Breast Cancer Diagnosis2020
- Depression detection from social network data using machine learning techniquesHealth Information Science and Systems, 2018
- Term-weighting approaches in automatic text retrievalInformation Processing & Management, 1988