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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An Efficient Toxic Comment Classification using Hybrid Machine Learning Algorithms with TF-IDF and Word2Vec Word Embeddings

M. Vamsi Krishna, Sasmita Kumari Nayak, S. Sushma
1 citations
Hate Speech and Cyberbullying Detection
2.48
article

An Efficient Toxic Comment Classification using Hybrid Machine Learning Algorithms with TF-IDF and Word2Vec Word Embeddings

M. Vamsi Krishna, Sasmita Kumari Nayak, S. Sushma
article en
1 citations

Abstract

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.

Aditya Birla (India) (IN), Centurion University of Technology and Management (IN)
Zero hunger
Openalex Percentile: Top 10%
Hate Speech and Cyberbullying Detection
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.