Skip to main content
QUICK REVIEW

[Paper Review] Hybrid Quantum-Classical Machine Learning for Sentiment Analysis

Abu Kaisar Mohammad Masum, Anshul Maurya|arXiv (Cornell University)|Oct 8, 2023
Quantum Computing Algorithms and ArchitectureComputer Science3 citations
TL;DR

This paper proposes a hybrid quantum-classical machine learning framework for sentiment analysis that integrates quantum kernel methods (QSVM) and variational quantum circuits (VQC) with classical dimensionality reduction via PCA and Haar wavelet transforms. The approach achieves consistent accuracy improvements—reaching 84% on English and 72% on Bengali datasets—especially when combining Haar transform with quantum models, outperforming classical SVMs under similar compression.

ABSTRACT

The collaboration between quantum computing and classical machine learning offers potential advantages in natural language processing, particularly in the sentiment analysis of human emotions and opinions expressed in large-scale datasets. In this work, we propose a methodology for sentiment analysis using hybrid quantum-classical machine learning algorithms. We investigate quantum kernel approaches and variational quantum circuit-based classifiers and integrate them with classical dimension reduction techniques such as PCA and Haar wavelet transform. The proposed methodology is evaluated using two distinct datasets, based on English and Bengali languages. Experimental results show that after dimensionality reduction of the data, performance of the quantum-based hybrid algorithms were consistent and better than classical methods.

Motivation & Objective

  • To develop a hybrid quantum-classical machine learning pipeline for sentiment analysis that leverages quantum advantages in feature mapping and classification.
  • To investigate the effectiveness of quantum kernel methods (QSVM) and parameterized quantum circuits (VQC) in classifying sentiment from multilingual text.
  • To evaluate dimensionality reduction techniques—PCA and Haar wavelet transform—for efficient encoding of classical NLP features into NISQ-era quantum hardware.
  • To compare quantum-classical models against classical SVMs under identical data compression, assessing robustness and performance trade-offs.
  • To demonstrate the feasibility and superiority of quantum-enhanced sentiment analysis on low-resource and linguistically complex languages like Bengali.

Proposed method

  • The framework combines classical NLP preprocessing with quantum machine learning models, using word embeddings and sentence tokenization for English and Bengali text.
  • Quantum feature maps are implemented using Pauli-based circuits, with entangled qubit pairs mapped via $ f_{q_j,q_k}(x) = (\pi - x[j])(\pi - x[k]) $ and single qubits via $ f_{q_m}(x) = x[m] $.
  • The Variational Quantum Classifier (VQC) is trained using the ADAM optimizer to minimize the loss function over parameterized quantum circuits.
  • Quantum Support Vector Machine (QSVC) is implemented using Qiskit’s pre-built library, leveraging a quantum kernel for classical SVM classification.
  • Dimensionality reduction is applied via PCA to reduce feature space and Haar wavelet transform to compress data points, with up to five decomposition levels tested.
  • The pipeline evaluates performance on two datasets: a Twitter-based English sentiment dataset and a Bengali sentiment dataset, both preprocessed with language-specific NLP techniques.
Figure 1: Workflow for the proposed hybrid quantum-classical methodology for sentiment analysis.
Figure 1: Workflow for the proposed hybrid quantum-classical methodology for sentiment analysis.

Experimental results

Research questions

  • RQ1Can hybrid quantum-classical models improve sentiment classification accuracy compared to classical methods when applied to multilingual text?
  • RQ2How effective are dimensionality reduction techniques like PCA and Haar wavelet transform in enabling efficient encoding of classical NLP features into quantum circuits?
  • RQ3Does the integration of Haar wavelet transform with quantum-classical models yield better performance than classical SVMs under data compression?
  • RQ4How do quantum kernel-based (QSVM) and variational quantum circuit-based (VQC) models compare in terms of accuracy and training efficiency on sentiment analysis tasks?
  • RQ5To what extent do language-specific characteristics, such as those in Bengali, affect the performance of quantum-enhanced sentiment analysis models?

Key findings

  • On the English dataset, the hybrid quantum-classical model achieved a test accuracy of 84%, significantly outperforming classical SVMs under similar compression.
  • For the Bengali dataset, the model maintained a consistent test accuracy of 72.22% even after dimensionality reduction, matching the performance of classical models without compression.
  • The VQC algorithm demonstrated the shortest training time across all feature sets and decomposition levels, maintaining stable accuracy up to five levels of Haar decomposition.
  • When using Haar transform for data point compression, the quantum-classical models achieved 71.23% accuracy, while classical SVM accuracy dropped to 58% with only one decomposition level.
  • The QSVC and VQC models showed higher test and training accuracies (70–71%) than the quantum kernel SVM on the Twitter (English) dataset, with VQC being the fastest to train.
  • The combination of Haar wavelet transform and quantum-classical models proved more effective than classical SVMs under compression, indicating a quantum advantage in data-efficient learning.
Figure 2: Bengali text pre-processing method for sentiment analysis.
Figure 2: Bengali text pre-processing method for sentiment analysis.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.