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.
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.
Abstract Hybrid quantum–classical models for text classification are constrained by the mismatch between high-dimensional sentence embeddings and the limited number of qubits available in Noisy Intermediate-Scale Quantum (NISQ) hardware. Existing approaches rely on fixed dimensionality-reduction techniques such as PCA, which compress embeddings independently of the learning task and often remove semantic information essential for downstream classification. This work addresses this limitation by applying Neural Quantum Embedding (NQE) to sentence-level sentiment analysis. NQE jointly performs nonlinear neural compression and quantum-oriented encoding, producing compact embeddings optimized for variational circuits.We integrate NQE with a Quantum Neural Network based on a three-layer SU(4) ansatz. Experiments on three sentence-level sentiment datasets show that NQE substantially improves hybrid quantum performance, increasing accuracy by up to 38%, with corresponding improvements in precision, recall, and F1-score. Additional experiments with a classical neural network demonstrate that NQE also enhances classical performance, yielding accuracy gains of up to 6.3%. Although classical models achieve higher absolute accuracy due to greater representational capacity, the relative improvement introduced by NQE is significantly larger in the quantum setting, where embedding structure must align with strict hardware constraints.Overall, this study introduces a task-adaptive, learnable embedding mechanism that bridges the representational gap between classical embeddings and quantum circuits. The results show that NQE improves optimization stability, enhances quantum-state separability, and enables more effective hybrid sentiment classification within NISQ limitations
Quantum machine learning has recently emerged as a promising paradigm that leverages the expressive power of quantum circuits to address complex learning tasks. In this work, we investigate the applicability of hybrid quantum-classical neural networks to sentiment analysis, a central problem in natural language processing. We focus on a dataset of tweets related to COVID-19, where the textual content is vectorized using TF-IDF and fed into both classical feedforward networks and hybrid architectures incorporating parameterized quantum circuits. Our results show that hybrid models can achieve accuracy comparable to the classical baseline, while exhibiting distinct learning dynamics, especially in terms of validation loss and accuracy, that suggest a richer representational capacity. Moreover, when applying transfer learning to an SMS spam classification task, the hybrid models consistently outperform the classical counterpart, achieving an accuracy increase of 15 percentage points (from 66% to 81%) on the spam class, demonstrating enhanced generalization. These findings highlight the feasibility of employing QML for natural language processing and point toward the potential advantages of hybrid models as quantum hardware continues to advance.
Paraphrase Detection is a core task in natural language processing (NLP) that aims to determine whether two sentences convey equivalent meanings.This work proposes a hybrid quantum-classical framework that integrates Sentence-BERT embeddings, simulated quantum feature encoding, and classical machine learning models to enhance semantic similarity detection.Initially, sentence pairs are embedded using Sentence-BERT and standardized through feature scaling.These representations are then transformed via rotation-based quantum circuits to capture higher-order feature interactions and non-linear dependencies.The resulting hybrid feature space, combining classical and quantum-inspired components are evaluated using LightGBM and deep neural network classifiers.Experimental results shows that the hybrid model incorporating quantuminspired features achieved superior classification performance, yielding a 10% improvement in overall accuracy outperforming standalone deep learning baselines.These findings demonstrate that quantum-classical fusion enhances semantic feature extraction and significantly improves paraphrase detection performance.
Given the recent prominence of Noisy Intermediate Scale Quantum (NISQ) devices, hybrid quantum-classical neural networks have recently drawn a lot of excitement as a potential solution to improving learning efficiency. Our current paper describes a Hybrid Quantum-Classical Convolutional Neural Network (HQCNN) which is defined as a pretrained backbone of ResNet-18 and a small quantum-enhanced feature-transformation layer of Qiskit. The convolutional high-dimensional features are reduced to the classical eight-dimensional one, which in turn is encoded into a four-qubit parameterized quantum circuit. The resultant quantum expectation values are combined with the compressed features to come up with a hybridized representation of twelve dimensions, used to classify multi-class dataset. Experimental analysis of CIFAR10 data has shown that the suggested HQCNN achieves a test accuracy of 94.74% and improves class-wise precision, recall, and F1-scores than a number of existing hybrid models while using a significantly smaller number of latent features. More investigation into the quantum module indicates that it is predictable about scalability to batch, resistant to perturbations in features, and efficiently performed by evaluating circuit vectors. These results indicate that compact and expressive representations of images that can be helpful in the NISQ era can be acquired using hybrid architectures, thus providing a practical way to forward the benefits of quantum to modern deep-learning pipelines.
This article proposes classical and quantum vectorization methods for text data classification, along with corresponding neural network architectures for classification based on these representations. The study applies classical and quantum variants of one-hot encoding, bag-of-words, TF-IDF, and word2vec vectorization techniques, which are respectively integrated with CNN, LSTM, MLP, and BiLSTM neural network models for text classification. All models are trained on the same dataset under identical experimental conditions, with classification accuracy and computational efficiency adopted as the primary evaluation metrics. Classical vectorization methods represent semantic and contextual properties of text in a limited manner, whereas quantum vectorization overcomes these limitations. When neural networks are trained using quantum-based representations, higher classification accuracy and significantly reduced computation time are achieved compared to classical approaches. The combined use of quantum word2vec and the BiLSTM architecture yields the highest performance among all evaluated models. The obtained results demonstrate that this approach is the most effective for text data classification, as it accurately captures semantic relationships and leverages deep neural network architectures. This study may serve as a scientific foundation for future research aimed at developing more advanced neural architectures based on quantum computing paradigms.
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.