Home / Archives / May 2026 / Articles

TOXIC COMMENT CLASSIFICATION USING DEEP LEARNING

Authors: Gangavarapu Jedidiah Psalms, Asadi Hari Prasad, Yadala Kalyan, Nalliboina Surendra, Guide: Bitra Ram Prasad,

Country: India

Abstract

The continually advancing technology is having a huge impact on changes in online communication. Within the realm of digital platforms, these developments have immensely been felt as cyberbullying and hate speech are gradually becoming a crucial public moderation problem. Awareness that there are newer methods of natural language processing and newer techniques of automated moderation has made it seem necessary to understand the aspects contributing towards toxic online behavior. This is innovative in method since it uses advanced deep learning techniques and knowledge distillation in analysing large text data sources to yield comprehensive analysis. The critical objective here is to understand that highly complex play between semantic context and the language intent of individuals posting toxic comments. In this study, researchers used the information about the Jigsaw Toxic Comment Classification Challenge Dataset by Kaggle and Wikipedia as a robust source relevant to online behavior. At the heart of the study is finding the contextual aspects of many user-generated texts and the complicated relationships these have with six distinct toxicity vectors: toxic, severe toxic, obscene, threat, insult, and identity hate. A highly efficient deep learning architecture has been used to pursue this objective. This includes a fine-tuned DistilBERT model deployed alongside a locally hosted, interactive Gradio graphical user interface. Researchers then may use this framework to predict how well the system does along a number of metrics, gaining insight into how lightweight transformers are better at differentiating the nuances of abusive language while significantly reducing computational overhead. The results were measured in training loss reduction across epochs and real-time inference precision during offline, standalone execution. Dataset Details: Sourced from Kaggle, the Jigsaw Toxic Comment Classification Challenge dataset was published by Jigsaw and Wikipedia to analyze toxic behavior in online discussions using real user-generated Wikipedia talk pages. The primary initiative was building multi-headed models to detect specific types of toxicity for automated moderation. Human raters evaluated and flagged comments, allowing single text sequences to be marked across multiple overlapping categories simultaneously. The training and validation dataset comprises 159,571 records across 8 columns. Demonstrating high integrity with zero missing values, the preprocessing pipeline focused entirely on tokenization rather than imputation. Reflecting real-world online environments, the label distribution is heavily imbalanced: Toxic (15,294 records), Obscene (8,449 records), Insult (7,877 records), Severe Toxic (1,595 records), Identity Hate (1,405 records), and Threat (478 records).

Keywords

Not provided

References

1) Sanh, V., Debut, L., Chaumond, J., & Wolf, T., “DistilBERT, a distilled version of BERT: smaller,
faster, cheaper and lighter,” arXiv preprint arXiv:1910.01108, 2019.
2) Devlin, J., Chang, M. W., Lee, K., & Toutanova, K., “BERT: Pre-training of Deep Bidirectional
Transformers for Language Understanding,” Proceedings of the North American Chapter of the
Association for Computational Linguistics (NAACL-HLT), 2019.
3) Hinton, G., Vinyals, O., & Dean, J., “Distilling the Knowledge in a Neural Network,” arXiv preprint
arXiv:1503.02531, 2015.
4) Wolf, T., Debut, L., Sanh, V., et al., “Transformers: State-of-the-Art Natural Language Processing,”
Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP):
System Demonstrations, 2020.
5) Paszke, A., Gross, S., Massa, F., et al., “PyTorch: An Imperative Style, High-Performance Deep
Learning Library,” Advances in Neural Information Processing Systems (NeurIPS), 2019.
6) Abid, A., Abdalla, A., Abid, A., et al., “Gradio: Hassle-Free Sharing and Testing of ML Models in the
Wild,” arXiv preprint arXiv:1906.02569, 2019.
7) Micikevicius, P., Narang, S., Alben, J., et al., “Mixed Precision Training,” International Conference
on Learning Representations (ICLR), 2018.
8) Loshchilov, I., & Hutter, F., “Decoupled Weight Decay Regularization (AdamW),” International
Conference on Learning Representations (ICLR), 2019.
9) Jigsaw / Conversation AI, “Toxic Comment Classification Challenge,” Kaggle Datasets, 2018.
10) McKinney, W., “Data Structures for Statistical Computing in Python,” Proceedings of the 9th Python
in Science Conference (SciPy), 2010.
11) Howard, J., & Ruder, S., “Universal Language Model Fine-tuning for Text Classification,”
Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (ACL), 2018.