An Efficient Toxic Comment Classification using Hybrid Machine Learning Algorithms with TF-IDF and Word2Vec Word Embeddings
The proliferation of user-generated content on platforms such as social media and online forums has led to a significant increase in harmful, toxic comments that can adversely impact user experience. Detecting such comments in real-time is critical for maintaining a healthy online environment. In this paper, we explore the effectiveness of several traditional machine learning algorithms in classifying toxic comments using the Jigsaw Toxic Comment Dataset. We implement and evaluate six different classifiers Logistic Regression, Random Forest, AdaBoost, XGBoost, KNN and Naive Bayes. The features are derived using two text representation methods: TF-IDF and Word2Vec. TF-IDF captures the importance of words in relation to the entire dataset, while Word2Vec provides word embeddings that capture semantic meaning and relationships between words. Each model is evaluated on multiple metrics, including accuracy, precision, recall, F1-score, and area under the receiver operating characteristic curve (AUC). The results indicate that XGBoost outperforms the other models, achieving the highest accuracy and AUC score, followed by Random Forest and Logistic Regression. This study demonstrates the viability of traditional machine learning methods, with both TF-IDF and Word2Vec, for toxic comment classification and provides insights for future improvements through model tuning and advanced deep learning techniques.
Authors
- M. Vamsi Krishna (ORCID: https://orcid.org/0000-0001-5285-9990)
- Sasmita Kumari Nayak (ORCID: https://orcid.org/0000-0003-4987-0739)
- S. Sushma
Institutions
- Aditya Birla (India) (IN)
- Centurion University of Technology and Management (IN)
Publication Details
- Published
- 2025-05-21
- DOI
- https://doi.org/10.1109/icaiss61471.2025.11042068
- Citations
- 1
- Primary Topic
- Hate Speech and Cyberbullying Detection
- Type
- article
- Field-Weighted Citation Impact
- 2.48