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 than previous metrics. Our findings reveal the “lazy pun generation” pattern and identify the primary challenges LLMs encounter in understanding puns.
1. Introduction
Humor is often considered one of the "final bosses" of natural language processing. Puns, in particular, rely on a delicate balance of lexical ambiguity (one word, two meanings) and context-shift surprise. While LLMs have demonstrated an ability to generate jokes, it has remained unclear whether they truly understand the underlying mechanics of wordplay or are simply reciting patterns from their training data. This research addresses the gap by establishing a comprehensive benchmark to evaluate the full pipeline of pun processing: spotting them, explaining the double meaning, and creating original wordplay from scratch.
2. Probing Pun Understanding
2.1 Methodology
The researchers developed a "Probing Protocol" consisting of three progressive tasks designed to test the depth of model understanding:
- Pun Recognition: To move beyond simple accuracy, the study used dual-biased prompts. By asking both "Is this a pun?" and "Is this a non-pun?", researchers could identify if a model inconsistently agreed with the prompt's suggestion, measured via Cohen’s Kappa.
- Pun Explanation: Models were required to use Chain-of-Thought (CoT) prompting to identify the "pun word," the "alternative word," and both intended meanings. A fine-grained punchline check ensured all critical components were addressed.
- Pun Generation: Models were tested in both free and constrained modes. To distinguish between plagiarism and creativity, an Overlap metric was introduced to compare model outputs against known human puns.
2.2 Datasets
The study utilized the Semeval-2017-Task-7 and ExPun datasets, categorizing wordplay into homographic puns (same spelling, different meaning) and heterographic puns (different spelling, similar sound, e.g., reword vs. reward).
3. Key Insights and Challenges
3.1 Phonetic Blindness and Prompt Vulnerability
A significant finding is that LLMs exhibit "phonetic blindness." Because they process text as tokens rather than sounds, they struggle significantly more with heterographic puns unless the context is extremely heavy-handed. Furthermore, many models act as "yes-men"; if a prompt leans toward a specific classification, the model is likely to agree regardless of the text's actual content. Consistency (Kappa) proved to be a much harsher and more accurate metric for true understanding than raw accuracy.
3.2 The "Lazy Pun" Pattern
When tasked with generation, LLMs often fall into a "lazy" pattern. Instead of creating a clever double entendre where one word carries two meanings, they produce sentences that simply include both meanings separately (e.g., "The sailor's pay was docked after he struggled to dock on time").
4. Results and Performance
- Top Performers: GPT-4-Turbo and Claude-3-Opus emerged as leaders, showing high consistency and explanation quality that occasionally rivaled human benchmarks. GPT-4’s explanations were particularly noted for their logical, structured approach.
- The Impact of CoT: Chain-of-Thought prompting significantly boosted recognition accuracy for mid-tier models, suggesting that explicit reasoning helps navigate semantic ambiguity.
- Originality vs. Memory: The Overlap metric revealed a surprising trend: larger models are more likely to accidentally plagiarize human puns from their training data when given specific keywords. Their vast memory may actually hinder original creative generation, leading to lower "Strict Success" rates in creating novel wordplay.
5. Conclusion
While top-tier LLMs are becoming adept at explaining puns, their ability to "hear" phonetic similarities and generate original, non-lazy wordplay remains limited. Future work should focus on expanding these benchmarks to multilingual contexts and developing "humor-aware" reward functions for Reinforcement Learning from Human Feedback (RLHF) to encourage more creative, less repetitive generation patterns.
Summary updated