RSIS Repository Open-access research from RSIS International journals

International Journal of Research and Innovation in Social Science (IJRISS)

PSO-Weighted Ensemble of Bags-of-Word and N-Gram Classifiers for YouTube Spam Detection

byNor Azman Mat Ariff; Mohd Zaki Mas’ud; Mohd Najwan Md Khambari; Mohd Fairuz Iskandar Othman; Taqwan Thamrin

Published December 23, 2025  •  Vol. 9, Issue 11, pp. 7010–7022Open Access
DOI: 10.47772/IJRISS.2025.91100545

Abstract

YouTube spam comments degrade user experience as well as increasing security and monetization risks, highlights the need for resilient automated detection system. The YouTube spam detection system has progressed from relying on single classifiers to incorporating ensemble-based system. However, current YouTube spam ensemble system typically train all base classifiers on homogeneous feature representations and rely on equal or fixed weighting schemes, which limits error diversity and prevents the ensemble from adapting to the varying strengths of individual models. This study proposed a Particle Swarm Optimization weighted ensemble that combined multiple n‑gram and BoW classifiers to build spam detection models. Six single classifiers using 1‑gram to 5‑gram character features and BoW features were combined into ensemble configurations with equal weighting and PSO‑optimized weighting, then evaluated on five YouTube spam datasets spanning Eminem, Katy Perry, LMFAO, Psy, and Shakira datasets. Results demonstrated that PSO‑weighted ensembles consistently outperformed the best single classifier on every dataset, with improvements ranging from 1.0 to 1.5 percentage points and accuracies from 91.65% to 96.79%. The all n‑grams plus BoW with PSO‑optimized weights ensemble delivered robust performance across all datasets, with PSO gains over equal weighting of 0.2 to 0.7 percentage points. These findings confirmed that combining character n‑gram and BoW features captured complementary spam patterns, and that PSO‑based weighting provided an adaptive mechanism for classifier integration. The proposed approach offered a good, generalizable solution for automated spam detection across diverse YouTube comments and social media platforms without extensive manual tuning.

Keywords: Ensemble learning, N-gram features, Particle Swarm Optimization

JournalInternational Journal of Research and Innovation in Social Science (IJRISS)
ISSN2454-6186
Volume / IssueVolume 9, Issue 11
Pages7010–7022
Publication dateDecember 23, 2025
DOI10.47772/IJRISS.2025.91100545
PublisherRSIS International
LicenseOpen Access

How to cite this article

Nor Azman Mat Ariff, Mohd Zaki Mas’ud, Mohd Najwan Md Khambari, Mohd Fairuz Iskandar Othman, & Taqwan Thamrin (2025). PSO-Weighted Ensemble of Bags-of-Word and N-Gram Classifiers for YouTube Spam Detection. International Journal of Research and Innovation in Social Science (IJRISS), 9(11), 7010-7022. https://doi.org/10.47772/IJRISS.2025.91100545

BibTeX

@article{Nor2025,
  title   = {PSO-Weighted Ensemble of Bags-of-Word and N-Gram Classifiers for YouTube Spam Detection},
  author  = {Nor Azman Mat Ariff and Mohd Zaki Mas’ud and Mohd Najwan Md Khambari and Mohd Fairuz Iskandar Othman and Taqwan Thamrin},
  journal = {International Journal of Research and Innovation in Social Science (IJRISS)},
  volume  = {9},
  number  = {11},
  pages   = {7010--7022},
  year    = {2025},
  doi     = {10.47772/IJRISS.2025.91100545},
  publisher = {RSIS International}
}