Sentiment analysis is a key approach for interpreting human emotions from data using Natural Language Processing. However, most current methods often face challenges such as capturing complex semantic relationships and high computational cost. This study proposes an Enhanced Quantum-LSTM architecture that exploits quantum properties like superposition and entanglement to improve semantic representation. The proposed pipeline includes: (i) extracting semantic features using 300-dimensional Word2Vec; (ii) reducing dimensionality with Principal Component Analysis; (iii) mapping data into Hilbert space via Angle Embedding for quantum state preparation; (iv) processing sequences through QLSTM cells with variational quantum gates; and (v) applying a Quantum Self-Attention mechanism to emphasize sentiment-relevant tokens. The main contribution is integrating quantum variational circuits into LSTM gate operations, achieving 79.77% accuracy and a 78.76% F1 score while using fewer parameters.
Sentiment analysis is a key approach for interpreting human emotions from data using Natural Language Processing. However, most current methods often face challenges such as capturing complex semantic relationships and high computational cost. This study proposes an Enhanced Quantum-LSTM architecture that exploits quantum properties like superposition and entanglement to improve semantic representation. The proposed pipeline includes: (i) extracting semantic features using 300-dimensional Word2Vec; (ii) reducing dimensionality with Principal Component Analysis; (iii) mapping data into Hilbert space via Angle Embedding for quantum state preparation; (iv) processing sequences through QLSTM cells with variational quantum gates; and (v) applying a Quantum Self-Attention mechanism to emphasize sentiment-relevant tokens. The main contribution is integrating quantum variational circuits into LSTM gate operations, achieving 79.77% accuracy and a 78.76% F1 score while using fewer parameters.
NLP models have shown remarkable performance for sentiment analysis and text classification tasks due to the deep neural networks and transformer architectures. However, these models typically necessitate considerable computational resources, high parameter complexity and large scale training datasets. Recently, quantum computing has emerged as a promising paradigm that can enhance machine learning systems using quantum parallelism, superposition, and entanglement. In this paper, we propose a new Hybrid Quantum-Classical NLP architecture that combines variational quantum circuit (VQC) layers with classical neural network layers for effective sentiment analysis. The proposed framework combines classical embedding and LSTM layers with a quantum-enhanced variational layer to improve feature representation and classification performance. The proposed framework combines classical embedding and LSTM layers with a quantum-enhanced variational layer to enhance the feature representation and classification performance. The quantum layer is realized via parameterized quantum circuits and optimized using hybrid gradient-based learning techniques. The effectiveness of The proposed framework combines classical embedding and LSTM layers with a quantum-enhanced variational layer to enhance the feature representation and classification performance. The quantum layer is realized via parameterized quantum circuits and optimized using hybrid gradient-based learning techniques. The effectiveness of the proposed model is evaluated on the benchmark sentiment analysis datasets such as IMDb and SST-2 experiments. The hybrid architecture is compared with standard deep learning models in terms of accuracy, training complexity and parameter efficiency. The experimental results show that the proposed quantum-enhanced model can achieve competitive classification accuracy while reducing model complexity and improving contextual semantic learning.
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±0.0059 across five random seeds).
Recent advances in quantum computing have opened new pathways for enhancing deep learning architectures, particularly in domains characterized by high-dimensional and context-rich data such as natural language processing (NLP). In this work, we present a hybrid classical-quantum Transformer model that integrates a quantum-enhanced attention mechanism into the standard classical architecture. By embedding token representations into a quantum Hilbert space via parameterized variational circuits and exploiting entanglement-aware kernel similarities, the model captures complex semantic relationships beyond the reach of conventional dot-product attention. We demonstrate the effectiveness of this approach across diverse NLP benchmarks, showing improvements in both efficiency and representational capacity. The results section reveal that the quantum attention layer yields globally coherent attention maps and more separable latent features, while requiring comparatively fewer parameters than classical counterparts. These findings highlight the potential of quantum-classical hybrid models to serve as a powerful and resource-efficient alternative to existing attention mechanisms in NLP.
Sentence classification is a core task in Natural Language Processing, and sentiment analysis in particular remains difficult because of contextual ambiguity, semantic complexity, and the overlap between closely related sentiment classes. This paper presents a hybrid quantum-classical architecture for sentence classification that combines classical deep learning with quantum feature extraction. The classical branch employs a Feedforward Neural Network (FNN) and a Long Short-Term Memory (LSTM) network to learn complementary semantic and contextual representations, while the quantum branch reduces TF-IDF features through Truncated Singular Value Decomposition (SVD) and encodes them into a parameterized quantum circuit built with Qiskit. The classical and quantum representations are combined through feature-level fusion and classified using a MultiLayer Perceptron (MLP). The framework is evaluated on the SST-2 dataset for binary sentiment classification and on a merged SST-2 + SST-5 dataset for multi-class classification. The proposed hybrid model achieves an accuracy of 90.5%, precision of 89.9%, recall of 90.1%, and F1-score of 90.1% on SST-2, with a ROC-AUC close to 0.97, exceeding the individual FNN and LSTM baselines. On the merged multi-class dataset, the hybrid model attains 66.65% accuracy against 65.15% for FNN and 62.65% for LSTM. These results indicate that feature-level integration of classical and quantum representations can improve sentence classification performance within currently available quantum simulation environments.
In recent days, sentiment analysis (SA) has emerged as a critical aspect of data analytics as user-generated content is rapidly disseminating across social media platforms, and other online channels. Breakthroughs in NLP and DL have significantly improved the contextual understanding and efficiency of SA models. Despite their success, traditional NLP and DL models have faced limitations within high-dimensional feature spaces, parameter optimization, and data scalability. This research work presents a novel SA framework based on quantum inspired DL (QIDL) techniques. We investigated hybrid models that integrate classical DL techniques with quantum inspired learning such as feature encoding, attention mechanisms, and context modeling. Three QIDL models have been studied, namely, QCNN, QLSTM, and QBERT. The performance of these models is evaluated on three benchmark sentiment datasets: IMDb, Twitter Sentiment, and SST-5. The experimental studies on the IMDb, Twitter Sentiment, and SST-5 datasets show that QCNN, QLSTM, and Q-BERT surpass their classical counterparts by approximately 1.6-2.7%, 1.5-3.3%; 1.5-2.6%, 1.4-4.2%; and 1-3%, 1.7-2.6%, respectively, in classification accuracy and macro-F1 score. Of all the benchmark models, Q-BERT achieved the best overall performance, attaining 55.8% accuracy and a macro-F1 score of 54.2% on the multi-class SST-5 dataset. Hence, it is evident that the proposed QIDL models achieve competitive classification performance while maintaining robustness in sparse and highdimensional settings.
Combining variational quantum circuits with classical neural network models is a potential direction for quantum natural language processing (QNLP) in the NISQ (Noisy Intermediate-Scale Quantum) era. We propose a hybrid classical-quantum neural network that enhances a transformer architecture in two key ways: first, by incorporating optimized variational quantum circuits into the self-attention and multilayer perceptron components, and second, by integrating a hybrid convolutional module for effective dimensionality reduction which can reduce the quantum resources required for subsequent layers and enhances the model’s trainability by mitigating issues like the barren plateau phenomenon, thus making it feasible to construct a deeper and more powerful network architecture. Our experiments on three widely-used sentiment analysis datasets demonstrate that the proposed model achieves comparable or even superior performance in terms of accuracy and F1 score compared to classical transformer-based sentiment classification models with similar structures, while reducing the number of parameters through the utilization of quantum advantages.