论文标题

量子自然语言处理的类别理论

Category Theory for Quantum Natural Language Processing

论文作者

Toumi, Alexis

论文摘要

本文基于计算语言学和量子力学之间的简单而强大的类比引入了量子自然语言处理(QNLP)模型:语法作为纠缠。文本和句子的语法结构以纠缠结构连接量子系统状态的方式连接单词的含义。类别理论允许使这种语言对等式的类比形式:它是从语法到向量空间的单型函数。我们将这个抽象的类比变成了一种混凝土算法,该算法将语法结构转化为参数化量子电路的结构。然后,我们使用混合经典量子算法来训练模型,以便评估电路在数据驱动的任务中计算句子的含义。 QNLP模型的实施激发了二光度拷贝的发展(分布构图Python),这是应用类别理论的工具包,第一章给出了全面的概述。字符串图是圆盘拷贝的核心数据结构,它们允许在高抽象水平的情况下进行计算。我们展示了它们如何编码语法结构和量子电路,还可以编码逻辑公式,神经网络或任意Python代码。单型函数允许将这些抽象图转换为具体计算,并与优化的特定任务特定库接口。 第二章使用Discopy将QNLP模型作为从语法到量子电路的参数函数。它为功能学习的更通用概念提供了概念验证:通过从图表的数据中学习,从功能到函数的通用机器学习。为了通过梯度下降学习最佳函子参数,我们介绍了图形分化的概念:用于计算参数图梯度的图形计算。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源