The Creativity Code by Marcus du Sautoy

This is a review a magazine commissioned from me a few years ago, which never ended up running. Since the role of artificial intelligence in the arts has been in the news again, I went back to re-read it and I found that, although a lot of the details are already outdated, I still agree with most of what I had to say. For that reason I thought it worthwhile to make the piece available to read. —Sam Sacks

The Creativity Code
Art and Innovation in the Age of AI

by Marcus du Sautoy
Belknap Press, 2019

Perhaps the most important document on the subject of artificial intelligence is the 1950 article “Computing and Machine Intelligence” by the famed British mathematician Alan Turing, who introduced what he called the Imitation Game and which has subsequently become known as the Turing Test. The setup goes like this: Someone asks a series of questions to both a person and a machine being held together in a separate room. At the end of the interactions the interrogator determines which is which. If he chooses wrongly, or simply can’t distinguish between the two, the machine can be said to possess intelligence.

It’s a funny article, in every sense. Drily delivered jokes abound. Turing counters the hypothetical worry that a person with ESP might skew the results by advising that the experiment take place in a “telepathy-proof room.” He muses that machines should probably not be sent to school to learn because the other students would make “excessive fun of it.” ‘The imperatives that can be obeyed by a machine that has no limbs are bound to be of a rather intellectual character,” he helpfully observes.

The sense that the article was meant, at least in part, as a tongue-in-cheek provocation is bolstered by the incredible conclusion Turing proposes we take from his theorizing, which is that human-level intelligence should be granted to an inanimate object on the basis of its ability to dupe someone into temporarily believing that it’s not an inanimate object. As Turing’s biographer Andrew Hodges puts it, “If a machine could argue as apparently genuinely as a human being, then how could it be denied the existence of feelings that would normally be credited to a human respondent?” To those who reply that it could be denied those feelings because, being made of metal and wires, it is not conscious entity, Turing points out that you can’t conclusively prove that other people are conscious either. So a path was set, intentionally or not, in which achieving intelligence became a matter of carrying out a sustained and elaborate deception, a guiding principle best summed up as Fake it till you make it.

Since 1950 the technological landscape has evolved in ways that not even Turing could have imagined, yet the Imitation Game continues to be the standard by which machine intelligence is measured. The graduation in terminology from a “game” to a “test” points to the formalization of a playful mental exercise to an actual evidentiary claim. Inevitably, a carnival sideshow has developed in which programmers try to “pass” the test by any means available. In 2014 a Russian chatbot called Eugene Goostman fooled 33% of judges into thinking it was a 13-year-old Ukrainian boy, largely because its interlocutors were prone to overlook the grammatical errors and bizarre non sequitors of a non-native English-speaking teenager. When the bot did the interview rounds in the wake of its triumph it was asked by computer scientist Scott Aaronson, “Do you think Alan Turing, brilliant though he was, had trouble imagining that the judges of his ‘imitation game’ wouldn’t think to ask commonsense questions…or that, if they did, they’d actually accept evasion or irrelevant banter as answers?” Eugene replied, “No, not really. I don’t think alan turing brilliant although this guy was had trouble imagining that the judges of his imitation game would not consider to Oooh. Anything else?” If Eugene could roll its eyes and make the jerk-off motion it would have 13-year-old behavior down cold.

One of the many virtues of Marcus du Sautoy’s “The Creativity Code,” a wide-ranging survey of the incursions artificial intelligence has made into the arts, is its attempt to establish a more worthwhile threshold for considering machine learning. Du Sautoy calls his proposal the Lovelace Test, after Ada Lovelace, the 19th-century mathematician who conceived the earliest computer programs. Lovelace believed that machines could never be more than powerful tools; they can carry out orders, but that’s all. The Lovelace Test challenges her contention. It asks whether an algorithm is capable of transcending what its programmer puts into it “to produce something that is truly creative”—that is, “to come up with things that are new, surprising, and of value.”

The elasticity of this definition of creativity characterizes du Sautoy’s open-minded and highly accessible book. Newness doesn’t depend on intentionality, after all. Something can be new and surprising by blind chance, and value is in the eye of the evaluator. Du Sautoy is an award-winning mathematician at Oxford and he groups himself with the artists whose livelihoods are theoretically threatened by the advent of creative supercomputers. But his book is a genuine inquiry rather than a warning or a screed. He wants to know whether artificial intelligence can be something other than useful. Can it be interesting, or even inspiring?

