The Yuan requests your support! Our content will now be available free of charge for all registered subscribers, consistent with our mission to make AI a human commons accessible to all. We are therefore requesting donations from our readers so we may continue bringing you insightful reportage of this awesome technology that is sweeping the world. Donate now
BERT-based humor generation system displays another side to AI
By Parisa Naraei  |  Mar 04, 2024
BERT-based humor generation system displays another side to AI
Image courtesy of and under license from
Humor is one of the most essential parts of human interaction, but humor generation as a sub-field of natural language generation is notoriously difficult. AI researcher and tech expert Parisa Naraei describes how a joke generator is being built to overcome this challenge.

TORONTO - In this project, a joke generator employing a large pre-trained language model (GPT2) used a caption generated from an image applying ResNet50, a convolutional neural network. My team and I sought to synthesize two language generation tasks into a single system - image captioning and joke generation, with the image caption acting as a context from which the joke is generated. Overall, the model accomplishes the task of generating a joke from the given image, achieving varying degrees of success in funniness. The system obtains evaluation scores - both human and automated - that are on par with previous research.


Humor is one of the most evolved characteristics that humans possess and a complex and intrinsic part of human conversation involving a deep understanding of grammatical structures and world knowledge. The exact reasons why people laugh and what makes them do so are still relatively unknown and the ability to understand and write jokes requires an understanding of different concepts. One must not only be aware of the world, but also the relationship between ideas and objects and linguistic structures that make a sentence funny - in other words, a strong understanding of semantics and syntax is required to understand and generate a joke. Even though understanding humor or any aspect of language is complex, advances in natural language processing and neural network architecture have succeeded in tasks such as text classification, generation, and summarization. BERT, GPT, and other pre-trained language models trained on a large corpus have shown comprehensive global knowledge. 

Building computational models that identify and generate humor remains hugely challenging. The work described in this article presents a neural network-based joke generator that employs a transformer-based architecture. Human ratings eva

The content herein is subject to copyright by The Yuan. All rights reserved. The content of the services is owned or licensed to The Yuan. Such content from The Yuan may be shared and reprinted but must clearly identify The Yuan as its original source. Content from a third-party copyright holder identified in the copyright notice contained in such third party’s content appearing in The Yuan must likewise be clearly labeled as such.
Continue reading
Sign up now to read this story for free.
- or -
Continue with Linkedin Continue with Google
Share your thoughts.
The Yuan wants to hear your voice. We welcome your on-topic commentary, critique, and expertise. All comments are moderated for civility.