Skip to content
Open access

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

2026 · IEEE Access · Vol 14, pp. 117086-117105 · 0 citations · 55 references
Computer Science

TL;DR

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, which excel at capturing global context and enhances sequential patterns and temporal features.

Abstract

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).

Read PDF

Similar papers

Review Sep 2026

HARNN_ALemOA: A Novel Optimized Deep Learning Framework with Dynamic Prompting for Mental Health Classification Using Social Media Data

Mental health problems adversely affect a person's emotional, social, psychological, and well-being. Individuals with mental health issues often do not seek professional help due to social stigma. Social media can serve as a vital tool for assessing a person’s mental health, and several methods have been proposed for classifying mental health from social media. Nevertheless, the prevailing methods mostly consider only the textual data without considering non-textual data, such as retweets and user engagement levels, which affect the reliability and accuracy of classification. Furthermore, the reviewed methods introduce challenges for text representation, multimodal information, and model optimization. Therefore, an effective model, namely Hierarchical Attention-based Recurrent Neural Network-based Aphid-Lemming Optimization Algorithm (HARNN_ALemOA) is proposed for classifying mental health. The objective is to improve classification by combining textual, contextual, and non-textual features and by optimizing the training of HARNN. Initially, input textual data is tokenized using Bidirectional Encoder Representations from Transformers (BERT), followed by feature extraction. Then, dynamic prompt engineering is employed to generate adaptive prompts tailored to the user's linguistic and emotional context, which are further refined using GPT to extract deeper contextual cues. Simultaneously, non-textual features are extracted. These features and contextual clues are combined and fed to HARNN with the Taylor-based Mean Bias Sigmoid Cross Entropy (TMSCE) loss for mental health classification. Further, HARNN is trained using ALemOA. Moreover, HARNN_ALemOA attained a better precision, F1-score, and recall of 97.979%, 97.633%, and 97.290%.

Ramesh Singh Saud · 0 citations
Open access Sep 2026

Deep Learning-Based Approach to Detect Depressive Tendencies from Social Media Posts by Leveraging Advanced NLP Techniques and Multimodal Data Analysis

Depression is a prevalent mental health disorder that significantly impacts individuals' well-being and daily life. With the increasing use of social media, users often express emotions, thoughts, and behaviours that can indicate mental health conditions, including depression. This study proposes a deep learning-based approach to detect depressive tendencies from social media posts by leveraging advanced Natural Language Processing (NLP) techniques and multimodal data analysis. We utilize transformer-based models such as BERT, RoBERTs, and XLNet for feature extraction and sentiment analysis. Additionally, we explore hybrid deep learning architectures integrating CNNs, LSTMs, and attention mechanisms to enhance contextual understanding. To improve accuracy and generalization, the dataset is augmented using selfsupervised learning techniques and pre-trained embeddings fine-tuned on mental health-related corpora. The model is evaluated on benchmark datasets using precision, recall, F1-score, and AUC-ROC metrics. The results demonstrate that deep learning-based approaches outperform traditional machine learning methods in detecting depressive expressions from social media posts. Furthermore, we discuss the ethical considerations and potential applications of AI-driven depression detection in real-world mental health support systems. Our findings suggest that AI can play a crucial role in early depression detection and intervention, contributing to proactive mental health care solutions.

S. D, A. Geetha · 0 citations
Review Aug 2026

Explainable Artificial Intelligence (AI) In Sentiment Analysis

Sentiment analysis has become an essential Natural Language Processing (NLP) technique for extracting opinions and emotions from textual data generated through social media, online reviews, blogs, and customer feedback. Although deep learning models such as Long Short-Term Memory (LSTM), Bidirectional Encoder Representations from Transformers (BERT), and other transformer-based architectures have achieved remarkable accuracy in sentiment classification, their black-box nature limits interpretability and user trust. Explainable Artificial Intelligence (XAI) addresses this limitation by providing transparent and understandable explanations for model predictions, enabling users to identify the key words, phrases, and contextual features that influence sentiment classification. This paper presents a comprehensive study of Explainable AI techniques applied to sentiment analysis, focusing on both model-agnostic methods, including Local Interpretable Model-Agnostic Explanations (LIME) and SHapley Additive exPlanations (SHAP), and attention-based explanation mechanisms. The proposed framework integrates text preprocessing, feature extraction using TF-IDF and contextual embeddings, sentiment classification through machine learning and deep learning models, and explanation generation to improve model transparency. Performance is evaluated using publicly available sentiment datasets based on accuracy, precision, recall, F1-score, and explanation quality. Experimental results demonstrate that XAI techniques significantly enhance the interpretability of sentiment prediction without substantially compromising classification performance. Furthermore, explainable sentiment analysis supports fairness assessment, bias detection, regulatory compliance, and informed decision-making in critical domains such as healthcare, finance, education, and social media analytics. The findings highlight that integrating explainability with sentiment analysis not only increases model reliability but also promotes greater user confidence and responsible deployment of artificial intelligence systems.

