午夜福利1000集合

Quantum links let computers understand language

Mathematics borrowed from quantum mechanics is helping computers to extract meaning from sentences
Ask me anything you like
Ask me anything you like
(Image: Louie Psihoyos/Science Faction/Corbis)

AS YOU read this article, your brain not only takes in individual words, but also combines them to extract the meaning of each sentence. It is a feat any competent reader takes for granted, but it鈥檚 beyond even the most sophisticated of today鈥檚 computer programs. Now their abilities may be about to leap ahead, thanks to a form of graphical mathematics borrowed from quantum mechanics.

鈥淚t鈥檚 important for people like Google,鈥 says physicist at the University of Oxford, who is pioneering the new approach to linguistics. At the moment computers 鈥渙nly understand sentences as a bag of different words without any structure鈥.

Coecke鈥檚 approach, aired at a recent , is based on category theory, a branch of mathematics that allows different objects within a collection, or category, to be linked. This makes it easy to express a problem in one area of mathematics as a problem in another, but for many years was viewed even by its creators as 鈥済eneral abstract nonsense鈥.

That changed when Coecke and his colleague used a graphical form of category theory to formulate some problems in quantum mechanics in a way that can be understood more intuitively. It provided a way to link quantum objects, written as vectors, to each other. That鈥檚 useful for representing quantum teleportation, say, when information passes instantaneously between certain locations via a specific route.

Coecke likens traditional approaches to such problems to watching television at a pixel level. 鈥淩ather than seeing the image, you get it in terms of 0s and 1s,鈥 he says. 鈥淚t wouldn鈥檛 mean anything to you.鈥 By translating quantum mechanical processes into pictures, higher-level structures become apparent.

More recently, Coecke, together with , also at Oxford, and , now at the University of Cambridge, realised this graphical mathematics might also be useful in computational linguistics. The field aims to create a universal 鈥渢heory of meaning鈥 in which language and grammar are encoded in a set of mathematical rules.

Computers could, in principle, use the rules to make sense of language. In practice, most existing models of human language focus either on the meaning of individual words, allowing search engines to work out the general context of a web page, or on the rules of grammar, but not both.

To produce a model that uses the rules of grammar to encode the meaning of sentences, Coecke and his colleagues had to combine the existing model types. To do this, they adopted the graphical approach Coecke had developed for use in quantum mechanics.

鈥淎 graphical approach developed for quantum mechanics combines words and grammar鈥

Existing models for word meanings define words as vectors in a high-dimensional space, in which each dimension represents some key attribute. So the vector for 鈥渄og鈥 might include the vectors for 鈥渆at鈥, 鈥渟leep鈥 and 鈥渞un鈥. 鈥淐at鈥 might be generated by a combination of similar words to 鈥渄og鈥, but 鈥渂anker鈥 would be built from quite different words, such as 鈥渕oney鈥 and 鈥渨ork鈥. Defining words in this way allows a dictionary to be represented as a 鈥渘eighbourhood鈥 of words, with the distances between residents in the high-dimensional space defined by their vectors. The vector representations of 鈥渄og鈥 and 鈥渃at鈥 would ensure that these words live much closer to each other than either does to 鈥渂anker鈥.

Now Coecke鈥檚 team has created a similar neighbourhood for sentences. To create a vector for a sentence, Coecke has devised an algorithm to connect individual words, using the graphical links that were developed to model the flow of quantum information. In this case, the links embody basic grammatical rules, such as the way the word 鈥渓ikes鈥 can be linked to 鈥淛ohn鈥 or 鈥淢ary鈥, and the different way it can be linked to the word 鈥渘ot鈥 (see diagram).

Making sense of sentences

The team has already shown that the method allows the two sentences 鈥淛ohn likes Mary鈥 and 鈥淛ohn does not like Mary鈥 to be represented as vectors and placed at the appropriate location. That鈥檚 no small feat: while anyone who can read English knows that these sentences are directly opposite, to a computer this isn鈥檛 obvious. The work will be published in the journal Linguistic Analysis.

Most sentences have more nuanced relationships than these two examples. The next stage of Coecke鈥檚 work allows more complex sentences to be represented as vectors, with the vectors that represent verbs taking into account the meaning of their subject and object nouns. This ensures that 鈥渄ogs chase cats鈥 gets assigned a vector placing it closer in sentence space to 鈥渄ogs pursue kittens鈥 than to 鈥渃ats chase dogs鈥. This work will be presented next month at the .

The team plans to train the new system on a billion pieces of text, starting with formal, carefully written legal or medical documents which should be relatively easy to parse. From there they will work their way up to more challenging extracts such as ambiguous sentences or sloppily written pages on the web.

It is not yet clear whether the insights gained so far can deal with all the nuances of language. , who studies computational linguistics at Heidelberg University in Germany, says that Coecke鈥檚 team needs to show its method working on text from the real world, rather than specially prepared examples. Coecke agrees: 鈥淲e have shown many proof-of-concept examples which have been crafted by hand, but to really convince the whole world this is the way to do things, you need a huge experiment.鈥

Topics: Quantum science