Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM66334
Volume:
10 |
7 |
Jul 2026
Pages:
1-9
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.

Department of Computer Science
JSPM University Pune
Department of Computer Science
JSPM University, Pune, India
Despite being an old issue, the development of generative AI algorithms made the problem more dangerous. The messages created using LLMs sound very convincing as they mimic human messages. In this paper, we introduce the system for detecting the spam that employs classical NLP text processing algorithms and supervised machine learning considering the existing threat of spam. This solution comprises five steps of the text preprocessing for the SMS messages including lowercasing, noise filtering with the help of regular expressions, removing the stopwords and stemming with the help of Porter Stemmer in order to convert the SMS messages into the feature vectors based on TF-IDF with up to 5,000 features. For the SMS Spam Collection dataset containing 5,572 SMS messages we have used four classifiers including the Multinomial Naïve Bayes, Logistic Regression, Linear SVM and Random Forest. Among all classifiers, the Linear SVM performed the best with 98.2% accuracy, 97.3% precision, 90.6% recall, and F1-score of 93.8%. The part of the problem which we find particularly interesting, and which is discussed mostly in this paper, is whether such a solution can compete with spam produced by the generative AI systems. It is because stemming decreases the diversity of vocabulary which is used by the language models, IDF weight automatically downweights the common tokens that are popular among the language models, and geometric properties of the margins of SVM allow some flexibility in case of perturbation of feature space. We have also developed the web application based on Flask framework for real-time predictions.
KEYWORDS
We attempted to implement a spam classifier of good quality not only for classic spam but also for new generation of spam produced using AI technologies. Our classifier confirmed some of our hypotheses - SVM cannot be surpassed in terms of TF-IDF representation, preprocessing is crucial, precision-recall balance is highly dependent on the selected algorithm but also uncovered some unexpected results. What is most fascinating is the fact that classical stages of NLP pipeline, invented many years ago, before anyone even considered ChatGPT, provide an accidental yet effective protection against spam produced using AI. Stemming lowers the diversity of paraphrases. Weighting by IDF helps to overcome preference of the language model for common tokens. The margin of SVM serves as a buffer in the feature space in relation to paraphrasing perturbations. Nevertheless, these techniques have some drawbacks. They can be bypassed by an intelligent enough adversary attempting to move beyond the training vocabulary. In the long term, it will be necessary to apply not one technique but a whole strategy of defense built around a classical pipeline, including enrichment of the corpus by AI-produced spam, characteristics of AI-produced text detection by means of perplexity, and adversarial training. For future work, we plan to: 1) Train the model on diverse LLM-generated spam, enabling classifiers to witness themselves the statistical patterns created by machines. 2) Adopt the 2-step system, where the TF-IDF classifier is employed in the first step, and the BERT-based classifier [19] is applied to emails that lie on the borderline. 3) Test the system through a well-defined process based on adversarial examples created through iterative queries on the classification model. 4) Add multilingual preprocessing in the form of language-agnostic tokenizers and multilingual embeddings. 5) Add Federated Learning, ensuring that the model learns during its application to many devices while none of their communications leave the device. The code, trained model, and web app are provided for replication and further exploration.
[1] GSMA Intelligence, "The mobile economy 2023," GSMA, London, U.K., Tech. Rep., 2023. [2] M. Delany, "Domain-based message authentication, reporting, and conformance (DMARC)," Internet Eng. Task Force, RFC 7489, Mar. 2015. [3] Statista Research Dept., "Global spam volume as percentage of total e-mail traffic from 2007 to 2023," Statista, 2023. [4] T. Brown et al., "Language models are few-shot learners," in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), vol. 33, 2020, pp. 1877–1901. [5] Z. Waseem and D. Hovy, "Hateful symbols or hateful people? Predictive features for hate speech detection on Twitter," in Proc. NAACL Student Res. Workshop, San Diego, CA, USA, 2016, pp. 88–93. [6] Apache Software Foundation, "Apache SpamAssassin," 2023. [Online]. Available: https://spamassassin.apache.org/ [7] Spamhaus Technology Ltd., "The Spamhaus project," 2023. [Online]. Available: https://www.spamhaus.org/ [8] P. O. Boykin and V. P. Roychowdhury, "Leveraging social networks to fight spam," IEEE Comput., vol. 38, no. 4, pp. 61–68, Apr. 2005. [9] F. Sebastiani, "Machine learning in automated text categorization," ACM Comput. Surv., vol. 34, no. 1, pp. 1–47, Mar. 2002. [10] M. Sahami, S. Dumais, D. Heckerman, and E. Horvitz, "A Bayesian approach to filtering junk e-mail," in Learning for Text Categorization: Papers from the 1998 Workshop, AAAI Tech. Rep. WS-98-05, Madison, WI, USA, 1998, pp. 55–62.
Publication Date
7/24/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
4
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...