A Text Scam Detection Model Using Text-To-Text Transfer Transformer Architecture
Abstract
The increase in the complexity of text message fraud in online communication endangers privacy, financial stability and user confidence. The traditional approaches to detection, like rule-based systems, keyword matching, and statistical classifiers, have difficulties in adapting to new scam techniques: they tend to end up with high false positive and false negative rates. The proposed work is the development of an improved scam detector using the Text to Text Transfer Transformer (T5) architecture with the Sentence -T5 encoding for semantic data compression. The proposed model was optimized using data comprised of the Kaggle benchmark dataset and scam messages that were previously unseen (collected and directly fed to the model using crowd sourcing and web scraping). Experiments were conducted, and the results were compared with Na¨ıve Bayes, SVM, Decision Tree, Random Forest, LSTM, Logistic Regression and K Nearest Neighbor. The comparative experiments have shown that the proposed model achieved 98% in all aspects of accuracy, precision, recall, and F1 Score, performing better than all the other baseline models. The proposed model displayed good generalization across unseen scam variations and, therefore, can be applied in secure messaging infrastructures. This work presents a robust and scalable, context-aware method to address performance and adaptability problems associated with fraud detection.
Keywords
Ethical Statement
References
- P. Laskov and R. Lippmann, “Machine learning in adversarial environments,” Mach. Learn., vol. 81, no. 2, pp. 115–119, 2010, doi : 10.1007/s10994-010-5207-6.
- G. Park and J. M. Taylor, “Towards text-based phishing detection,” arXiv preprint arXiv:2111.01676, 2021. [Online]. Available: https://arxiv.org/abs/2111.01676
- S. Rojas-Galeano, “Using BERT encoding to tackle the mad-lib attack in SMS spam detection,” arXiv preprint arXiv:2107.06400, 2021. [Online]. Available: https://arxiv.org/abs/2107.06400
- O. Agboola, “Spam detection using machine learning and deep learning,” Ph.D. dissertation, Louisiana State Univ. and Agric. & Mech. College, Baton Rouge, LA, USA, 2022, doi : 10.31390/gradschool dissertations.6011.
- S. Gadde, A. Lakshmanarao, and S. Satyanarayana, “SMS spam detection using machine learning and deep learning techniques,” in Proc. 7th Int. Conf. Adv. Comput. Commun. Syst. (ICACCS), Coimbatore, India, Mar. 2021, pp. 358–362, doi : 10.1109/ICACCS51430.2021.9441783.
- Y. Lee, J. Saxe, and R. Harang, “CATBERT: Context-aware tiny BERT for detecting social engineering emails,” arXiv preprint arXiv:2010.03484, 2020. [Online]. Available: https://arxiv.org/abs/2010.03484
- T. Brown et al., “Language models are few-shot learners,” in Adv. Neural Inf. Process. Syst., vol. 33, Vancouver, Canada, pp. 1877–1901, 2020.
- A. Radford, J. Wu, R. Child, D. Luan, and D. Amodei, “Language models are unsupervised multitask learners,” OpenAI, Tech. Rep., 2019. [Online]. Available: https://cdn.openai.com/better-language-models/language models are unsupervised multitask learners.pdf
Details
Primary Language
English
Subjects
Data Security and Protection, Natural Language Processing
Journal Section
Research Article
Early Pub Date
October 27, 2026
Publication Date
October 30, 2026
Submission Date
November 6, 2025
Acceptance Date
June 22, 2026
Published in Issue
Year 2026 Volume: 9 Number: 5