Source-linked AI summary
Training-Time Explainability for Multilingual Hate Speech Detection: Aligning Model Reasoning with Human Rationales
Muhammad Deedahwar Mazhar Qureshi, Sannaan Khan, Muhammad Atif Qureshi, Wael Rashwan
TL;DR
Culturally coded and multilingual hate speech challenges opaque moderation systems, especially in English and Hinglish settings. The paper trains classifiers to align explanations with human rationales and evaluates four XAI methods across two datasets. Attention and gradient-based approaches improve classification and explanation properties, while method performance varies by dataset and explanation strategy.
Problem
Culturally coded, multilingual hate speech challenges moderation systems that remain opaque and risk biased decisions without sociocultural context.
Method
The framework adds human-rationale alignment during training and compares LIME, Integrated Gradients, Grad×Input, and attention on HateXplain and BullySent.
Results
Attention achieves the best overall F1 (HX: 0.84, BS: 0.85), while IG yields the largest Prediction Drop on both datasets.
Takeaways & Limitations
Gradient- and attention-based regularization generalizes across languages and captures culturally specific cues often missed by perturbation-based methods.
Abstract
from arXiv · showhide
Online hate against Muslim communities often appears in culturally coded, multilingual forms that evade conventional AI moderation. Such systems, though accurate, remain opaque and risk bias, over-censorship, or under-moderation, particularly when detached from sociocultural context. We propose a \emph{training-time} explainability framework that aligns model reasoning with human-annotated rationales, improving both classification performance and interpretability. Our approach is evaluated on HateXplain (English) and BullySent (Hinglish), reflecting the prevalence of anti-Muslim hate across both languages. Using LIME, Integrated Gradients, Grad X Input, and attention, we assess accuracy, explanation quality, and cross-method agreement. Results show that gradient- and attention-based regularization improve F-scores, enhance plausibility and faithfulness, and capture culturally specific cues for detecting implicit anti-Muslim hate, offering a path toward multilingual, culturally aware content moderation.
1 Introduction
The paper addresses culturally coded, multilingual anti-Muslim hate that challenges accurate and context-aware moderation. It proposes training-time rationale alignment to improve model performance and interpretability across English and Hinglish.
- Implicit, culturally coded, and code-switched hate speech creates under-moderation and over-moderation risks for Muslim communities.
- Transformer-based moderation models achieve high accuracy but remain opaque and risk bias without sociocultural context.
- The framework aligns model reasoning with human rationales during training and evaluates four integrated XAI methods.
- The evaluation spans English HateXplain and Hinglish BullySent to examine multilingual, code-switched hate detection.
- Gradient- and attention-based regularization offers the best balance of accuracy, explanation quality, and efficiency.
2 Methodology
The method trains dataset-matched transformer classifiers with composite classification and explanation losses, then evaluates rationale alignment, faithfulness, and method differences. Human rationales guide token-level regularization and post-hoc comparison across English and Hinglish datasets.
- Datasets and Pre-processing: HateXplain provides ∼20k English posts with multi-annotator rationales, while BullySent provides ∼6.5k Hinglish cyberbullying posts.
- Model Architectures: RoBERTabase models HateXplain and XLM-RoBERTa-base models Hinglish BullySent, with a Dense ReLU layer, 0.3 dropout, and sigmoid output.
- Training-Time Explanation-Based Regularization: Training combines binary cross-entropy with an explanation-alignment loss applied only to correctly predicted Detrimental Content examples.
- Training-Time Explanation-Based Regularization: Normalized token importance scores are aligned with word-level human rationales using KL divergence.
- XAI Methods: The framework compares LIME, Integrated Gradients, Grad×Input, and attention as complementary explanation strategies.
- Post-Hoc Explanation Evaluation: Post-hoc explanations are evaluated using plausibility, faithfulness, and fixed- versus variable-length rationale binarization.
3 Results and Discussion
Attention and gradient-based methods perform strongly across classification, plausibility, and faithfulness, while explanation quality depends on dataset and binarization strategy. Agreement is highest among gradient-based approaches and lowest between LIME and other methods.
- Classification: Attention achieves the best overall F1: 0.84 on HateXplain and 0.85 on BullySent, plus 0.86 BullySent accuracy.
- Plausibility: Attention leads HateXplain plausibility with IoU/Token-F1 of 0.38/0.60, while LIME leads BullySent Top-K plausibility at 0.27/0.45.
- Faithfulness: IG produces the largest Prediction Drop on both datasets: 0.72/0.74 for HateXplain and 0.82 for BullySent.
- Inter-Method Agreement: Attention and G×I show the highest Kendall’s τ agreement at ≈0.45, whereas LIME has near-zero or negative correlations with other methods.
- Qualitative Comparison: Gradient-based approaches highlight subword units within compounds, while perturbation methods operate at whole-word level and can overlook embedded cues.
4 Conclusion
The framework embeds human-aligned rationales into hate speech classifiers and improves explanation quality across English and Hinglish datasets. It addresses opaque, culturally and linguistically limited moderation systems that struggle with implicit hate.
- Training-time rationale alignment improves plausibility and faithfulness across English and Hinglish hate speech datasets.
- Transformer-based moderation systems still struggle with sarcasm, implicit hate, and culturally coded language across linguistic and cultural boundaries.
B.1 Datasets
The evaluation uses HateXplain and BullySent, which provide token-level human rationales across English and Hinglish settings. Their linguistic differences make rationale alignment particularly challenging in BullySent.
- HateXplain contains approximately 19k Twitter and Gab posts with multi-annotator token-level rationales and Hate, Offensive, or Normal labels.
- BullySent contains approximately 6.4k Hinglish posts annotated for abusive content with token-level rationales.
- BullySent’s lexical variation, spelling inconsistencies, and transliteration noise make rationale alignment more challenging.
- Annotator rationales are aggregated with the Union strategy to provide inclusive coverage of highlighted tokens.
B.2 Training Pipeline
The training pipeline matches each dataset with a suitable transformer encoder and jointly optimizes classification with human-rationale alignment. Explanation regularization is applied to correctly predicted detrimental-content examples.
- RoBERTa is fine-tuned for HateXplain, while XLM-R is used for Hinglish BullySent.
- A composite loss combines binary cross-entropy with an explanation-alignment term based on KL divergence between normalized token importance scores and human rationales.
- The alignment procedure generates token-level importance scores only for correctly predicted detrimental-content examples before matching them to human rationales.
C Extended Explainability Analysis Across Datasets
The extended analysis compares explanation plausibility and faithfulness across two datasets, four XAI methods, and two rationale-selection strategies. Metric trends are plotted over varying Top-K and threshold values using identical scales.
- Plausibility and faithfulness are evaluated on HateXplain and BullySent using Attention, Gradient×Input, Integrated Gradients, and LIME.
- Top-K and Thresholding strategies select rationales while K and τ values vary across the evaluation.
- Identical plot scales enable direct visual comparison of metric trends across the twelve analysis plots.
C.1 Intersection over Union
Attention explanations achieve the strongest overlap with human rationales across both datasets, while IG follows closely. Thresholding generally preserves rationale boundaries better than Top-K selection, especially for longer HateXplain texts.
- Attention achieves the highest IoU across both datasets and selection strategies, indicating the strongest alignment with human rationales.
- Integrated Gradients follows Attention in IoU, particularly under thresholding, where nonlinear token dependencies are captured.
- BullySent produces lower overlap and Token-F1 scores than HateXplain, while the relative method ranking remains stable.Shorter, noisier, more code-switched inputs and greater annotation sparsity make exact token overlap harder.
- Thresholding generally outperforms Top-K for token-level rationale matching, especially on HateXplain’s longer texts.
C.3 Prediction Drop
Prediction Drop identifies Integrated Gradients as the most faithful method across both datasets, while Attention also produces substantial but more variable confidence decreases. BullySent shows smaller overall drops than HateXplain, and Figure 2 depicts the training pipeline integrating explanation regularization.
- C.3 Prediction Drop: Integrated Gradients produces the largest confidence decreases after top-ranked tokens are masked, indicating the strongest faithfulness across both datasets.This pattern is interpreted as strong alignment with the model’s decision process.
- C.3 Prediction Drop: Attention also yields substantial Prediction Drop values, but they vary more across K and τ.
- C.3 Prediction Drop: Figure 2 presents a training pipeline with integrated explanation regularization.
- C.3 Prediction Drop: LIME maintains low Prediction Drop values across datasets, reinforcing concerns about its faithfulness in high-dimensional, context-dependent NLP.
- C.3 Prediction Drop: BullySent exhibits smaller overall Prediction Drop values than HateXplain, possibly because its shorter statements require only a few key tokens for classification.