A Quantum Natural Language Processing Approach to Musical Intelligence

Quantum Natural Language Processing

A paper from our Compositional Intelligence team which uses QNLP techniques in musical composition. This paper is part of the work accompanying the world’s first ever symposium on Quantum Computing and Music. There has been tremendous progress in Artificial Intelligence (AI) for music, in particular for musical composition and access to large databases for commercialisation through the Internet.

We are interested in further advancing this field, focusing on composition. In contrast to current “black-box” AI methods, we are championing an interpretable compositional outlook on generative music systems. In particular, we are importing methods from the Distributional Compositional Categorical (DisCoCat) modelling framework for Natural Language Processing (NLP), motivated by musical grammars. Quantum computing is a nascent technology, which is very likely to impact the music industry in time to come. Thus, we are pioneering a Quantum Natural Language Processing (QNLP) approach to develop a new generation of intelligent musical systems.

This work follows from previous experimental implementations of DisCoCat linguistic models on quantum hardware. In this chapter, we present Quanthoven, the first proof-of-concept ever built, which (a) demonstrates that it is possible to program a quantum computer to learn to classify music that conveys different meanings and (b) illustrates how such a capability might be leveraged to develop a system to compose meaningful pieces of music.

After a discussion about our current understanding of music as a communication medium and its relationship to natural language, the chapter focuses on the techniques developed to (a) encode musical compositions as quantum circuits, and (b) design a quantum classifier. The chapter ends with demonstrations of compositions created with the system.

When people say that John Coltrane’s “Alabama” is awesome or that Flow Composer’s “Daddy’s Car” is good, what do they mean by “awesome music” or “good music”? This is debatable. People have different tastes and opinions. And this is true whether the music is made by a human or a machine. The caveat here is not so much to do with the terms “awesome music” or “good music,” or whether it is made by humans or machines. The caveat is with the word “mean.”

In the last 20 years or so, there has been tremendous progress in Artificial Intelligence (AI) for music. But computers still cannot satisfactorily handle meaning in music in controlled ways that generalises between contexts. There is AI technology today to set up computers to compose a decent pastiche of, say, a Beethoven minuet; e.g., there are connectionist (a.k.a., neural networks) systems for composition that have been trained on certain genres or styles. For a comprehensive account of the state of the art of AI for music, please see here.

However, it is very hard to program a computer to compose a piece of music from a request to, say, “generate a piece for Alice’s tea party.” How would it know how tea party music should sound like, or who Alice is? And how would it relate such concepts with algorithms to compose? A challenging task is to design generative systems with enough knowledge of musical structure and ability to manipulate said structure, so that given requests for mood, purpose, style, and so on, are appropriately met. Systems that currently attempt to perform such tasks, specially for music recommendation systems, work in terms of finding and exploiting correlations in large amounts of human-annotated data. These, for example, would fill a preference matrix, encoding information such as “likes” for songs, which are categorised already in certain genres by listeners. Following an alternative route, which comes under the umbrella of Compositional Intelligence, we are taking the first steps in addressing the aforementioned challenge from a Natural Language Processing (NLP) perspective, which adopts a structure-informed approach.