Goto

Collaborating Authors

 discocat model


Higher-Order DisCoCat (Peirce-Lambek-Montague semantics)

Toumi, Alexis, de Felice, Giovanni

arXiv.org Artificial Intelligence

DisCoCat [1, 2] (Categorical Compositional Distributional) models are structure-preserving maps which send grammatical types to vector spaces and grammatical structures to linear maps. Concretely, the meaning of words is given by tensors with shapes induced by their grammatical types; the meaning of sentences is given by contracting the tensor networks induced by their grammatical structure. String diagrams provide an intuitive graphical language to visualise and reason formally about the evaluation of DisCoCat models; which can be formalised in terms of functors F: G Vect from the category generated by a formal grammar G to the monoidal category Vect of vector spaces and linear maps with the tensor product [3, 2.5]. Although this functorial definition applies equally to any kind of formal grammar, most of the DisCoCat literature focuses on pregroup grammars and more generally on categorial grammars such as the Lambek calculus [4, 5] and combinatory categorial grammars (CCG) [6]. In that case, G is a closed monoidal category and the DisCoCat models F: G Vect map grammatical structures to the closed structure of Vect in a canonical way. In practice, this means that once the meaning of each word is computed from a dataset, the meaning of any new grammatical sentence can be computed automatically from its grammatical structure.


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

Lorenz, Robin (a:1:{s:5:"en_US";s:17:"Cambridge Quantum";}) | Pearson, Anna (Quantinuum) | Meichanetzidis, Konstantinos (Quantinuum) | Kartsaklis, Dimitri (Quantinuum) | Coecke, Bob (Quantinuum)

Journal of Artificial Intelligence Research

Quantum Natural Language Processing (QNLP) deals with the design and implementation of NLP models intended to be run on quantum hardware. In this paper, we present results on the first NLP experiments conducted on Noisy Intermediate-Scale Quantum (NISQ) computers for datasets of size greater than 100 sentences. Exploiting the formal similarity of the compositional model of meaning by Coecke, Sadrzadeh, and Clark (2010) with quantum theory, we create representations for sentences that have a natural mapping to quantum circuits. We use these representations to implement and successfully train NLP models that solve simple sentence classification tasks on quantum hardware. We conduct quantum simulations that compare the syntax-sensitive model of Coecke et al. with two baselines that use less or no syntax; specifically, we implement the quantum analogues of a "bag-of-words" model, where syntax is not taken into account at all, and of a word-sequence model, where only word order is respected. We demonstrate that all models converge smoothly both in simulations and when run on quantum hardware, and that the results are the expected ones based on the nature of the tasks and the datasets used. Another important goal of this paper is to describe in a way accessible to AI and NLP researchers the main principles, process and challenges of experiments on quantum hardware. Our aim in doing this is to take the first small steps in this unexplored research territory and pave the way for practical Quantum Natural Language Processing.


A multiclass Q-NLP sentiment analysis experiment using DisCoCat

Martinez, Victor, Leroy-Meline, Guilhaume

arXiv.org Artificial Intelligence

Sentiment analysis is a branch of Natural Language Processing (NLP) which goal is to assign sentiments or emotions to particular sentences or words. Performing this task is particularly useful for companies wishing to take into account customer feedback through chatbots or verbatim. This has been done extensively in the literature using various approaches, ranging from simple models to deep transformer neural networks. In this paper, we will tackle sentiment analysis in the Noisy Intermediate Scale Computing (NISQ) era, using the DisCoCat model of language. We will first present the basics of quantum computing and the DisCoCat model. This will enable us to define a general framework to perform NLP tasks on a quantum computer. We will then extend the two-class classification that was performed by Lorenz et al. (2021) to a four-class sentiment analysis experiment on a much larger dataset, showing the scalability of such a framework.