The AI Built To Make Puns

Hang on for a minute...we're trying to find some more stories you might like.


Email This Story






Why is a droid mechanic never lonely? She’s always making new friends!

In He He’s case, the funnier the friends, the better.

During her postdoc at Stanford, He He has been working on developing a pun generator. Her goal is to ultimately build AI (Artificial Intelligence) that can make natural conversation, tell jokes, and come up with coherent stories. “The goal is to make stories that are more creative and interesting,” He He told Wired. “I want AI to write stories about things humans wouldn’t think to write about.”

AI normally learns through neural networks and imitate patterns of language by scanning over a large amount of text. Unfortunately, this type of learning is not advantageous for creating AI that are meant to be humorous. This type of pattern-based learning is more geared towards AI with the purpose of reporting news or facts from online rather than creating original stories or jokes. He He’s challenge is to figure out how to program AI that can come up with original but coherent jokes. He He explained to Wired, “Even if we had a long list of puns it could learn from, that would miss the point.”

He He and her team, including Nanyun Peng and Percy Liang, are working to create AI with creative wit that forms its sense of humor from humor theory rather instead of imitating patterns.

A visual of He He’s method to turn a normal sentence into a joke via Wired

In order to create a pun while using neural networks, the AI is given two words with the same pronunciation but different meanings, such as hair and hare. The AI creates a normal sentence with the first word but then replaces it with the second word with a different meaning to create a joke. However, normally switching one word isn’t enough to make a joke that makes sense, so the AI then uses another word, such as greyhound, to give the joke more context.

He He and her team produced some AI with this basic function and tested their puns against humans in a contest and they did not do well, winning over humans’ jokes only 10% of the time. The AI also seemed to struggle with grammar when generating jokes.

“We’re nowhere near solving this,” He He admitted to Wired.

There’s question whether any AI will ever be able to accurately duplicate a human’s humor. Roger Levy, the director of MIT’s computational psycholinguistics lab told Wired that “Humor is an intrinsically challenging aspect of studying the mind. But it’s also fundamental to what makes us human.” Humor is not only perfected through language but also through body language and other signs, such as tracking eye movements.

For now, He He’s AI cannot perfect the pun, but in a few years there could be stand-up AI comedians.