Loading... Loading...
Grenze Logo
GRENZE International Journal of Engineering and Technology Vol. 12 (2026), Issue 2

Toxic Comment Classifier

Authors

P Velvadivu, Saondarya K, Yashvitha PR, Srivarshini G

Abstract

Online social platforms have evolved into essential environments for global communication, yet they continue to face significant challenges posed by toxic, offensive, and hateful language. Manual moderation of such content is inefficient, inconsistent, and incapable of operating at the scale required for modern digital ecosystems. This creates a strong need for automated, intelligent systems capable of identifying and categorizing harmful language with high precision. Although earlier approaches such as Bidirectional LSTM networks were effective in modeling sequential dependencies, they often struggled with long-range context, subtle linguistic cues, and the emerging variability in toxic expressions. To address these limitations, this project, titled “Toxic Comment Classifier,” proposes a Large Language Model (LLM) based toxicity detection framework that leverages transformer architectures such as DistilBERT for efficient, context-aware multi-label classification. The system processes user-generated comments and predicts six toxicity categories: toxic, severe toxic, obscene, threat, insult, and identity hate. A robust preprocessing pipeline was implemented using subword tokenization and attention-based text encoding, ensuring deeper contextual understanding compared to recurrent models. The LLM was fine-tuned on a large, annotated dataset of online comments, and scientific evaluation demonstrated improvements in micro-F1 performance, better handling of implicit and context-dependent toxicity, and enhanced generalization under class imbalance conditions. An interactive Gradio interface further enables real-time toxicity assessment, offering probabilistic outputs, binary risk classification, and interpretable insights for moderation workflows. The integration of transformer-based modeling with threshold optimization and empirical validation highlights the system’s scientific contribution: it demonstrates that lightweight LLMs can outperform traditional deep learning models while remaining computationally feasible for local, unpaid deployment. This work contributes toward safer digital communication environments by providing a scalable, accurate, and user-friendly automated moderation solution.

Pages: 90 - 100