Supervised compression boosts quantum NLP classification accuracy

Hybrid Quantum-Classical NLP Classification with Compact Semantic Representations: An Experimental Analysis of Representation Compression

Machine Learning

Summary

Quantum computers can only handle a small number of input features, so representing long sentences for them is hard. The authors studied ways to shrink large sentence descriptions into smaller, meaningful ones without losing important information. They found that supervised methods, which use task labels, keep more useful details than simple variance-based methods. This makes hybrid quantum-classical systems more practical for natural language tasks. Their experiments showed that with just five features, these methods nearly matched the accuracy of much larger classical models.

What this means in practice

  • For quantum software developers: Design quantum classifiers that use compact, supervised-reduced embeddings to improve performance on natural language tasks within limited qubit counts.
  • For machine learning engineers: Build hybrid NLP models that combine classical embedding compression with quantum circuits to maintain classification accuracy on small feature sets.

Tested on one dataset.

Authors

Ali Hassan, Zijia Zhao, Maha A. Metawei

Abstract

Large language and sentence-embedding models provide rich semantic representations, but their high dimensionality poses a challenge for near-term quantum machine learning (QML), where quantum circuits can process only a limited number of input features. We investigate a hybrid quantum-classical pipeline that transforms high-dimensional sentence embeddings into compact representations for variational quantum classification. The workflow combines a pretrained sentence-embedding model, dimensionality reduction, angle encoding, a variational quantum circuit (VQC), and a classical decision layer. We systematically compare principal component analysis (PCA), neighborhood components analysis (NCA), and linear discriminant analysis (LDA), covering both unsupervised and supervised dimensionality reduction. Using the TREC question-classification dataset, we study the relationship between representation dimensionality, information retention, qubit count, and classification performance. Preliminary PCA experiments reveal a strong information bottleneck: reducing 768-dimensional embeddings to 3, 4, 5, and 8 dimensions retains about 8.2%, 10.2%, 11.9%, and 16.4% of the variance, with corresponding classification accuracies of 50.3%, 51.2%, 57.9%, and 63.4%. In contrast, supervised reduction is substantially more efficient. LDA reaches 85.3% accuracy and NCA reaches 83.1% using only 5 dimensions, under a leakage-free cross-validation protocol, compared with 85.1% for a full 384-dimensional classical baseline. These results indicate that supervised dimensionality reduction can preserve task-relevant information far more effectively than variance-based compression, making compact representations a promising route toward practical hybrid quantum-classical NLP models.