Bengali cyberbullying detection: A comprehensive dataset for advanced analysis
Gazi Tahsina Sharmin Jahin1, Firoze Maliha1, Nuren Nafisa1, Mohammad Mahadi Hassan1, M. Jamshed Alam Patwary2
1Department of Computer Science and Engineering, International Islamic University Chittagong, Kumira, IIUC Avenue, Sonaichhari, Chattogram, 4318, Chattogram, Bangladesh
2Department of Computer Science and Engineering, Rangamati Science and Technology University, Rangamati Hill District, Rangamati, 4500, Chattogram, Bangladesh
Ann. Quantum Condens. Matter Phys. 2024, 4(3), 112205; https://doi.org/10.58303/wdhctw15
Abstract
Cyberbullying has become a major concern in the digital world, with social media platforms facilitating harmful interactions that target individuals. Although there has been significant research, studies specifically focusing on Bengali cyberbullying remain scarce. This paper addresses this gap by analyzing over 70,000 social media comments in the Bengali language. The dataset is preprocessed for sentiment analysis to classify positive and negative comments, followed by topic modeling for negative comments using Latent Dirichlet Allocation (LDA) to extract features from age, gender, ethnicity, religion-based, and miscellaneous comments. Various models are applied, including Support Vector Machine, XGBoost, CNN+BiLSTM+GRU, mBERT, XLM-R, etc. Among the evaluated models, mBERT demonstrated the highest performance, attaining an accuracy of 92%. While the CNN+BiLSTM+GRU hybrid model outperformed with an accuracy of 91%. Further improvements are done by incorporating BERT embeddings into CNN and ANN models, and achieved an accuracy of 93%. To enhance model transparency and trust, Local Interpretable Model-agnostic Explanations is applied to interpret predictions.
| Subject Area | Natural Language Processing (NLP). |
| Specific Subject Area | Cyberbullying Detection in Bengali Language using NLP Models. |
| Type of Data | Textual Data Bengali social media comments. |
| Data Collection | The dataset comprises over 70,000 Bengali-language comments. Approximately 50,000 were sourced from a Kaggle dataset focused on social media discourse, while 20,000 were gathered from publicly available Bengali text corpora, including Facebook, Twitter, and forums. These comments reflect diverse communication styles and topics. Data were filtered for relevance and quality, and duplicates were removed. No specialized instruments were used. |
| Data Source Location | Data were sourced from publicly available platforms relevant to Bangladesh, including Facebook comments and Google-hosted datasets. While user content originated in Bangladesh, no geographic coordinates were recorded due to anonymization. The dataset is stored at the Department of CSE, International Islamic University Chittagong (IIUC). |
| Data Accessibility | Repository: Zenodo |
| Data Identification Number: 10.5281/zenodo.15230540 | |
| Direct URL to data: https://zenodo.org/records/15230540 | |
| Related Research Article | None |
1 Value of the Data
• The dataset brings together more than 70,000 comments in the Bengali language, making it one of the most significant available public sources. About 50,000 comments have been sourced from Kaggle, while the other 20,000 comments are collected from various online Bengali text sources, providing an extensive mix of content.
• The comments are made from the actual users’ interactions on the various online platforms(Facebook, Twitter, and Internet forums), capturing a wide range of natural communication styles and behaviors. It gives a precious foundation to develop and test NLP models based on the Bengali language.
• The dataset can be used for varied research and practical applications. Examples of such include detection of cyberbullying, hate speech analysis, opinion mining, and social behavior understanding in Bengali.
2 Background
Various researchers have applied machine learning (ML) and deep learning (DL) techniques to combat cyberbullying, often relying on small, domain-specific datasets [1]. LIME has been widely used for model interpretability. For instance, [2] used LIME with classifiers like SVM, RF, Bi-LSTM, and BERT, offering interpretability but falling short in model-specific explanations. Similarly, [3] and [4] incorporated LIME in hate speech detection but encountered limitations in capturing individual model behaviors. In sentiment analysis, particularly for Bengali, [5] existing research has shown promising results but remains heavily dependent on limited datasets. [6] used FastText and Skipgram for feature extraction, highlighting the robustness of BanglaBERT. However, the study emphasized the need for domain adaptation and multi-class learning. [7] proposed a hybrid ensemble model achieving 85% accuracy, yet it lacked transformer-based architectures crucial for capturing deeper language features. Similarly, [8] demonstrated the superiority of transformer-based embeddings such as BERT and GPT-J-6B over traditional methods like TF-IDF and Word2Vec, reaching up to 98% accuracy. Multilingual efforts like those by [9], using WordPiece tokenization with AfriBERTa and RoBERTa, faced challenges of overfitting and data quality, despite achieving 80.88% accuracy. In Bengali-specific settings, [10] applied BERT with 97% accuracy but was limited by a small and imbalanced dataset. Likewise, [11] integrated TF-IDF with BERT, CNN, and MLP, achieving 92.3% accuracy, though the dataset size raised concerns about overfitting. [12] experimented with pre-trained models like BERT, XLM-R, and mBERT, finding BanglaBERT to be the most effective. These studies underline the necessity of fine-tuned transformer models for Bengali, but again highlight the consistent issue of limited, non-diverse datasets. Hybrid and ensemble models are also gaining attention; [13] reached 87.54% using DistilBERT and XLM-R. However, dataset limitations continue to restrict broader applicability and generalization. Despite technological progress, the lack of large, diverse, and representative Bengali datasets remains a significant barrier to the development of reliable and generalizable models. Most existing works depend on narrow-scope datasets, often sourced from single platforms like Facebook or Twitter, which limits cross-platform adaptability and model robustness. Furthermore, the need for domain adaptation, multi-class learning, and model-specific interpretability frameworks remains largely unattended.
To bridge these gaps, we propose an end-to-end system built upon a large-scale, richly diverse Bengali dataset, integrating ML, DL, transformer-based models (TBM), and explainable AI (XAI) techniques. This comprehensive approach aims to enhance model performance, interpretability, and generalizability for effective cyberbullying detection in the Bengali language.
3 Data Description
This section presents a detailed overview of the dataset used in the study, including its collection sources, preprocessing techniques, and preparation steps. We describe the origin and characteristics of the data, followed by the methods applied to clean and tokenize the Bengali textual content to ensure it is suitable for further analysis.
3.1 Data collection
The dataset consists of over 70,000 Bengali comments collected from diverse public domains. This subsection outlines the data sources and collection methods, providing context on how the dataset was compiled to represent real-world social media communication in Bengali.
3.1.1 Data sources
Table 1 Data Collection Statistics.
| Label | Data |
|---|---|
| Kaggle | 50000 |
| Github Repository | 20000 |
| Total | 70000 |
3.1.2 Dataset file description
• Collected Bangla Comments.csv: A dataset containing raw Bengali comments collected from various online platforms.
• NotoSansBengali-Regular.ttf: It is the standard, regular-weight variant of the Noto Sans Bengali font family designed to support the Bengali script with modern typography.
• SolaimanLipi_22-02-2012.ttf: It is a widely used Bengali font distributed freely to promote Bengali digital literacy.
3.2 Data preprocessing
This section outlines the essential steps undertaken to prepare the raw Bengali social media comments for analysis. It covers data cleaning, tokenization, and annotation procedures that ensure the dataset’s quality and relevance for cyberbullying detection.
3.2.1 Data cleaning
The initial phase of our study involves the careful preparation of Bengali social media textual data. During data pre-processing, the text is cleansed of HTML tags, URLs, emojis, special characters, common stop words, and unnecessary white spaces. Entries without ‘text’ values are excluded from further analysis [Fig. 1 a]. The ‘text’ column entries are converted to string format using ‘astype(str)’ to ensure uniform formatting for tokenization. For word-level parsing in Bengali, language-specific tools are used. However, since transformer-based models inherently handle noise and irrelevant tokens, overly aggressive cleaning is avoided.
3.2.2 Tokenization
For accurate representation of Bengali characters, words, and sentence structures, mBERT is used for tokenization. mBERT is trained on multiple languages, including Bengali, enabling it to handle diverse linguistic patterns and provide effective tokenization for Bengali text. This process involves splitting each input text into tokens, truncating it to a maximum length of 128 tokens, and padding the sequences to maintain uniform input vector lengths [Fig. 1 b].
Fig. 1 Comparison of two stages in the data cleaning process.
3.2.3 Annotation
Table 2 Labeled Dataset.
| Label | Data |
|---|---|
| Age-based cyberbullying | 8001 |
| Gender-based cyberbullying | 8001 |
| Ethnicity-based cyberbullying | 8001 |
| Religion-based cyberbullying | 8001 |
| Miscellaneous | 8001 |
Fig. 2 Description of Dataset Label.
4 Experimental Design, Materials and Methods
Fig. 7 Sentiment and Annotated Dataset Distributions.
Table 3 Sentiment Label Distribution Statistics.
| Label | Data |
|---|---|
| Positive Sentiment | 30000 |
| Negative Sentiment | 40000 |
| Total | 70000 |
Fig. 5 Dataset with Sentiment.
Fig. 4 Overview of Word Scores for Topics.
Algorithm 1 Bengali Cyberbullying Detection (BCD)
Fig. 3 Side-by-side comparison of framework and data collection process.
4.1 Model comparison
Table 4 Performance Results of the ML Models with LIME.
| ML Models | Accuracy | Precision | Recall | F1-score |
|---|---|---|---|---|
| RF | 89% | 90% | 89% | 89% |
| SVM | 91% | 92% | 91% | 91% |
| NB (Multinomial) | 81% | 82% | 81% | 80% |
| NB (Bernoulli) | 86% | 88% | 86% | 86% |
| AdaBoost | 85% | 86% | 85% | 85% |
| XGBoost | 91% | 91% | 91% | 91% |
| LR | 90% | 90% | 90% | 90% |
| DT | 86% | 86% | 86% | 86% |
| GB | 88% | 88% | 88% | 89% |
Table 5 Performance Results of the DL Models with LIME.
| DL Models | Accuracy | Precision | Recall | F1-score | Epoch | Learning Rate |
|---|---|---|---|---|---|---|
| ANN | 89% | 89% | 89% | 89% | 5 | 0.0001 |
| LSTM | 88% | 88% | 89% | 88% | 5 | 0.0001 |
| GRU | 89% | 88% | 88% | 88% | 5 | 0.0001 |
| CNN | 90% | 89% | 89% | 89% | 5 | 0.0001 |
| RNN | 89% | 88% | 88% | 88% | 5 | 0.0001 |
| CNN+BiLSTM | 90% | 89% | 89% | 89% | 5 | 0.0001 |
| CNN+GRU | 90% | 88% | 89% | 89% | 5 | 0.0001 |
| CNN+Bi-LSTM+GRU | 91% | 90% | 90% | 90% | 5 | 0.0001 |
Table 6 Performance Results of the TBM Models with LIME.
| TBM Models | Accuracy | Precision | Recall | F1-score | Epoch | Learning Rate |
|---|---|---|---|---|---|---|
| DistilBERT | 89% | 89% | 89% | 89% | 5 | 0.0001 |
| T5 | 86% | 86% | 85% | 85% | 5 | 0.0001 |
| mBERT | 92% | 90% | 90% | 91% | 5 | 0.0001 |
| XLM-R | 91% | 90% | 90% | 91% | 5 | 0.0001 |
Fig. 6 Overview of the three figures: (a) Sentiment Analysis Overview, (b) Topic Modelling Overview, and (c) Overview of Model Application.
4.2 LIME Application with BERT Embeddings
Table 7 Performance Results of the Models with LIME.
| Models | Accuracy | Precision | Recall | F1-score | Epoch | Learning Rate |
|---|---|---|---|---|---|---|
| BERT+CNN | 93% | 92% | 91% | 92% | 5 | 0.0001 |
| BERT+ANN | 93% | 92% | 92% | 92% | 5 | 0.0001 |
| BERT+CNN + BiLSTM | 92% | 92% | 92% | 92% | 5 | 0.0001 |
| BERT+CNN + ANN | 91% | 90% | 90% | 91% | 5 | 0.0001 |
Fig. 8 ROC Curves for BERT+CNN and BERT+ANN.
Limitations
Our data, while large, comes from particular Bengali social media platforms and periods and therefore can be subject to demographic or topical bias. For example, particular offline situations or some dialects are not represented, potentially hindering generalizability. Also, while annotators were experienced, manual detection of cyberbullying is not objective; certain sarcasm or implicit comments might have been interpreted inconsistently. Finally, pretrained models over general corpora (e.g., mBERT) may still miss nuanced domain-specific vocabulary. We understand these shortcomings and propose future research in diversifying data sources and annotators.
Ethics Statement
The data were sourced from publicly available platforms, including Kaggle and other Bengali text corpora. As the data were publicly accessible, no consent was required. The dataset was anonymized, and the study complies with the redistribution policies of the respective platforms, including Kaggle, Facebook, and Twitter.
CRediT authorship contribution statement
Gazi Tahsina Sharmin Jahin: Conceptualization, Methodology, Writing – original draft, Writing – review & editing, Visualization. Firoze Maliha: Conceptualization, Software, Data curation. Nuren Nafisa: Validation, Supervision. Mohammad Mahadi Hassan: Project administration. M. Jamshed Alam Patwary: Writing – review & editing, Validation.
References
- 1 AshrafK.HosenM.H.AsgarS.IslamM.T.NawarS.Analyzing abusive Bangla comments on social media: NLP and explainable AI2024 International Conference on Advances in Computing, Communication, Electrical, and Smart Systems (iCACCESS), IEEE202410.1109/iCACCESS61735.2024.10499547
- 2 ImbwagaJ.L.ChittaragiN.B.KoolagudiS.G.Explainable hate speech detection using LIMEInt. J. Speech Technol.27202479381510.1007/s10772-024-10135-3
- 3 MehtaH.PassiK.Social media hate speech detection using explainable artificial intelligence (XAI)Algorithms15202229110.3390/a15080291
- 4 ShakilM.H.AlamM.G.R.Hate speech classification implementing NLP and CNN with machine learning algorithm through interpretable explainable AI2022 IEEE Region 10 Symposium (TENSYMP), IEEE202210.1109/TENSYMP54529.2022.9864421
- 5 IslamS.IslamM.J.HasanM.M.AyonS.M.S.M.Bengali social media post sentiment analysis using deep learning and BERT model2022 IEEE Symposium on Industrial Electronics Applications (ISIEA), IEEE202210.1109/ISIEA54517.2022.9873680
- 6 HossainM.M.AkhiI.A.H.RaisaS.R.S.OnniT.S.Critical analysis of BERT and LSTM model for bengali sentiment analysis across varied datasets2023 IEEE 15th International Conference on Computational Intelligence and Communication Networks (CICN), IEEE202310.1109/CICN59264.2023.10402353
- 7 AhmedM.T.UrmiA.S.RahmanM.IslamA.Z.M.T.DasD.RashedM.G.Cyberbullying detection based on hybrid ensemble method using deep learning technique in bangla datasetInt. J. Adv. Comput. Sci. Appl.149202354555110.14569/IJACSA.2023.0140958
- 8 JobairM.DasD.IslamN.B.DharM.Bengali hate speech detection with BERT and deep learning modelsProceedings of the 2nd International Conference on Big Data, IoT and Machine Learning202410.1007/978-981-99-8937-9_56
- 9 AliyuY.SarlanA.DanyaroK.U.RahmanA.S.B.A.Comparative analysis of transformer models for sentiment analysis in low-resource languagesInt. J. Adv. Comput. Sci. Appl.154202410.14569/IJACSA.2024.0150437
- 10 SenM.MasihJ.RajkumarR.From tweets to insights: BERT-enhanced models for cyberbullying detection2024 ASU International Conference in Emerging Technologies for Sustainability and Intelligent Systems (ICETSIS)202410.1109/ICETSIS61505.2024.10459672
- 11 J. Devlin, M.-W. Chang, K. Lee, K. Toutanova, BERT: Pre-training of deep bidirectional transformers for language understanding, 2019, ArXiv preprint arXiv:1810.04805. 10.48550/arXiv.1810.04805
- 12 AkhterA.AcharjeeU.K.TalukderM.A.IslamM.A robust hybrid machine learning model for bengali cyberbullying detection in social mediaNat. Lang. Process. J.41202310.1016/j.nlp.2023.100027
- 13 HoqueM.N.SeddiquiM.H.Leveraging transformer models in the cyberbullying text classification system for the low-resource bengali language2023 26th International Conference on Computer and Information Technology (ICCIT), IEEE202310.1109/ICCIT60459.2023.10441412
- 14 (Nobel)S.M.N.“Facebook sentiment analysis bangla language,”Kaggle1020212025
[Online]. Available: https://www.kaggle.com/datasets/smnuruzzaman/facebook-sentiment-analysis-bangla-language[Accessed:
- 15 BawaneV.GaupaleV.WakalkarA.RathodK.Cyberbullying detection on social mediaInt. J. Innov. Eng. Sci.87202310.46335/IJIES.2023.8.7.6
- 16 ChowdhuryH.SuptoM.A.ChowdhuryZ.BAAD: A multipurpose dataset for automatic bangla offensive speech recognitionData Brief48202210.1016/j.dib.2023.109067PMC1007052337025508
- 17 We are social & hootsuiteDigital 2023: Bangladesh2024
[Online]. Available: http://www.datareportal.com/reports/digital-2023-bangladesh[Accessed:
- 18 HamzaG.I.MuthakiT.MasukS.I.ShahF.M.Saha JoyS.K.RahmanM.M.Bengali cyberbullying text detection: a comprehensive study, in: 26th International Conference on Computer and Information technology (ICCIT)IEEE202310.1109/ICCIT60459.2023.10441141
- 19 HassanM.M.ShakilM.S.NessaN.IslamM.M.Sentiment analysis on Bangla conversation using machine learning approachInt. J. Electr. Comput. Eng.1252022556210.11591/ijece.v12i5.pp5562-5572
- 20 ManikM.M.H.HaqueF.HashemM.M.A.HabibM.A.A hybrid framework for sentiment analysis from Bangla texts2022 25th International Conference on Computer and Information Technology (ICCIT), IEEE202210.1109/ICCIT57492.2022.10054952
- 21 AhmedT.KabirM.IvanS.MahmudH.HasanK.Am I being bullied on social media? An ensemble approach to categorize cyberbullying2021 IEEE International Conference on Big Data (Big Data), IEEE202110.1109/BigData52589.2021.9671594
- 22 AhmedM.T.RahmanM.NurS.IslamA.A.Deployment of machine learning and deep learning algorithms in detecting cyberbullying in Bangla and romanized Bangla text: a comparative study2021 International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), IEEE202110.1109/ICAECT49130.2021.9392608
- 23 NathS.S.KarimR.MirazM.H.Deep learning based cyberbullying detection in Bangla languageAnn. Emerg. Technol. Comput.812024506510.33166/AETiC.2024.01.005
- 24 BataniJ.MbungeE.MuchemwaB.GaobotseG.GurajenaC.FashotoS.KavuT.D.DandajenaK.A review of deep learning models for detecting cyberbullying on social media networks, in: R. silhavy (ed.)Cybernetics Perspectives in Systems, Proceedings of the 11th Computer Science On-line Conference 2022 (CSOC 2022), Vol. 3, Lecture Notes in Networks and Systems, vol. 503, Springer, Cham202252855010.1007/978-3-031-09073-8_46
- 25 SahaS.IslamM.S.AlamM.M.RahmanM.M.MajumderM.Z.H.AlamM.S.HossainM.K.Bengali cyberbullying detection in social media using machine learning algorithms, in: 2023 5th international conference on sustainable technologies for industry 5.0 (STI)IEEE202310.1109/STI59863.2023.10464740
- 26 AhmmedF.JahinA.ZohoraF.T.PatwaryM.J.A.An improved hybrid deep learning approach with explainable AI for COVID-19 detection, in: 2025 international conference on electricalComputer and Communication Engineering (ECCE), Chittagong, Bangladesh, IEEE20251610.1109/ECCE64574.2025.11013503
- 27 RibeiroM.T.SinghS.GuestrinC.“Why should i trust you?” Explaining the predictions of any classifierProceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ACM20161135114410.1145/2939672.2939778
- 28 ChenJ.SongL.WainwrightM.JordanM.Learning to explain: an information-theoretic perspective on model interpretationPMLR802018883-89210.48550/arXiv.1802.07814
in: Proceedings of the 35th International Conference on Machine Learning
- 29 PawarV.JoseD.V.PatilA.Explainable AI method for cyberbullying detectionProceedings of the 2022 IEEE 2nd International Conference on Mobile Networks and Wireless Communications (ICMNWC), IEEE, Pune, India202211912410.1109/ICMNWC56175.2022.10031652
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Declarations
Data Availability
Collected Bangla Comments Dataset (https://zenodo.org/records/15230540).
Copyright and License
© 2025