Cyber-Bullying and Harassment Detection using ML presents a hybrid approach for detecting and hiding cyberbullying content on social media by integrating a machine learning-based detection system into the browser extension. AmultilingualdatasetcontainingEnglish,Hindi,andHinglishtextwaspreprocessedandusedtotrainvariousmachinelearningmodels.Thebestperformingmodel,LinearSVCwithTFIDFfeatures,achieved92.1%accuracyandwasembeddedintotheextensionforrealtimemoderation.The system first applies rule-based filtering, followed by ML classification for ambiguous content. Successfully tested on Facebook and Instagram, the solution enhances online safety by automating cyberbullying detection without affecting user experience. The project demonstrates a scalable and adaptive method for content moderation across dynamic and diverse digital environments.
Introduction
With the rapid rise of social media platforms like Facebook and Instagram, hate speech and abusive content have become widespread. Traditional browser-based filters rely on rule-based systems (e.g., keyword matching and heuristics) to hide offensive comments in real time but struggle to detect evolving slang, coded language, and nuanced abuse, resulting in false positives and negatives.
To address these limitations, this project integrates a machine learning (ML) model—specifically a Linear Support Vector Classifier (LinearSVC) pipeline—into the existing browser extension. The extension retains its original rule-based filters for fast initial screening, while ambiguous comments are passed to the ML model for more accurate detection. This hybrid approach improves detection accuracy, reduces errors, and preserves the user experience.
The ML model is trained on a multilingual dataset including English, Hindi, and Hinglish, reflecting real-world language diversity and code-switching. Data preprocessing includes normalization, tokenization, and TF-IDF vectorization. Several ML algorithms were tested, with LinearSVC achieving the best accuracy (92.1%) and robustness.
The trained LinearSVC pipeline is serialized and integrated into the extension to operate in real time, hiding abusive comments dynamically via DOM manipulation. Live tests on Facebook, Instagram, and YouTube demonstrate that the enhanced extension effectively filters harmful content without disrupting normal interactions.
Conclusion
Inthispaper,weproposedamachinelearningbasedcyberbullyingdetectionsystemintegratedwiththebrowserextensionforrealtimemoderationonsocialmediaplatforms.OurapproachcombinestraditionalMLmodels,particularlyLinearSVC,with TF-IDF feature extraction to accurately classify multilingual comments. The system preserves the extension’s original workflowwhile significantlyimprovingdetectionaccuracy.Future work will explore multilingual model expansion, adaptive retraining, and integration with explainable AI techniques for greater transparency.
References
[1] .K.Dinakar,R.Reichart,andH.Lieberman,\"ModelingtheDetectionofTextualCyberbullying,\"inProc.Int.Conf. Weblogs and Social Media (ICWSM), 2011.
[2] R. Zhao, A. Zhou, and K. Mao, \"Automatic Detection of Cyberbullying on Social Networks Based on Bullying Features,\" in Proc. 17th Int. Conf. Distributed Computing and Networking (ICDCN), 2016.
[3] S.Salawu,Y.He,andJ.Lumsden,\"ApproachestoAutomatedDetectionofCyberbullying:ASurvey,\"IEEETrans. Affective Computing, 2020.
[4] D. Chatzakou, N. Kourtellis, J. Blackburn et al., \"Mean Birds: Detecting Aggression and Bullying on Twitter,\" in Proc.ACM Conf. Web Science (WebSci), 2017.
[5] N.SoniandA.Singh,\"AMachineLearningApproachforDetectionofCyberbullyinginTwitter,\"inProc.Int.Conf. Intelligent Computing and Communication (ICICC), 2018.
[6] M. Dadvar, F. de Jong, R. Ordelman, and D. Trieschnigg, \"Improved Cyberbullying Detection through User Context,\" in Proc. 35th European Conf. Information Retrieval (ECIR), 2013.
[7] J.M. Xu,K. S.Jun,X. Zhu,and A. Bellmore, \"Learning from Bullying Tracesin SocialMedia,\"in Proc. North American Chapter of the ACL: HLT, 2012.
[8] C.VanHee,E.Lefever,andV.Hoste,\"DetectingCyberbullyinginSocialMedia,\"inProc.COLING,2018.
[9] R.Kumar,A. K. Ojha, S.Malmasi,and M. Zampieri, \"Benchmarking Aggression Identification in SocialMedia,\"in Proc. TRAC Workshop, 2018
[10] V. S. Chavan and S. S. Shylaja, \"Machine Learning Approach for Detection of Cyber-Aggressive Comments by Peers on Social Media Network,\" in Proc. Int. Conf. Adv. Computing, Communications and Informatics (ICACCI), 2015.