Jayi2424 commited on
Commit
945cfb0
·
verified ·
1 Parent(s): d548ce3

Update README with detailed problem framing, CSF explanation, and CLEF JOKER context

Browse files
Files changed (1) hide show
  1. README.md +68 -62
README.md CHANGED
@@ -12,116 +12,123 @@ tags:
12
  - text-generation
13
  ---
14
 
 
15
 
16
-
17
- **An Open-Weight Ecosystem for Computational Humor Generation**
18
  Carnegie Mellon University
19
 
20
  [View on Hugging Face](https://huggingface.co/collections/Jayi2424/humorgen) · [Read the Paper](https://arxiv.org/abs/2604.09629) · [CLEF 2026 Paper](https://edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf)
21
 
22
  ---
23
 
24
- ## The Problem
 
 
25
 
26
- Language models struggle to be funny — not because they lack knowledge of humor, but because of how they are trained. Standard next-token prediction rewards the most probable continuation. In humor, the most probable output is always the safest, most generic one. Comedy lives at the edges of the distribution: in the unexpected turn of phrase, the precise word that collapses two meanings at once, the observation that makes a situation suddenly absurd.
27
 
28
- Training a model to "be funny" with a single instruction does not work. It produces outputs that scan as jokes but fail to land.
29
 
30
  ---
31
 
32
- ## Our Approach: The Cognitive Synergy Framework
33
 
34
- HumorGen introduces the **Cognitive Synergy Framework (CSF)** — a Mixture-of-Thought method that structures humor generation as an ensemble of six distinct cognitive personas, each grounded in psychological theory.
35
 
36
- Rather than a single generation path, CSF produces six parallel candidates per input — one from each persona — creating a diverse pool by construction. The model is then trained on this data, learning that a single headline supports multiple valid comedic interpretations.
 
37
 
38
- | Persona | Grounding | Comedic Lens |
39
- |:---|:---|:---|
40
- | The Neurotic | Superiority — Self-Deprecation | Anxiety, vulnerability, personal insecurity |
41
- | The Cynic | Superiority — Mockery | Hypocrisy and the dark side of social norms |
42
- | The Observer | Incongruity — Relatability | The absurdity hiding in ordinary life |
43
- | The Wordsmith | Incongruity — Linguistic | Phonological ambiguity and double entendres |
44
- | The Optimist | Benign Violation | Wholesome misinterpretation |
45
- | The Absurdist | Incongruity — Surprise | Surreal logic and violated causality |
46
 
47
- **Training pipeline:**
48
 
49
- 1. **Teacher generation** — A strong LLM generates six candidates per headline, one per persona
50
- 2. **SFT** — A 7B student learns from this diverse pool
51
- 3. **Preference alignment** — HumorRank (Bradley-Terry pairwise ranker) scores the persona outputs; DPO and O-GRPO teach the model which angle is funniest in context
52
 
53
- ---
 
 
 
 
 
 
 
54
 
55
- ## Extending to Constrained Humor: CLEF 2026 JOKER
56
 
57
- The CSF is not limited to open-ended generation. **CLEF 2026 JOKER Task 4** poses a harder challenge: given a pun word and two required semantic senses, generate a pun-brief — a sentence that satisfies both senses simultaneously and still reads as funny.
58
 
59
- To tackle this, we first train domain-agnostic multilingual humor checkpoints at 14B and 32B scale on the SemEval MWAHAHA corpus across all languages. These **HumorGen Base** models are general-purpose multilingual humor generators and serve as the starting point for JOKER-specific fine-tuning in English, French, and Spanish.
 
 
60
 
61
  ---
62
 
63
- ## Model Collection
64
-
65
- All models are released as LoRA adapters on Hugging Face under [Jayi2424/HumorGen](https://huggingface.co/collections/Jayi2424/humorgen).
66
 
67
- ---
68
 
69
- ### Core HumorGen — 7B
70
 
71
- Open-ended headline humor. A full ablation across SFT, DPO, and O-GRPO, with and without Chain-of-Thought reasoning traces.
72
 
73
- | Model | Training | CoT | Hugging Face |
74
- |:---|:---|:---:|:---|
75
- | HumorGen_SFT_7B | Supervised Fine-Tuning | — | [Link](https://huggingface.co/Jayi2424/HumorGen_SFT_7B) |
76
- | HumorGen_SFT_Think_7B | Supervised Fine-Tuning | Yes | [Link](https://huggingface.co/Jayi2424/HumorGen_SFT_Think_7B) |
77
- | HumorGen_DPO_7B | Direct Preference Optimization | — | [Link](https://huggingface.co/Jayi2424/HumorGen_DPO_7B) |
78
- | HumorGen_DPO_Think_7B | Direct Preference Optimization | Yes | [Link](https://huggingface.co/Jayi2424/HumorGen_DPO_Think_7B) |
79
- | HumorGen_GRPO_7B | Offline Group Relative Policy Opt. | — | [Link](https://huggingface.co/Jayi2424/HumorGen_GRPO_7B) |
80
- | HumorGen_GRPO_Think_7B | Offline Group Relative Policy Opt. | Yes | [Link](https://huggingface.co/Jayi2424/HumorGen_GRPO_Think_7B) |
81
 
82
- Base model: Qwen2.5-7B-Instruct
83
 
84
  ---
85
 
86
- ### Multilingual Base — 14B & 32B
87
 
88
- Domain-agnostic humor pretraining on the SemEval MWAHAHA corpus across all languages. Released independently as general-purpose multilingual humor generators.
89
 
90
- | Model | Scale | Base Model | Hugging Face |
91
- |:---|:---|:---|:---|
92
- | HumorGen_SFT_14B | 14B | Qwen3-14B | [Link](https://huggingface.co/Jayi2424/HumorGen_SFT_14B) |
93
- | HumorGen_SFT_32B | 32B | Qwen3-32B | [Link](https://huggingface.co/Jayi2424/HumorGen_SFT_32B) |
94
 
95
- ---
 
 
 
 
 
 
 
96
 
97
- ### CLEF 2026 JOKER — Constrained Pun Generation
 
98
 
99
- Two-stage cross-lingual LoRA curriculum: multilingual pretraining → per-language JOKER fine-tuning. Available at 14B and 32B in English, French, and Spanish.
 
 
 
 
 
 
100
 
101
- | Model | Language | Scale | Hugging Face |
102
  |:---|:---|:---|:---|
103
- | HumorGen_JOKER_EN_14B | English | 14B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_EN_14B) |
104
- | HumorGen_JOKER_EN_32B | English | 32B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_EN_32B) |
105
- | HumorGen_JOKER_FR_14B | French | 14B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_FR_14B) |
106
- | HumorGen_JOKER_FR_32B | French | 32B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_FR_32B) |
107
- | HumorGen_JOKER_ES_14B | Spanish | 14B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_ES_14B) |
108
- | HumorGen_JOKER_ES_32B | Spanish | 32B | [Link](https://huggingface.co/Jayi2424/HumorGen_JOKER_ES_32B) |
109
 
110
  ---
111
 
112
- ## Papers
113
 
114
- **HumorGen: Cognitive Synergy for Humor Generation in Large Language Models via Persona-Based Distillation**
115
- Ajayi, E. et al. · arXiv 2026
116
  [arxiv.org/abs/2604.09629](https://arxiv.org/abs/2604.09629)
117
 
118
- **HumorGen at CLEF 2026 JOKER Task 4: Cross-Lingual Constrained Pun Generation via the Cognitive Synergy Framework**
119
- Ajayi, E. et al. · Working Notes of CLEF 2026
120
  [edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf](https://edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf)
121
 
122
  ---
123
 
124
- ## Citation
125
 
126
  ```bibtex
127
  @misc{ajayi2026humorgen,
@@ -146,5 +153,4 @@ Ajayi, E. et al. · Working Notes of CLEF 2026
146
  ```
147
 
148
  ---
149
-
150
  *Carnegie Mellon University*
 
12
  - text-generation
13
  ---
14
 
15
+ # HumorGen
16
 
17
+ **An Open-Weight Ecosystem for Computational Humor Generation**
 
18
  Carnegie Mellon University
19
 
20
  [View on Hugging Face](https://huggingface.co/collections/Jayi2424/humorgen) · [Read the Paper](https://arxiv.org/abs/2604.09629) · [CLEF 2026 Paper](https://edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf)
21
 
22
  ---
23
 
24
+ ## 1. The Problem: Why are LLMs so unfunny?
25
+
26
+ Large Language Models (LLMs) possess vast amounts of world knowledge, yet they notoriously struggle to generate genuinely funny content. The reason isn't a lack of data; it's a fundamental flaw in how they are trained.
27
 
28
+ Standard LLM training minimizes perplexity—it teaches the model to predict the most probable (i.e., average) next token. However, in the context of humor, "average" means boring, generic, or cliché. Comedy relies on subverting expectations. It lives at the extreme edges of the probability distribution: in the unexpected turn of phrase, the precise word that collapses two meanings at once, or the observation that highlights the absurdity of a mundane situation.
29
 
30
+ When you prompt a standard LLM to "be funny," it suffers from **Mode Collapse** in creative generation. It defaults to the safest, most statistically common "joke-like" structures, producing text that scans as a joke but completely fails to land.
31
 
32
  ---
33
 
34
+ ## 2. Our Approach: The Cognitive Synergy Framework (CSF)
35
 
36
+ To solve this, we cannot simply tell a model to "be funny." Instead, we introduce the **Cognitive Synergy Framework (CSF)**, which represents the first application of **Mixture-of-Thought (MoT)** specifically designed for creative divergence.
37
 
38
+ * **Traditional MoT:** Typically used for logic or math to converge on *one correct answer*.
39
+ * **Cognitive Synergy:** Used for creativity to diverge into *many distinct, valid humorous answers*.
40
 
41
+ CSF structures humor generation not as a single task, but as an ensemble of specific cognitive processes. We force the model to adopt distinct "Cognitive Personas." Each persona acts as a **Latent Expert**, grounded in a specific psychological theory of humor. By forcing generation through these specific lenses, we push the model away from the generic mean and into those creative "tails" of the distribution.
 
 
 
 
 
 
 
42
 
43
+ ### The Six Latent Experts
44
 
45
+ Instead of one generic generation path, CSF produces six parallel candidates per input—one from each persona. This guarantees a diverse pool of comedic angles by construction.
 
 
46
 
47
+ | Persona | Psychological Theory | Comedic Lens & Mechanism |
48
+ |:---|:---|:---|
49
+ | **The Neurotic** | Superiority (Self-Deprecation) | Focuses on anxiety, overthinking, and personal insecurity. Finds humor in vulnerability and self-inflicted struggles. |
50
+ | **The Cynic** | Superiority (Mockery) | Cuts through polite society. Focuses on hypocrisy, social contradictions, and the dark, unspoken truths we all secretly acknowledge. |
51
+ | **The Observer** | Incongruity (Relatability) | The "Seinfeld" lens. Highlights the absurdity hiding in mundane, everyday life and unspoken social rules. |
52
+ | **The Wordsmith** | Incongruity (Linguistic) | Treats jokes as linguistic puzzles. Focuses on phonology, double entendres, puns, and structural ambiguity. |
53
+ | **The Optimist** | Benign Violation | Focuses on wholesome misinterpretation. Finds a ridiculous, forced silver lining where there absolutely shouldn't be one. |
54
+ | **The Absurdist** | Incongruity (Surprise) | Abandons reality. Focuses on non-sequiturs, surreal logic, and completely violating causal reasoning. |
55
 
56
+ ### The Training Pipeline: Baking Synergy into the Weights
57
 
58
+ Our framework is a full training pipeline designed to distill this multi-persona capability into a compact open-weight model.
59
 
60
+ 1. **Phase 1: MoT Generation (Teacher)** — We use a powerful teacher LLM to generate six independent joke candidates (one per persona) for a given prompt (e.g., a news headline).
61
+ 2. **Phase 2: Structure Distillation (SFT)** — A compact 7B student model is trained on this diverse pool. The crucial lesson here is that a single input can support multiple, entirely valid, and distinct comedic interpretations.
62
+ 3. **Phase 3: Quality Alignment (DPO / O-GRPO)** — We don't just train on the "best" joke. We use **HumorRank**—a Bradley-Terry pairwise evaluation framework—to rank the six persona outputs against each other. Through Direct Preference Optimization (DPO) and Offline Group Relative Policy Optimization (O-GRPO), the model learns: *"In this specific context, The Cynic's approach was funnier than The Wordsmith's."*
63
 
64
  ---
65
 
66
+ ## 3. Extending to Constrained Humor: CLEF 2026 JOKER Task 4
 
 
67
 
68
+ The Cognitive Synergy Framework isn't just for open-ended headline jokes. To prove its robustness, we extended it to a significantly harder problem: **Constrained Multilingual Pun Generation**, specifically for the CLEF 2026 JOKER Task 4.
69
 
70
+ **The Challenge:** The task requires the model to generate a **pun-brief**—a single sentence that simultaneously satisfies a specific pun word and two distinct semantic senses. For example, given the word "bark," sense 1 ("the sound a dog makes"), and sense 2 ("the outer covering of a tree"), the model must weave both meanings into a natural, genuinely funny sentence. This requires strict lexical constraint adherence alongside creative humor generation.
71
 
72
+ **The Solution:** To scale CSF to this multilingual, constrained environment, we utilized a two-stage cross-lingual LoRA curriculum:
73
 
74
+ 1. **Domain-Agnostic Pretraining (HumorGen Base):** We first trained foundational humor models at the 14B and 32B scale on the SemEval MWAHAHA corpus across all languages (English, French, Spanish). These serve as incredibly strong, general-purpose multilingual humor generators.
75
+ 2. **Task-Specific Adaptation (JOKER Suite):** We branched from these foundational bases, applying per-language LoRA fine-tuning specifically on the CLEF-JOKER constraint data.
 
 
 
 
 
 
76
 
77
+ In our CLEF study, we explicitly test whether the persona-based CSF prompting (API teacher) outperforms a single "creativity-first" prompt, and how well our task-adapted open weights (HumorGen-JOKER 14B/32B) compete against those frontier models.
78
 
79
  ---
80
 
81
+ ## 4. Model Collection
82
 
83
+ All models are released as LoRA adapters on Hugging Face. View the full collection here: **[Jayi2424/HumorGen](https://huggingface.co/collections/Jayi2424/humorgen)**.
84
 
85
+ ### Core HumorGen Suite — 7B
86
+ Open-ended headline humor generation. This suite represents a full ablation across post-training paradigms (SFT, DPO, O-GRPO), tested with and without explicit Chain-of-Thought (CoT) reasoning traces. Base model: Qwen2.5-7B-Instruct.
 
 
87
 
88
+ | Model | Training Stage | CoT | Hugging Face Link |
89
+ |:---|:---|:---:|:---|
90
+ | HumorGen_SFT_7B | Supervised Fine-Tuning | — | [Jayi2424/HumorGen_SFT_7B](https://huggingface.co/Jayi2424/HumorGen_SFT_7B) |
91
+ | HumorGen_SFT_Think_7B | Supervised Fine-Tuning | Yes | [Jayi2424/HumorGen_SFT_Think_7B](https://huggingface.co/Jayi2424/HumorGen_SFT_Think_7B) |
92
+ | HumorGen_DPO_7B | Direct Preference Optimization | — | [Jayi2424/HumorGen_DPO_7B](https://huggingface.co/Jayi2424/HumorGen_DPO_7B) |
93
+ | HumorGen_DPO_Think_7B | Direct Preference Optimization | Yes | [Jayi2424/HumorGen_DPO_Think_7B](https://huggingface.co/Jayi2424/HumorGen_DPO_Think_7B) |
94
+ | HumorGen_GRPO_7B | Offline GRPO | — | [Jayi2424/HumorGen_GRPO_7B](https://huggingface.co/Jayi2424/HumorGen_GRPO_7B) |
95
+ | HumorGen_GRPO_Think_7B | Offline GRPO | Yes | [Jayi2424/HumorGen_GRPO_Think_7B](https://huggingface.co/Jayi2424/HumorGen_GRPO_Think_7B) |
96
 
97
+ ### Multilingual Base Models — 14B & 32B
98
+ Domain-agnostic humor pretraining on the SemEval MWAHAHA corpus across all languages. Released independently as general-purpose multilingual humor generators and used as the foundation for the JOKER suite. Base models: Qwen3-14B / Qwen3-32B.
99
 
100
+ | Model | Scale | Hugging Face Link |
101
+ |:---|:---|:---|
102
+ | HumorGen_SFT_14B | 14B | [Jayi2424/HumorGen_SFT_14B](https://huggingface.co/Jayi2424/HumorGen_SFT_14B) |
103
+ | HumorGen_SFT_32B | 32B | [Jayi2424/HumorGen_SFT_32B](https://huggingface.co/Jayi2424/HumorGen_SFT_32B) |
104
+
105
+ ### CLEF 2026 JOKER Suite — Constrained Pun Generation
106
+ Task: dual-sense pun-brief generation. Two-stage cross-lingual LoRA curriculum: multilingual pretraining → per-language JOKER fine-tuning. Available in English, French, and Spanish.
107
 
108
+ | Model | Language | Scale | Hugging Face Link |
109
  |:---|:---|:---|:---|
110
+ | HumorGen_JOKER_EN_14B | English | 14B | [Jayi2424/HumorGen_JOKER_EN_14B](https://huggingface.co/Jayi2424/HumorGen_JOKER_EN_14B) |
111
+ | HumorGen_JOKER_EN_32B | English | 32B | [Jayi2424/HumorGen_JOKER_EN_32B](https://huggingface.co/Jayi2424/HumorGen_JOKER_EN_32B) |
112
+ | HumorGen_JOKER_FR_14B | French | 14B | [Jayi2424/HumorGen_JOKER_FR_14B](https://huggingface.co/Jayi2424/HumorGen_JOKER_FR_14B) |
113
+ | HumorGen_JOKER_FR_32B | French | 32B | [Jayi2424/HumorGen_JOKER_FR_32B](https://huggingface.co/Jayi2424/HumorGen_JOKER_FR_32B) |
114
+ | HumorGen_JOKER_ES_14B | Spanish | 14B | [Jayi2424/HumorGen_JOKER_ES_14B](https://huggingface.co/Jayi2424/HumorGen_JOKER_ES_14B) |
115
+ | HumorGen_JOKER_ES_32B | Spanish | 32B | [Jayi2424/HumorGen_JOKER_ES_32B](https://huggingface.co/Jayi2424/HumorGen_JOKER_ES_32B) |
116
 
117
  ---
118
 
119
+ ## 5. Papers
120
 
121
+ **HumorGen: Cognitive Synergy for Humor Generation in Large Language Models via Persona-Based Distillation**
122
+ Ajayi, E. et al. · arXiv 2026
123
  [arxiv.org/abs/2604.09629](https://arxiv.org/abs/2604.09629)
124
 
125
+ **HumorGen at CLEF 2026 JOKER Task 4: Cross-Lingual Constrained Pun Generation via the Cognitive Synergy Framework**
126
+ Ajayi, E. et al. · Working Notes of CLEF 2026
127
  [edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf](https://edwardajayi.github.io/assets/papers/HumorGen-JOKER.pdf)
128
 
129
  ---
130
 
131
+ ## 6. Citation
132
 
133
  ```bibtex
134
  @misc{ajayi2026humorgen,
 
153
  ```
154
 
155
  ---
 
156
  *Carnegie Mellon University*