# Hate Speech Detection by Using Rationales for Judging Sarcasm
## 6 Discussion
**LIME:**LIME [25], or Local Interpretable Model-agnostic Explanations, enhances the interpretability of complex machine learning models, particularly for text data. It operates by generating new samples around the instance being explained through perturbation--slightly modifying the original data point to create a dataset of \"synthetic\" samples that are similar to the original instance. LIME then monitors how the predictions change with these modifications. Subsequently, LIME constructs a simpler, interpretable model that approximates the original model's behavior within a local region around the perturbed instance. This model identifies and highlights the words or phrases that significantly influence the model's decisions. By demonstrating how predictions shift when key text elements--termed rationales--are included or excluded, LIME helps in assessing the model's robustness and its reliance on specific features for decision-making. This methodology is crucial for applications requiring high interpretability, such as content moderation or hate speech detection, where understanding the basis of the model's decisions is essential for user trust and the validation of the model's effectiveness. Figure 8 shows how LIME selected tokens for both baseline and proposed method along with the prediction probabilities for the toxic category, as evidenced by an example of hate speech data. For both the baseline and proposed method, the token selection was diverse, which led to distinct label predictions for each method. In Figure 8, the classification approaches of the baseline and proposed methods are compared using the BERT model, as illustrated by LIME. Figure 8 shows the baseline method utilizing BERT. Here, BERT marked tokens via LIME for a text example, demonstrating how each token influenced the classification, with the offensive category predicted with the highest probability. This highlights the baseline's sensitivity to specific trigger words, classifying them typically as offensive without deeper contextual analysis. Conversely, Figure 8 depicts the proposed method, also applying BERT with LIME to mark tokens. This method, however, assigned the highest prediction probability to the hate speech category, aligning more closely with the contextual use of the terms within the dialogue, hence providing a more accurate representation of the original label, which was hate speech. This contrast between the two figures illustrates the proposed method's enhanced ability to contextualize and accurately classify complex expressions of hate speech, leveraging the nuanced understanding capabilities of the BERT model. Figure 8: LIME-marked tokens that were deemed important for classification. (**a**) Baseline. (**b**) Proposed method. The details of Figure 8 is explained in Table 3. The first two rows depict the \"rationale\" chosen by the annotators of the HateXplain paper [13] and our annotators, which they deemed essential for the classification task. The last two rows showcase significant tokens using LIME for the BERT model, encompassing both the baseline and proposed method. From Table 3, the details can be observed for the baseline ground truth attention calculation; therein, even though the BERT model marked the same \"rationale\" as the HateXplain human annotators, it assigned the wrong label (offensive speech--OF). But, for the proposed ground truth attention calculation, the BERT model marked almost the same \"rationale\" as that of our annotators and assigned the right label (hate speech--HS).