Humor is often considered an "AI-complete" problem because it resists simple rule-based automation. While modern large language models (LLMs) can effortlessly generate fluent prose, write code, and translate languages, they routinely fail at making people laugh or explaining why a joke is funny.
To understand why humor is so difficult for artificial intelligence, we must look beyond surface-level linguistic patterns. Computational humor research has shifted from treating jokes as mere wordplay to modeling them as complex cognitive puzzles driven by semantic incongruity and script opposition.
The Mechanics of a Joke: Script Opposition
At the core of computational humor theory is the Semantic-Script Theory of Humor (SSTH). This framework posits that a text is humorous if it satisfies two conditions:
- The text is compatible, at least in part, with two different semantic "scripts" (internal clouds of world knowledge about a concept or situation).
- The two scripts are in direct opposition or incongruity (e.g., life vs. death, high status vs. low status, normal vs. abnormal).
A joke acts as a cognitive bait-and-switch. The setup primes the reader to activate a dominant script. The punchline then introduces a sudden anomaly that forces the reader to discard the first script and adopt an unexpected, secondary script that fits the context just as well, but subverts expectations.
[ Setup ]
│
┌─────────┴─────────┐
▼ ▼
Primary Script Secondary Script
(Highly Probable) (Low Probability)
│ │
▼ ▼
[ Expectation ] [ The Punchline ]
│
▼
Resolution of Incongruity
To operationalize this mechanically, Labutov and Lipson modeled jokes as "circuits" within large-scale semantic networks like ConceptNet. In this view, a joke is a graph-traversal problem: finding two distinct paths that originate from the same premise but terminate at clashing, incongruous conclusions. True semantic humor requires modeling these deep conceptual interactions rather than relying on superficial word associations.
The Statistical Illusion: Why LLMs Parrot but Do Not Invent
Early computational humor systems relied heavily on rigid lexical constraints. For instance, Valitutti et al. generated adult humor by algorithmically substituting words with phonetically similar taboo words at the end of sentences. While effective for basic puns, this approach fails to generate situational or narrative humor.
You might expect that modern autoregressive Transformers, trained on massive datasets, would naturally learn to generate sophisticated humor. However, Kersting et al. demonstrated that models like ChatGPT largely rely on a memorized "greatest hits" reel of existing puns rather than creative generation.
The root of this failure lies in the standard language modeling objective itself: maximizing token probability. Humor requires a delicate calibration of semantic distance. As Buz et al. observe, generating witty content requires balancing relatability with surprise. If a model outputs the most statistically probable next token, it produces predictable, unfunny text. Conversely, if it samples from too far outside the expected distribution, it produces nonsense.
As Ofer and Shahaf point out in their study of fill-in-the-blank party games, current architectures struggle to distinguish between a standalone shocking or popular phrase and a punchline that creates a clever, context-specific semantic incongruity. True humor requires intentional subversion—a structural property that statistical pattern matching alone cannot reliably replicate.
The Frontier: Moving from Detection to Explanation
Because models can often guess whether a text is a joke based on superficial linguistic cues, researchers have introduced benchmarks that force models to prove their comprehension through explanation.
Surface-Level Detection: "Is this text a joke?" ──► [Binary Classification]
│ (Often fooled by keywords)
▼
Semantic Comprehension: "WHY is this text funny?" ──► [Trace Semantic Ambiguity]
To move past binary classification, Sun and Oraby introduced the ExPUNations dataset, which requires models to explicitly articulate the alternate meanings and phonological similarities that drive wordplay. Similarly, He et al. developed the Chumor benchmark using culturally nuanced jokes from Chinese online communities, demonstrating that even advanced models like GPT-4o perform near random guessing when forced to parse complex logical subversions rather than simple surface patterns.
The ultimate test of this semantic synthesis occurs in multimodal settings, such as The New Yorker Cartoon Caption Contest. In this task, analyzed by Hessel, a model must bridge a visual anomaly (e.g., a giant teacup in an office) with a witty textual remark. Hessel found that even when models are given perfect textual descriptions of the visual elements, they fail to explain the joke's underlying logic. They lack the social commonsense and cultural context required to connect the visual disruption to the textual punchline.
Ultimately, computational humor works when a system can explicitly map, balance, and resolve clashing semantic scripts. Until models can reason about the cognitive spaces of their audience, they will remain high-fidelity parrots—capable of repeating jokes, but fundamentally missing the punchline.
Key Foundational Work
Getting Serious about the Development of Computational Humor (2003) — contributed 1 concept elements to this direction.
Was the Title of This Talk Gernerated Automatically? Prospects on Intelligent Interfaces and Language (1999) — contributed 1 concept elements to this direction.