Introduction
Detecting offensive content online is a persistent challenge due to the fluid nature of language and platform-specific norms. What is considered offensive on one social media site may be viewed as neutral on another, leading to models that perform well on specific datasets but fail to generalize to real-world, cross-platform environments. Furthermore, most existing detection tools operate as "black boxes"—they may flag a post for a violation but cannot provide a human-understandable justification for the decision.
While some datasets include human-provided "rationales" (specific snippets of text that triggered a label), these are often fragmented and insufficient for explaining complex policy violations to users. To address these issues, researchers have introduced HateCOT, a massive dataset of over 52,000 offensive speech samples paired with detailed, "Chain-of-Thought" (CoT) style explanations. This approach aims to teach models not just to label content, but to reason through the underlying definitions of offensive speech.
The HateCOT Dataset and Methodology
The core innovation of this work is the construction of the HateCOT (Hate-related Chain-of-Thought) dataset. The authors aggregated eight existing offensive speech datasets and utilized GPT-3.5-Turbo to transform raw human rationales into coherent, step-by-step explanations.
To ensure the generated explanations remained faithful to the source material, the authors employed Annotation-Guided Generation. Rather than allowing the Large Language Model (LLM) to generate explanations freely, they prompted it using the original human-provided targets and rationales. This constrained the model to explain the specific reasoning path intended by the human annotators.
The researchers also optimized the dataset for "reasoning diversity," finding that providing three distinct reasoning paths per sample yielded the best performance. These explanations serve as a "distillation" mechanism, teaching smaller, open-source models like Llama 2 and FLAN-T5 how to apply complex definitions to nuanced social media text.
Experimental Setup and Benchmarking
To test the generalizability of models trained on HateCOT, the authors evaluated them on three distinct benchmark datasets that were entirely excluded from the training phase:
- HateCheck: A functional suite designed to test specific, difficult hate speech cases.
- HateXplain: A dataset focused on explainable hate speech detection.
- Latent_Hate: A dataset targeting "covert" or implicit offensive content.
Models were tested in zero-shot, few-shot, and in-context learning scenarios to determine if the explanation-based pretraining improved their ability to handle unseen data.
Key Results and Insights
Pretraining on HateCOT led to significant performance boosts across all benchmarks. For instance, Llama 13B saw a 27.9% increase in F1 score on HateCheck and a 118.5% increase on HateXplain in zero-shot settings compared to the base model.
One of the most striking findings is the data efficiency provided by HateCOT. As shown in the performance plots, a model pretrained on HateCOT and then finetuned on just 256 samples of a new dataset can often outperform models trained on the entire original dataset without the HateCOT boost. This suggests that the reasoning learned during the HateCOT phase acts as a bridge between different labeling schemas.
Beyond raw performance, the quality of the explanations was also superior. In human evaluations, annotators preferred the explanations from HateCOT-pretrained models over base models 75.2% of the time for the COT-T5-XL model. However, "Implicit Hate" (such as sarcasm or coded language) remains a challenge, with models generally scoring lower on these nuanced tasks compared to overt hate speech.
Limitations and Future Work
Despite the success of HateCOT, the authors acknowledge several limitations. The current dataset is restricted to English, and the impact on massive models (e.g., Llama-70B) remains untested due to hardware constraints. Additionally, using GPT-3.5 to generate training data carries the risk of propagating the specific biases of that model. Future research will focus on expanding the corpus to include multi-lingual data and integrating these reasoning-based models into real-time content moderation pipelines to provide transparent feedback to users.
Summary updated