Aishwarya P. A., N. K · 0 citations
Review Open access Jul 2026

Enhanced Sentiment Analysis Using RoBERTa and BiLSTM: A Context-Aware Hybrid Deep Learning Approach

This paper presents a context-aware hybrid deep learning approach by integrating the Robustly Optimized BERT Pretraining Approach (RoBERTa) with Bidirectional Long Short-Term Memory (BiLSTM) networks to generate rich contextual word embeddings.

V. Gayatri, Rajani Rajalingam · 0 citations
Conference Jul 2026

Leveraging Fine-tuned IndoBERT and Zero-shot GPT-4o for Mental Health Monitoring from Indonesian Tweets

Social media provides valuable linguistic signals for population-level mental health monitoring, but its informal, ambiguous, and context-dependent language complicates automated classification. This study compares fine-tuned IndoBERT and zero-shot GPT-4o on Indonesian-language tweets across three tasks: seven-class emotion classification, four-class sentiment analysis, and binary suicidal ideation detection. A dataset of 4,280 tweets collected through keyword-based scraping from 2023 to 2025 was labeled using an AI-assisted annotation procedure, with a subset manually reviewed to ensure contextual relevance and label alignment. Of the total dataset, 3,424 tweets were used to fine-tune IndoBERT, while 856 held-out tweets served as a common evaluation benchmark. GPT-4o processed 850 test samples, with six inputs blocked by its built-in content moderation mechanism. The results show a task-dependent performance pattern. GPT-4o outperformed IndoBERT in emotion classification (Macro F1: 0.650 vs. 0.578), whereas IndoBERT performed better in sentiment analysis (0.570 vs. 0.517) and suicidal ideation detection (0.693 vs. 0.441). Despite comparable overall accuracy in suicidal ideation detection, GPT-4o achieved a recall of only 0.01 for the suicidal class, compared with 0.63 for IndoBERT, indicating a critical false-negative risk. These findings suggest that zero-shot GPT-4o performs well on prototypical emotional expressions, whereas task-specific IndoBERT fine-tuning provides more reliable performance for ambiguous sentiment and implicit suicidal ideation. Accordingly, the proposed framework provides a foundation for human-supervised, real-time, granular mental health monitoring using Indonesian tweets.

Athifa Khansa Faaris, R. Putri, Andry Alamsyah · 0 citations
Open access Sep 2026

Modeling Co-Existing Mental Health Risks in Social Media via Multi-Label Learning and LLM

Mental health risk detection from user-generated social media text has become increasingly important as psychiatric conditions such as depression, anxiety, and suicidal ideation continue to rise. However, most existing computational studies operationalize the problem using single-label datasets, implicitly assuming mutually exclusive conditions and thereby under-modeling clinically prevalent comorbidity. To better align modeling assumptions with real-world mental health phenomena, we formulate social-media-based risk identification as a multi-label text classification problem, enabling the simultaneous prediction of co-existing risks within a single post. We construct a hybrid corpus by integrating AIMH/SWMH and the Sentiment Analysis for Mental Health dataset, and by adding neutral/positive samples from Sentiment140 to strengthen healthy-content representation. Multi-label annotations are generated via Meta Llama-3-70B-Instruct using deterministic zero-shot prompting (temperature=0); a manual audit of 1,000 randomly sampled instances yields 94% agreement with the LLM-generated labels. We then benchmark multiple transformer-based encoders under a unified multi-label training protocol and report macro/micro F1 performance, highlighting the feasibility of transformer-based multi-label learning for modeling overlapping mental health risks at scale in social media.

Zehra Özer, Emre Kenger, Görkem Gözükara et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.