# Sarcasm Detection Base on Adaptive Incongruity Extraction Network and Incongruity Cross-Attention
###### Abstract
COMET can generate rich and diverse commonsense descriptions based on natural language. COMET is an adaptive framework for building commonsense knowledge bases from language models by training them on a seed set of knowledge tuples. The sentences are fed into the pre-trained COMET model to produce the required commonsense knowledge. There is no doubt that commonsense knowledge is crucial for sarcasm detection. Commonsense knowledge also generates a great deal of useless or even irrelevant information, although it offers much effective information in sarcasm detection. The incorporation of commonsense knowledge has also proven to be important in other NLP tasks [13; 17; 18]. However, the existing models are unable to effectively utilize such external commonsense knowledge for sarcasm detection. [PERSON] et al. [13] introduced commonsense knowledge into sarcasm detection for the first time and achieved excellent results that surpassed all previous models. However, commonsense knowledge was not sufficiently utilized in his work. Three knowledge selection approaches are employed, each of which can only obtain optimal results on a certain dataset [13]. In our study, we propose the incongruity cross  
Figure 1: Examples of sarcasm detection with the help of commonsense knowledge. attention network to address this challenging issue, which performs the best by effectively testing on three datasets. Sarcasm often involves contrasting two polarities of sentiment. Here are some examples:  
\"I just love when people read my text and don't reply.\"  
\"I totally feel safe on this shuttle with the driver texting.\"  
\"I love being told what can and can't be said\". Intuitively, sentiment incongruity between words in a sentence is an important indicator for sarcasm detection. For example, [love, don't reply], [feel safe, driver texting], and [love, can, and can't be said] show a juxtaposition of positive and negative terms within a sarcastic sentence. [PERSON] et al. [19] also found this phenomenon, and called it \"incongruity\". Therefore, it is very important to capture the words with different sentiment polarities within a sentence. [PERSON] et al. [2] proposed the intra-attention method to detect incongruity. [PERSON] et al. [5] suggested an innovative self-matching module to detect sentence incongruity. However, their methods consider similarity and assign higher weight scores to highly similar words, which are unable to effectively capture the incongruity information within a sentence. Therefore, we propose an adaptive incongruity extraction module that calculates the Euclidean distance between words to address this issue. Words with different sentiment polarities can get higher weight scores, which can better extract the incongruous semantic information in the sentence. The experimental results indicate that our method can significantly improve performance in sarcasm detection. In this study, we obtain the feature representation of the text and knowledge by employing the BERT base model as the embedding layer so that words can obtain more affluent and correct semantic information [20]. In the adaptive incongruity extraction module, a learnable network is designed to automatically extract incongruity in order to capture the semantic incongruity of the text itself and the commonsense knowledge itself. Various studies on sarcasm detection have concentrated on the extraction of incongruity. They [3; 4; 19; 21; 22; 23; 24; 25] proposed rule-based extractions of incongruity that required manually designed rules for capture, as incongruity can only be identified if it satisfies the associated rules. With the emergence of deep learning, new methods [2; 5] employing attention mechanisms have achieved better performance. However, their approaches take into account similarity and assign higher weight scores to highly similar words, which does not effectively capture the incongruity information within a sentence. Incongruity can be more effectively captured when phrases with opposite sentimental polarity are given higher attention scores.