Abstract
Although social media platforms are a prominent arena for users to engage in interpersonal discussions and express opinions, the facade and anonymity offered by social media may allow users to spew hate speech and offensive content. Given the massive scale of such platforms, there arises a need to automatically identify and flag instances of hate speech. Although several hate speech detection methods exist, most of these black-box methods are not interpretable or explainable by design. To address the lack of interpretability, in this paper, we propose to use state-of-the-art Large Language Models (LLMs) to extract features in the form of rationales from the input text, to train a base hate speech classifier, thereby enabling faithful interpretability by design. Our framework effectively combines the textual understanding capabilities of LLMs and the discriminative power of state-of-the-art hate speech classifiers to make these classifiers faithfully interpretable. Our comprehensive evaluation on a variety of English language social media hate speech datasets demonstrate: (1) the goodness of the LLM-extracted rationales, and (2) the surprising retention of detector performance even after training to ensure interpretability.
Introduction
Hate speech detection is a high-stakes task where automated decisions can significantly impact both free speech and community safety. While current state-of-the-art models—primarily based on Transformer architectures like BERT—are highly accurate, they are essentially "black boxes." They can flag a post as hateful but cannot explain why they made that choice. This lack of interpretability makes it difficult for human moderators to trust these systems, debug biased predictions, or handle "domain shifts" where the nature of hate speech evolves.
In this work, we introduce SHIELD, a framework that bridges this gap by creating a model that is inherently explainable. By forcing the final decision to be explicitly tied to human-understandable features extracted from the text, we ensure "interpretability by design."
Methodology: The SHIELD Framework
The SHIELD framework uses a "two-pronged" approach to classification, combining the deep linguistic understanding of LLMs with the discriminative power of specialized detectors.
LLM Feature Extraction
Instead of asking an LLM (such as GPT-3.5) to classify text directly—a task where LLMs often struggle with consistency—we utilize it as a sophisticated feature extractor. The LLM is prompted to identify rationales, derogatory language, and cuss words within the input text. These rationales act as a "denoising" signal, helping the classifier focus on robust, discriminative features.
Embedding Fusion and Classification
The framework processes input through two parallel paths:
- Raw Text Path: The original input text is passed through a base detector (HateBERT) to obtain a general representation.
- Rationale Path: The LLM-extracted rationales are embedded using a standard BERT model.
These two representations are concatenated and passed through a Multi-Layer Perceptron (MLP) to make the final "Hate" vs. "Non-hate" prediction.
Experimental Evaluation
We evaluated SHIELD across five diverse English-language datasets to ensure robustness across different social media environments: GAB, Reddit, Twitter, YouTube, and an Implicit Hate Speech (Implicit HS) corpus. The latter is particularly challenging as it focuses on subtle abuse that lacks obvious slurs.
Key Results
Our evaluation demonstrates that SHIELD does not sacrifice accuracy for interpretability. Across all datasets, SHIELD performed at par with or better than strong black-box baselines.
As shown in the results, SHIELD achieved a state-of-the-art accuracy of 94.5% on the Reddit dataset. Furthermore, on the difficult Implicit HS dataset, SHIELD matched the performance of the best baseline (78%), proving its effectiveness in detecting nuanced forms of hate speech.
Discussion
A significant insight from our study is that LLMs are better "experts" than "judges." While direct one-shot classification by ChatGPT (GPT-3.5) often achieved only ~60% accuracy, its ability to identify the components of hate speech was exceptional. The rationales extracted by the LLM showed significant overlap with human-annotated rationales, suggesting that LLMs can effectively automate the process of rationale labeling.
Conclusion and Future Work
SHIELD provides a path toward more transparent and trustworthy automated content moderation. While the current implementation relies on proprietary APIs, future work will explore the use of open-source LLMs to improve accessibility. Additionally, we envision a "hybrid" future where LLMs extract rationales at scale, which are then verified by human experts to ensure the highest quality of training data and model accountability.
Summary updated