Skip to content
Open access

Multi-Class Mental Health Discourse Classification from Online Texts: Classical ML vs Transformer/LLM Modeling

Aug 2026 · International journal of computer information systems and industrial management applications · 0 citations

TL;DR

It is shown that con-textual transformer/LLM models yield more reliable macro-level performance under imbalance than TF–IDF baselines, particularly for semantically adja- cent classes.

Abstract

Online mental-health discourse contains diverse in-tents including awareness education, wellness advice, support seeking, and symptom narratives associated with anx- iety and depression. These categories are semantically overlapping, short and noisy, and imbalanced in public datasets, making robust multi-class classification difficult. This paper presents an end-to-end framework for six- class mental health discourse classification and provides a publication-oriented SN Computer Science style analysis including mathematical formulation, gradient deriva-tions for cross-entropy learning, computational complexity anal-ysis, ablation design, and statistically grounded compari- son using McNemar’s test. Using a public dataset with six classes (awareness, wellness, anxiety, support, depression, general) and the provided empirical results and figures, we show that con-textual transformer/LLM models yield more reliable macro-level performance under imbalance than TF–IDF baselines, particularly for semantically adja- cent classes. A confusion-matrix driven analysis identifies two dominant confusion clusters (awareness vs wellness and anxiety vs depression) and motivates intent-aware modeling, calibration and uncertainty reporting. We also provide a rigorous reporting protocol (splits, leakage con-trol, seeds), per-class metrics derived from the supplied confusion matrix, and a Q1-ready ablation blueprint.

Read PDF

Similar papers

Jul 2026

Evaluation of Transformer and Gradient Boosting Models for Indonesian Mental Health Text Classification

This study compares the performance between traditional feature-based classification methods and transformer architectures in mapping stress, anxiety, and depression conditions in Indonesian-language mental health discourse. The task is formulated as a multi-class classification problem, where each consultation is assigned a single dominant mental health category. By implementing an integrated experimental framework on an online consultation dataset, we tested Gradient Boosting as the baseline model against two specific transformer models, namely IndoBERT and IndoRoBERTa. Experimental findings indicate that transformer-based models consistently outperform traditional approaches, with IndoRoBERTa achieving the highest accuracy of 82%. These results affirm the capability of contextual language representation in capturing complex semantic and linguistic nuances in mental health texts. Nevertheless, this study notes ongoing challenges in differentiating categories with strong semantic overlap, particularly between stress and anxiety symptoms.

Evi Dwi Wahyuni, Wiwik Anggraeni, Reza Fuad Rachmadi et al. · 0 citations
Review Open access Jul 2026

Predicting Mental Health Conditions from Text Using Interpretable Machine Learning

Mental health disorders such as depression, anxiety, and post-traumatic stress disorder (PTSD) affect over one billion people worldwide, yet early detection remains a major clinical challenge. In recent years, text data from social media posts, clinical notes, and patient surveys has emerged as a rich source of signals for automated mental health screening. However, most existing machine learning models operate as black boxes, limiting clinical adoption. This paper presents an interpretable machine learning framework that combines natural language processing (NLP) feature extraction with explainable AI techniques — specifically SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) — to predict mental health conditions from text while providing transparent, clinically meaningful explanations. A multi- class classification task involving depression, anxiety, PTSD, and healthy controls is performed on a dataset of 19,320 labelled text samples. The proposed XGBoost model with SHAP explanations achieves 87.3% accuracy and an AUC of 0.924, while the fine-tuned BERT model achieves 91.6% accuracy and an AUC of 0.961. Experimental results demonstrate that interpretability does not significantly compromise predictive performance, enabling trustworthy AI-assisted mental health screening.

N. Thakur, D. Patil, Pushpa Choudhary · 0 citations
Open access Aug 2026

Domain-informed density extraction for robust mental health classification of long social media posts

Recent advances in machine learning and natural language processing (NLP) have enabled the early identification of mental disorders from social media content. Among such platforms, Reddit is characterized by linguistically rich, long-form narratives in which users describe their psychological symptoms, emotions, and personal experiences. However, these datasets present significant challenges for text classification because the posts are lengthy, voluminous, and class-imbalanced. In this study, we revisit the concept of a segmentation-based, expression-weighted representation that emphasizes clinically relevant language while suppressing irrelevant content. During this investigation, we identify a critical limitation in conventional preprocessing pipelines—specifically, the application of chunking and oversampling prior to the train–test split—which introduces data leakage and consequently inflates reported performance. To address this issue, we propose a leakage-safe evaluation protocol together with a domain-informed density extraction method that identifies clinically dense passages using a lexicon derived exclusively from the training data. The proposed method was evaluated using logistic regression, linear SVM, XGBoost, fastText, RNN, and TextCNN, together with a transformer-based baseline (MentalBERT), all under a leakage-safe evaluation protocol. After eliminating data leakage, the apparent advantage of naive weighted chunking disappeared, and the headline macro-F1 score decreased from approximately 0.96 to 0.67. In contrast, the proposed domain-informed density extraction method consistently outperformed fixed-window chunking in five of the six models and matched or exceeded the full-text baseline in several cases. Statistically significant improvements were observed for logistic regression, RNN, and fastText, despite using only a fraction of the input text. For the context-limited transformer, density-based selection significantly outperformed naive truncation (macro-F1 + 0.023, 95% CI [+0.006, +0.041], p  = 0.008). Our findings demonstrate that a leakage-safe evaluation protocol is essential for producing credible results in mental health classification from long social media posts. They further show that domain-informed density extraction provides a robust and practical text representation, with its greatest benefits emerging when models are unable to process the entire post. By selectively preserving clinically informative content while reducing input length, the proposed approach offers an effective and computationally efficient alternative to increasingly complex model architectures.

