# Sarcasm Detection Base on Adaptive Incongruity Extraction Network and Incongruity Cross-Attention
## 4 Experiment
### Model Visualization  
In this part, we visualize the weight scores to demonstrate the mechanism of the adaptive incongruity extraction module and incongruity cross-attention module. The adaptive incongruity extraction module extracts the incongruity in the sentence by calculating the weight scores between words. To make the calculation of the weights learnable, we will apply three different linear transformations to the features after the word embedding, which will change the original meaning of the weight scores. Weight scores are automatically learned to assign higher weights to incongruuous words. In Figure 4, the text sequence is \"nothing better than watching movies with my dog on this Friday night\", and the commonsense knowledge sequence is \"be entertain cry depression be bore boredom\".  
For the adaptive incongruity extraction module, Figure 4a shows the attention weight scores of a text obtained after the model is trained. It is evident that \"with\", \"dog\", \"nothing\", \"than\", and \"watch\" have the highest weighting scores. Specifically, \"with\", \"dog\" and \"watching\", \"movie\" have high scores. At the same time, \"with\", \"dog\", \"better\", and \"than\" have high scores. The above phrases have strong inconsistent semantics among themselves, and our module gives them high weight scores, indicating that it can capture the incongruent semantics effectively. The phrase \"with my dog\" is the key to determining whether it is sarcasm. Therefore, \"with\" and \"dog\" are given very high weight scores along with other words. Next, it adds the vectors \"with\" and \"dog\" multiplied by the weights to the corresponding word. Similarly, \"nothing better than\" represents positive sentiment words, which are also assigned high weights. These reinforce the incongruity information on the corresponding word vector.  
For the incongruity cross-attention module, Figure 4b shows the incongruity cross-attention scores between the text and the corresponding commonsense knowledge. Text sequence is used as the query vector. In this text sequence, the emotion \"entertain\" is easily discernible, whereas the emotion \"bore\" is more difficult to locate and comprehend. Therefore, we should pay more attention to the \"bore\" in commonsense knowledge to better understand the meaning of this sentence. Our incongruity cross-attention scores also corroborate our analysis. The words \"bore\", \"cy\", and \"depression\" have the highest cross-attention scores, which represent negative emotional words, and they are the main sentiment of the text sequence, indicating that we have accurately captured the correct words. Next, the term \"entertain\" also has a high attention score, which represents a positive emotional word. For the judgment of sarcasm in this text, we can easily find the positive sentiment of \"entertain\", but it is challenging to find the negative emotion of \"boring\". In this text, the negative semantics of \"bore\" are much more important, so \"entertain\" has a slightly lower attention score than \"bore\".  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Twitter-G** & **Twitter-P** & **Reddit-Pol** \\ \hline
**Method** & & **F1 Score** & \\ \hline
**Method (ours)** & **0.8751** & **0.8612** & **0.7658** \\ Method (\(-\)gate) & 0.8708 & 0.8519 & 0.7462 \\ Method (\(+\)concat) & 0.8666 & 0.8580 & 0.7503 \\ Method (\(+\)add) & 0.8662 & 0.8563 & 0.7523 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Experimental results of ablation study concerning the gate mechanism. The best result is in boldface.  
It shows that the adaptive incongruity extraction network and the incongruity cross-attention network perform well in extracting incongruent information and words with distinct sentiment polarity, which actually demonstrates the effectiveness of the two modules.