Hostility Detection Dataset in Hindi

Mohit Bhardwaj, Md. Shad Akhtar, Asif Ekbal, Amitava Das, Tanmoy ChakrabortyarXiv 2020

Introduction

As digital communication expands globally, English-centric Natural Language Processing (NLP) tools often leave "low-resource" languages behind. Despite having hundreds of millions of speakers, Hindi lacks comprehensive resources for detecting online toxicity. This gap became critical during the COVID-19 pandemic, which saw a surge in hate speech and misinformation.

Existing Hindi datasets are often limited, focusing on single dimensions like "hate speech." However, real-world hostility is multi-dimensional; a single post can simultaneously be fake news, offensive, and defamatory. To address this, researchers have introduced a first-of-its-kind, multi-label dataset of approximately 8,200 Hindi social media posts annotated for various forms of hostility.

Venn diagram illustrating the overlap between different categories of hostile content (Fake, Offensive, Hate, Defamation) and Non-Hostile posts.

Methodology

The researchers developed a multi-stage pipeline to build and validate the Hindi Hostility Detection Dataset:

  1. Data Collection: ~8,200 posts were scraped from Twitter, Facebook, and WhatsApp, targeting topics from fact-checking sites and keywords related to violence or known toxic users.
  2. Annotation: Posts were manually labeled as Non-Hostile or Hostile. Hostile posts were further categorized into four overlapping dimensions: Fake News, Hate Speech, Offensive, and Defamation.
  3. Feature Extraction: The team utilized multilingual BERT (m-BERT) to generate sentence embeddings.
  4. Classification: The dataset was benchmarked using traditional machine learning algorithms: Support Vector Machines (SVM), Logistic Regression (LR), Random Forest (RF), and Multi-Layer Perceptron (MLP).

Dataset Characteristics

Released as part of the CONSTRAINT-2021 shared task, the dataset contains 8,192 posts:

  • Non-Hostile: 4,358 samples
  • Hostile: 3,834 samples
    • Fake: 1,638
    • Hate: 1,132
    • Offensive: 1,071
    • Defamation: 810

Lexical and Structural Insights

Analysis of the dataset revealed distinct linguistic "red flags" that differentiate hostile and non-hostile content:

  • Punctuation: Non-hostile posts tend to use significantly more punctuation (approx. 32% more) than hostile ones, suggesting a higher regard for formal structure.
  • Word and Letter Counts: Hostile posts generally feature longer individual words (higher average letter count) but fewer words overall compared to non-hostile posts.
  • Directed Offense: Offensive posts frequently include user mentions, indicating that "offensiveness" is often a directed attack against specific individuals.
Comparison of lexical parameters—punctuations, hashtags, and user mentions—per post across different hostility categories.

Key Results

The models were evaluated on both coarse-grained (Hostile vs. Non-Hostile) and fine-grained tasks:

  • Overall Performance: The SVM model using m-BERT embeddings achieved the highest weighted F1-score of 84.11% on the coarse-grained task.
  • Fine-grained Detection: SVM also led in detecting Hate (47.49% F1), Offensive (41.98% F1), and Defamation (43.57% F1).
  • Fake News: Logistic Regression proved most effective for the Fake News category, reaching an F1-score of 68.15%.

The relatively lower scores for fine-grained categories highlight the inherent difficulty in distinguishing between subtle types of hostility, establishing a rigorous baseline for future research.

Conclusion and Future Work

This dataset provides a critical foundation for building safer online spaces for Hindi speakers. While a significant step forward, the researchers note that expanding the dataset—particularly for smaller categories like Defamation—and incorporating multi-modal content (images/videos) are essential next steps. Additionally, addressing "Hinglish" (code-mixed Hindi and English) remains a vital frontier for Indian social media analysis.

Summary updated

BibTeX
@misc{bhardwaj2020hostility,
  author = {Mohit Bhardwaj and Md. Shad Akhtar and Asif Ekbal and Amitava Das and Tanmoy Chakraborty},
  title = {{Hostility Detection Dataset in Hindi}},
  year = {2020},
  eprint = {2011.03588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.03588},
}
Figure