The hope for the creative algorithm is in what du Sautoy calls a “bottom-up” approach to coding and what computer scientists, with typical humility, think of as “deep learning.” At its heart, du Sautoy writes, “is the idea that an algorithm can be created that will alter its approach if the result it produces comes up short of its objective.” The most famous example is DeepBlue, the chess program that unseated Garry Kasparov, although “The Creativity Code” focuses on AlphaGo, which in 2015 defeated the world champion of Go, widely considered the most complex game in existence. These programs use probabilities to decide which moves to make in any given situation, and they refine that method by building up an enormous data set. Before facing off against humans, AlphaGo played itself millions of times, generating in a matter of days the game experience that people have needed thousands of years to accumulate. The program’s decision-making is effectively opaque; it frequently made moves that fell outside the bounds of any known strategy. A later iteration became even more unbeatable because it was programmed with no knowledge of extant real-life matches and could therefore master the game on its own inscrutable terms.

The prospect of translating this kind of evolving, alien logic to artistic mediums is tantalizing, but the challenges are twofold. For one thing, deep learning algorithms depend on vast quantities of data. The world’s catalog of books, paintings and music constitute a comparatively meager data set, especially if you’re restricted to art that people have deemed to be good. More problematically, programmers are compelled to contrive some sort of objective for the algorithms to work toward. Needless to say, creating an original work of art isn’t analogous to winning a board game; by most measurements, it probably has more in common with losing.

One way to hack the dilemma is by eliminating the idea of an endpoint. Du Sautoy discusses computer programs that are designed to run on an infinite loop: AARON, which is coded with a random number generator to produce an endless spool of abstract drawings, or The Painting Fool, which creates portraits based on digital photographs but adapts its “style” by scanning the headlines of the daily paper and responding to their overall mood. Du Sautoy is especially intrigued by programs that give form to the evolutionary process of deep learning. DeepDream, designed by Google, inverts visual recognition algorithms by altering random images to bring out the objects it thinks it sees in them—a picture of a tree becomes a steepled building, a cloudscape is turned into a variety of psychedelic animals, and so on. An AI exhibition piece called BOB, a sort of writhing digital octopus displayed in a London gallery, responds in unpredictable ways when visitors interact with it on a smartphone. Watching it squirm and flail on the screen, driven by unknown and ever-changing imperatives, does feel a bit like encountering a wild algorithm in its natural habitat.

These programs reach toward originality by exploiting what du Sautoy calls “the mathematics of chaos,” and if you strain you can place them within an artistic tradition that includes Dadaism and William Burroughs’ cut-up technique. Abstract art and avant garde poetry are the genres that seem most capable of being approximated through randomness. Inevitably, robots have been designed to simulate Jackson Pollock’s drip paint method. In 2011 a Duke undergrad had an AI-generated poem accepted into the university’s literary journal. But chaos is only stimulating if it’s balanced by control. It has to be mediated or else you’re left with a factory machine endlessly grinding out uniform packets of randomness. Once programs like DeepDream and BOB wear out their novelty, they become fancy screensavers.

An interesting, if perhaps obvious, realization from “The Creativity Code” is that artificial intelligence can only exist on the extreme poles. It has to be either absolutely arbitrary or absolutely formulaic. This accounts for the other approach programmers have taken to achieving machine creativity: they have tried to reproduce art by breaking it down to its fundamental elements, the way that scientists have cloned organic life by manipulating the building blocks of DNA.

The most eye-catching example that du Sautoy explores comes from a collaboration between Microsoft and Delft University of Technology called the Next Rembrandt. Data scientists subjected Rembrandt’s paintings to microscopic digital analysis, identifying patterns in geometry, composition and painting material. A software system was created to generate new facial features based on that analysis—it knew where to place and proportion facial features and where to cast shadows. The designers even found a way to replicate the textured quality of Rembrandt’s brushstrokes. The final painting, in a triumph of 3D printing, consists of 13 layers of paint-based ink.

That final painting depicts a man facing the viewer with an open mouth, a reddish moustache and goatee and one slightly lazy eye. He wears a broad-brimmed black hat and a white ruff and he stands in partial light before a mottled gray background. He looks roughly the way you would imagine a 17th-century Dutch man is supposed to look, and the painting’s composition and use of light would lead most people to guess, if they were asked to, that it was done by Rembrandt or someone from his school. It is without a doubt the most extraordinary knockoff ever produced.

“Could machine learning bypass the need for conscious expression by picking up patterns and rules that we are unable to detect?” Du Sautoy asks. The assumption behind a project like the Next Rembrandt is that humans, too, are programmed, and that art is an extension of the formulas that make us run—“an outpouring of the human code,” as he puts it elsewhere.

