TL;DR
This paper introduces SGHateCheck, a novel framework for evaluating hate speech detection models in Singapore's diverse linguistic landscape. By extending existing functional testing approaches with LLM-powered translation and native annotator refinement, SGHateCheck reveals critical limitations in current models, particularly their inadequacy in handling nuanced, culturally specific hate speech.
What Problem Does This Paper Address?
Hate speech detection models are crucial for moderating online content, but their evaluation often relies on standard held-out test sets. This method can miss systematic gaps and biases, especially in diverse linguistic and cultural contexts. Singapore, with its mix of English, Mandarin, Tamil, and Malay, presents a unique challenge. Existing models, often trained on Western data, struggle to capture the nuances of hate speech in Southeast Asian (SEA) languages and cultures. This paper addresses this gap by creating a specialized evaluation framework for this under-resourced region.
Methods
The core of SGHateCheck is an extension of the functional testing approach pioneered by HateCheck and MHC. Instead of manual translation of test cases, SGHateCheck leverages Large Language Models (LLMs) to translate and paraphrase existing templates into Singapore's primary languages. These machine-generated translations are then refined by native annotators to ensure cultural accuracy and sensitivity. This approach allows for the creation of a comprehensive set of functional tests tailored to the specific linguistic and cultural nuances of Singapore and the broader SEA region. The framework includes 28 functional tests for Singlish, 26 for Mandarin, and 21 each for Malay and Tamil, covering various forms of hate speech, including derogatory remarks, threats, slurs, and profanity, as well as contrastive non-hateful examples.
Datasets
The paper introduces SGHateCheck, a new benchmark dataset comprising over 21,152 test cases. These cases are derived from existing HateCheck templates, translated and refined for Singaporean languages. The dataset is annotated with gold labels indicating hateful or non-hateful content.
For training and evaluating benchmark LLMs, the authors utilized:
- EngSet: An English-language dataset combining data from Twitter Hate (Waseem and Hovy, 2016) and HateXplain (Mathew et al., 2021).
- MultiSet: A multilingual dataset incorporating Mandarin and Malay examples from COLD (Deng et al., 2022) and HateM (Maity et al., 2023).
Key Insights and Ideas
- LLMs are powerful for translation, but human refinement is crucial: While LLMs significantly accelerate the translation process for low-resource languages, native annotators are essential for ensuring cultural relevance and accuracy, especially for nuanced expressions of hate.
- Standard datasets miss critical nuances: Even advanced, fine-tuned LLMs exhibit significant limitations when tested on SGHateCheck, particularly in distinguishing between genuinely hateful content and non-hateful expressions that use similar language or target protected groups without malice.
- Bias towards non-hateful classification: A common failure mode observed is the tendency for models to misclassify ambiguous cases as non-hateful, which could have serious implications for content moderation.
- Localized testing is paramount: The study highlights that models performing well on general English datasets may falter when faced with the specific linguistic and cultural contexts of Singapore, underscoring the need for region-specific evaluation frameworks.
- Cross-lingual transfer has limits: While multilingual fine-tuning generally improves performance, the effectiveness varies across languages, with Tamil showing particularly low F1 scores, suggesting language-specific biases and challenges.
Key Results
The paper evaluated several state-of-the-art LLMs (mBERT, LLaMA2, Mistral-7B, SEA-LION-7B, and SeaLLMv1-7B) using SGHateCheck.
- Mistral-7B generally showed strong performance, outperforming others on many tests, though it had specific weaknesses in certain Mandarin functionalities.
- SEA-LION and mBert exhibited a notable bias towards classifying ambiguous cases as non-hateful, leading to lower F1 scores in certain areas.
- MultiSet-tuned models generally performed better than EngSet-tuned models, demonstrating the benefit of multilingual training data.
- Tamil consistently showed lower F1 scores across models, indicating a significant challenge in detecting hate speech in this language.
- Specific functional tests revealed vulnerabilities, such as models struggling with denunciations of hate speech (F18) and abuse targeting non-protected groups (F21, F22).
- Performance varied significantly across protected groups, with "Seniors" receiving the lowest average F1 score and "Muslims" the highest.
Limitations and Future Work
The authors acknowledge several limitations:
- Fixed template-placeholder pairs: The reliance on fixed templates and placeholders for generating test cases limits the flexibility and may not fully capture all forms of hate speech, such as nuanced expressions targeting transgender individuals or code-switching common in Singapore.
- Focus on model weaknesses: While SGHateCheck excels at identifying model weaknesses, it doesn't fully account for external context or the entire spectrum of protected groups.
- Monolingual approach for some tests: The direct translation of templates without considering local nuances might not fully reflect real-world hate speech usage.
Future work could involve developing more dynamic test case generation methods, incorporating external context, and expanding the coverage of protected groups and linguistic phenomena. The authors also suggest that SGHateCheck can serve as a foundation for further research into HS detection in other low-resource languages and regions.
Summary updated