Category theory for quantum natural language processing

<p>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 tha...

Full description

Bibliographic Details
Main Author: Toumi, A
Other Authors: Coecke, B
Format: Thesis
Language:English
Published: 2022
Subjects:
_version_ 1797108908642271232
author Toumi, A
author2 Coecke, B
author_facet Coecke, B
Toumi, A
author_sort Toumi, A
collection OXFORD
description <p>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.</p> <p>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.</p> <p>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.</p>
first_indexed 2024-03-07T07:34:37Z
format Thesis
id oxford-uuid:3b45fce6-9647-4148-b595-37e81aa6e94d
institution University of Oxford
language English
last_indexed 2024-03-07T07:34:37Z
publishDate 2022
record_format dspace
spelling oxford-uuid:3b45fce6-9647-4148-b595-37e81aa6e94d2023-02-27T12:35:52ZCategory theory for quantum natural language processingThesishttp://purl.org/coar/resource_type/c_db06uuid:3b45fce6-9647-4148-b595-37e81aa6e94dNatural language processing (Computer science)Quantum computingCategories (Mathematics)EnglishHyrax Deposit2022Toumi, ACoecke, BMarsden, D<p>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.</p> <p>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.</p> <p>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.</p>
spellingShingle Natural language processing (Computer science)
Quantum computing
Categories (Mathematics)
Toumi, A
Category theory for quantum natural language processing
title Category theory for quantum natural language processing
title_full Category theory for quantum natural language processing
title_fullStr Category theory for quantum natural language processing
title_full_unstemmed Category theory for quantum natural language processing
title_short Category theory for quantum natural language processing
title_sort category theory for quantum natural language processing
topic Natural language processing (Computer science)
Quantum computing
Categories (Mathematics)
work_keys_str_mv AT toumia categorytheoryforquantumnaturallanguageprocessing