Work

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

Year: 2026
Type: article
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.
Language: English
Open Access status: bronze
OpenAlex ID: W7236119458
FWCI:
Cites: 19
Cited by:
Related to: 10