Exploiting quantum properties to improve performance of different tasks in Natural Language Processing (NLP) and other domains has increasingly becoming a successful trend to deal complex language phenomena or to fill task or domain-specific gaps with an approach that needs less data and minor computational resources. The field that has, to date, yielded more quantum-based attention is the retrieval and classification of textual data. This work aims to replicate the excellent results of hybrid quantum approaches for syntactic tasks on semantic classification tasks. In detail, a quantum machine learning algorithm, namely, the Variational Quantum Classifier (VQC), is used to perform sentiment analysis classification tasks. This algorithm can deduce the relationships between input features and their corresponding class affiliations using a parametrized quantum circuit and an encoding layer that translates classical data into quantum states. The approach has been tested on a well-known benchmark annotated dataset used for the Italian language, and the results have been compared to existing baselines, pointing out state-of-the-art scores.
Exploiting quantum properties to improve performance of different tasks in Natural Language Processing (NLP) and other domains has increasingly becoming a successful trend to deal complex language phenomena or to fill task or domain-specific gaps with an approach that needs less data and minor computational resources. The field that has, to date, yielded more quantum-based attention is the retrieval and classification of textual data. This work aims to replicate the excellent results of hybrid quantum approaches for syntactic tasks on semantic classification tasks. In detail, a quantum machine learning algorithm, namely, the Variational Quantum Classifier (VQC), is used to perform sentiment analysis classification tasks. This algorithm can deduce the relationships between input features and their corresponding class affiliations using a parametrized quantum circuit and an encoding layer that translates classical data into quantum states. The approach has been tested on a well-known benchmark annotated dataset used for the Italian language, and the results have been compared to existing baselines, pointing out state-of-the-art scores.
Abstract Hybrid quantum-classical algorithms have emerged as promising candidates for overcoming current limitations of deep learning techniques and recently have attracted a lot of attention for their application in natural language processing (NLP). Among the potential applications of quantum computing in this field, quantum transfer learning—using quantum circuits for fine-tuning pre-trained classical models specific to a task—is regarded as a potential avenue to exploit the potentiality of quantum computers. This study validates, both experimentally and with domain knowledge analysis, the efficacy of quantum transfer learning for two distinct NLP tasks—semantic and syntactic—and employ multilingual data encompassing both English and Italian. In particular is hereby demonstrated that embedded knowledge coming from pre-trained deep learning models can be effectively transferred into a quantum classifier, which shows good performances, either comparable or potentially better than their classical counterparts, with a further reduction of parameters compared to a purely classical classifier. Furthermore, a qualitative linguistic analysis of the results is presented, that elucidates two points: the lack of language dependence in the quantum models and the ability to discriminate with higher precision than standard classifiers, sub-types of linguistic structures.
Abstract Hybrid quantum-classical classifiers promise to positively impact critical aspects of natural language processing tasks, particularly classification-related ones. Among the possibilities currently investigated, quantum transfer learning, i.e., using a quantum circuit for fine-tuning pre-trained classical models for a specific task, is attracting significant attention as a potential platform for proving quantum advantage. This work shows potential advantages, in terms of both performance and expressiveness, of quantum transfer learning algorithms trained on embedding vectors extracted from a large language model to perform classification on a classical linguistics task—acceptability judgements. Acceptability judgement is the ability to determine whether a sentence is considered natural and well-formed by a native speaker. The approach has been tested on sentences extracted from ItaCoLa, a corpus that collects Italian sentences labeled with their acceptability judgement. The evaluation phase shows results for the quantum transfer learning pipeline comparable to state-of-the-art classical transfer learning algorithms, proving current quantum computers’ capabilities to tackle NLP tasks for ready-to-use applications. Furthermore, a qualitative linguistic analysis, aided by explainable AI methods, reveals the capabilities of quantum transfer learning algorithms to correctly classify complex and more structured sentences, compared to their classical counterpart. This finding sets the ground for a quantifiable quantum advantage in NLP in the near future.
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.
This research paper primarily investigates the application and performance of traditional machine learning and quantum computing in Natural Language Processing (NLP), with a focus on sentiment analysis tasks. By comparing the accuracy, efficiency, and scalability of these two technologies, the study aims to reveal the potential of quantum computing in handling complex NLP tasks and to provide data support for future technology choices and research directions. The paper also details the use of 1M DB and NLTK movie review datasets for experiments and discusses the experimental design, performance evaluation results, and technical challenges faced by both methods.
The meeting between Natural Language Processing (NLP) and Quantum Computing has been very successful in recent years, leading to the development of several approaches of the so-called Quantum Natural Language Processing (QNLP). This is a hybrid field in which the potential of quantum mechanics is exploited and applied to critical aspects of language processing, involving different NLP tasks. Approaches developed so far span from those that demonstrate the quantum advantage only at the theoretical level to the ones implementing algorithms on quantum hardware. This paper aims to list the approaches developed so far, categorizing them by type, i.e., theoretical work and those implemented on classical or quantum hardware; by task, i.e., general purpose such as syntax-semantic representation or specific NLP tasks, like sentiment analysis or question answering; and by the resource used in the evaluation phase, i.e., whether a benchmark dataset or a custom one has been used. The advantages offered by QNLP are discussed, both in terms of performance and methodology, and some considerations about the possible usage QNLP approaches in the place of state-of-the-art deep learning-based ones are given.
Abstract Quantum Machine Learning (QML) is a promising field that combines the power of quantum computing with machine learning. Variational quantum circuits, where parameters of circuits are learned classically, have been widely used in many recent applications of QML. This is an instance of a hybrid quantum-classical framework, where both classical and quantum components are present. However, applying these techniques to applications involving massive data is a challenging task. One way to overcome this, is using the concept of classical-quantum transfer learning with the help of dressed quantum circuit, introduced recently, where the underlying neural architecture is pre-trained classically, but at the final steps (decision layer), a quantum circuit is used, followed by quantum measurements and post-processing to classify images with high precision. In this paper, we applied hybrid classical-quantum transfer learning to another task of massive data processing, i.e. Natural Language Processing (NLP). We show how to (binary) classify short texts (e.g., SMS) with classical-quantum transfer learning, which was originally applied to image processing only. Our quantum network was pre-trained by Bidirectional Encoder Representations from the Transformers (BERT) model, and its variational quantum circuit is fine-tuned for text processing. We evaluated the performance of our hybrid neural architecture using the Receiver Operating Characteristic (ROC) curve, which is typically used in the evaluation of classification problems. The results indicate high precision as well as lower loss function. To our knowledge, our work is the first application of quantum transfer learning to the area of NLP. Finally a comparison with a tool that uses learning but in a different way than transfer learning is presented