The Funny Thing About Incongruity: A Computational Model of Humor in Puns

The Funny Thing About Incongruity: A Computational Model of Humor in Puns Justine T. Kao 1 (justinek@stanford.edu) , Roger Levy 2 (rlevy@ucsd.edu) , Noah D. Goodman 1 (ngoodman@stanford.edu) 1 Department of Psychology, Stanford University. 2 Department of Linguistics, UC San Diego. Abstract Language understanding in general, and particularly hu- mor, relies on rich commonsense knowledge and discourse understanding. To somewhat limit the scope of our task, we focus on applying formalizations of incongruity to a subset of linguistic humor: puns. Writer and philosopher Henri Berg- son defined a pun as “a sentence or utterance in which two ideas are expressed, and we are confronted with only one se- ries of words. ” This highlights the fact that one sentence must evoke two different interpretations in order to be a pun, which aligns with the concept of incongruity as a requisite of humor. We develop our model on homophone puns—puns contain- ing words that sound identical to other words in the English language—because the space of possible interpretations of a homophone pun is relatively constrained and well-defined. An example helps to illustrate: Researchers showed the robot ten puns, hoping that one of them would make it laugh. Unfortunately, no pun in ten did. What makes something funny? Humor theorists posit that incongruity—perceiving a situation from different viewpoints and finding the resulting interpretations to be incompatible— contributes to sensations of mirth. In this paper, we use a com- putational model of sentence comprehension to formalize in- congruity and test its relationship to humor in puns. By com- bining a noisy channel model of language comprehension and standard information theoretic measures, we derive two dimen- sions of incongruity—ambiguity of meaning and distinctive- ness of viewpoints—and use them to predict humans’ judg- ments of funniness. Results showed that both ambiguity and distinctiveness are significant predictors of humor. Addition- ally, our model automatically identifies specific features of a pun that make it amusing. We thus show how a probabilistic model of sentence comprehension can help explain essential features of the complex phenomenon of linguistic humor. Keywords: Humor; language understanding; probabilistic models Introduction Humor plays an essential role in human interactions: it has important positive effects on children’s development (Frank & McGhee, 1989), success in the work place (Duncan et al., 1990), coping with illness and traumatic events (Gelkopf & Kreitler, 1996), and marital satisfaction (Ziv & Gadish, 1989). Indeed, in a study on gender differences in desired characteristics of relationship partners, both men and women rated sense of humor as more important than physical attrac- tiveness and earning potential (Stewart et al., 2000). In this paper, we are interested in understanding how this fundamen- tal and ubiquitous phenomenon works from the perspective of cognitive science. What makes something funny? How might defining characteristics of humor shed light on the ways in which the mind processes and evaluates information? A leading theory of humor posits that incongruity— perceiving a situation from different viewpoints and finding the resulting interpretations to be incompatible—contributes to sensations of mirth (Veale, 2004; Forabosco, 1992; Mar- tin, 2007; Hurley et al., 2011); an idea that dates to Kant’s theories about laughter and the sublime (Veatch, 1998). Al- though there is disagreement about whether incongruity alone is sufficient, most theorists accept that incongruity is neces- sary for producing humor: as Veale (2004) states, “Of the few sweeping generalizations one can make about humor that are neither controversial or trivially false, one is surely that humor is a phenomenon that relies on incongruity. ” However, definitions of incongruity are often ambiguous and difficult to operationalize in empirical research. In this paper, we use a computational model of language understanding to formalize a notion of incongruity and test its relationship to humor. “The magician got so mad he pulled his hare out. ” This sentence allows for two interpretations: (a) The magician got so mad he performed the trick of pulling a rabbit out of his hat. (b) The magician got so mad he (idiomatically) pulled out the hair on his head. If the comprehender interprets the word “hare” as itself, he will arrive at interpretation (a); if he interprets the word as its homophone “hair,” he will arrive at interpretation (b). The sentence-level differences between interpretations (a) and (b) can thus be approximated by the two interpretations of the observed word “hare. ” In general, distinct interpretations of a homophone pun hinges on one phonetically ambiguous word, allowing the two lexical forms of the homophone word to stand in for competing interpretations of the entire sentence. Critically, even though the example we gave was a writ- ten pun and the reader sees the word “hare” explicitly on the page, the “hair” interpretation is still present and even salient in the context of the sentence. Here we explore the idea that puns such as these arise and are funny when they are due to noisy-channel processing. Noisy channel models of sentence processing posit that language comprehension is a rational process that incorporates uncertainty about surface input to arrive at sentence-level interpretations that are globally coher- ent (Levy, 2008; Levy et al., 2009). Comprehenders can thus consider multiple word-level interpretations (“viewpoints”) to arrive at more than one interpretation of a sentence, each coherent but potentially incongruous with each other. The notion of incongruity thus fits naturally into a noisy channel model of sentence comprehension. Our purposes for developing a formal model of linguistic humor are two-fold. First, we wish to formalize the concept