Pandata is proud to be the Diversity & Inclusion Sponsor at ODSC East 2021. Drop by our Booth and say Hello!

Pandata Blog

Approachable, Ethical, Human-Centered AI

“An AI Walks into a Bar” – Using Artificial Intelligence to Generate Humor

“If the mushroom was such a fungi, why didn’t they have the party at his house?”

“Because there wasn’t much-room.”

                              –Dad Joke Generator

We all know a bad joke when we hear it. Sometimes one person’s bad joke is another person’s knee slapper. Humor is one of the most difficult things to get Artificial Intelligence (AI) to do and do well. Humans have a hard time trying to describe what makes something funny. What is it about these seemingly illogical connections of ideas that makes us smile and guffaw? In our darkest moments, humor is what brightens our days. Some will argue that humor is what makes us human.

How do we even begin to teach AI about humor? One idea is to break down this question into two tasks. Task one is teaching the AI to identify what is funny to begin with. Task two is to teach AI to tell a joke. The process is fraught with accidental humor when an AI creates awkward and amusing tidbits while trying to do a more deliberate task of generating creative content. Pandata’s own HolidAI Greeting Card Generator is an example of this kind of humor, where the absurdity of an AI generating creative content makes us smile.

Can an AI identify what is funny?  Well, kind of.  Several AIs have been built that can tell you if a joke is funnier than another joke.  Shahaf, Horvitz, and Mankoff (2015) built an AI that, when provided a set of potential captions to a New Yorker Cartoon, were able to identify which caption was funnier 69% of the time when the caption is hinging on the same joke and 64% of the time for any two captions. More recently Harvard researchers Yeomans, Shah, Mullainathan and Kleinberg (2019) have created an AI that can correctly identify the funnier joke 61% of the time. And while that may seem low, humans identify what others will think is funnier 57% of the time, even when they know the people in the audience five or more years.  So next time you play Cards Against Humanity, you may want the Harvard AI as your partner. Still, identifying something as funnier than something else is one thing. The larger task is getting AI to identify what is funny at all.

How does AI fair at creating humor? Let start simple, with basic puns.  Stanford researchers He, Peng, and Liang (2019) have created a pun generating AI that can create puns that are coherent. That’s a start. University of Edinburgh has been working on the issue of funny AI for nearly two decades. The work of Graeme Ritchie at the University of Aberdeen has produced the daily tweets of the Joking Computer.  While some of these jokes are amusing, many wouldn’t be considered funny to a mass audience. 

While we realize that humor is subjective and often personal, AI seems to be picking up steam with what humans find funny. That said, I think we can agree that the SNL writing room is safe for now.  

Julie Novic is a Data Scientist at Pandata.