Abstract
Despite significant advancements in image segmentation and object detection, understanding complex scenes remains a significant challenge. Here, we focus on graphical humor as a paradigmatic example of image interpretation that requires elucidating the interaction of different scene elements in the context of prior cognitive knowledge. This paper introduces HumorDB, a novel, controlled, and carefully curated dataset designed to evaluate and advance visual humor understanding by AI systems. The dataset comprises diverse images spanning photos, cartoons, sketches, and AI-generated content, including minimally contrastive pairs where subtle edits differentiate between humorous and non-humorous versions. We evaluate humans, state-of-the-art vision models, and large vision-language models on three tasks: binary humor classification, funniness rating prediction, and pairwise humor comparison. The results reveal a gap between current AI systems and human-level humor understanding. While pretrained vision-language models perform better than vision-only models, they still struggle with abstract sketches and subtle humor cues. Analysis of attention maps shows that even when models correctly classify humorous images, they often fail to focus on the precise regions that make the image funny. Preliminary mechanistic interpretability studies and evaluation of model explanations provide initial insights into how different architectures process humor. Our results identify promising trends and current limitations, suggesting that an effective understanding of visual humor requires sophisticated architectures capable of detecting subtle contextual features and bridging the gap between visual perception and abstract reasoning.
Introduction
While computer vision has achieved remarkable success in identifying objects and segmenting scenes, true "scene understanding"—the ability to interpret the complex interplay between objects, human intentions, and cultural context—remains an elusive goal. Humor serves as a unique stress test for this capability. To "get" a visual joke, an observer must recognize an incongruity that violates expectations. This requires more than simple label recognition; it demands an understanding of social norms and cultural obsessions.
Existing datasets for humor often lack the rigorous controls necessary to ensure models are performing genuine reasoning rather than exploiting statistical shortcuts like specific art styles. To address this, we present HumorDB, a curated dataset designed to probe the depths of AI's interpretive capabilities.
Methodology and Dataset
HumorDB consists of 3,542 images across five categories: Photos, Photoshopped real-life images, Cartoons, Sketches, and AI-generated content. A core innovation of this dataset is the inclusion of 1,271 minimally contrastive pairs. Using Photoshop and AI inpainting, we created "non-funny" versions of humorous images by removing the specific element that creates the punchline.
This controlled environment forces models to identify the specific humorous cue to succeed, preventing them from "cheating" by recognizing general image categories or editing artifacts. We benchmarked these images using 650 human participants across three tasks: binary classification (funny vs. not funny), funniness rating (1-10), and pairwise comparison.
Results and Insights
Our evaluation spanned a variety of architectures, including vision-only models (e.g., DINOv2, ViT) and Large Vision-Language Models (VLMs) like GPT-4o and Gemini 1.5 Flash.
The Performance Gap
Humans achieved approximately 87% accuracy on binary humor classification. In contrast, the highest-performing AI models, such as Gemini-Flash and GPT-4o, reached only 75-82% accuracy. Vision-language models generally outperformed vision-only models, suggesting that the broad world knowledge acquired during language pretraining is vital for interpreting visual incongruity.
"Right for the Wrong Reasons"
A critical finding emerged from our interpretability analysis. Even when models correctly classified an image as funny, attention maps often revealed they were looking at irrelevant parts of the scene. For instance, in a scene where a surgeon "operates" on a phone, a model might focus on a nearby dinner plate rather than the phone itself. This suggests that current models may rely on spurious correlations rather than a true understanding of the humor's source.
The Sketch and Reasoning Challenge
AI models performed near chance levels on abstract sketches. While humans easily interpret minimal line drawings as humorous situations, AI struggles without realistic textures. Furthermore, models found pairwise comparisons—judging which of two similar images is funnier—particularly difficult, highlighting a lack of nuance in their evaluative capabilities.
Discussion
The results from HumorDB indicate that while modern AI is improving, it still lacks the deep reasoning and contextual awareness required to truly understand humor. Current models are primarily "recognizers" rather than "reasoners."
Future research must address several hurdles, including the cultural subjectivity of humor and the need for architectures capable of multi-step abstract reasoning. Scaling HumorDB will also require innovative ways to generate high-quality contrastive pairs. By bridging the gap between visual perception and abstract reasoning, we can move closer to AI that truly "gets" the joke.
All the code and data are available here: https://github.com/kreimanlab/HumorDB
Summary updated