International Journal of Algorithms Design and Analysis Review Original Research
Explainable Sentiment Mining Model in Mental Health Forums for Emotion Classification and Justification
Abstract
Understanding and interpreting emotions expressed in online mental health discussions plays a crucial role in enabling early detection of psychological distress and facilitating timely interventions. As individuals increasingly turn to digital platforms to share personal experiences and seek support, automated systems capable of accurately identifying emotional states can significantly assist clinicians, moderators, and support communities. This paper presents a deep learning–based sentiment mining and emotion classification framework specifically designed to analyze posts from mental health forums. The proposed architecture integrates Bidirectional Encoder Representations from Transformers (BERT)-based contextual embeddings to capture nuanced semantic relationships within text, along with a multi-channel convolutional neural network enhanced by residual connections. This hybrid structure effectively teaches both local phrase-level features and broader contextual patterns, improving classification performance across diverse emotional expressions. To ensure transparency and trustworthiness, especially important in sensitive domains such as mental health, we incorporate a gradient × embedding explainability mechanism. This component highlights token-level contributions toward each predicted emotion category, enabling users to understand which specific words most influenced the model’s decision. The framework was evaluated on a benchmark mental health dataset consisting of seven emotion classes: joy, sadness, anger, fear, love, surprise, and others. Experimental results demonstrate an overall classification accuracy of 92%. Additionally, the visualization of influential words enhances interpretability, thereby supporting responsible and explainable AI-driven sentiment analysis in real-world mental health applications.
Keywords
References (17)
- Abdullah M, Negied N. Detection and Prediction of Future Mental Disorder From Social Media Data Using Machine Learning, Ensemble Learning, and Large Language Models. IEEE Access. 2024;12:120553-120569. doi:10.1109/access.2024.3406469
- Singh J, Sharma G. Sentiment Analysis Study of Human Thoughts using Machine Learning Techniques. 2023 International Conference on Disruptive Technologies (ICDT). 2023:776-785. doi:10.1109/icdt57929.2023.10150917
- Brynielsson J, Johansson F, Jonsson C, Westling A. Emotion classification of social media posts for estimating people’s reactions to communicated alert messages during crises. Security Informatics. 2014;3(1). doi:10.1186/s13388-014-0007-3
- Lövheim H. A new three-dimensional model for emotions and monoamine neurotransmitters. Medical Hypotheses. 2012;78(2):341-348. doi:10.1016/j.mehy.2011.11.016
- Sasidhar TT, B P, P SK. Emotion Detection in Hinglish(Hindi+English) Code-Mixed Social Media Text. Procedia Computer Science. 2020;171:1346-1352. doi:10.1016/j.procs.2020.04.144
- Irtiza Tripto N, Eunus Ali M. Detecting Multilabel Sentiment and Emotions from Bangla YouTube Comments. 2018 International Conference on Bangla Speech and Language Processing (ICBSLP). 2018:1-6. doi:10.1109/icbslp.2018.8554875
- Batbaatar E, Li M, Ryu KH. Semantic-Emotion Neural Network for Emotion Recognition From Text. IEEE Access. 2019;7:111866-111878. doi:10.1109/access.2019.2934529
- Li D, Rzepka R, Ptaszynski M, Araki K. HEMOS: A novel deep learning-based fine-grained humor detecting method for sentiment analysis of social media. Information Processing & Management. 2020;57(6):102290. doi:10.1016/j.ipm.2020.102290
- Ren Z, Shen Q, Diao X, Xu H. A sentiment-aware deep learning approach for personality detection from text. Information Processing & Management. 2021;58(3):102532. doi:10.1016/j.ipm.2021.102532
- Pattun G, Kumar P. Emotion Classification using Generative Pre-trained Embedding and Machine Learning. 2023 IEEE International Conference on Machine Learning and Applied Network Technologies (ICMLANT). 2023:1-6. doi:10.1109/icmlant59547.2023.10372980
- Bayu Y, tegegn T. Multi-label Emotion Classification on Social Media Comments using Deep learning. 2024. doi:10.21203/rs.3.rs-4431629/v1
- Kaushik B, Sharma A, Chadha A, Sharma R. Machine Learning Model for Sentiment Analysis on Mental Health Issues. 2023 15th International Conference on Computer and Automation Engineering (ICCAE). 2023:21-25. doi:10.1109/iccae56788.2023.10111148
- Choudhary DK, Gupta A, Singh S, Abhinav T, Agrawal T. Sentiment Analysis for Depression Detection Using Artificial Intelligence. 2024 3rd International Conference on Artificial Intelligence For Internet of Things (AIIoT). 2024:1-5. doi:10.1109/aiiot58432.2024.10574749
- V CI, K J S. Text-Based Emotion Recognition Using Deep Learning. 2024 Second International Conference on Advances in Information Technology (ICAIT). 2024:1-7. doi:10.1109/icait61638.2024.10690782
- Adoma AF, Henry NM, Chen W, Rubungo Andre N. Recognizing Emotions from Texts using a Bert-Based Approach. 2020 17th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP). 2020:62-66. doi:10.1109/iccwamtip51612.2020.9317523
- Sharma T, Diwakar M, Singh P, Lamba S, Kumar P, Joshi K. Emotion Analysis for predicting the emotion labels using Machine Learning approaches. 2021 IEEE 8th Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON). 2021:1-6. doi:10.1109/upcon52273.2021.9667562
- Shyang YK, Yan JLS. A Text Augmentation Approach using Similarity Measures based on Neural Sentence Embeddings for Emotion Classification on Microblogs. 2020 IEEE 2nd International Conference on Artificial Intelligence in Engineering and Technology (IICAIET). 2020:1-6. doi:10.1109/iicaiet49801.2020.9257826