Unknown authors · 0 citations
Conference Jul 2026

A Web-Based Mental Health Assessment Framework using Natural Language Processing Techniques

Mental illnesses like depression, anxiety, stress, and so on have become more widespread, and this has necessitated the availability of assessment tools that are readily available, scalable, and automated. The paper will offer a web-based mental health risk assessment system that utilizes the latest technology of Natural Language Processing (NLP) in real-time to analyze textual information provided by users. The offered system incorporates a hybrid deep learning framework with the relation of DeBERTa, BiLSTM, and XGBoost to promote the contextual comprehension, sequential emotional pattern identification, and effective classification of the performance. First, text input by the users is received with a secure web interface and processed with general NLP preprocessing methods, such as tokenization, lemmatization, and sentiment normalization. To extract deep semantic relationships in the text, DeBERTa is used to extract contextual embeddings. Such embeddings are also trained in the form of a Bidirectional Long Short-Term Memory (BiLSTM) network in order to capture emotional dynamics and linguistic reinforcing relations. Fused feature representation, sentiments, and linguistic indicators are input into an XGBoost classifier to predict mental health in multi-class. There is a weighted risk scoring system used to measure the level of severity and provide tailored feedback. It is experimentally tested on standard mental health text data sets that the proposed hybrid framework is more effective than the traditional machine learning and standalone transformer models in terms of accuracy, precision, recall, and F1-score. The architecture is scalable to the deployment of a web system, which is guaranteed to perform in real-time, secure data, and privacy of users. The suggested framework offers a solid and smart instrument to identify the risk of mental health early and help intervene in time and to promote the development of digital health care.

D. D, S. S, L. K et al. · 0 citations
Open access 2026

QBERT-LSTM: Quantum Intelligence-Based Mental Health Sentiment Analysis Using Web Scraping

Social media has become a significant resource for evaluating public attitudes regarding mental health, as individuals may express their thoughts through postings, comments, and conversations. Sentiment analysis is a promising method for studying emotional patterns expressed in mental-health-related text. Traditional machine learning for sentiment analysis faces challenges like transparency, scarce labeled data, and language limitations. This paper presents a sentiment classification (positive, negative, neutral) framework applied to mental-health-related Reddit posts. Repeated emotional patterns can offer helpful insights into sentiment trends in mental health discussions, but they shouldn’t be seen as proof of clinical disorders. In this paper, we propose a hybrid framework for sentiment classification from text, termed QBERT-LSTM, which integrates quantum-enhanced bidirectional encoder representations from transformers (QBERT) with long short-term memory (LSTM) networks. In the proposed approach, transformer models excel at capturing global context, while the LSTM enhances sequential patterns and temporal features. The quantum component uses a parameterized circuit with angle encoding and variational gates to perform nonlinear transformations on a quantum simulator (PennyLane). Subsequently, the model is tested on more intricate circuits comprising 2, 4, 6, 8, 10, and 12 qubits to assess its consistency. A novel Reddit dataset of mental health-related subreddits (anxiety, panic attacks, and depression) is constructed, with sentiment labels derived from the VADER sentiment analyzer. We thoroughly assessed the performance of our proposed model against deep learning models and cutting-edge transformer architectures, achieving up to 98% accuracy in the best-performing configuration on the generated dataset (mean accuracy $0.97~\pm ~0.0059$ across five random seeds).

Najnin Sultana Shirin, Md. Aminul Islam, Maria Akter Abin et al. · 0 citations
Conference Jul 2026

A Multimodal Approach Integrating Clinical Text Analysis and Psychometric Instruments for ADHD Prediction

This Attention Deficit Hyperactivity Disorder (ADHD) remains substantially under-diagnosed among university students despite affecting 2–8% of this population. Campus health services, facing persistent resource constraints, frequently accumulate assessment backlogs of 6–12 months. This paper presents a machine learning framework for automated ADHD pre-screening that combines structured psychometric assessments with natural language processing (NLP)-derived features extracted from free-text clinical self-reports. Drawing on 506 university student responses, we engineer 124 multimodal features spanning four validated instruments, the Adult ADHD Self-Report Scale (ASRS), Beck Anxiety Inventory (BAI), Beck Depression Inventory (BDI-II), and Adult Attachment Scale (AAS), together with unstructured diagnostic text. Mutual Information-based feature selection reduces dimensionality to 20 features, yielding a 2% accuracy gain. A comparative evaluation across five classifiers reveals Logistic Regression as the top performer, achieving 81.4% accuracy and an AUC of 0.881. SHAP (SHapley Additive exPlanations) analysis confirms clinical meaningfulness by identifying BAI Item 8 (somatic anxiety), ASRS inattention items, and prior mental health history as the principal risk factors. The system is deployed as an interactive web application that delivers calibrated risk assessments suited to clinical triage in resource limited settings.

Niraj Sharma, Pampa Hawladar, Nidhi Kushwaha · 0 citations