A Comparative Study of Metadata and Text-Based Features Using Stacked SVMs for Telegram Spam Detection
Authors
Faculty of Information and Communication Technology, Universiti Teknikal Malaysia Melaka (Malaysia)
Faculty of Artificial Intelligence and Cyber Security, Universiti Teknikal Malaysia Melaka (Malaysia)
Faculty of Information and Communication Technology, Universiti Teknikal Malaysia Melaka (Malaysia)
Faculty of Information and Communication Technology, Universiti Teknikal Malaysia Melaka (Malaysia)
Faculty of Information and Communication Technology, Universiti Teknikal Malaysia Melaka (Malaysia)
Article Information
DOI: 10.47772/IJRISS.2026.101000785
Subject Category: Machine Learning
Volume/Issue: 10/10 | Page No: 11103-11111
Publication Timeline
Submitted: 2026-10-27
Accepted: 2026-11-01
Published: 2026-11-18
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.
Keywords
Character n-grams, metadata features, stacking ensemble, Support vector machine
Downloads
References
1. Adnan, M., Imam, M. O., Javed, M. F., & Murtza, I. (2024). Improving spam email classification accuracy using ensemble techniques: a stacking approach. International Journal of Information Security, 23(1), 505–517. https://doi.org/10.1007/s10207-023-00756-1 [Google Scholar] [Crossref]
2. Chaudhary, A., & Jain, S. (2026). Enhancing text classification using hybrid embeddings and advanced machine learning techniques. International Journal of System Assurance Engineering and Management, 17(1), 214–229. https://doi.org/10.1007/s13198-025-02950-x [Google Scholar] [Crossref]
3. Chiu, C.-Y., & Huang, Y.-T. (2007). Integration of support vector machine with naïve Bayesian classifier for spam classification. Proceedings - Fourth International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2007, 1, 618–622. https://doi.org/10.1109/FSKD.2007.366 [Google Scholar] [Crossref]
4. Dargahi Nobari, A., Sarraf, M. H. K. M., Neshati, M., & Erfanian Daneshvar, F. (2021). Characteristics of viral messages on Telegram; The world’s largest hybrid public and private messenger. Expert Systems with Applications, 168. https://doi.org/10.1016/j.eswa.2020.114303 [Google Scholar] [Crossref]
5. Gourshettiwar, P., Thakare, R. D., Duddalwar, P., Shete, R., Gundewar, S., & Verma, P. (2024). ShieldSMS Sentinel: Guardian of Your Digital Communication Bastion. 2024 2nd DMIHER International Conference on Artificial Intelligence in Healthcare, Education and Industry, IDICAIEI 2024. https://doi.org/10.1109/IDICAIEI61867.2024.10842929 [Google Scholar] [Crossref]
6. Hassan, A., & Wajiro, M. A. (2025). BES-SVM: Enhanced machine learning algorithm for Telegram spam classification. FUOYE Journal of Engineering and Technology, 10(4), 586–589. [Google Scholar] [Crossref]
7. https://doi.org/10.4314/fuoyejet.v10i4.2 [Google Scholar] [Crossref]
8. Hassan, A., Ayuba, Y., Wajiro, M. A., & Ahmad, M. Z. (2024). Machine learning algorithms for Telegram spam filtering. FUDMA Journal of Sciences, 8(6), 170–176. https://doi.org/10.33003/fjs-2024-0806-2799 [Google Scholar] [Crossref]
9. Kharat, R., Bhattarai, M., Chavan, A., Chaudhary, R. N., & Bhore, A. (2026). Spam Detection in Text Messages and Emails: A Natural Language Processing Approach. International Conference on Emerging Trends and Innovations in ICT, ICEI 2026. [Google Scholar] [Crossref]
10. https://doi.org/10.1109/ICEI65890.2026.11448007 [Google Scholar] [Crossref]
11. Koch, P., Bischl, B., Flasch, O., Bartz-Beielstein, T., Weihs, C., & Konen, W. (2012). Tuning and evolution of support vector kernels. Evolutionary Intelligence, 5(3), 153–170. [Google Scholar] [Crossref]
12. https://doi.org/10.1007/s12065-012-0073-8 [Google Scholar] [Crossref]
13. Poojashri, P., Shopika, S., & Pavithra, S. (2025). Enhancing Online Transaction Security Through Comprehensive Fraud Detection Using Machine Learning. 2025 International Conference on Data Science, Agents and Artificial Intelligence, ICDSAAI 2025. [Google Scholar] [Crossref]
14. https://doi.org/10.1109/ICDSAAI65575.2025.11011564 [Google Scholar] [Crossref]
15. Rączka, G., & Plichta, A. (2026). Spam and Phishing Detection with Adversarial Attack Robustness Analysis Using Machine Learning Models. In S. F., D. F., S. F., P. M., A.-B. K., & I. M. (Eds.), Proceedings - European Council for Modelling and Simulation, ECMS (Vols. 2026-June, pp. 311–320). European Council for Modelling and Simulation. [Google Scholar] [Crossref]
16. https://www.scopus.com/inward/record.uri?eid=2-s2.0-105042236606&partnerID=40&md5=0edaadea60f6f0ff0393ba4c17bff2f1 [Google Scholar] [Crossref]
17. Rumapea, H., Manalu, D. R., & Rumapea, Y. Y. P. (2025). Interpretable Deep Learning for Enhanced AI Trust and Clarity. Journal of Artificial Intelligence and Technology, 5, 345–353. [Google Scholar] [Crossref]
18. https://doi.org/10.37965/jait.2025.0748 [Google Scholar] [Crossref]
19. Şenol, T., Takcı, H., & Şeker, A. (2026). SMS spam detection via a systematic machine learning pipeline: Feature engineering, hyperparameter optimizing, scaling, and ensemble learning. Journal of Engineering Research (Kuwait), 14(3), 2941–2952. https://doi.org/10.1016/j.jer.2026.05.020 [Google Scholar] [Crossref]
20. Skaržauskienė, A., Mačiulienė, M., Gulevičiūtė, G., Zelenkauskaitė, A., Diržytė, A., & D’Antonio Maceiras, S. (2026). MALICIOUS CREATIVITY IN TELEGRAM’S (SOFTWARE) ANTI-VACCINATION ECOSYSTEM: PROFILING ACTORS AND EARLY MISINFORMATION DYNAMICS. Creativity Studies, 19(1), 132–141. https://doi.org/10.3846/cs.2026.22247 [Google Scholar] [Crossref]
21. Subhashini, G., Mahalakshmi, G., Ashik, H. M., & Duresh, B. N. (2024). Advanced SMS Spam Detection Using Integrated Feature Extraction. Proceedings of the 4th International Conference on Ubiquitous Computing and Intelligent Information Systems, ICUIS 2024, 780–785. [Google Scholar] [Crossref]
22. https://doi.org/10.1109/ICUIS64676.2024.10867034 [Google Scholar] [Crossref]
23. Verma, A. R. K., & Sadana, S. (2025). Textual, Non-Textual, and Hybrid Feature Engineering for SMS Spam Classification. IEEE Access, 13, 176901–176914. [Google Scholar] [Crossref]
24. https://doi.org/10.1109/ACCESS.2025.3620751 [Google Scholar] [Crossref]
25. Xu, S., Ding, Z., Wei, Z., Yang, C. P., Li, Y., Chen, X., & Wang, H. (2026). Beyond keywords: modeling the semantic complexity of deceptive communication on instant messaging platforms. Journal of Computational Social Science, 9(2). https://doi.org/10.1007/s42001-026-00461-8 [Google Scholar] [Crossref]
26. Xu, S., Ding, Z., Wei, Z., Yang, C. P., Li, Y., Chen, X., & Wang, H. (2025). A Comparative Analysis of Deep Learning and Machine Learning Approaches for Spam Identification on Telegram. 2025 6th International Conference on Computer Communication and Network Security, CCNS 2025, 50–55. https://doi.org/10.1109/CCNS66849.2025.11338070 [Google Scholar] [Crossref]
27. Yadav, A., Yadav, R., & Kiruthika, M. (2025). SMS Spam Detection with NLP and Ensemble Learning for Enhanced Classification. 2025 International Conference on Computing Technologies and Data Communication, ICCTDC 2025. https://doi.org/10.1109/ICCTDC64446.2025.11159039 [Google Scholar] [Crossref]
28. Ying, K. (2012). Study on image multiple classification based on boosting method. Journal of Convergence Information Technology, 7(13), 58–65. https://doi.org/10.4156/jcit.vol7.issue13.7 [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- A Machine Learning Model for Predicting the Risk of Developing Diabetes - T2DM Using Real-World Data from Kilifi, Kenya
- AI-Powered Facial Recognition Attendance System Using Deep Learning and Computer Vision
- A Comprehensive Review on Brain Tumour Segmentation Using Deep Learning Approach
- A Scalable Retrieval-Augmented Generation Pipeline for Domain-Specific Knowledge Applications
- Predictive Maintenance in Semiconductor Manufacturing Using Machine Learning on Imbalanced Dataset