YNU - HPCC at S em E val-2022 Task 6: Transformer-based Model for Intended Sarcasm Detection in E nglish and A rabic (2022)

Abstract: In this paper, we (a YNU-HPCC team) describe the system we built in the SemEval-2022 competition. As participants in Task 6 (titled “iSarcasmEval: Intended Sarcasm Detection In English and Arabic”), we implement the sentiment system for all three subtasks in English and Arabic. All subtasks involve the detection of sarcasm (binary and multilabel classification) and the determination of the sarcastic text location (sentence pair classification). Our system primarily applies the sequence classification model of a bidirectional encoder representation from a transformer (BERT). The BERT is used to extract sentence information from both directions for downstream classification tasks. A single basic model is used for single-sentence and sentence-pair binary classification tasks. For the multilabel task, the Label-Powerset method and binary cross-entropy loss function with weights are used. Our system exhibits competitive performance, obtaining 12/43 (21/32), 11/22, and 3/16 (8/13) rankings in the three official rankings for English (Arabic).

## introduction satirical text is a rhetorical device for implicitly expressing emotions by using words that are contrary to the actual intention to achieve a satirical or humorous linguistic effect. the true semantics of satirical texts cannot be directly inferred from the text vocabulary, and contradictions exist between their literal meaning and the true intention. therefore, the detection of sarcasm and its sentiment discrimination are more challenging in natural language processing (nlp) problems. task 6 in the semeval-2022 competition is a sarcasm detection task that consists of three subtasks @xcite . in previous sarcasm detection tasks, researchers used supervised learning methods based on the support vector machines and logistic regression @xcite to study ironic and non-ironic tweets that directly express positive and negative views. however, these traditional machine learning methods cannot mine the deep semantic information hidden in the text. relying only on the surface semantic information can easily result in an incorrect judgment regarding irony. in contrast, deep learning methods show excellent results in deep semantic mining. by using the context information of the text to be detected @xcite , we can further mine the behavior information of social users. we can achieve better performance by using a bidirectional recurrent neural network to capture the syntactic and semantic information of the target tweet text and the automatic learning features of historical tweets related to the target tweet for sarcasm detection @xcite . the convolutional long-term and short-term memory network (cnn-lstm-dnn) @xcite achieved remarkable results. in this paper, we propose a deep learning system for task 6 in semeval-2022, titled "isarcasmeval: intended sarcasm detection in english and arabic." we use a pre-trained bidirectional encoder representation from a transformer (bert) @xcite sequence classification model as the base model. for single-sentence and sentencepair binary classification tasks, we use fine-tuning methods on a basic model. we employ the label-powerset @xcite approach and train the basic model by applying a binary cross-entropy loss function with weights for the multi-label task. the contributions of this study are as follows. the remainder of this paper is organized as follows. in section 2, we describe the proposed system and model in detail. the experiments and results are discussed in section 3. finally, conclusions are presented in section 4. ## system description the general structure of our system consists of four modules, described as follows. input layer. in this layer, we build text-processing tools to perform pre-processing of text and embedding of words. a large amount of useless information in the given text, such as user (@user), url ( http://ie.com ), and escape symbols (\s, \j, etc.), increases the computational effort and complexity of a model. we remove the useless information in advance by using regular expressions and convert all words to lowercase, without breaking the structure of hashtags (#hashtag). we believe that the search and tagging of these tweets depends mainly on their hashtags @xcite . the preservation of the hashtag structure improves the accuracy of sarcasm detection. tokenizers provided by hugging-face 1 are used to process information such as punctuation, emoticons, non-english (or non-arabic) letters, numbers, and hashtags (#hashtag) that are still present in the text and to rapidly perform word separation. tokenizers can also perform word embedding using continuous low-dimensional vectors to represent word features @xcite . in this layer, we obtain the sequence of representations to be used as inputs to the subsequent modules. context encoder. devlin et al. proposed a new natural language representation model named bert in 2018, which successfully achieved state-of-theart results in 11 nlp tasks, winning a plethora of accolades from the nlp community. the model is based on a bidirectional transformer for large-scale pre-training and can be fine-tuned by users to handle different text-processing tasks. one variant of the bert is roberta @xcite , which enhances the effect of the bert by improving its pre-training method without affecting the structure of the bert. unlike the bert static mask approach, roberta uses dynamic masks, where the tokens masked for each sequence are changed in different epochs of training. roberta removes the nsp task and uses the full-sentences training approach. roberta also uses a larger minibatch, more data, and larger number of sentences. therefore, the roberta-pretrained model yields better results. in this module, we mainly use the pre-trained bert model and its variant roberta model to complete the contextual encoder. fully connected layer. fully connected networks are used for downstream classification tasks. output layer. the output of the fully connected layer is processed to complete the label prediction. different tasks require different processing methods. the details of each subtask in each module are discussed in the following. ## experimental datasets. the datasets used were the english dataset (3467 data) and arabic dataset (2602 data) provided by the competition, with no other external corpus. only one dataset in english was used for subtask b, except for subtasks a and c, in which two sub-datasets were used. we thank the organizers for their contributions to the data. evaluation metrics. the main evaluation metrics are as follows: ## conclusion in this paper, we describe a deep learning model for the sentiment analysis task in the semeval-2022 competition (task 6: isarcasmeval: intended sarcasm detection in english and arabic). a bert sequence classification model was used as the base model. the final submitted system performed admirably and ranked third in one of the rankings. however, there is still considerable potential for improvement. therefore, in future investigations, we will attempt to extend this model with improved capabilities to achieve better outcomes.