Abstract
Detecting hate speech on social media is challenging due to its high dependence on social context. Traditional NLP models often treat posts as isolated text sequences, ignoring the rich relational data inherent in social platforms. We present CRUSH (Contextually Regularized and User anchored Self-supervised Hate speech detection), a framework that leverages social structure through three phases: continual pre-training on toxic corpora, user-anchored self-supervision via contrastive learning, and contextual regularization during fine-tuning. Our approach achieves significant performance improvements (1–12%) across multiple datasets while remaining efficient for inference by using context as a training-time regularizer rather than an input feature.
Introduction
Hate speech detection is a critical yet complex task in online safety. A primary hurdle is that language is deeply contextual; a statement that appears benign in isolation may be toxic when considered within a specific conversation thread or when authored by a user with a history of radicalization. Most existing models treat social media posts as independent sequences, failing to account for the "social graph"—the relationships between posts, threads, and authors.
The CRUSH framework addresses this by incorporating social context into language models without requiring expensive manual annotations or increasing computational overhead during real-time deployment.
Methodology
CRUSH operates in three distinct phases to "bake" social information into the model's representations.
Phase I: Continual Pre-training (CP)
The process begins with a standard BERT model subjected to additional Masked Language Modeling (MLM) on large, unlabeled datasets from Gab and Reddit. This phase produces a "Hate-infused Language Model" (HateLM) that is well-versed in the specific slang and semantic nuances of online hate.
Phase II: User Anchored Self-supervision (UA)
Using contrastive learning, the model is trained to recognize that posts from the same user should have similar vector representations, while posts from different users should be distinct. This "anchors" the model to individual writing styles and biases, providing a structural prior for classification.
Phase III: Contextual Regularization (CR)
During fine-tuning on labeled data, a novel loss function is introduced. Based on the observation that "hate begets hate," the model is regularized so that a post’s representation is influenced by its neighbors in a thread and other posts by the same author. Crucially, this context is used only during training to sharpen the encoder; at inference time, the model can still classify a single post in isolation.
Datasets and Evaluation
The researchers evaluated CRUSH across three diverse English-language datasets:
- HateXplain-GAB: A 3-class classification task (Hate, Offensive, Normal).
- LTI-GAB: A binary classification task (Toxic vs. Non-Toxic).
- Ruddit: A regression task for predicting "hatefulness" scores.
- Unlabeled Data: Massive dumps from Pushshift (Gab) and the Reddit API were used for the self-supervised pre-training phases.
Key Insights
- The Echo Chamber as a Feature: CRUSH treats the clustering of hateful content as a statistical signal rather than just a social phenomenon.
- Efficiency through Regularization: By using context as a regularizer rather than an input feature, CRUSH avoids the computational costs associated with processing entire threads during inference.
- Robustness: CRUSH significantly outperforms vanilla BERT in low-data scenarios, where self-supervised "user anchoring" compensates for a lack of human labels.
Results
CRUSH achieved a 1–4% improvement in F1-scores for classification tasks and a ~12% improvement in Mean Absolute Error (MAE) for regression tasks compared to state-of-the-art baselines like HateBERT and HateXplain. Qualitatively, the model demonstrated a superior ability to distinguish between "trigger words" used in benign versus hateful contexts.
Conclusion and Limitations
While CRUSH marks a significant step forward, challenges remain in detecting implicit hate and sarcasm. Furthermore, the authors caution that models pre-trained on toxic data (HateLM) must be used responsibly as filters rather than generators. Future work will explore Graph Neural Networks (GNNs) to capture even deeper relational structures.
Summary updated