Design and Implementation of a Quantum Kernel for Natural Language Processing

05/13/2022
by   Matt Wright, et al.
0

Natural language processing (NLP) is the field that attempts to make human language accessible to computers, and it relies on applying a mathematical model to express the meaning of symbolic language. One such model, DisCoCat, defines how to express both the meaning of individual words as well as their compositional nature. This model can be naturally implemented on quantum computers, leading to the field quantum NLP (QNLP). Recent experimental work used quantum machine learning techniques to map from text to class label using the expectation value of the quantum encoded sentence. Theoretical work has been done on computing the similarity of sentences but relies on an unrealized quantum memory store. The main goal of this thesis is to leverage the DisCoCat model to design a quantum-based kernel function that can be used by a support vector machine (SVM) for NLP tasks. Two similarity measures were studied: (i) the transition amplitude approach and (ii) the SWAP test. A simple NLP meaning classification task from previous work was used to train the word embeddings and evaluate the performance of both models. The Python module lambeq and its related software stack was used for implementation. The explicit model from previous work was used to train word embeddings and achieved a testing accuracy of 93.09 ± 0.01 testing accuracy of 95.72 ± 0.01 for (ii). The SWAP test was then simulated under a noise model defined by the real quantum device, ibmq_guadalupe. The explicit model achieved an accuracy of 91.94 ± 0.01 dataset, suggesting that the kernelized classifiers are resilient to noise. These are encouraging results and motivate further investigations of our proposed kernelized QNLP paradigm.

READ FULL TEXT

page 22

page 24

research
02/25/2021

QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer

Quantum Natural Language Processing (QNLP) deals with the design and imp...
research
02/23/2022

A gentle introduction to Quantum Natural Language Processing

The main goal of this master's thesis is to introduce Quantum Natural La...
research
05/08/2020

Quantum Natural Language Processing on Near-Term Quantum Computers

In this work, we describe a full-stack pipeline for natural language pro...
research
12/07/2020

Grammar-Aware Question-Answering on Quantum Computers

Natural language processing (NLP) is at the forefront of great advances ...
research
03/04/2023

Variational Quantum Classifiers for Natural-Language Text

As part of the recent research effort on quantum natural language proces...
research
04/12/2020

A hybrid classical-quantum workflow for natural language processing

Natural language processing (NLP) problems are ubiquitous in classical c...
research
07/21/2020

Human Abnormality Detection Based on Bengali Text

In the field of natural language processing and human-computer interacti...

Please sign up or login with your details

Forgot password? Click here to reset