Skip to main navigation Skip to search Skip to main content

Leveraging large language models for cybersecurity: enhancing SMS spam detection with robust and context-aware text classification

  • Mohsen Ahmadi
  • , Matin Khajavi
  • , Abbas Varmaghani
  • , Ali Ala
  • , Kasra Danesh
  • , Danial Javaheri

Research output: Contribution to journal › Article › peer-review

Abstract

This study evaluates feature extraction techniques and classifiers for detecting SMS spam. We compared six classifiers: Naive Bayes, K-Nearest Neighbors, Support Vector Machines, Linear Discriminant Analysis, Decision Trees, and Deep Neural Networks, using both bag-of-words and TF-IDF. Results show TF-IDF consistently outperforms bag-of-words, with Naive Bayes achieving the highest accuracy (96.2%) and strong precision for non-spam (0.976). Support Vector Machines (94.5% accuracy) and Deep Neural Networks (91.0% accuracy) also performed well. In contrast, K-Nearest Neighbours, Linear Discriminant Analysis, and Decision Trees were less effective. Findings highlight TF-IDF with Naive Bayes, SVMs, or DNNs as optimal for spam detection.

Original languageEnglish
Pages (from-to)277-303
Number of pages27
JournalCyber-Physical Systems
Volume12
Issue number3
DOIs
Publication statusPublished - 2026
Externally publishedYes

Keywords

  • Feature extraction
  • large language models (LLM)
  • machine learning
  • natural language processing
  • spam detection

Fingerprint

Dive into the research topics of 'Leveraging large language models for cybersecurity: enhancing SMS spam detection with robust and context-aware text classification'. Together they form a unique fingerprint.

Cite this