Abstract
Puns play a vital role in academic research due to their distinct structure and clear definition, which aid in the comprehensive analysis of linguistic humor. However, the understanding of puns in large language models (LLMs) has not been thoroughly examined, limiting their use in creative writing and humor creation. In this paper, we leverage three popular tasks—pun recognition, explanation, and generation—to systematically evaluate the capabilities of LLMs in pun understanding. In addition to adopting automated evaluation metrics from prior research, we introduce new evaluation methods and metrics better suited to the in-context learning paradigm of LLMs. These new metrics offer a more rigorous assessment of an LLM's ability to understand puns and align more closely with human cognition. Our findings reveal the "lazy pun generation" pattern and identify the primary challenges LLMs encounter in understanding puns.
Introduction
While Large Language Models (LLMs) are becoming increasingly sophisticated, they still struggle with the subtle "wordplay" of puns. Puns represent a unique linguistic challenge because they rely on lexical-semantic ambiguity (one word, two meanings) and context-shift surprise. Understanding a pun requires more than just vocabulary; it requires grasping phonetic similarities and the "double entendre" intended by the author.
While LLMs have been tested on general humor, their specific ability to process puns hasn't been rigorously or systematically evaluated. This gap is significant because puns are foundational to creative writing and linguistic humor. If an LLM cannot "get" a pun, it likely lacks a deep, human-like grasp of how language can be manipulated for effect.
Probing Protocol and Methodology
The researchers developed a "Probing Protocol" consisting of three progressive tasks:
- Pun Recognition: Determining if a text is a pun. To test model confidence, the authors used dual-biased prompts—instructions that subtly nudged the model toward either a "pun" or "non-pun" answer to see if the model would flip-flop.
- Pun Explanation: Using Chain-of-Thought (CoT) prompting to ask the model why a text is funny. They evaluated this using a "punchline check" (identifying the pun word, the alternative word, and both intended senses) and pairwise comparisons against human explanations.
- Pun Generation: Testing the model's ability to create puns in "Free" mode (given a pun pair) and "Constrained" mode (given a pun pair plus specific context words).
To measure originality, an Overlap metric (based on Jaccard similarity) was introduced to determine if the LLM was genuinely creating a new pun or simply reciting one from its training corpus.
Key Insights and Results
The study utilized the Semeval-2017-Task-7 and ExPun datasets, categorized into homographic puns (same spelling) and heterographic puns (different spelling, similar sound).
The "Lazy Pun" Pattern
A primary finding is the "Lazy Pun" pattern. When asked to generate a pun, LLMs often take the easy way out. Instead of crafting a sentence where one word carries two meanings, they write a sentence that uses both words separately (e.g., "The sailor's pay was docked after he struggled to dock on time"). Humans consider this a "failed" pun, but LLMs exhibit this behavior consistently.
Phonetic Blindness and Prompt Bias
LLMs struggle significantly more with heterographic puns (het-puns). Because these rely on sound rather than spelling, and LLMs process text via tokens, they often fail to "hear" the joke. Furthermore, smaller models (7B parameters) are highly susceptible to prompt bias, often agreeing with whatever the prompt suggests about the text's status as a pun.
Memorization vs. Creativity
Larger models like GPT-4 show a higher "Overlap" with human datasets when given specific context words. This suggests that as models get "smarter," they might actually be relying more on their vast memory of existing jokes rather than true creative synthesis. Despite this, GPT-4 and Claude 3-Opus achieved high recognition accuracy (Kappa > 0.8) and were found to be competitive with humans in explanation quality.
Conclusion
While top-tier models like GPT-4 rival humans in explaining humor, they frequently fall into the "lazy pun generation" trap—using dual meanings separately rather than blending them into a single, clever punchline. Future work should expand to multilingual pun datasets and develop more nuanced metrics for humor quality beyond simple semantic checks.
Summary updated