Beyond Accuracy: An Explainability-Driven Analysis of Harmful Content Detection
Organizations: Upper Hand, Indianapolis, IN 46204, USA · Ace Rent a Car, Indianapolis, IN 46204, USA
Abstract
Although automated harmful content detection systems are frequently used to monitor online platforms, moderators and end users frequently cannot understand the logic underlying their predictions. While recent studies have focused on increasing classification accuracy, little focus has been placed on comprehending why neural models identify content as harmful, especially when it comes to borderline, contextual, and politically sensitive situations. In this work, a neural harmful content detection model trained on the Civil Comments dataset is analyzed explainability-drivenly. Two popular post-hoc explanation methods, Shapley Additive Explanations and Integrated Gradients, are used to analyze the behavior of a RoBERTa-based classifier in both correct predictions and systematic failure cases. Despite strong overall performance, with an area under the curve of 0.93 and an accuracy of 0.94, the analysis reveals limitations that are not observable from aggregate evaluation metrics alone. Integrated Gradients appear to extract more diffuse contextual attributions while Shapley Additive Explanations extract more focused attributions on explicit lexical cues. The consequent divergence in their outputs manifests in both false negatives and false positives. Qualitative case studies reveal recurring failure modes such as indirect toxicity, lexical over-attribution, or political discourse. The results suggest that explainable AI can foster human-in-the-loop moderation by exposing model uncertainty and increasing the interpretable rationale behind automated decisions. Most importantly, this work highlights the role of explainability as a transparency and diagnostic resource for online harmful content detection systems rather than as a performance-enhancing lever.
Figures & tables
| Metric | Value |
|---|---|
| Accuracy | 0.9405 |
| AUC | 0.9371 |
| Precision (Toxic) | 0.6242 |
| Recall (Toxic) | 0.6203 |
| F1-score (Toxic) | 0.6222 |
| Token | IG Attribution |
|---|---|
| away | 0.221 |
| war | 0.195 |
| to | 0.165 |
| firms | 0.105 |
| suspect | 0.104 |
| position | 0.100 |
| Example Type | Dominant Attribution Pattern | Observed Behavior |
|---|---|---|
| True Positive | Distributed across multiple tokens | Contextual cues collectively support correct toxic classification |
| False Positive | Concentrated on isolated lexical cue | Over-reliance on single trigger leads to misclassification |
| False Negative | Weak and diffuse attribution | Subtle or implicit toxicity not sufficiently captured |
| Long Comments | Broad attribution span | Captures long-range dependencies better than SHAP |
| Short Comments | Narrow attribution span | Limited context reduces explanatory clarity |
Content Moderation
Content moderation studies how to detect, interpret, and respond to harmful or policy-violating material across digital platforms.
See all 87 papers