Enhancing Pun Generation by Punishing Auto Generated Pun-ish Outputs

Puns are clever wordplays that exploit sound similarities while contrasting different meanings. Such complexpuns remain challenging to create, even with today’s advanced large language models. This study focuses on generatingJapanese juxtaposed puns while preserving the original meaning of input sentences. We propose a two-steptraining approach combining supervised fine-tuning (SFT) and Direct Preference Optimization (DPO). First, we performsupervised fine-tuning on a pre-trained language model using a specially designed pun paraphrase dataset. Eachpun sentence in the dataset is paired with a sentence of equivalent meaning that does not contain a pun. This step helpsthe model learn the style characteristic of puns. Second, we apply DPO, labeling human-written puns as preferredand model-generated puns from the SFT step as dispreferred. This contrastive learning guides the model in recognizingthe key elements that define pun-ness. Experimental results demonstrate that our method significantly enhancespun generation capabilities, evaluated using both neural network-based and rule-based metrics designed to measurepun-ness. Human evaluations confirm that puns generated by our approach exhibit higher pun-like qualities comparedto those produced solely by supervised fine-tuning, surpassing GPT-4o according to these metrics. Although our experimentsprimarily target Japanese puns, our model also exhibits some ability to generate English puns, suggestingpotential adaptability across languages. Overall, our findings highlight that integrating supervised fine-tuning withiterative Direct Preference Optimization improves the generation of pun-rich text without significantly compromisingthe original meaning.

Authors

Institutions

Publication Details

Journal
Transactions of the Japanese Society for Artificial Intelligence
Published
2025-08-31
DOI
https://doi.org/10.1527/tjsai.40-5_c-p44
Primary Topic
Evolutionary Algorithms and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Pun Generation by Punishing Auto Generated Pun-ish Outputs

Toshiro Minami, Akihiko Ohsuga, Yasuyuki Tahara, Ryohei Orihara et al.
Transactions of the Japanese Society for Artificial Intelligence
Evolutionary Algorithms and Applications
article

Enhancing Pun Generation by Punishing Auto Generated Pun-ish Outputs

Toshiro Minami, Akihiko Ohsuga, Yasuyuki Tahara, Ryohei Orihara, Yuichi Sei
article en

Abstract

Puns are clever wordplays that exploit sound similarities while contrasting different meanings. Such complexpuns remain challenging to create, even with today’s advanced large language models. This study focuses on generatingJapanese juxtaposed puns while preserving the original meaning of input sentences. We propose a two-steptraining approach combining supervised fine-tuning (SFT) and Direct Preference Optimization (DPO). First, we performsupervised fine-tuning on a pre-trained language model using a specially designed pun paraphrase dataset. Eachpun sentence in the dataset is paired with a sentence of equivalent meaning that does not contain a pun. This step helpsthe model learn the style characteristic of puns. Second, we apply DPO, labeling human-written puns as preferredand model-generated puns from the SFT step as dispreferred. This contrastive learning guides the model in recognizingthe key elements that define pun-ness. Experimental results demonstrate that our method significantly enhancespun generation capabilities, evaluated using both neural network-based and rule-based metrics designed to measurepun-ness. Human evaluations confirm that puns generated by our approach exhibit higher pun-like qualities comparedto those produced solely by supervised fine-tuning, surpassing GPT-4o according to these metrics. Although our experimentsprimarily target Japanese puns, our model also exhibits some ability to generate English puns, suggestingpotential adaptability across languages. Overall, our findings highlight that integrating supervised fine-tuning withiterative Direct Preference Optimization improves the generation of pun-rich text without significantly compromisingthe original meaning.

Transactions of the Japanese Society for Artificial IntelligenceVol. 40(5)
University of Electro-Communications (JP)
Openalex Percentile: Top 88%
Evolutionary Algorithms and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.