Hate Speech Detection in Nepali Social Media: A Comparative Analysis of Machine Learning and Transformer-based Approaches
Abstract
The growth of hate speech on social media presentsserious problems for low-resource languages like Nepali, asautomated detection systems for the Nepali language are underdeveloped.This paper presents a comprehensive approachfor detecting hate speech in Nepali social media by combininglexicon-based feature engineering with machine learning andtransformer-based models. The NEHATE dataset, which included13,505 annotated tweets from Nepal’s municipal election discoursein 2022, was used for this study along with a curatedlexicon of 1,077 offensive terms divided into classes such asPolitics (115 terms), Race (77), Vulgar (50), Disability (37), andGender (15). The lexicon includes 159 taboo terms and 158severely offensive terms, with ratings ranging from 1 (mild) to 5(severe). The methodology uses the lexicon for feature engineeringrather than training data, extracting offensive term counts, maximumoffensiveness scores, taboo presence, and category-specificindicators. Two traditional machine learning models – NaiveBayes and Gradient Boosting were applied using character-levelTF-IDF (n-grams 2–5) with lexical characteristics. Additionally,three multilingual transformers—mBERT, XLM-RoBERTa, andMuRIL were fine-tuned. The pre-processing pipeline handlesboth Devanagari script and Romanized Nepali text commonon social media. Experimental results on an 80-20 train-testsplit demonstrate that Random Forest Classifier achieves thebest performance among traditional machine learning models(F1-score: 0.847, AUC-ROC: 0.912), while MuRIL outperformsother transformer models (F1-score: 0.863). Also for the ablationstudy lexicon enhanced features improve F1-score over TF-IDFalone. This study demonstrates that lexicon-enhanced featureengineering significantly improves hate speech detection in lowresourcelanguages and provides practical recommendationsfor developing content moderation systems for Nepali-speakingcommunities.
Fields of Study & Subjects
Hate Speech and Cyberbullying Detection
Sentiment Analysis and Opinion Mining
Topic Modeling
Publication details
- Journal / source
- Proceedings of International Conference on Innovation in Computing Science Engineering and Technology
- Volume
- 2
- Issue
- 1
- Publication date
- 19 January 2026