MLE ngineer at S em E val-2020 Task 7: BERT -Flair Based Humor Detection Model ( BFH umor) (2020)

Abstract: Task 7, Assessing the Funniness of Edited News Headlines, in the International Workshop SemEval2020 introduces two sub-tasks to predict the funniness values of edited news headlines from the Reddit website. This paper proposes the BFHumor model of the MLEngineer team that participates in both sub-tasks in this competition. The BFHumor’s model is defined as a BERT-Flair based humor detection model that is a combination of different pre-trained models with various Natural Language Processing (NLP) techniques. The Bidirectional Encoder Representations from Transformers (BERT) regressor is considered the primary pre-trained model in our approach, whereas Flair is the main NLP library. It is worth mentioning that the BFHumor model has been ranked 4th in sub-task1 with a root mean square error (RMSE) value of 0.51966, and it is 0.02 away from the first ranked model. Also, the team is ranked 12th in the sub-task2 with an accuracy of 0.62291, which is 0.05 away from the top-ranked model. Our results indicate that the BFHumor model is one of the top models for detecting humor in the text.

## introduction humor is a distinctive quality of humans, which is considered a figurative language; where the person can express his feelings through social media once entertainment media have existed or if he faces a funny event. researchers found that humor leads to enhance the human's health and mood @xcite @xcite . in the last decades, the world has witnessed a rapid move in artificial intelligent (ai) field toward simulating human intelligence in machines or computer systems @xcite . one of the main branches of ai is natural language processing (nlp), where the computer learns how to understand human languages regardless the diversity and complexity of human languages that are considered open challenges for nlp systems and communities @xcite . knowing that humor has many facets and can be produced through words (texts), gestures (vision), and prosodic cues (acoustic) @xcite , humor detection is considered a multimodal language. the reasons behind the difficulty of detecting humor are due to (1) the nature of the context, emotion, and rhythm, which contains a large degree of complexity for the machine to understand the level of the humor. (2) the cultural differences, knowing that humor is universal, the different cultures see the humor in various ways @xcite . detecting humor from social media sites or tv dialogues using a set of algorithms had been studied thoroughly in the nlp field @xcite . in this paper, we detect the humor through news headlines from the reddit website 1 that are provided by semeval-2020 organizers @xcite . the international workshop on semantic evaluation semeval-2020 has introduced several nlp shared tasks. task 7, assessing the funniness of edited news headlines, aims to motivate participants to build systems to predict the level of funniness in edited news headlines. the task asked participants to replace a word in the headline using a micro-edit and check if this modification makes the news headlines more funnier or not. the task consists of two subtasks (sub-task1 and sub-task2). in sub-task1, the participants should predict the funniness of the edited headline based on rmse value. while sub-task2 is intended to predict which edited headline is more funnier based on the accuracy value. further clarifications about task 7 and the dataset in section 3. our team, mlengineer, proposed a bfhumor model for predicting the funniness value of the edited news headlines in both subtasks. our model is an ensembling model of different state-of-the-art pre-trained models with various nlp techniques. the mlengineer has been ranked 4 th in sub-task1 and 12 th in sub-task2 out of 84 teams. the remaining sections of this paper are organized as follows: section 2 describes the existed work on detecting humor. section 3 provides insights into the proposed system methodology and architecture. section 4 presents the key experimental setup and bfhumor results. finally, in section 5, we conclude with the findings of our research. ## related work a plethora of research has studied the figurative languages in various datasets to predict the funniness value. the publication race in this area is growing at a fast pace between the industry and academic researchers. this section presents some analysis of the existed work related to humor, irony, ridicule, satire detection, and assessing funniness. the authors in @xcite @xcite @xcite studied humor detection in various languages to classify each tweet into a joke or not and how they are funny. in @xcite , the authors classified the dataset into a joke or not with a dataset that was obtained from twitter in the spanish language. while bueno et al. in this paper, we have built a robust model, named bfhumor, dealing with continuous labels, which aims to predict the funniness value of the news headline between zero and three. this model is a combination of the various pre-trained model and techniques that are mainly bert regressor and the nlp flair library. up to our knowledge, we are the first to use these state-of-the-art techniques for humor detection. ## system methodology in this section, we present the workflow of our proposed system to predict the funniness of edited news headlines as shown in figure 1 . more details about the workflow are in the following subsections.