Category Theory for Quantum Natural Language Processing

12/13/2022
by   Alexis Toumi, et al.
0

This thesis introduces quantum natural language processing (QNLP) models based on a simple yet powerful analogy between computational linguistics and quantum mechanics: grammar as entanglement. The grammatical structure of text and sentences connects the meaning of words in the same way that entanglement structure connects the states of quantum systems. Category theory allows to make this language-to-qubit analogy formal: it is a monoidal functor from grammar to vector spaces. We turn this abstract analogy into a concrete algorithm that translates the grammatical structure onto the architecture of parameterised quantum circuits. We then use a hybrid classical-quantum algorithm to train the model so that evaluating the circuits computes the meaning of sentences in data-driven tasks. The implementation of QNLP models motivated the development of DisCoPy (Distributional Compositional Python), the toolkit for applied category theory of which the first chapter gives a comprehensive overview. String diagrams are the core data structure of DisCoPy, they allow to reason about computation at a high level of abstraction. We show how they can encode both grammatical structures and quantum circuits, but also logical formulae, neural networks or arbitrary Python code. Monoidal functors allow to translate these abstract diagrams into concrete computation, interfacing with optimised task-specific libraries. The second chapter uses DisCopy to implement QNLP models as parameterised functors from grammar to quantum circuits. It gives a first proof-of-concept for the more general concept of functorial learning: generalising machine learning from functions to functors by learning from diagram-like data. In order to learn optimal functor parameters via gradient descent, we introduce the notion of diagrammatic differentiation: a graphical calculus for computing the gradients of parameterised diagrams.

READ FULL TEXT
research
02/02/2021

Parametrized Quantum Circuits of Synonymous Sentences in Quantum Natural Language Processing

In this paper, we develop a compositional vector-based semantics of posi...
research
12/13/2022

Categorical Tools for Natural Language Processing

This thesis develops the translation between category theory and computa...
research
10/08/2021

lambeq: An Efficient High-Level Python Library for Quantum NLP

We present lambeq, the first high-level Python library for Quantum Natur...
research
04/06/2019

The Mathematics of Text Structure

In previous work we gave a mathematical foundation, referred to as DisCo...
research
01/25/2023

Distilling Text into Circuits

This paper concerns the structure of meanings within natural language. E...
research
02/27/2012

Synthesising Graphical Theories

In recent years, diagrammatic languages have been shown to be a powerful...
research
12/07/2020

Foundations for Near-Term Quantum Natural Language Processing

We provide conceptual and mathematical foundations for near-term quantum...

Please sign up or login with your details

Forgot password? Click here to reset