No art form tests that proposition better than classical music, which is both abstract and highly mathematical. Du Sautoy astutely summarizes the complex algorithmic variations behind the fugues of Bach (“the first musical coder”) as well as the different mathematical structures that inform compositions by Schoenberg, Bartok and Philip Glass. Because representational art like literature and painting are explicitly informed by history and individual experience, it’s difficult to imagine them broken down into a set of equations. Structure is an aspect of expression, but not the sum of it. Could it be that this is not the case with music? Du Sautoy quotes Igor Stravinsky’s observation that “music is, by its very nature, essentially powerless to express anything at all, whether a feeling, an attitude of mind, a psychological mood, a phenomenon of nature.” In other words, the emotions music gives rise to originate in the listener, not the composer.

A familiar recitation of technological outsourcing follows. American David Cope writes music in collaboration with a software program called Emmy, which recombines the fragments of phrases and motifs from other compositions. A Paris-based team fed their algorithm all of Bach’s chorales and then asked the program—called, inevitably, DeepBach—to construct new harmonies in the same mode. Also from France comes the algorithm AIVA, “the artificial intelligence composing emotional soundtrack music,” as its website has it. Once again, the algorithm has analyzed the classical canon for patterns and regularities in order to generate themes personalized to preselected styles (it can also produce Chinese, Middle Eastern, Argentine Tango and rock music). AIVA is responsible for some of the most polished “virtual artist” music to be found on the Internet, though all of it has been modified by humans and the company seems cagey about disclosing the extent of their assistance.

We’re back to the Turing Test with all of this, and maybe, in spite of Du Sautoy’s hopes, we never really left it. Every one of the above programs has succeeded in fooling listeners, even experts, into believing that its compositions were human-made. Du Sautoy relates David Cope’s claim that a music professor praised one of his computer-generated pieces in lavish terms but then, when he learned the truth of its origins some weeks later, reversed his verdict, calling it vapid and soulless. “The output was the same: the only thing that had changed was his knowledge of the fact that it had been generated by computer code.”

Stories like this are wielded by proponents of AI as telling gotcha moments when people reveal the irrational technophobic biases that stand in the way of their appreciation of algorithmic art. But I don’t think they prove anything of the sort. Our responses to art are not absolute, after all. We engage with it with what Frank Kermode called conditional assent. For as long as it holds a spell over us, we allow ourselves to believe in the reality it creates. A radical change in circumstances can easily shatter that suspension of disbelief. It’s not necessary that our reactions accord with the artist’s intentions, or even that the artist have conscious intentions. But it is essential that a creation have some kind of will behind it—that it comes into being because, at least for a moment, it matters to someone that it should.

At best art is born of passion, suffering, ecstasy, reverence or irreverence. At the very least it can be hacked out from a sense of duty or a need for routine or an anxiety over alimony payments. Any motivation, no matter how venal, can support a critical interaction. AI art cannot. The Mona Lisa’s smile would cease to be enigmatic the instant you learned that it was the accidental byproduct of facial recognition software. Meaning doesn’t come about ex nihilo; it’s formed in the connection between minds. It’s in this context that the inalienable AI prefix “Deep” starts to sound like Newspeak. Algorithmic art can only achieve an effect so long as you don’t think about it, or try to understand it. It demands total intellectual passivity. It treats us as equals, fellow automata reflexively responding to stimuli.

The abysmal lesson of the Turing Test is that you do not pass by achieving excellence but by conditioning your audience to expect mediocrity. Du Sautoy describes the ventures into machine creativity in the most generous light possible, yet even his accounts become increasingly disenchanted. How boring all this stuff is, if you treat it as art rather than feats of computer science! Since it is derivative by definition, artificial intelligence is almost diabolically suited to replicating the sort of art or art-like things we typically think of as filler. The classical paintings look like undistinguished genre portraits that hang for eternity in antique stores. The music is literal background noise: AIVA’s primary service is to create scores for video games; other systems specialize in muzak or ambient sounds or synth pop. “The phrase ‘good enough’ is one that is bandied around a lot in the AI music-generation scene,” writes du Sautoy in a rare access of exasperation. It seems like an ominously fitting maxim for everything AI has to offer. The popular dystopian visions of a brave new soulless, hyper-efficient future have got things wrong. The world we can expect is one in which everything is just barely adequate, and either we can’t tell the difference or we can’t be bothered to try.

What else could artificial intelligence make more perfectly mediocre? Customized home interiors, children’s cartoons, soap opera scripts, AP wire reports, pornography—whatever requires minimal scrutiny and can be speedily commodified. Du Sautoy soft-pedals the financial incentives of AI to focus on its creative possibilities, but he could have easily refashioned each of his chapters to center on the role of money. Most of the projects he explores are bagatelle sidelights at tech giants like Microsoft and Google, funded because they yield positive news coverage and provide flashy exhibitions of the companies’ coding prowess. Some of the stunts are even more transparent: In 2018, a distorted, weirdly pixelated algorithm-generated portrait sold at Christie’s auction house for $432,500.

