Why quantum computing for Natural Language Processing?
Our team focuses on Quantum Natural Language Processing (QNLP). More broadly, we are interested in the potential quantum computing has to enhance Artificial Intelligence (AI). We take advantage of structural correspondences between the matching compositional structures underpinning quantum theory (e.g., process theories and tensor networks) on the one hand, and formal and natural languages on the other hand, in order to design novel models for language and other cognitive phenomena. These mathematical connections between quantum theory and language models allow us to implement our models on quantum computers and exploit the advantage that may bring.
The relevant mathematical framework is category theory, which comes equipped with an intuitive graphical language in terms of process diagrams. Last but not least, as current “black box” machine learning architectures are confronted by the need for interpretability, explainability, and responsibility, we envisage that our brand of AI models provide a scalable solution towards transparency.
Quantum Natural Language Processing
The foundations we built upon have largely been developed by ourselves, over the past two decades, when we were still residing in academia. Our journey towards QNLP began with the question of how to combine the strengths of symbolic approaches to AI, which naturally capture compositionality via recursive rules, with the distributed approach to modelling meaning, which captures the flexible and ambiguous nature of natural language semantics and allows the meanings to be learned automatically from large amounts of text.
In our original DisCoCat paper, grammatical rules dictate how the meanings of words flow and interact inside a sentence to produce its meaning. Interestingly, this flow of information is similar — at an abstract level — to how information flows in quantum protocols, which can be formulated entirely in terms of diagrams.
As implementations of this compositional framework on classical computers can become exponentially costly, we turn to its quantum origins and consider quantum computers as the native environment for language to inhabit.
This allows us to exploit the exponentially large state spaces defined by qubits and invoke entanglement and interference to capture the complexity of meaning interactions in text. Thus, our compositional approach to NLP naturally leads to Quantum NLP. Furthermore, this formal analogy between linguistics and quantum physics goes both ways; for example, concepts from quantum theory such as density matrices can be used to model entailment and ambiguity in language.
Our developers are building a software library, λambeq, which enables the design and implementation of end-to-end QNLP pipelines which seamlessly integrate with Cambridge Quantum’s platform-agnostic state-of- the-art compiler, TKET. Like TKET, λambeq is also open-sourced, with the aim of accelerating the development of novel quantum applications for NLP. With our QNLP toolkit, grammatical sentences can be automatically parsed and mapped to process diagrams, as is also demonstrated in our online tool.
With our library for building and interpreting diagrams, DisCoPy, running under the hood of λambeq, we can map sentence diagrams to quantum circuits, which faithfully reflect grammatical structure. Thus, we have already been able to implement the first proof-of-concept experiments, solving NLP tasks such as sentence classification on noisy near-term quantum processors, using techniques from the rapidly developing field of Quantum Machine Learning to automatically learn parameterized “language circuits.”
Download our high-level Python library for Quantum Natural Language Processing