Abstract
Wit is a quintessential form of rich inter-human interaction, and is often grounded in a specific situation (e.g., a comment in response to an event). In this work, we attempt to build computational models that can produce witty descriptions for a given image. Inspired by a cognitive account of humor appreciation, we employ linguistic wordplay, specifically puns. We compare our approach against meaningful baseline approaches via human studies. In a Turing test style evaluation, people find our model's description for an image to be wittier than a human's witty description 55% of the time!
Introduction
Standard image captioning models have reached impressive levels of accuracy, yet they remain fundamentally "boring." They excel at literal descriptions—identifying a person holding a phone or a dog in a park—but they fail to capture the "wit" that makes human interaction engaging. Wit is difficult for AI because it is highly contextual, requiring a creative leap beyond the pixels.
This research addresses the challenge of contextual humor by focusing on puns: linguistic wordplay grounded in the visual content of an image. The objective is to create captions where humor arises from the tension between the visual reality and an unexpected, phonetically similar word.
Methodology: The Incongruity-Resolution Pipeline
The proposed approach is built on the incongruity-resolution theory, which posits that humor occurs when a perceiver encounters something unexpected (incongruity) and then quickly makes sense of it (resolution). To implement this, the researchers developed a three-stage pipeline.
First, the system extracts tags using an Inception-ResNet-v2 model and a standard caption generator to identify key objects (e.g., "bear," "pole"). Second, it identifies potential puns from a compiled list of approximately 1,000 pairs (e.g., bear/bare). Finally, the system generates or retrieves captions.
The generation model is a modified encoder-decoder (CNN-RNN) architecture. To ensure the sentence remains grammatical while forcing the insertion of a pun word, the researchers utilized both forward RNNs (generating start-to-finish) and reverse RNNs (generating end-to-start). This bidirectional approach allows the model to "plan" the sentence structure around the pun word effectively.
Experimental Setup
The models were evaluated using 100 random images from the MS COCO validation set. The retrieval corpus consisted of 13.5 million sentences from the Book Corpus and NLTK datasets. A custom-built list of 1,067 unique pun words was derived from web-scraping heterographic homophones and an articulatory representation model.
Key Results and Human Evaluation
The most striking result came from a "constrained" Turing test. When humans were restricted to using the same pre-selected pun words and caption-style rules as the AI, the model was voted wittier 55% of the time. This suggests that for specific, narrow creative tasks, AI can optimize for "wit" more effectively than a restricted human.
In head-to-head comparisons, the top-ranked generated captions were perceived as wittier than baseline approaches (such as random pun insertion) over 50% of the time. The model successfully balanced humor with relevance, outperforming "mismatched" human captions (funny captions for the wrong image) 95% of the time. Qualitative successes include a picture of a bear in water captioned as "a bear that is bare (bear) in the water."
Conclusion and Future Work
While the model demonstrates significant progress in teaching AI the art of the visual pun, limitations remain. The system is currently restricted by a pre-defined vocabulary and cannot yet "invent" new wordplay or handle complex humor like sarcasm. Furthermore, when humans are granted full creative freedom without constraints, they still outperform the model 90% of the time. Future work will focus on expanding the model's creative range and moving toward unconstrained witty generation.
Summary updated