A likelier harbinger is the publishing platform Wattpad, which was recently profiled in the New York Times. Wattpad is an online collective that invites users to upload their writing, where it can be read and commented upon. But more than just a bustling forum for self-publication, Wattpad is a rigorous data miner. Using what its programmers call their Story DNA Machine Learning technology, they analyze the uploads (there are well over 500 million) and the readers’ responses to sniff out popular trends. “Every day we collect over 1 billion data events based on what the global Wattpad community is searching for, reading, and engaging with,” explains the CEO, Allen Lau. “Our data tells us which parts of a story generate the most intense reaction from the community and the specific genres certain demographics prefer. With our data we can significantly improve the success rate of projects as Wattpad stories are brought to life on other platforms.”

Wattpad’s successes are too substantial to dismiss. Anna Todd’s steamy YA series “After,” composed entirely on her cell phone, was published by Simon & Schuster in a six figure deal. Beth Reekles’ story “The Kissing Booth,” which she wrote when she was 15, has been turned into one of the most-viewed films on Netflix. Countless other uploads have been bought or optioned. The site handily cuts through the problem of intent that bedevils AI art. It doesn’t seem possible to train an algorithm to recognize and replicate good art; it can, however, spot what’s popular, especially if an enormous audience—Wattpad has over 45 million monthly users—is constantly supplying it with data to adjust or reinforce its conclusions. The symbiotic relationship between the algorithm and the crowd of users, by which data is exchanged for personalized entertainment, seems like a much more promising model, financially speaking, than one in which the algorithm is responsible for both identifying the patterns and generating the simulacra. The product is no longer arbitrarily trite and predictable. It’s trite and predictable in exactly the ways that people want.

But is it all about money, in the end? That would be reassuring, somehow, because it would be explainable, but I don’t think it’s the case. Reading du Sautoy’s lucid, genial book is a disorienting experience, because while everything he describes is ingenious and complex it’s also enormously, almost sublimely, stupid. What, really, is the point of it? Why go to so much trouble to teach a machine to make a painting instead of making a painting yourself? Who could possibly be interested in a poem popped out by an algorithm? These days, people who attribute human motives to animals are roundly ridiculed. Why, then, do we seem to be so insistent about anthropomorphizing strings of code?

Throughout “The Creativity Code,” utterly risible scenarios are presented with a straight face. At one point du Sautoy has a conversation with an AI developer who confides his plan to develop an algorithm that will prove a complicated mathematical theorem and thereby get it elected a Fellow of the Royal Society. Britain’s Royal Society exists to honor people who have made important contributions to the world’s knowledge in math and science. It’s not technophobic to say that electing an algorithm would be nonsense. It would be nonsense because honoring an algorithm would be a wholly meaningless gesture, like giving your email account the day off on postal holidays. And solemnly consecrated nonsense makes a farce of things we hold of value.

Worse, it spoils our enjoyment of them. DeepBlue is obviously a coding triumph, but its other legacy has been to degrade the game of chess, one of the most widely loved and respected forms of recreation humans have ever devised. Being good at it once signified something. Now it means you don’t lose quite as quickly when you play against your phone. When AlphaGo clobbered the world Go champion to earn a million-dollar prize, du Sautoy writes, the programming team was so struck by the devastating effect the loss had on its opponent that they barely celebrated. It hadn’t just beaten the challenger; it had vanquished the mystique of the game. (AlphaGo, du Sautoy notes, “did not demonstrate any emotional response to its win.”)

It’s a very human predicament, heartbreakingly so: We invent things that give us pleasure and a feeling of meaning and then we diligently labor to ruin them. “The destructive character stands in the front line of the traditionalists,” Walter Benjamin wrote. “Some pass things down to posterity, by making them untouchable and thus conserving them, others pass on situations, by making them practicable and thus liquidating them.” He was describing a personality type, but the destructive character is in all of us. We might just as well think of it as the urge toward de-creation, an urge inexorably chained to our mortality and the destruction we know we will one day have to undergo.

Against it is the desire to create. Creativity is many things, but most of all it is pleasurable. To make art, or to share in it, is a sweetness that in life has no rival except love. Who but humans would have that before them and choose to pass it along to a machine? Algorithms have got a lot to learn if they’re ever going to be as dumb as we are.

Sam Sacks writes the Fiction Chronicle for the Wall Street Journal.