Skip to main content

A Bullying Detection Framework Using BI-LSTM and NLP

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 06 | Jun 2026 www.irjet.net p-ISSN: 2395-0072

A Bullying Detection Framework Using BI-LSTM and NLP

Deependra Singh1 , Bhanu Pratap Singh2

1Research scholar, Aditya College of Technology and Science, Satna, Madhya Pradesh, India

2 HOD, CSE, Aditya College of Technology and Science, Satna, Madhya Pradesh, India ***

Abstract - The rapid expansion of social media platforms has led to a significant rise in cyberbullying, posing serious psychological and social challenges. Detecting such harmful content automatically has becomeessentialduetothemassive volume of user-generated data. This paper presents a cyberbullying detection framework that integrates Natural Language Processing (NLP) techniques with deep learning models, particularly Bidirectional Long Short-Term Memory (Bi-LSTM). The proposed system follows a structured pipeline that includes data collection from social media sources, text preprocessing, feature extraction through vectorization, and semantic representation using GloVe word embeddings. Both traditional machine learning algorithms and deep learning models are implemented and evaluated. Experimental results demonstrate that deep learning models, especially Bi-LSTM, outperform conventional methods in capturing contextual dependencies and identifying bullying patterns. The model is evaluated using standard performance metrics such as accuracy, precision, recall, and F1-score, achieving improved classification performance. The proposed approach provides an efficient and scalablesolution for detectingcyberbullyingin online environments.

Key Words: Cyberbullying Detection, Natural Language Processing (NLP), Bi-LSTM, Deep Learning, Machine Learning, GloVe Embeddings

1. INTRODUCTION

TherapidgrowthofsocialmediaplatformssuchasTwitter andYouTubehassignificantlytransformedthewaypeople communicate and share information. However, this widespread adoption has also led to the emergence of cyberbullying, a serious online threat that involves harassment,intimidation,orabusethroughdigitalplatforms. Cyberbullyingcanhaveseverepsychological,emotional,and social consequences, particularly among adolescents and youngadults[1],[2].

Traditionalmethodsfordetectingcyberbullyingrelyheavily onmanualmoderation,whichistime-consuming,subjective, andnotscalableforlargevolumesofonlinedata.Asaresult, automated cyberbullying detection systems using Natural Language Processing (NLP) and Machine Learning (ML) techniqueshavegainedsignificantattentioninrecentyears [3]. These systems aim to analyze textual content and classifyitintobullyingornon-bullyingcategoriesefficiently.

Early approaches to cyber bullying detection primarily utilizedconventionalmachinelearningalgorithmssuchas NaïveBayes,SupportVectorMachines(SVM),andLogistic Regression, which depend on handcrafted features and shallowrepresentationsoftext[4],[5].Whilethesemethods have shown reasonable performance, they often fail to capturecontextualandsemanticrelationshipsinlanguage, limitingtheireffectiveness.

Recent advancements in Deep Learning (DL), particularly RecurrentNeuralNetworks(RNNs)andtheirvariantssuch asLongShort-TermMemory(LSTM)andBidirectionalLSTM (Bi-LSTM),havedemonstratedsuperiorperformanceintext classification tasks [6], [7]. These models can effectively learnsequentialdependenciesandcontextualinformationin textual data, making them highly suitable for detecting nuancedandimplicitformsofcyberbullying.

In addition, the use of word embeddings such as GloVe (Global Vectors for Word Representation) has further enhancedthecapabilityofNLPmodelsbyprovidingdense vector representations that capture semantic similarities betweenwords[8].Combiningwordembeddingswithdeep learning architectures enables more accurate and robust detectionsystems.

In this work, we propose a cyberbullying detection framework that integrates NLP techniques, GloVe embeddings,andBi-LSTMmodelstoimproveclassification performance. The proposed system is evaluated using standardmetricssuchasAccuracy,Precision,Recall,andF1Score, demonstrating its effectiveness compared to traditionalmachinelearningapproaches.

2. RELATED WORK

In recent years, cyber bullying detection has gained significantattentionduetotherapidgrowthofsocialmedia platformsandonlinecommunication.Advancedtechniques in Natural Language Processing (NLP) and Deep Learning (DL) have been widely explored to improve detection accuracyandrobustness.

Recent studies indicate that deep learning models outperform traditional machine learning approaches by automatically learning semantic and contextual representationsfromtextualdata.Forinstance,Hasan et al. [9] provided a comprehensive survey highlighting the

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 06 | Jun 2026 www.irjet.net p-ISSN: 2395-0072

