ZYJ at S em E val-2021 Task 7: H a H ackathon: Detecting and Rating Humor and Offense with ALBERT -Based Model (2021)

Abstract: This article introduces the submission of subtask 1 and subtask 2 that we participate in SemEval-2021 Task 7: HaHackathon: Detecting and Rating Humor and Offense, we use a model based on ALBERT that uses ALBERT as the module for extracting text features. We modify the upper layer structure by adding specific networks to better summarize the semantic information. Finally, our system achieves an F-Score of 0.9348 in subtask 1a, RMSE of 0.7214 in subtask 1b, F-Score of 0.4603 in subtask 1c, and RMSE of 0.5204 in subtask 2.

## introduction a sense of humor is a positive psychological quality that can make people feel better about themselves, relieve stress, and gain a sense of connection with others. humor can help bring about happiness experiences and optimism. humor, by its nature, stirs up emotions. the speaker presents the audience with an unexpected conflict. the audience feels nervous and anticipatory, and at the same time feels pleased and released. humor is also a highly subjective phenomenon, with age, gender, and socioeconomic status is known to influence the perception of jokes. that's why some things make people laugh and others don't. when the brain lacks the cognitive resources to accurately understand the context in which a joke takes place, it generalizes it into an everyday behavior, and the benign offense becomes hostile aggression. like most metaphorical languages, humor emphasizes multiple word meanings, cultural knowledge, and pragmatic capabilities, making it a challenging task to detect humor and offense in a sentence. semeval-2021 shared task 7: hahackathon: detecting and rating humor and offense @xcite shared task has two subtasks. subtask 1 emulates previous humor detection tasks in which all ratings were averaged to provide mean classification and rating scores. subtask 1a: predict if the text would be considered humorous (for an average user). this is a binary task. subtask 1b: if the text is classed as humorous, predict how humorous it is (for an average user). the values vary between 0 and 5. subtask 1c: if the text is classed as humorous, predict if the humor rating would be considered controversial, i.e. the variance of the rating between annotators is higher than the median. this is a binary task. subtask 2 aims to predict how offensive a text would be (for an average user) with values between 0 and 5. this score was calculated regardless of whether the text is classed as humorous or offensive overall. in this paper, we use albert: a lite bert for self-supervised learning of language @xcite as the module for extracting sentence semantic information. the features extracted by albert are then further processed through a specific structure. besides, for subtasks 1a and 1c, since it is a binary classification problem, we use k-fold stratified sampling to reinforce the training process. the rest of the paper is organized as follows. part 2 gives a brief introduction to the relevant work. part 3 describes the dataset and our approach. part 4 describes the hyperparameters of the study method used and our results. finally, the fifth part summarizes our work. ## related work computational research in the field of humor detection has been going on for some time, and the diversity of tasks allows for different analyses according to the type and expression of humor. in previous shared tasks, t3 team @xcite used the pre-trained language model roberta in the semeval-2020 shared task7 on assessing the funninness of edited news headlines @xcite to learn the latent features in news headlines and predict how funny each headline is. unitue-bingencl team @xcite used a ridge regression model using elmo and glove embeddings as well as truncated singular value decomposition at semeval-2020 task 7: humor detection in news headlines. humor and emotions such as offense and hatred are not only different but also related to one another. it is often challenging to classify them accurately. badlani et al. (2019) proposed a composite two-step model. in the first step, features related to irony, humor, hate speech, and emotion are extracted, and in the second step, these features are combined to classify emotions. this multi-step method is better than a single step. models that predict sentiment have better empirical performance in sentiment classification. sentiment analysis of humor data requires a deep semantic understanding of the text, and signals of nuances in the language may enhance or completely change the sentiment of the sentence. @xcite proposed a generative language model based on incongruity theory to model humorous text, using background text sources, such as wikipedia entry descriptions, and being able to construct multiple features to identify humorous comments. besides, deep learning (dl) (goodfellow et al., 2016) methods of multi-layer neural networks (nn) @xcite stacked was also a common method. ortega-bueno et al. (2018) used a recurrent neural network(rnn) @xcite that combines language features and attention-based to classify spanish tweets as humorous or not and predict how funny they are. the attention @xcite layer helps calculate the contribution of each term to the target humor category. in recent years, various pre-training models based on transformer have shown outstanding performance, and some researchers have also applied them in the field of humor detection. @xcite used a transformer framework to evaluate whether a joke was humorous, and performed well on the short joke and pun datasets. 3 methodology and data ## conclusion in this task, we detect and rate humor and offense using a deep-learning-based model. in the construction of the model, we use albert as a module of the model and add a custom network structure to further process the extracted feature vector. as for the classification task, we perform stratified-k-fold cross-validation based on the model and get the optimal value through the voting mechanism. although our system has fewer parameters and is easier to train, the performance needs to be improved. in future work, we will further optimize the system structure, so that the model can obtain rich semantic information characteristics.