33 Sarah Harmon Uses AI to Create Illuminating Metaphors
I focused on poetry and even more particularly on figurative language. I wanted to know how computers can write in a way that was surprising and meaningful.
—Sarah Harmon117
Sarah Harmon began writing computer-generated poetry at high school, using programs like Logo Writer, an educational programming language that includes rules for grammar and structure. She published her work in her high school literary magazine under the pseudonym Dan Goshen, an anagram of Ogden Nash. She “was enthralled that we can interact with technology and how this can affect us emotionally,” she says. As an undergraduate, she began by studying neuroscience, then switched to mathematics and computer science and completed a PhD in computer science at the University of California at Santa Cruz.
She then decided to take another look at computer-generated poetry. “Current research concerns how people interact with computers in a way that is meaningful and impactful to us in solving problems in the best possible way. … I focused on poetry and even more particularly on figurative language. I wanted to know how computers can write in a way that was surprising and meaningful.”118
Whereas literal language uses words according to their exact dictionary definitions, figurative language—simile, metaphor—provides color, panache, and a more creative tone. “We surround ourselves with figurative language because with it we can express our emotions,” Harmon says.119 If a computer can generate figurative language effectively, then, she says, “it should be able to reason about our own language and understand our stories and language much more easily.” In this way, poetry and stories—vehicles by which we navigate the world—can influence how we interact and respond to machines. It’s not just a matter of machines creating metaphor but of teaching them more about our world.
Harmon expresses her dissatisfaction with the many programs that generate poetry from a heavily rule-based algorithm the computer blindly follows, randomly generating poetry that is often nonsense. Those that produce interesting work, she contends, rely too much on cherry-picking by the creator, added to which such programs cannot explain what they’re doing or evaluate their own work, both of which are essential to creativity.
So Harmon decided to take a step back from computer-generated poetry to explore one key element—figurative language. This she does with her FIGURE8 program.120 Instead of generating poetry, FIGURE8 generates imaginative metaphors. Metaphors illuminate a word or concept by explaining it in terms of another, linked by phrases like “as if.”
When Danish physicist Niels Bohr was formulating the first modern theory of the atom in 1913, he used a metaphor: “The atom acts as if it were a miniscule solar system.” He used the well-understood image of the solar system of planets revolving around the sun to explain the less well-understood concept of the atom. Bohr replaced the planets with electrons and the sun with the nucleus, then adjusted the mathematics of the solar system to use in the realm of the atom.
In rhetoric, the concept to be illuminated—in this case, the atom—is called the tenor and the concept being used to illuminate it—the solar system—is the vehicle. The greater the dissimilarity between tenor and vehicle, the greater the creative power of the metaphor.
To generate creative metaphors with a computer, Harmon feeds in literary texts, augmented by WordNet’s lexnames file, which ranks metaphors according to the closeness between tenor and vehicle. She combines all this with a case-by-case reasoning system that checks them against the ways in which authors have used the tenor/vehicle in question. FIGURE8 does some brainstorming, then comes up with a list of metaphors and compares them, ranking them according to coherence, sound, and how well the image fits.
Here is a metaphor generated by FIGURE8: “Like a pale moon, the garden lit up in front of him.”121 The tenor is garden, the vehicle moon. They have low semantic similarity—that is, not much in common. FIGURE8 calculates it as 0.0204, very low indeed. Thus this metaphor is potentially novel, a requirement of creativity. It is certainly not a cliché.
In another example, the tenor was pearl. FIGURE8 generated the following list of metaphors:
(A) It was the pearl, fermenting like a wild apple.
(B) Like scenic music, the pearl danced in front of him.
(C) It was their pearl, sprawling like a wretched corpse.
(D) It was her pearl, crumpling like a drowned corpse.
(E) It was my pearl, bubbling like a treacherous swamp.122
FIGURE8 rated these metaphors, and so did readers. Both FIGURE8 and the readers ranked (D) the highest for clarity and attractiveness. The extent to which the readers “liked the figurative description was directly related to how well they understood it,” Harmon writes.123
For this study, Harmon did not tell the readers that the metaphors had been generated by a computer. She was, she says, just interested in responses. But if she repeated the experiment, she would apply more controls, such as trying it out on one group that knew the source of the metaphors and another that didn’t. “If you are told something came from a machine, it can completely bias your perception,” she says.124 The point is perhaps that computers can nudge our understanding and appreciation of language further, dream up combinations of words that are beyond most human imaginations.
Says Harmon, “Machines can be creative, but it’s a creativity that’s entirely alien to us.”125