Abstract
Hate speech detection datasets often suffer from selection bias due to keyword-based collection methods. This paper introduces two label-agnostic metrics, $B_1$ (Average Stability) and $B_2$ (Keyword Presence), to quantify this bias across eleven datasets in seven languages. Results demonstrate that these metrics are robust to hyperparameter changes and effectively reveal the "keyword trap" in data collection, providing a path toward more representative hate speech corpora.
Introduction
The "needle in a haystack" nature of hate speech on social media necessitates targeted data collection, typically using keywords, slurs, or hashtags. However, this process introduces significant selection bias. Models trained on such data may learn to associate specific neutral terms (e.g., "refugee") with hate speech, leading to high false-positive rates. This research shifts the focus from post-hoc model debiasing to measuring the bias inherent in the data collection process itself, without requiring manual ground-truth labels.
Methods
The proposed framework utilizes Latent Dirichlet Allocation (LDA) for topic discovery and multilingual Babylon embeddings for semantic similarity analysis. Two primary metrics are defined:
- $B_1$ (Average Stability): The mean semantic similarity between discovered topic words and the original search keywords. It indicates how much the latent meaning of the dataset revolves around the search terms.
- $B_2$ (Keyword Presence): The frequency with which search keywords (or close synonyms) appear as top words in discovered topics.
To ensure these metrics are robust and not artifacts of specific model configurations, the authors evaluate them across a range of topics and words (from 2 to 100).
Datasets and Experimental Setup
The study evaluates 11 benchmark datasets spanning 7 languages: English, French, German, Arabic, Italian, Portuguese, and Indonesian. This cross-lingual approach allows for the identification of universal patterns in selection bias. For instance, while European datasets often focus on immigrants, Arabic and Indonesian datasets frequently center on religious and sectarian conflicts.
Key Results and Analysis
- Metric Robustness: As shown in Figure 1, both $B_1$ and $B_2$ scores remain remarkably consistent regardless of whether the LDA model is configured for 10 or 100 topics, proving they are reliable measures of a dataset's inherent properties.
- The "Keyword Trap": Datasets collected via narrow keyword lists (such as the German and French sets) exhibited higher $B_1$ scores. The German dataset, for example, reached a $B_1$ of 0.41, indicating it is highly specialized around its initial search terms related to the refugee crisis.
- Collection Strategy Impact: One Arabic dataset (AR3) collected via specific political/religious accounts rather than keywords showed significantly lower bias. This suggests that account-based sampling captures a more diverse range of natural language.
- Domain-Specific Embeddings: When training custom Word2Vec embeddings on hate speech data, $B_1$ scores increased. This suggests that general-purpose embeddings may underestimate bias by missing the "coded" or slang meanings of hateful terms.
Discussion and Limitations
While $B_1$ and $B_2$ provide a reliable means to assess dataset "tethering" to search terms, they rely on researchers reporting their original keyword lists. Furthermore, while the metrics are stable, LDA is inherently stochastic, which can lead to minor variations. The authors suggest integrating these metrics directly into the data collection pipeline to allow researchers to identify and adjust for "keyword bubbles" in real-time.
Conclusion
Quantifying selection bias is a critical step toward building robust hate speech classifiers. By providing label-agnostic metrics, this research enables a more critical evaluation of existing benchmarks and offers a methodology for developing more balanced, representative datasets in the future.
Summary updated