effectivenessofdeepneural networkssuchasLSTM,GRU, and transformer-based models in detecting cyberbullying content. Their work emphasizes the importance of contextual understanding in improving classification performance.

Transformer-based models have shown remarkable improvements in recent research. Muneer et al. [10] proposed a BERT-based ensemble framework for cyberbullying detection, demonstrating superior performance compared to individual classifiers. Similarly, RoyandMali[11]exploredtransferlearningtechniquesand showed that pre-trained models significantly enhance performance,particularlyinscenarioswithlimitedlabeled data.

Hybridmodelscombiningmultiplearchitectureshavealso been widely investigated. Chen et al. [12] introduced a hybrid model integrating XLNet with Bi-LSTM, which effectively captures both contextual and sequential information in text, leading to improved classification accuracy. In another study, Kumar et al. [13] proposed a multimodaldeeplearningframeworkcombiningtextualand visual features, achieving high performance in detecting cyberbullyingacrossdifferentdatamodalities.

Handling data imbalance and improving generalization remainkeychallengesincyberbullyingdetection.Akter et al. [14]proposedanLSTM-basedautoencoderframeworkthat enhances feature representation and improves detection performanceonimbalanceddatasets.Furthermore,Azumah et al. [15] addressed adversarial cyberbullying detection usingdeeplearningtechniques,highlightingtherobustness of LSTM-based architectures against manipulated or disguisedharmfulcontent.

Recentadvancementsalsoinclude multilingual and crossdomain cyberbullying detection. Aljohani and Yafoo [16] demonstrated that combining Bi-LSTM with transformerbased embeddings significantly improves performance across different languages and datasets. Their findings suggest that hybrid deep learning approaches provide a strong balance between accuracy and computational efficiency.

Despite these advancements, challenges such as sarcasm detection, contextual ambiguity, and computational complexity of transformer models still persist. Therefore, modelslikeBi-LSTMremainapracticalandefficientchoice forreal-worldcyberbullyingdetectionsystems.

3. METHODOLOGY

Proposedsystemarchitectureisshownbyfigurebelow:

:Systemarchitecture

The process begins with gathering textual data from platforms like Twitter, YouTube comments, and publicly availabledatasets(e.g.,Kaggle).Rawtextdataisoftennoisy and unstructured. This stage cleans and standardizes the databyremovingHTMLtags,convertingtexttolowercase, tokenizing sentences into words, and eliminating unnecessarysymbolsor noise.Thisimprovesdata quality and model performance. Since machine learning models requirenumericalinput,thecleanedtextistransformedinto numericalrepresentations.TechniqueslikeCountVectorizer (word frequency-based) and Tokenizers (word-to-index mapping)areusedtoconverttextintostructurednumeric form. To capture semantic meaning beyond simple word counts, GloVe embeddings are used. These convert words into dense vectors where similar words have similar representations, helping models understand context and relationshipsbetweenwords.Varioustraditionalsupervised algorithmssuchasNaiveBayes,LogisticRegression,Support Vector Machine, KNN, AdaBoost, and Bagging are applied. Thesemodelslearnpatternsfromthevectorizeddataand performclassificationofcyberbullyingcontent.

AdvanceddeepmodelslikeLSTMandBi-LSTMareusedto capturecontextualandsequentialinformationintext.Model performance is evaluated using metrics such as Accuracy, Precision, Recall, and F1-Score, with F1-Score being particularlyimportantforhandlingimbalanceddatasets.

Fig-1

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 06 | Jun 2026 www.irjet.net p-ISSN: 2395-0072

Architectureofproposedmethodisshownbelow:

:Proposedmodel

4. RESULT

After training and testing different machine learning and deep learning models, we found the values of Precision, Accuracy, F1 Score and Recall score for each model. Deep learningmodels(LSTMandBI-LSTM)performsbetterthan machinelearningmodels.RefertoFigure5andFigure6for summary of our LSTM and BI-LSTM models which we implemented. The various hyper-parameters used in the modelsare:

(1)Epochs-15

(2)Dropout-0.2

(3)Optimizer-Adam

(4)LearningRate-0.001

(5)LossFunction-BinaryCrossentropy

(6)BatchSize-512

Accuracycomparisonofdeepmodelsisshownbelow:

Chart-1:AccuracycomparisonofDLmodels

AccuracycomparisonwithMLmodelsisshowninchart below:

