A Primer on Quantum Neural Network Model for Text Classification: From Concept to Design
Open Access
- 16 April 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 14, 59932-59947
Abstract
Quantum neural networks (QNNs) have recently attracted remarkable attention as a potential alternative to classical and deep neural network (NN) models particularly under constraints imposed by noisy intermediate-scale quantum (NISQ) devices, which support only shallow circuits with few quantum bits (qubits) and limited variational depth. However, applying QNNs to natural language processing (NLP) remains challenging because text representations are typically high-dimensional, while NISQ classifiers can only encode a small number of features at a time, requiring classical compression to enable stable training and flexible circuit configuration. In addition, many existing studies integrate QNNs into rich-text representation pipelines, where the quantum circuit is often implemented as a variational quantum circuit (VQC). Here, the VQC acts as an additional component within a larger model, and it remains unclear how the quantum component improves the classification task. Therefore, in this work, we propose a fully reproducible and compact QNN pipeline that provides a controlled setting for studying the contribution of the VQC to text classification. The model is trained end-to-end with a lightweight classical compression layer, and the overall study is supported by systematic ablation analyses of the compression layer, the classifier heads under a shared frozen low-dimensional representation, and quantum circuit structure. Our model uses the term frequency-inverse document frequency (TF-IDF) features with linear compression followed by a shallow four-qubit, two-layer VQC, implemented in PyTorch and PennyLane for end-to-end training. It is evaluated on five benchmark text classification datasets against classical baselines, including logistic regression and multilayer perceptron (MLP) models. Experimental results show that the proposed QNN achieves a competitive performance across all evaluated datasets, yielding the best results on three of the five benchmark datasets.Keywords
Funding Information
- Natural Sciences and Engineering Research Council of Canada (#1-51-48574)
- NSERC Discovery Grant
This publication has 47 references indexed in Scilit:
- Quantum self-attention neural networks for text classificationScience China Information Sciences, 2024
- Hybrid classical-quantum transfer learning for text classificationQuantum Machine Intelligence, 2024
- Time series quantum classifiers with amplitude embeddingQuantum Machine Intelligence, 2023
- Time Series Forecasting with Quantum Neural Networks2023
- Quantum machine learning for natural language processing applicationPhysica A: Statistical Mechanics and its Applications, 2023
- Expressibility and Entangling Capability of Parameterized Quantum Circuits for Hybrid Quantum‐Classical AlgorithmsAdvanced Quantum Technologies, 2019
- Barren plateaus in quantum neural network training landscapesNature Communications, 2018
- Annotating Expressions of Opinions and Emotions in LanguageLanguage Resources and Evaluation, 2005
- Realization of the Cirac–Zoller controlled-NOT quantum gateNature, 2003
- Basics of quantum computationProgress in Quantum Electronics, 1998