Data-Efficient Hate Speech Detection via Cross-Lingual Nearest Neighbor Retrieval with Limited Labeled Data

Faeze Ghorbanpour, Daryna Dementieva, Alexander Fraser · DOI

Hate speech detection is a critical component of modern content moderation, yet its development remains heavily biased toward English. For most of the world's languages, creating labeled datasets is a significant bottleneck—not only due to the financial cost but also the psychological toll on human annotators. While cross-lingual transfer learning offers a potential solution, traditional methods often rely on training on massive, noisy multilingual datasets, which is computationally expensive and prone to overfitting.

This paper introduces a more surgical approach: Retrieval-Augmented Fine-Tuning. Instead of training on every available data point, the authors use a tiny set of target-language examples to retrieve only the most semantically relevant instances from a massive multilingual pool, achieving state-of-the-art performance with high efficiency.

The Retrieval-Augmented Pipeline

The proposed method consists of four distinct stages designed for maximum data efficiency:

  1. Embedding: Using BAAI/bge-m3, a state-of-the-art multilingual sentence embedder, instances from 14 different datasets are mapped into a shared 1024-dimensional vector space.
  2. Indexing and Retrieval: The authors utilize the FAISS library (specifically the HNSW algorithm) to index approximately 265,000 instances. When presented with a small target-language sample (e.g., 20 Hindi tweets), the system identifies the top-k nearest neighbors across the entire multilingual pool based on Euclidean distance.
  3. Diversity via MMR: To ensure the model doesn't overfit to a single cluster of near-identical examples, the authors optionally apply Maximum Marginal Relevance (MMR) to balance relevance to the query with diversity among the retrieved results.
  4. Fine-tuning: The final model, XLM-T (a version of XLM-RoBERTa optimized for Twitter), is fine-tuned on the combination of the small target dataset and the retrieved cross-lingual instances for binary classification (Hate vs. Non-Hate).

Experimental Design and Datasets

The researchers constructed a massive retrieval pool of ~265,000 instances across 14 datasets. This included six English datasets (such as HateXplain and Implicit_hate) and eight non-English target datasets covering Spanish, Portuguese, Hindi, Arabic, French, Italian, Turkish, and German. This diverse set allowed the researchers to test the method's effectiveness across different linguistic families and cultural contexts.

Key Insights: Efficiency and Performance

The research yields several counter-intuitive and highly practical insights for the NLP community:

1. The "Less is More" Principle

A significant finding is that performance does not scale infinitely with more data. The authors observed that performance typically peaks when retrieving around 2,000 instances. Beyond this point, the introduction of noise, domain shifts, and dataset-specific biases begins to degrade the model's accuracy. This suggests that a "surgical" selection of data is superior to "brute-force" multilingual training.

2. Superiority in Data Scarcity

The method shines brightest in extreme low-resource settings. In scenarios with fewer than 50 labeled target instances, the retrieval-augmented approach achieved up to a 10% F1-macro improvement over standard monolingual training. It also outperformed established baselines that use significantly more data (e.g., 20,000 English samples) for intermediate training, all while requiring no manual selection of source tasks.

3. Natural Cross-Lingual Affinities

The retrieval process naturally identified linguistic and cultural proximities. For instance, the system frequently retrieved Italian data to support Spanish targets and Portuguese data for French targets. This demonstrates that semantic similarity in the embedding space effectively captures cross-lingual relationships that are beneficial for transfer learning without human intervention.

Limitations and Future Work

Despite its success, the method has limitations. It is not a purely zero-shot approach; it requires a small "seed" of labeled data in the target language to act as queries. Furthermore, the retrieval pool is currently 67% English, which may limit its effectiveness for languages typologically distant from the Indo-European family. Additionally, the contextual nature of hate speech means that cultural differences in definitions across the 14 datasets could introduce annotation inconsistencies.

Future work will focus on expanding the retrieval pool to include more non-Western languages and investigating the specific linguistic features that drive successful cross-lingual transfer. By understanding why certain examples are retrieved, researchers hope to develop even more interpretable and robust detection systems for global safety.

Summary updated

BibTeX
@misc{ghorbanpour2025data,
  author = {Faeze Ghorbanpour and Daryna Dementieva and Alexander Fraser},
  title = {{Data-Efficient Hate Speech Detection via Cross-Lingual Nearest Neighbor Retrieval with Limited Labeled Data}},
  year = {2025},
  eprint = {2505.14272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.14272},
}
Figure