Chart-2:AccuracycomparisonofMLmodels

5. CONCLUSIONS

Whileexploringandanalyzingdatawerealisedthatitcan helptoweedoutunnecessaryinformation.Forourdataset, wesawthatkeywordattributesUserIndex,Age,Annotation etc.werenotpresentuniformlyacrossallthedatasets.Asa result,wewereabletoremovethoseattributes.Wealsosaw thatthepre-processingstepvarieswiththetypeofdataset. Majorityoftheresourcesthatdealtwithtextpre-processing didnotincluderemovaloflinksandtags("@").However,the removalofthesetokenswasimportanttothedatasetasthey servednopurposeinclassifyingtextforcyberbullying.Deep learningmodelsused(LSTMandBI-LSTM)with64neurons (>80F1Score)areabletolearnthecontextbetterthanthe traditionalMLalgorithms.Futureresearchcanbuildupon thisworkinseveralmeaningfuldirections.First,extending detectioncapabilitiestomultimodalcontentsuchasimages, videos,andaudiowouldmorecomprehensivelyaddressthe variednatureofcyberbullyingacrosssocialmedia.

REFERENCES

[1]K.Kowalski,R.Giumetti,A.Schroeder,andM.Lattanner, “Bullying in the digital age: A critical review and metaanalysis of cyberbullying research among youth,” PsychologicalBulletin,vol.140,no.4,pp.1073–1137,2014.

[2]S.HindujaandJ.Patchin,“Cyberbullying:Identification, prevention,andresponse,”CyberbullyingResearchCenter, 2015.

[3] A. Schmidt and M. Wiegand, “A survey on hate speech detection using natural language processing,” in Proc. SocialNLP,2017,pp.1–10.

Fig-2

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 06 | Jun 2026 www.irjet.net p-ISSN: 2395-0072

[4] R. Zhao, A. Zhou, and K. Mao, “Automatic detection of cyberbullying on social networks based on bullying features,”inProc.ACMSIGKDD,2016,pp.43–52.

[5]S.Rekha,P.K.S.Reddy,andM.S.Kumar,“Cyberbullying detectionusingmachinelearningalgorithms,”International JournalofEngineeringandTechnology,vol.7,no.3,pp.1–5, 2020.

[6] Y. Kim, “Convolutional neural networks for sentence classification,”inProc.EMNLP,2014,pp.1746–1751.

[7] Z. Zhang, D. Robinson, and J. Tepper, “Detecting hate speech on Twitter using a convolution-GRU based deep neuralnetwork,”inProc.ESWC,2018.

[8] J. Pennington, R. Socher, and C. D. Manning, “GloVe: Global vectors for word representation,” in Proc. EMNLP, 2014,pp.1532–1543.

[9]M.T.Hasan,M.I.Hossain,andM.S.Rahman,“Areviewon deep learning approaches for cyberbullying detection,” FutureInternet,vol.15,no.5,pp.1–25,2023.

[10]A.Muneer,S.M.Anwar,andM.A.Khan,“Cyberbullying detectiononsocialmediausingstackingensemblelearning andBERT,”Information,vol.14,no.8,pp.1–18,2023.

[11]P.K.RoyandF.U.Mali,“Cyberbullyingdetectionusing deeptransferlearning,”Complex&IntelligentSystems,vol. 8,pp.5449–5467,2022.

[12] S. Chen, J. Wang, and K. He, “Cyberbullying detection usingXLNetandBi-LSTMhybridmodel,”Information,vol. 15,no.2,pp.1–15,2024.

[13]A.Kumar,R.Singh,andP.Sharma,“Amultimodaldeep learning approach for cyberbullying detection,” Applied Sciences,vol.14,no.24,pp.1–20,2024.

[14] M. S. Akter, M. Rahman, and S. Azad, “An LSTMautoencoderframeworkforcyberbullyingdetection,”IEEE Access,vol.11,pp.102345–102358,2023.

[15] S. W. Azumah, K. O. Boateng, and E. K. Arthur, “Adversarial cyberbullying detection using deep learning techniques,”IEEEAccess,vol.12,pp.55678–55690,2024.

[16] E. J. Aljohani and W. Yafoo, “Enhanced cyberbullying detection using LSTM, Bi-LSTM, and transformer-based models,”IEEEAccess,vol.13,pp.11234–11248,2025.

Turn static files into dynamic content formats.

Create a flipbook
A Bullying Detection Framework Using BI-LSTM and NLP by IRJET Journal - Issuu