A Comparative Study of Metadata and Text-Based Features Using Stacked SVMs for Telegram Spam Detection

Telegram is frequently targeted by spammers because it supports large groups, allowing scammers to send a single message to a vast number of recipients. Spam tactics such as obfuscated text, intentional misspellings, and the substitution of symbols for letters or numbers can bypass filters that rely on complete, standard words. While Support Vector Machine (SVM) classifiers are well suited to small or high dimensional datasets such as spam text messages, kernel choice is critical because performance depends on the underlying data distribution. This study compared four feature representations, namely metadata, Bag of Words (BoW), word n-grams, and character n-grams, using SVMs with linear and RBF kernels. It also examined a combined model that integrated the four representations through stacking. During preprocessing, duplicate and invalid messages were removed, and the cleaned data were partitioned into training and testing sets using a stratified split. Undersampling was applied only to the training set, while the test set retained its original class imbalance to reflect real world conditions. Each SVM model was tuned using five fold grid search, evaluated with ten fold cross validation, and finally tested on the held out test set. The stacking approach used the decision scores of the four base models, with logistic regression as the meta learner. The character n-gram model with an RBF kernel was the best individual classifier, achieving an accuracy of 95.69% and a spam class F1 score of 92.85%. Stacking all four models achieved an accuracy of 96.28% and a spam F1 score of 93.84%, improvements of 0.59 and 0.99 percentage points, respectively. Removing metadata eliminated these gains in accuracy, while combining character n-grams with metadata yielded an accuracy of 96.06%. Character level features were the most effective individual representation, whereas metadata, which is readily available, provided a complementary perspective that modestly improved spam detection on Telegram.

Authors

Institutions

Publication Details

Journal
International Journal of Research and Innovation in Social Science
Published
2026-11-18
DOI
https://doi.org/10.47772/ijriss.2026.101000785
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

A Comparative Study of Metadata and Text-Based Features Using Stacked SVMs for Telegram Spam Detection

Mohd Zaki Mas’ud, M. Shahkhir Mozamir, Nor Azman Mat Ariff, Mohd Fairuz Iskandar Othman et al.
4 links
International Journal of Research and Innovation in Social Science
Spam and Phishing Detection
article

A Comparative Study of Metadata and Text-Based Features Using Stacked SVMs for Telegram Spam Detection

Mohd Zaki Mas’ud, M. Shahkhir Mozamir, Nor Azman Mat Ariff, Mohd Fairuz Iskandar Othman, Mohd Najwan Md Khambari
article en

Abstract

Telegram is frequently targeted by spammers because it supports large groups, allowing scammers to send a single message to a vast number of recipients. Spam tactics such as obfuscated text, intentional misspellings, and the substitution of symbols for letters or numbers can bypass filters that rely on complete, standard words. While Support Vector Machine (SVM) classifiers are well suited to small or high dimensional datasets such as spam text messages, kernel choice is critical because performance depends on the underlying data distribution. This study compared four feature representations, namely metadata, Bag of Words (BoW), word n-grams, and character n-grams, using SVMs with linear and RBF kernels. It also examined a combined model that integrated the four representations through stacking. During preprocessing, duplicate and invalid messages were removed, and the cleaned data were partitioned into training and testing sets using a stratified split. Undersampling was applied only to the training set, while the test set retained its original class imbalance to reflect real world conditions. Each SVM model was tuned using five fold grid search, evaluated with ten fold cross validation, and finally tested on the held out test set. The stacking approach used the decision scores of the four base models, with logistic regression as the meta learner. The character n-gram model with an RBF kernel was the best individual classifier, achieving an accuracy of 95.69% and a spam class F1 score of 92.85%. Stacking all four models achieved an accuracy of 96.28% and a spam F1 score of 93.84%, improvements of 0.59 and 0.99 percentage points, respectively. Removing metadata eliminated these gains in accuracy, while combining character n-grams with metadata yielded an accuracy of 96.06%. Character level features were the most effective individual representation, whereas metadata, which is readily available, provided a complementary perspective that modestly improved spam detection on Telegram.

International Journal of Research and Innovation in Social ScienceVol. 10(10)
Technical University of Malaysia Malacca (MY)
Spam and Phishing Detection
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.

Laika access coming soon