Features

Will a Computer be the Next Bard?
image/svg+xml

400 years after his death, Shakespeare might face real competition

screen-shot-2016-09-22-at-1-46-32-pm

Until you start thinking about it, it seems like it shouldn’t be all that difficult to get a computer to successfully knock out something as utterly formulaic as a sonnet.

More than most other forms of poetry, the English sonnet, the kind Shakespeare wrote, is bound by very strict rules, and adhering to rules, is, of course, something computers were designed to do. Sonnets always consist of 14, 10-syllable lines, all of which end with rhymes. They are organized into three, four-line quatrains and finished off with a single two-line couplet. Thematically, a sonnet explores a single idea, which gets introduced in the first quatrain. In the second, that idea gets compared to something else. In the third quatrain, it all gets turned on its head. But in the closing couplet, all of it gets resolved.

Simple, right? Nothing a Univac and a bunch of well-constructed algorithms shouldn’t be able to replicate, given, as the old saying goes, enough monkeys and typewriters.

Yet scientists have tried to get computers to do things like compare thee to a summer’s day for years, and their results have never been anything but dismal. Computers may do lots of things well, but understanding the human heart has never been one of them. Neither is grasping the magic of words or the power of a telling line.

Kevin Knight and Andrew Gordon

If you’d asked USC computer scientists Kevin Knight or Andrew Gordon just a couple years ago whether computers could ever create real poetry or fiction or art, they would have said probably not. But now they’re starting to think that with recent advances in machine learning, big data, language and narrative, the day might come fairly soon.

In a way, the computer bard, at least a rudimentary version, already exists. It’s a prize-winning, sonnet-generating algorithm called Hafez, designed by a team of USC Viterbi computer scientists led by doctoral student Marjan Ghazvininejad. Feed Hafez a word or two as a topic and Hafez will obligingly spin out a sonnet that rhymes, has meter and runs exactly three quatrains and a couplet. The only problem is that while the sonnet technically does have a subject, it won’t necessarily be apparent to anyone, even the person who’d fed it, and it doesn’t have a point to make. It’s not capable of fooling anyone into thinking it might have a human author.

Even so, Hafez recently won first prize for sonnets at Dartmouth College’s Turing Tests in the Creative Arts.

“Passing a Turing test is extremely difficult for a machine to do,” said Knight, research director at USC Viterbi’s Information Sciences Institute (ISI) and a professor in the Department of Computer Science. “It can fake it for two lines and four lines, because when it’s that short, it’s easy to read all kinds of things into it. But the more you go into the 14 lines, it becomes clearer that the machine doesn’t have a point it’s trying to make.”

However, said Knight, the advances in machine learning, narrative and story are coming so fast that the next round of Turing tests might have a different outcome with better sonnets.

“There is a vast amount of poetry, song lyrics, and stories, personal narratives, synopses and movie summaries available on the web,” Knight said. “Buried in there has got to be a lot of gold about what makes a sequence of words work. We just don’t know yet how to mine that gold from all the data.”    

We may not know how to, but the machines are beginning to figure it out themselves. “Right now, it’s about data and how much text we can put in front of a computer,” said Gordon, director of Interactive Narrative Research at the USC Institute for Creative Technologies and a research professor in the Department of Computer Science. “What it’s going to learn is mostly stylistic things — forms rather than content, the rhythms and rules of language. In the old days, you’d try to make those things explicit. You’d get a bunch of linguists together and figure out what exactly are the rules we’re trying to encourage.

screen-shot-2016-09-22-at-12-16-44-pm

“These days,” Gordon continued, “you just sort of let the computer figure out on its own what it’s supposed to do. When it starts to generate bad stuff, you tell it, ‘That’s not what I’m looking for.’ That way you give it some sort of objective function that allows it to figure out what good looks like, and then use that function to gravitate toward something that is satisfying.”

The problem is that given the sheer volume of material, results will gravitate more toward the mean than to the excellent. But Gordon believes computers will eventually chew through enough poetry, short stories, narratives and synopses, and have drawn from them enough patterns and correlations, that they will put together narratives that would seem to reflect the way humans perceive things. Inevitably, the machines will manage to fool readers into believing the authors are themselves human, thereby passing the Turing test.

But will machines ever make the leap to literature? Will a true computer bard arise that is capable of creating stories and poetry good enough to touch the human heart and, in the process, tell us something about ourselves? Knight says yes, but Gordon isn’t so sure.

What separates literature from functional prose is the author’s ability to connect with readers by knowing which words to use, what to say and what to merely hint at to stir something inside them. Even equipped with the best correlations, analytics and inference-generators, can a computer ever deliver that?

“It’s a huge leap across the chasm to art,” said David St. John, professor and chair of the Department of English at USC Dornsife. To him the question is a lot like the one Dr. Frankenstein faced when he wondered whether a big jolt of electricity would bring his creation to life. “Maybe, maybe not,” St. John said.

Even if the computer bard knows the point it wants to make and has databases of patterns and analytics about which word constructions work best in a whole calculus of circumstances, it overlooks the fact that poems aren’t simply assemblages of words that play off contrasting aspects of language and linguistics. Nor are they, as St. John put it, “simply like a leaf pressed between pages of a book. Poems are pieces of human consciousness, memory and experience melded into language.”

He added: “One of the basic measures of poetry is the degree to which an experience of empathy has been created between a reader (or listener) and the speaker of the poem, or even with the circumstances of the poem. Perhaps a computer poet’s poems will excite a kind of sympathy from a reader.

“But empathy, which is a profoundly human experience? I have doubts a computer will be able to create a poem that can do that anytime soon.”