Mental health-aware sentiment analysis using a hybrid quantum–classical approach
摘要
Social media offers a real-time opportunity to examine human emotions, behaviors, and mental health as it becomes more and more integrated into daily life. These platforms are rich sources of public opinions and expressions that provide insightful information about psychological health. Such data have been interpreted using traditional sentiment analysis. However, it frequently fails to identify subtle emotional cues that are important for evaluating mental health. In order to improve sentiment analysis for mental health detection using social media datasets, this study investigates a novel integration of Quantum Natural Language Processing (QNLP). The study proposes a hybrid quantum–classical framework for binary sentiment classification of tweets that incorporates a custom quantum layer into an LSTM network. To enhance the feature representation, the quantum layer employs variational quantum circuits with rotational and entanglement gates. The final classification is achieved by concatenating the results with classical LSTM outputs. In addition, we introduced a recency-aware temporal weighting mechanism to dynamically monitor mental health of users. Our model offers improved feature entanglement capabilities while achieving competitive performance (validation accuracy of 0.7707) when compared to a classical LSTM baseline (0.7775) on the Sentiment140 dataset. This work illustrates the potential of quantum machine learning for scalable, real-time psychological analysis by mapping weighted sentiment scores to inferred mental health states. The suggested framework focuses on large-scale, real-time social media streams, where repeated quantum circuit simulations and training and inference over millions of temporally evolving textual instances require GPU acceleration, parallel execution, and high-performance computing (HPC) resources for practical deployment.