Source-linked AI summary
Bangla hate speech detection on social media using attention-based recurrent neural network
Amit Kumar Das, Abdullah Al Asif, Anik Paul, Md. Nur Hossain
TL;DR
Online harassment motivates automated hate-speech detection, while the paper identifies limited prior work in Bangla despite widespread use of the language. It evaluates an encoder–decoder recurrent approach on Bengali Facebook comments, and the attention-based decoder achieves the highest reported accuracy at 77%.
Problem
The paper addresses hate-speech detection amid online harassment and limited prior research in Bangla, a language widely used on social media.
Source: §1 · p. 1Method
The study applies a Conv1D encoder with recurrent decoders, including LSTM, GRU, and attention-based variants, to Bengali Facebook comments.
Source: §1 · p. 2, §3 · pp. 8–9Results
77% accuracy for the attention-based decoder, compared with 74% accuracy for both LSTM and GRU decoders.
Source: §4 · p. 11Takeaways & Limitations
The attention mechanism performed better than the other algorithms on both binary and multi-class label datasets.
Source: §4 · p. 12The authors identify mixed English–Bangla comments and photo comments as areas for future dataset and model extensions.
Source: §5 · p. 13
Abstract
from arXiv · showhide
Hate speech has spread more rapidly through the daily use of technology and, most notably, by sharing your opinions or feelings on social media in a negative aspect. Although numerous works have been carried out in detecting hate speeches in English, German, and other languages, very few works have been carried out in the context of the Bengali language. In contrast, millions of people communicate on social media in Bengali. The few existing works that have been carried out need improvements in both accuracy and interpretability. This article proposed encoder decoder based machine learning model, a popular tool in NLP, to classify user's Bengali comments on Facebook pages. A dataset of 7,425 Bengali comments, consisting of seven distinct categories of hate speeches, was used to train and evaluate our model. For extracting and encoding local features from the comments, 1D convolutional layers were used. Finally, the attention mechanism, LSTM, and GRU based decoders have been used for predicting hate speech categories. Among the three encoder decoder algorithms, the attention-based decoder obtained the best accuracy (77%).
1 Introduction
Social media enables harassment through hateful content, while Bangla is widely used online despite limited research on hate-speech detection in the language. This study introduces a 7,425-comment dataset and compares recurrent decoder approaches, with attention reaching 77% accuracy.
1 Introduction
- Social media harassment includes sexism, racism, and other forms of hate, prompting researchers to automate the identification and removal of harmful content.A cited 2017 survey found that 41% of 4,248 US adults had personally experienced online harassment.Source: §1 · p. 1
- Bangla has about 205 million native speakers, and 42 million Facebook users use it to comment, post, or share.The passage contrasts this widespread use with its statement that much abusive-text research has focused on English.Source: §1 · p. 2
- 77% accuracy was obtained with the attention mechanism, compared with 74% for the other decoder algorithms.The article also describes a Bangla Emot Module for identifying emotions behind emoji and emoticons.Source: §1 · p. 2
- The dataset contains 7,425 Bengali Facebook comments classified into seven categories, including hate speech, aggressive comments, religious hatred, and suicidal comments.Comments came from Facebook pages, collected through the Graph API and manually.Source: §1 · p. 2
2 Related work
Prior work spans English and other languages, but Bangla studies had comparatively limited datasets and methods. This article extends a six-class Bengali dataset, introduces attention and an emoticon-based sentiment module, and relates its approach to earlier classification work.
2 Related work
- English SVM work using character and word n-grams reported 78% accuracy across hate, offensive, and normal classes [12].Other cited English approaches reported around 4% and then a further 7% improvement in F1 score.Source: §2 · p. 2
- The Twitter-based LSA method reported 57.9% average accuracy, while random forest on a Twitter dataset of 14,509 identified hate speech and offensive words, outperforming AdaBoost and Neural Network at 0.722 accuracy.Source: §2 · p. 3
- Studies in Amharic and Indonesian reported 79.83% accuracy with Word2Vec and an 85% F1 score with SVM; HASOC reported language-specific Macro-F1 scores.The HASOC scores were 0.78 for English, 0.81 for Hindi, and 0.61 for German.Source: §2 · p. 3
- This article uses 2,500 cleaned comments from the earlier study and adds 4,925 collected through the Facebook Graph API, introducing suicidal comments as a seventh class.The authors describe suicidal comments as an increasingly common social-media category.Source: §2 · p. 3
- A Bengali Unicode study reported 78% accuracy for linear-kernel SVM, while prior stemming could remove suffixes without following proper Bengali grammatical rules.The related work also contrasts Unicode-only processing with a study using words and emoticons.Source: §2 · p. 3
- An earlier Bangla study annotated 5,126 comments in six classes, with GRU achieving 70.10% accuracy and random forest 52.20%.The earlier work compared several machine-learning algorithms and a GRU-based model.Source: §2 · pp. 3–4
- The article presents the first use of attention for Bangla hate-speech detection and adds a sentiment-analysis module using emoticons.The module is intended to help clarify the type of hate speech in Bangla.Source: §2 · p. 4
3 Method
The method preprocesses Bangla Facebook comments and classifies them into seven categories using a Conv1D encoder with recurrent decoders, including an attention-based decoder. It also converts emoji and emoticon meanings into Bangla text and compares multiple feature and classification approaches.
3 Method
- The data are split 80/20, and the approaches use TF-IDF and learned word embeddings alongside CNN, bidirectional LSTM, GRU, and attention-RNN classifiers.The embedding layer learns vector representations during training; TF-IDF weights are normalized so longer documents are not given more weight.Source: §3 · pp. 4, 7
- Seven labels cover hate speech, aggressive comments, religious hatred, ethnic attacks, religious comments, political comments, and suicidal comments.Political comments can be hateful or non-hateful, while religious and suicidal comments are categorized as non-hateful in the dataset description.Source: §3 · pp. 5–6
- Preprocessing tokenizes Bangla text, removes nonletters and tokens occurring fewer than five times, stems verb and noun inflections, and removes stopwords.Frequently used misspelled stopword variants are included in the stopword list.Source: §3 · p. 6
- The Bangla Emot Module converts emoji and emoticon meanings into Bangla text to help identify emotion and categorize comments.The module uses emoji and emoticon meanings drawn from ref..Source: §3 · p. 7
- A Conv1D encoder produces text feature vectors for LSTM, GRU, and attention-based recurrent decoders that predict the outcome.The encoder is bidirectional, and attention assigns word weights; the combined context and current hidden states are used to predict a speech category.Source: §3 · pp. 8–10
4 Results and discussion
The attention-based encoder–decoder achieved the strongest reported accuracy among the three decoder models. The results also report precision, recall, and F1-scores, and compare performance across binary- and multi-class labels.
4 Results and discussion
- The experiments used convolutional neural networks as encoders, with LSTM, GRU, or attention as the decoder; the 80% training and 20% testing split gave the highest accuracy.Node dropout was 0.4 and recurrent dropout was 0.3 to prevent overfitting.Source: §4 · pp. 10–11
- 77% accuracy for the attention-based decoder exceeded the 74% accuracy reported for both the LSTM and GRU decoders.The comparison is presented in Table 1.Source: Table 1 · p. 11, §4 · p. 11
- The attention-based encoder–decoder scored precision 0.78, recall 0.75, and f1-score 0.78; LSTM scored 0.72, 0.71, and 0.72, while GRU scored 0.70, 0.70, and 0.69, respectively.Source: §4 · p. 11
- The attention mechanism performed better than the other algorithms on both binary- and multi-class label datasets.Tables 2 and 3 compare algorithms on binary- and multi-class labels, respectively.Source: §4 · pp. 11–12, Table 2 · p. 11, Table 3 · p. 12
- Figure 13 presents training and testing accuracy, while Figure 14 presents test accuracy and F1-score performance for different hate-speech models.The Figure 14 caption identifies LSTM, GRU, and attention as the F1-score models shown.Source: Figure 13 · p. 11, §4 · p. 12, Figure 14 · p. 12
5 Conclusion and future work
The paper reports a seven-category Facebook-comment dataset and compares machine-learning and deep-neural-network approaches. It proposes further dataset development and comment-processing extensions.
5 Conclusion and future work
- The dataset contains seven categories, separates hateful from non-hateful content, and is presented as a potential benchmark for future projects.The categories are Hate Speech, Aggressive Comment, Religious Hatred, Ethnical Attack, Religious, Political Comment, and Suicidal Comment.Source: §5 · p. 12
- A future data-parsing model could classify comments by class when a Facebook post link is inserted.Source: §5 · p. 12
- Proposed dataset extensions include English–Bangla mixed-language comments and speech detection in photo comments.Source: §5 · p. 13