Previous Article in Journal
Gaps in AI-Compliant Complementary Governance Frameworks’ Suitability (for Low-Capacity Actors), and Structural Asymmetries (in the Compliance Ecosystem)—A Systematic Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Deep Learning Approaches for Multi-Class Classification of Phishing Text Messages

Department of Engineering Management and Systems Engineering, The George Washington University, Washington, DC 20052, USA
*
Author to whom correspondence should be addressed.
J. Cybersecur. Priv. 2025, 5(4), 102; https://doi.org/10.3390/jcp5040102
Submission received: 7 October 2025 / Revised: 6 November 2025 / Accepted: 12 November 2025 / Published: 21 November 2025

Abstract

Phishing attacks, particularly Smishing (SMS phishing), have become a major cybersecurity threat, with attackers using social engineering tactics to take advantage of human vulnerabilities. Traditional detection models often struggle to keep up with the evolving sophistication of these attacks, especially on devices with constrained computational resources. This research proposes a chain transformer model that integrates GPT-2 for synthetic data generation and BERT for embeddings to detect Smishing within a multiclass dataset, including minority smishing variants. By utilizing compact, open-source transformer models designed to balance accuracy and efficiency, this study explores improved detection of phishing threats on text-based platforms. Experimental results demonstrate an accuracy rate exceeding 97% in detecting phishing attacks across multiple categories. The proposed chained transformer model achieved an F1-score of 0.97, precision of 0.98, and recall of 0.96, indicating strong overall performance.

1. Introduction

Phishing attacks, particularly Smishing (SMS phishing), exploit human psychology by manipulating victims into compromising security measures, leading to the exposure of sensitive data [1,2]. These attacks are particularly effective because they rely on trust and emotional triggers, often bypassing traditional cybersecurity defenses [3]. Recent reports indicate that Americans lost over $800 million to Smishing scams in 2022, underscoring the growing importance of effective detection strategies [4,5]. Given the increasing prevalence of Smishing attacks, it is crucial to develop robust detection mechanisms. Current systems often struggle to identify and classify the diverse range of phishing attempts, especially those that are less frequent but equally harmful [6,7]. This research explores integrating data augmentation and transformer-based embeddings to improve the effectiveness of multiclass Smishing detection models.
Despite advancements in machine learning and cybersecurity, conventional Smishing detection systems struggle to keep pace with the continuously evolving tactics of cybercriminals. This challenge is particularly significant when identifying Smishing in resource-constrained environments, which often have limited computational resources [8]. Many existing models focus solely on binary classification, neglecting the need to detect and classify the diverse variants of phishing within multiclass datasets [9]. Additionally, minority classes, representing less frequent but equally dangerous Smishing attempts, can go undetected due to the limitations of current models [10]. To address these gaps, this research builds upon the work of Mishra & Soni [8] by introducing a deep learning-based detection system designed to differentiate between legitimate messages, spam, and Smishing within a multiclass dataset. Utilizing the ‘SMS Phishing Dataset for Machine Learning and Pattern Recognition,’ this study highlights key features, such as URLs and email addresses, which are crucial for Smishing classification [8]. However, prior studies have been constrained by dataset diversity, binary classification schemes, and high computational overhead, that restrict their applicability to real-world resource-constrained environments. A new chain transformer model is proposed, integrating GPT-2 for synthetic data generation and BERT for embeddings to enhance model performance, particularly for minority classes [11,12].
Through this research, the aim is to contribute to the field by developing a deep learning-based Smishing detection system that effectively classifies SMS messages into legitimate, spam, and phishing categories. This approach includes introducing a chain transformer model that leverages synthetic data generation and advanced embeddings to improve detection rates, especially for minority classes. Additionally, the performance of various deep learning architectures are evaluated to identify the most effective model for deployment on devices with limited computational resources [13]. While there has been some exploration of deep learning for Smishing detection, there is limited focus on how the choice of architecture impacts efficiency for multiclass classification [6]. This research intends to fill this gap by assessing how different deep learning models can enhance detection capabilities, particularly for underrepresented phishing types. The originality of this research lies in its comprehensive evaluation of ensemble models that combine deep learning transformer embeddings with traditional machine learning techniques, all with the goal of achieving both accuracy and efficiency.
The remainder of this paper is structured as follows. Section 2 summarizes a review of related research on Smishing detection using traditional and deep learning methods. Section 3 describes the dataset used in this research and exploratory data analysis. Section 4 explains the design, implementation, and experimental setup of the proposed model. Section 5 presents the results and performance evaluations, and finally, Section 6 concludes the paper and outlines future research options.

2. Related Works

The Smishing Detector model presented by Mishra & Soni [14] integrates URL behavior with SMS content analysis to enhance detection accuracy, making it highly effective in identifying Smishing attempts. The dual-analysis approach can be resource-intensive, posing challenges for performance in resource-constrained environments. Its effectiveness depends on the accuracy of the URL behavior analysis component. The model uses binary classification and achieves notable performance, with URL features being the most accurate at 94%. A neural network-based variant of the model [15] improved detection further, achieving a 97.93% accuracy by utilizing a backpropagation algorithm, though it remains computationally demanding. Other implementations focus on verifying URL authenticity and SMS content, achieving accuracy rates as high as 96.2%.
DSmishSMS [16] is a system designed to detect Smishing SMS messages by combining content analysis and machine learning. It focuses on extracting five features from SMS texts to classify messages, with phases for checking URL authenticity and analyzing SMS content. Although it is adaptive and can improve with new data, its reliance on machine learning requires regular updates and large datasets, which can lead to overfitting. Unlike neural network-based systems, DSmishSMS uses traditional classifiers to compare results, achieving an accuracy of 97.9% (for both Smishing and Spam combined). Despite its effectiveness, Smishing detection remains a challenge due to the limited information available in SMS messages.
SmiDCA [17] uses machine learning to detect Smishing attacks and can adapt as threats change over time. The model extracts features from Smishing messages and applies dimensionality reduction to select the 20 most relevant ones for classification. It employs correlation algorithms and machine learning techniques, achieving a 96.4% accuracy using a Random Forest classifier. The model does need large datasets for training, which may limit its effectiveness in real-world scenarios. SmiDCA uses binary classification.
The S-Detector model [18] detects Smishing messages by analyzing both SMS content and URL behavior. If a URL is included, it checks for Android package file downloads to identify potential Smishing attempts. If no URL is present, it uses keyword classification using the Naive Bayes algorithm to check for suspicious patterns. The model is lightweight and well-suited for resource-constrained environments, but it may have difficulty handling advanced evasion techniques used by attackers and might not perform well with unseen Smishing patterns. It uses binary classification to differentiate between Smishing and legitimate messages, offering reliable detection while focusing on efficiency.
The Compact On-device Pipeline Smishing detection [19] model is optimized for resource-constrained environments, providing real-time detection of Smishing attacks with minimal impact on performance. It uses a Disentangled Variational Autoencoder (VAE) to analyze both SMS content and URL features without the need for large URL databases. This is important for detecting short-lived malicious URLs. Its lightweight design makes it ideal for resource-constrained environments with limited computational resources. However, its compact structure may limit its effectiveness against more complex or evolving Smishing tactics. The model’s architecture creates a balance between performance efficiency and accuracy, addressing key challenges in resource-constrained environments’ security.
The Detection of Phishing in Mobile Instant Messaging model [20] analyzes message content using natural language processing, improving its ability to detect phishing attempts in mobile instant messaging. The integration of machine learning increases its adaptability. However, NLP models can be resource-heavy and typically require significant processing power [21]. The model’s accuracy relies on the quality of the training data and the effectiveness of the NLP techniques applied [22].
The paper on Investigating Evasive Techniques in SMS Spam Filtering [23] compares different machine learning models, focusing on their strengths and weaknesses in filtering SMS Spam. It provides useful insights into the effectiveness of various approaches. Because it is a comparative study, it does not offer a clear-cut solution but instead gives an overview of the different models. The performance of each model may vary based on the specific implementation and dataset used [24].
ExplainableDetector [25] uses transformer-based language models, which are highly effective at understanding and analyzing text. It also focuses on explainability, offering insights into how decisions are made. Transformer models are resource-intensive and may not be suitable for all mobile devices [26]. The emphasis on explainability can increase complexity to the model, which may affect its performance [7]. ExplainableDetector uses binary classification.
Privacy BERT-LSTM [27] combines BERT and LSTM to detect sensitive information in text, focusing on high accuracy in identifying privacy-related content. The combination of BERT and LSTM can be computationally intensive, requiring substantial processing power [28]. Privacy BERT-LSTM uses binary classification. In a recent study, researchers applied a Bidirectional LSTM within a federated learning framework to detect Smishing attacks, achieving an accuracy of 88.78% [29].
While the studies outlined above demonstrate progress in Smishing detection, most focus on binary classification or rely on computationally intensive architectures. This gap motivates the current work, which explores lightweight transformer combinations for multiclass detection. Table 1 summarizes key characteristics and performance metrics of existing and proposed Smishing detection approaches.

3. Phishing Dataset Specifications

Smishing detection faces notable challenges due to the absence of standardized benchmark datasets. This research utilizes the ‘SMS Phishing Dataset for Machine Learning and Pattern Recognition’ (SMSPD) by Mishra & Soni [8], available on Mendeley Data. Building upon the foundational work of Almeida et al. [30], the dataset classifies SMS messages into three categories: Ham (81.1%), Smishing (10.7%), and Spam (8.2%), highlighting a significant class imbalance.
Figure 1 illustrates the distribution of messages across these three categories, emphasizing the dominant presence of legitimate messages (Ham) in comparison to the much smaller proportions of Smishing and Spam. This imbalance plays a critical role in training detection models, as underrepresented classes may require resampling techniques to improve detection performance.
Figure 2 illustrates the word distribution across text messages, revealing that Ham messages typically contain more words than Smishing and Spam. This difference indicates that word count may serve as a key feature in classification models, as Smishing and Spam messages tend to be shorter and more direct.
Figure 3 presents Kernel Density Estimation (KDE) to examine word frequency distribution, highlighting areas with higher or lower word concentration. This visualization helps identify anomalies within the dataset by uncovering patterns in word usage that may distinguish Smishing attempts from legitimate messages. Understanding these patterns plays a crucial role in refining classification models by leveraging linguistic variations across different message types.

4. Design and Implementation

This research explores the effectiveness of deep learning models, particularly transformers, alongside traditional machine learning algorithms for detecting Smishing and Spam in text messages. By leveraging Python (v3.13) for generating synthetic data, fine-tuning transformer models, and conducting analysis and visualizations, this study aims to enhance the accuracy and efficiency of Smishing detection systems. The choice to employ scikit-learn version 1.5.2, rather than the newer 1.6.1 release from January 2025, ensures compatibility with existing methodologies while allowing for a focused evaluation of model performance. To enhance model performance, extensive preprocessing is applied to the dataset, including cleaning, tokenization, and handling missing values. Additionally, Exploratory Data Analysis (EDA) is conducted to assess data distribution, class imbalances, and key challenges, providing essential insights for model development and fine-tuning. The originality of this research lies in its comprehensive approach to integrating deep learning and traditional machine learning techniques, as well as its focus on addressing the unique challenges posed by minority classes in Smishing detection. By systematically evaluating the interplay between different model architectures and preprocessing techniques, this study contributes valuable insights to the field of cybersecurity, particularly in the context of phishing threats in resource-constrained environments.
The dataset is divided into training and testing subsets, with data balancing techniques implemented on the training subset to address class imbalances. Feature selection plays a key role in optimizing efficiency by filtering out irrelevant features. Hyperparameter tuning and validation are performed on the training subset, while the testing subset is used as a benchmark to evaluate model performance and determine the most effective approach for Smishing detection. To ensure data integrity and prevent information leakage, all generated synthetic samples were confined strictly to the training subset and excluded from any validation and testing sets.
To improve Smishing detection, synthetic data generation is employed to balance the dataset. The GPT-2 Medium model, fine-tuned for minority classes, is used to create synthetic text messages that capture distinct linguistic patterns. GPT-2’s pre-trained language capabilities ensure that generated messages align with real-world patterns while not distorting the word count distribution of original training data, leading to superior model training and detection accuracy. To identify the best synthetic data generation method, SMOTE, GPT-2 Medium, and GPT-2 were evaluated using statistical metrics such as mean, standard deviation, minimum, and maximum values. While SMOTE and GPT-2-based balancing were used to address class imbalance, care was taken to minimize overfitting and semantic drift by applying controlled sampling ratios and temperature settings during text generation, ensuring that synthetic data remained representative of real-world patterns. GPT-2 Medium was selected for its ability to produce high-quality synthetic samples that accurately represent minority-class characteristics.
This study enhances Smishing detection by generating synthetic data to create a more balanced dataset. The synthetic training data is generated using the GPT-2 Medium model and fine-tuned for each minority class. By using the model’s pre-training linguistic abilities, synthetic text messages are generated to capture the unique characteristics and semantic details of the minority class. This ensures that the generated messages not only align with the intended meaning but also maintain the word count distribution of the training data.
Table 2 presents the stats of the dataset using the SMOTE technique.
Table 3 displays the statistics of the GPT-2 Medium generated dataset. This is the dataset chosen for this research.
Table 4 shows the statistics of the GPT-2 generated dataset. There was no significant difference between datasets generated by GPT-2 medium and GPT-2, so the smaller model was chosen.
Shapley values are applied for feature selection due to their model-agnostic nature, allowing effective estimation of feature importance across different machine learning models. A major advantage of Shapley values is their ability to handle correlated features by assigning lower importance to redundant variables, ensuring that only unique contributions enhance model performance. In this study, Shapley values helped prioritize features while maintaining model accuracy and reducing classification time. The SHAP analysis revealed that structural indicators, such as the presence of URLs, email addresses, or phone numbers, contributed the most to classification, alongside semantic text embedding. To simplify interpretation, the mean absolute SHAP value was used, providing clear insights into the most influential attributes in the dataset.
Following data preparation and splitting, text embeddings are generated using pre-trained transformer models, such as BERT, DistilBERT (Distilled BERT), and ELECTRA, from Hugging Face’s Transformers library. Although more recent transformer variants such as TinyBERT and MobileBERT are specifically optimized for mobile or edge deployment, this study focused on BERT, DistilBERT, and ELECTRA due to their well-established benchmark performance, broad availability of pretrained weights, and extensive prior validation in smishing and text classification research. These models provided a strong and reproducible foundation for comparative analysis without introducing additional variability from newer, less extensively evaluated architectures. These embeddings are extracted as high-dimensional feature vectors and serve as inputs for traditional machine learning algorithms such as logistic regression, random forest, and support vector machines [31]. The selection criteria for the machine learning algorithms were based on their proven effectiveness and computational efficiency in resource-constrained environments. Algorithms such as Support Vector Classifier (SVC) and Logistic Regression were chosen because they offer strong classification performance while maintaining relatively low memory and processing requirements, making them well-suited for deployment in lightweight or constrained settings. To enhance model robustness, k-fold cross-validation is employed, ensuring comprehensive performance evaluation while mitigating overfitting through iterative training on different data subsets [32]. Hyperparameter tuning is conducted using grid search, optimizing parameters such as learning rate, batch size, and regularization strength. The final model is evaluated using F1 score, precision, accuracy, and recall to ensure its ability to generalize effectively to new data [33].
Overfitting happens when a model memorizes training data instead of learning patterns that generalize to new data, reducing effectiveness [34]. To prevent this, a small learning rate is adopted during training, allowing gradual updates and preventing drastic weight changes that can lead to overfitting [35].
Different synthetic data generation methods are combined with BERT-based language models and traditional machine learning algorithms to identify the best-performing model. The model development process begins with generating contextual embeddings from a pre-trained transformer model, effectively capturing the semantic meaning of input text. These embeddings serve as input features for traditional machine learning models such as logistic regression, random forest, and support vector machines [36]. By integrating the deep contextual understanding of transformers with the efficiency of traditional machine learning models, this hybrid approach enhances classification accuracy and interpretability [12]. The study incorporates synthetic data generation alongside BERT-based models and machine learning algorithms to optimize multi-class SMS classification.
This research evaluates 9 model variations by testing combinations of three transformer-based embeddings (BERT, Google ELECTRA, and DistilBERT) with three traditional machine learning models: Random Forest Classifier, Logistic Regression, and Support Vector Classifier (SVC). Each combination undergoes testing with various hyperparameter configurations, including batch size, epochs, and learning rates, to determine the most effective settings for improving overall model accuracy. To ensure reproducibility and clarity, the training and evaluation workflow of the proposed smishing detection model is summarized in pseudocode form.
Algorithm 1 presents the main computational steps, including data preprocessing, model fine-tuning, and performance assessment of the chain transformer model.
Algorithm 1. Smishing Detection Workflow
Input: D_train, D_test, transformer model M
Output: performance metrics, saved results
        1.
Tokenize D_train and D_test using M’s tokenizer
        2.
Encode labels for all datasets
        3.
Load pretrained transformer model M with classification head
        4.
Fine-tune M on D_train
        5.
Evaluate M on D_test:
  •    - Compute accuracy, precision, recall, F1-score
        6.
Save metrics and generate ROC curves
To identify the most suitable deep learning (DL) architecture for achieving the research objective, the following tables present a summary comparison of 47 evaluated architectures, highlighting their F1-Score, Precision, and Recall. The results indicate that the DL architecture integrating GPT-2 with BERT-uncased achieves the highest overall performance.
Table 5 presents the performance of models utilizing BERT embeddings alone, alongside those paired with ML algorithms such as SVC, Logistic Regression, and Random Forest. The results indicate that the BERT embedding without an ML algorithm, trained for 3 epochs, achieves the highest performance.
Table 6 presents the performance of models using DistilBERT embeddings, both without an ML algorithm and in combination with SVC, Random Forest, and Logistic Regression algorithms.
Table 7 presents the performance of models combining Google ELECTRA embeddings with no ML, Random Forest, Logistic Regression, and SVC ML algorithms.
Google ELECTRA models ran faster but unfortunately the results were not as accurate.
Finally, Table 8 shows the results of models with no Embeddings and using SVC, Logistic Regression, and Random Forest ML algorithms. This shows an improvement in the models’ performance which included an Embedding.
Based on the results presented in Table 5, Table 6, Table 7 and Table 8, the deep learning architecture combining GPT-2 with BERT-uncased achieves better precision compared to models utilizing DistilBERT or Google ELECTRA. This architecture benefits from GPT-2’s ability to generate coherent and contextually relevant text. Also, it utilizes BERT-uncased’s proficiency in understanding the nuances of language through bidirectional context. By integrating these two transformer models, the architecture enhances the model’s capacity to capture complex linguistic patterns and improve classification accuracy in detecting Smishing and Spam messages. A full list of experiments can be provided upon request.
Precision and recall for the minority Smishing class are reported in Figure 4 and Figure 5, showing improved detection with the chosen model. However, additional research time is recommended to perform further hyperparameter tuning to enhance classification performance.
Establishing a clear threat model that distinguishes between Smishing, Spam, and Ham is essential for developing targeted detection strategies and improving user awareness, particularly in operational scenarios such as financial institutions or e-commerce platforms where users are frequently targeted by Smishing attacks. Smishing messages are specifically designed to deceive users into revealing sensitive information, while Spam consists of unsolicited advertisements that do not pose a direct threat. For instance, in a banking application, identifying Smishing messages can enable real-time alerts that warn users about potential phishing attempts, enhancing user trust and security. A precise definition of each class eliminates ambiguity in the classification logic, grounding the classification scheme in practical use cases, such as customer support systems that filter harmful messages while allowing legitimate communications. This strategic approach to multiclass framing provides actionable insights for improving detection systems, enabling organizations to tailor their responses based on the specific threat posed by each class and effectively address the unique challenges posed by minority classes in Smishing detection.

5. Results

The objective of this research is to develop a deep learning-based Smishing detection system using an ensemble model for multiclass classification. The primary goal is to enhance classification accuracy, with a particular focus on improving detection of minority phishing types by integrating multiple deep learning models in a unified framework.
The findings supported three key hypotheses. First, feature identification analysis demonstrated that URLs and email addresses play a key role in classifying Smishing attacks, as illustrated in the Mean Absolute SHAP values chart below. This conclusion was validated through Shapley value analysis, presented in Figure 4, which highlights their importance in distinguishing minority phishing types from legitimate messages.
Second, Figure 5 presents the ROC curve for each class, highlighting the deep learning model’s effectiveness, which achieved over 97% validation accuracy. The model demonstrated exceptional performance, especially in detecting minority phishing attacks, which are frequently misclassified by traditional methods.
Lastly, the study examined model synergies by incorporating multiple deep learning models within a chained transformer architecture. This integration notably improved classification accuracy and overall performance, creating a highly effective approach for Smishing detection in a multiclass setting. Table 9 presents the results of the chained transformer model that achieved the best performance.
This chained transformer model enhances the Baseline model developed by Houston [37] by offering improved effectiveness in identifying minority phishing types. The Houston baseline was included primarily for contextual comparison, as Houston’s work focused on the generation of synthetic data using transformer-based methods rather than on developing or evaluating a classification model. Consequently, the baseline does not provide a directly comparable model architecture or performance framework but serves to illustrate the impact of synthetic data generation on downstream smishing detection tasks. Table 10 compares the findings from the chained transformer model in this research with those of the Baseline model.
This study did not find a baseline model from published journals using the same dataset or focusing on text phishing multiclass detection. The closest approximation was the work in DSmishSMS [16], which proposed a Smishing detection system achieving a binary classification accuracy of 0.979 and referenced as a paper offering an experimental study of the dataset used in this research. Similar accuracy was achieved for multiclass classification. No additional analysis was conducted to compare binary vs. multiclass classification models beyond their accuracy metrics.

6. Conclusions and Future Work

This research provides valuable insights into Smishing detection within multiclass datasets. Through Shapley value analysis, URLs and email addresses emerged as critical features for classification. The deep learning model achieved over 97% validation accuracy, demonstrating strong performance in detecting minority phishing types. The implementation of a chained transformer model effectively balanced complexity and accuracy, demonstrating strong multiclass performance and providing a foundation for further benchmarking of phishing detection models. Additionally, integrating multiple deep learning models enhanced the identification of both Smishing and Spam, addressing a gap in existing methods.
Future advancements in Smishing detection could focus on incorporating ensemble techniques to further improve accuracy, particularly for minority classes. Optimizing real-time deployment on resource-constrained environments will be essential for balancing performance and efficiency while enabling continuous updates. Implementing the model directly on resource-constrained environments could help reduce latency, conserve bandwidth, and ensure compatibility with existing security features. Adversarial testing can reinforce model resilience against evolving phishing tactics. Expanding datasets to include a wider range of up-to-date phishing messages will enhance adaptability, creating a more robust detection framework. Integrating explainability into user interfaces (for example, displaying concise warnings indicating message features like suspicious URLs or sender anomalies) could significantly enhance user trust and interpretability of Smishing detection systems. Introducing techniques such as dropout or early stopping to mitigate overfitting, along with demonstrating the model’s ability to generalize to unseen data, would strengthen the overall effectiveness.

Author Contributions

Conceptualization, M.L.M. and M.F.I.; methodology, M.L.M. and M.F.I.; validation, M.L.M. and M.F.I.; formal analysis, M.L.M. and M.F.I.; investigation, M.L.M. and M.F.I.; resources, M.L.M. and M.F.I.; data curation, M.L.M. and M.F.I.; writing—original draft preparation, M.L.M. and M.F.I.; writing, review and editing, M.L.M. and M.F.I.; visualization, M.L.M. and M.F.I.; supervision, M.L.M. and M.F.I. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding. Approved for Public Release; Distribution Unlimited. Public Release Case Number 25-3038. The author’s (M.F.I.) affiliation with The MITRE Corporation is provided for identification purposes only, and is not intended to convey or imply MITRE’s concurrence with, or support for, the positions, opinions, or viewpoints expressed by the author. ©2025 The MITRE Corporation. All Rights Reserved. The author’s (M.L.M.) affiliation with The Boeing Company is provided for identification purposes only, and is not intended to convey or imply Boeing’s concurrence with, or support for, the positions, opinions, or viewpoints expressed by the author. ©2025 The Boeing Company. All Rights Reserved.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article is available in the associated dataset [38].

Acknowledgments

The authors acknowledge the use of AI tools for enhancing the quality of the paper, particularly for grammar checking.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SMSShort Message Service
GPT-2Generative Pre-trained Transformer 2
BERTBidirectional Encoder Representations from Transformers
URLUniform Resource Locator
LSTMLong Short-Term Memory
SMSPDSMS Phishing Dataset for Machine Learning and Pattern Recognition
KDEKernel Density Estimation
EDAExploratory Data Analysis
SHAPShapley Additive Explanations
DistilBERTDistilled BERT
ELECTRAEfficiently Learning and Encoder that Classifies Token Replacements Accurately
MLMachine Learning
SMOTESynthetic Minority Oversampling Technique
SVCSupport Vector Classifier
ROCReceiver Operating Characteristic

References

  1. Alkhalil, Z.; Hewage, C.; Nawaf, L.; Khan, I. Phishing attacks: A recent comprehensive study and a new anatomy. Front. Comput. Sci. 2021, 3, 563060. [Google Scholar] [CrossRef]
  2. Gupta, M.; Bakliwal, A.; Agarwal, S.; Mehndiratta, P. A comparative study of spam SMS detection using machine learning classifiers. In Proceedings of the 2018 Eleventh International Conference on Contemporary Computing (IC3), Noida, India, 2–4 August 2018; pp. 1–7. [Google Scholar] [CrossRef]
  3. Pant, V.K.; Pant, J.; Singh, R.K.; Srivastava, S. Social Engineering in the Digital Age: A Critical Examination of Attack Techniques, Consequences, and Preventative Measures. In Effective Strategies for Combatting Social Engineering in Cybersecurity; IGI Global: Hershey, PA, USA, 2024; pp. 61–76. [Google Scholar] [CrossRef]
  4. Chan-Tin, E.; Stalans, L.J. Phishing for profit. In Handbook on Crime and Technology; Hummer, D., Byrne, J., Eds.; Edward Elgar Publishing: Gloucestershire, UK, 2023; pp. 54–71. [Google Scholar]
  5. FTC. New FTC Data Analysis Shows Bank Impersonation is Most-Reported Text Message Scam; Federal Trade Commission: Washington, DC, USA, 2023. Available online: https://www.ftc.gov/news-events/news/press-releases/2023/06/new-ftc-data-analysis-shows-bank-impersonation-most-reported-text-message-scam (accessed on 5 May 2025).
  6. Orunsolu, A.; Sodiya, A.; Akinwale, A. A predictive model for phishing detection. J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 232–247. [Google Scholar] [CrossRef]
  7. Sengupta, P.; Zhang, Y.; Maharjan, S.; Eliassen, F. Balancing explainability—Accuracy of complex models. arXiv 2023, arXiv:2305.14098. Available online: http://arxiv.org/abs/2305.14098 (accessed on 10 February 2025).
  8. Mishra, S.; Soni, D. SMS phishing dataset for machine learning and pattern recognition. In Proceedings of the 14th International Conference on Soft Computing and Pattern Recognition (SoCPaR 2022); Abra-ham, A., Hanne, T., Gandhi, N., Mishra, P.M., Bajaj, A., Siarry, P., Eds.; Springer: Cham, Switzerland, 2023; pp. 597–604. [Google Scholar] [CrossRef]
  9. Brownlee, J. Random Oversampling and Undersampling for Imbalanced Classification. Machine Learning Mastery. 5 January 2021. Available online: https://machinelearningmastery.com/random-oversampling-and-undersampling-for-imbalanced-classification/ (accessed on 17 October 2024).
  10. Qiu, Z.; Hu, W.; Wu, J.; Liu, W.; Du, B.; Jia, X. Temporal network embedding with high-order nonlinear in-formation [Conference session]. Proc. AAAI Conf. Artif. Intell. 2020, 34, 5436–5443. [Google Scholar] [CrossRef]
  11. Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv 2019, arXiv:1810.04805. Available online: https://arxiv.org/abs/1810.04805 (accessed on 10 February 2025). [CrossRef]
  12. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. arXiv 2017, arXiv:1706.03762. Available online: https://arxiv.org/abs/1706.03762 (accessed on 10 February 2025).
  13. Indurkhya, N.; Damerau, F.J. Handbook of Natural Language Processing, 2nd ed.; Chapman and Hall/CRC: Boca Raton, FL, USA, 2010. [Google Scholar] [CrossRef]
  14. Mishra, S.; Soni, D. Smishing detector: A security model to detect Smishing through SMS content analysis and URL behavior analysis. Futur. Gener. Comput. Syst. 2020, 108, 803–815. [Google Scholar] [CrossRef]
  15. Mishra, S.; Soni, D. Implementation of ‘Smishing Detector’: An efficient model for Smishing detection using neural network. SN Comput. Sci. 2022, 3, 189. [Google Scholar] [CrossRef] [PubMed]
  16. Mishra, S.; Soni, D. DSmishSMS-A system to detect Smishing SMS. Neural Comput. Appl. 2023, 35, 4975–4992. [Google Scholar] [CrossRef] [PubMed]
  17. Sonowal, G.; Kuppusamy, K.S. SmiDCA: An anti-Smishing model with machine learning approach. Comput. J. 2018, 61, 1143–1157. [Google Scholar] [CrossRef]
  18. Joo, J.W.; Moon, S.Y.; Singh, S.; Park, J.H. S-Detector: An enhanced security model for detecting Smishing attack for mobile computing. Telecommun. Syst. 2017, 66, 29–38. [Google Scholar] [CrossRef]
  19. Harichandana, B.S.S.; Kumar, S.; Ujjinakoppa, M.B.; Raja, B.R.K. COPS: A compact on-device pipe-line for real-time Smishing detection. arXiv 2024, arXiv:2402.04173. Available online: http://arxiv.org/abs/2402.04173 (accessed on 10 February 2025).
  20. Verma, S.; Ayala-Rivera, V.; Portillo-Dominguez, A.O. Detection of phishing in mobile instant messaging using natural language processing and machine learning. In Proceedings of the 2023 11th International Conference in Software Engineering Research and Innovation (CONISOFT), Guanajuato, Mexico, 6–10 November 2023. [Google Scholar] [CrossRef]
  21. Min, B.; Ross, H.; Sulem, E.; Ben Veyseh, A.P.; Nguyen, T.H.; Sainz, O.; Agirre, E.; Heintz, I.; Roth, D. Recent advances in natural language processing via large pre-trained language models: A survey. ACM Comput. Surv. 2024, 56, 1–40. [Google Scholar] [CrossRef]
  22. Treviso, M.; Lee, J.-U.; Ji, T.; van Aken, B.; Cao, Q.; Ciosici, M.R.; Hassid, M.; Heafield, K.; Hooker, S.; Raffel, C.; et al. Efficient methods for natural language processing: A survey. Trans. Assoc. Comput. Linguist. 2023, 11, 826–860. [Google Scholar] [CrossRef]
  23. Salman, M.; Ikram, M.; Kaafar, M.A. Investigating evasive techniques in SMS spam filtering: A com-parative analysis of machine learning models. IEEE Access 2024, 12, 24306–24324. [Google Scholar] [CrossRef]
  24. Ma, S. Enhancing NLP Model Performance Through Data Filtering (Technical Report No. UCB/EECS-2023-170); University of California: Berkeley, CA, USA, 2023. [Google Scholar]
  25. Uddin, M.A.; Islam, M.N.; Maglaras, L.; Janicke, H.; Sarker, I.H. ExplainableDetector: Exploring transformer-based language modeling approach for SMS spam detection with explainability analysis. arXiv 2024, arXiv:2405.08026. Available online: http://arxiv.org/abs/2405.08026 (accessed on 10 February 2025). [CrossRef]
  26. Tabani, H.; Balasubramaniam, A.; Marzban, S.; Arani, E.; Zonooz, B. Improving the efficiency of transformers for resource-constrained devices [Conference session]. In Proceedings of the 2021 24th Euromicro Conference on Digital System Design (DSD), Palermo, Italy, 1–3 September 2021. [Google Scholar]
  27. Muralitharan, J.; Arumugam, C. Privacy BERT-LSTM: A novel NLP algorithm for sensitive information detection in textual documents. Neural Comput. Appl. 2024, 36, 15439–15454. [Google Scholar] [CrossRef]
  28. Khan, M.A.; Huang, Y.; Feng, J.; Prasad, B.K.; Ali, Z.; Ullah, I.; Kefalas, P. A multi-attention approach using BERT and stacked bidirectional LSTM for improved dialogue state tracking. Appl. Sci. 2023, 13, 1775. [Google Scholar] [CrossRef]
  29. Remmide, M.A.; Boumahdi, F.; Ilhem, B.; Boustia, N. A privacy-preserving approach for detecting smishing attacks using federated deep learning. Int. J. Inf. Technol. 2025, 17, 547–553. [Google Scholar] [CrossRef]
  30. Almeida, T.A.; Hidalgo, J.M.G.; Yamakami, A. Contributions to the study of SMS Spam filtering: New collection and results. In Proceedings of the DocEng ’11: 11th ACM Symposium on Document Engineering, Mountain View, CA, USA, 19–22 September 2011; pp. 259–262. [Google Scholar] [CrossRef]
  31. Alpaydin, E. Introduction to Machine Learning, 4th ed.; The MIT Press: Cambridge, MA, USA, 2020; Available online: https://mitpress.mit.edu/9780262043793/introduction-to-machine-learning/ (accessed on 10 February 2025).
  32. Bishop, C.M. Pattern Recognition and Machine Learning; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4, Available online: https://link.springer.com/book/9780387310732 (accessed on 10 February 2025).
  33. Géron, A. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd ed.; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2022; Available online: https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/ (accessed on 10 February 2025).
  34. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. Available online: https://www.cs.toronto.edu/~rsalakhu/papers/srivastava14a.pdf (accessed on 10 February 2025).
  35. Bengio, Y. Practical recommendations for gradient-based training of deep architectures. In Neural Networks: Tricks of the Trade, 3rd ed.; Montavon, G., Orr, G.B., Müller, K.-R., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 437–478. [Google Scholar] [CrossRef]
  36. Johnson, R.; Zhang, T. Semi-supervised convolutional neural networks for text categorization via region embedding [Conference presentation]. In Proceedings of the NIPS ’15: 28th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 7–12 December 2015; Volume 1. [Google Scholar] [CrossRef]
  37. Houston, R.A. Transformer-Enhanced Text Classification in Cybersecurity: GPT Augmented Synthetic Data Generation, BERT-Based Semantic Encoding, and Multiclass Analysis. Ph.D. Thesis, The George Washington University, Washington, DC, USA, 2024. Available online: https://search.proquest.com/openview/fe2a7d3fb1e4ac4426755c3237663c7c/1?pqorigsite=gscholar&cbl=18750&diss=y (accessed on 10 February 2025).
  38. Munoz, M.; Islam, M. A Balanced Dataset for Spam and Smishing Detection Using Large Language Models (LLMs). Mendeley Data, V1. 2025. Available online: https://data.mendeley.com/datasets/vmg875v4xs (accessed on 7 July 2025). [CrossRef]
Figure 1. Dataset Distribution by Class.
Figure 1. Dataset Distribution by Class.
Jcp 05 00102 g001
Figure 2. Distribution of Words per Text Data.
Figure 2. Distribution of Words per Text Data.
Jcp 05 00102 g002
Figure 3. Kernel Density Estimation of Word Concentration.
Figure 3. Kernel Density Estimation of Word Concentration.
Jcp 05 00102 g003
Figure 4. Mean Absolute Shapley Values of Features.
Figure 4. Mean Absolute Shapley Values of Features.
Jcp 05 00102 g004
Figure 5. ROC Curve for Ham (Class 0), Phishing (Class 1) and Spam (Class 2).
Figure 5. ROC Curve for Ham (Class 0), Phishing (Class 1) and Spam (Class 2).
Jcp 05 00102 g005
Table 1. Comparative Analysis of Smishing Detection Studies.
Table 1. Comparative Analysis of Smishing Detection Studies.
Study/ModelApproach TypeClassification TypeKey Features UsedAccuracy (%)Computational Efficiency
Mishra & Soni—Smishing Detector [14]Hybrid (URL + Content Analysis)BinaryURL behavior, keywords94.0Moderate
Mishra & Soni—Neural Network Variant [15]Neural NetworkBinaryURL, text content97.9Low
Sonowal & Kuppusamy—SmiDCA [17]Machine Learning (Random Forest)BinaryFeature selection (top 20)96.4Moderate
Joo et al.—S-Detector [18]Hybrid (Naïve Bayes + URL check)BinaryURL presence, APK detection~95.0High
Harichandana et al.—COPS [19]Deep Learning (VAE-based)BinarySMS content, URL features95.0High
Uddin et al.—ExplainableDetector [25]Transformer-basedBinaryText embeddings96.0Low
Proposed in This Study—Chained Transformer (GPT-2 + BERT)Deep Learning (Hybrid Transformer + ML)MulticlassURLs, emails, embeddings97.0+Optimized for mobile
Table 2. SMOTE Generated Dataset Statistics.
Table 2. SMOTE Generated Dataset Statistics.
SMOTENumber of CharactersNumber of WordsNumber of Sentences
count11,60711,60711,607
mean139.9052324.9195311
std75.33042712.8492390
min211
25%72141
50%145251
75%199351
max473881
Table 3. GPT-2 Medium Generated Dataset Statistics.
Table 3. GPT-2 Medium Generated Dataset Statistics.
GPT-2 MediumNumber of CharactersNumber of WordsNumber of Sentences
count11,61011,61011,610
mean115.90559923.5944012.346598
std53.97476711.0068271.447662
min211
25%72161
50%132252
75%154303
max79022038
Table 4. GPT-2 Generated Dataset Statistics.
Table 4. GPT-2 Generated Dataset Statistics.
GPT-2Number of CharactersNumber of WordsNumber of Sentences
count11,61011,61011,610
mean138.17734726.5913873.499139
std73.74709516.4875273.167564
min000
25%80141
50%142252
75%183355
max79022038
Table 5. BERT Embedding Model Results.
Table 5. BERT Embedding Model Results.
EmbeddingBERTBERTBERTBERTBERT
MLno ML—
3 epochs
no ML—1 epochSVCLogistic RegressionRandom Forest
Accuracy0.970.970.950.950.95
ham Precision0.990.990.990.990.99
ham Recall1.000.990.990.990.99
ham F1-score1.000.990.990.990.99
smishing Precision0.880.890.830.800.78
smishing Recall0.910.910.820.830.84
smishing F1-score0.910.900.820.820.81
spam Precision0.830.810.750.740.79
spam Recall0.780.720.750.720.69
spam F1-score0.810.760.750.730.73
Table 6. DistilBERT Embedding Model Results.
Table 6. DistilBERT Embedding Model Results.
EmbeddingDistilBERTDistilBERTDistilBERTDistilBERT
MLno MLSVCLogistic RegressionRandom Forest
Accuracy0.960.950.950.95
ham Precision0.990.990.990.99
ham Recall0.990.990.990.99
ham F1-score0.990.990.990.99
smishing Precision0.900.820.790.80
smishing Recall0.890.820.810.82
smishing F1-score0.900.820.800.80
spam Precision0.770.760.730.76
spam Recall0.770.750.720.70
spam F1-score0.770.760.720.72
Table 7. Google ELECTRA Embedding Model Results.
Table 7. Google ELECTRA Embedding Model Results.
EmbeddingELECTRAELECTRAELECTRAELECTRA
MLno MLSVCLogistic RegressionRandom Forest
Accuracy0.960.940.940.94
ham Precision0.990.990.990.99
ham Recall0.990.980.980.98
ham F1-score0.990.980.980.98
smishing Precision0.880.800.860.79
smishing Recall0.880.820.820.89
smishing F1-score0.880.810.840.84
spam Precision0.730.680.620.71
spam Recall0.730.710.700.65
spam F1-score0.730.690.660.68
Table 8. No Embedding Model Results.
Table 8. No Embedding Model Results.
EmbeddingNoneNoneNone
MLSVCLogistic RegressionRandom Forest
Accuracy0.960.950.95
ham Precision0.970.980.97
ham Recall1.000.991.00
ham F1-score0.990.990.98
smishing Precision0.930.890.90
smishing Recall0.860.840.84
smishing F1-score0.890.860.87
spam Precision0.780.690.73
spam Recall0.630.670.55
spam F1-score0.700.680.63
Table 9. Chained Transformer Model Results.
Table 9. Chained Transformer Model Results.
Chained Transformer Model
Accuracy0.97
ham Precision0.99
ham Recall1.00
ham F1-score1.00
smishing Precision0.90
smishing Recall0.91
smishing F1-score0.91
spam Precision0.83
spam Recall0.78
spam F1-score0.81
Table 10. Baseline vs. Chained Transformer Model.
Table 10. Baseline vs. Chained Transformer Model.
Baseline ModelChained Transformer Model
Accuracy0.960.97
ham Precision0.990.99
ham Recall1.001.00
ham F1-score0.991.00
smishing Precision0.900.90
smishing Recall0.840.91
smishing F1-score0.870.91
spam Precision0.770.83
spam Recall0.770.78
spam F1-score0.770.81
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Munoz, M.L.; Islam, M.F. Deep Learning Approaches for Multi-Class Classification of Phishing Text Messages. J. Cybersecur. Priv. 2025, 5, 102. https://doi.org/10.3390/jcp5040102

AMA Style

Munoz ML, Islam MF. Deep Learning Approaches for Multi-Class Classification of Phishing Text Messages. Journal of Cybersecurity and Privacy. 2025; 5(4):102. https://doi.org/10.3390/jcp5040102

Chicago/Turabian Style

Munoz, Miriam L., and Muhammad F. Islam. 2025. "Deep Learning Approaches for Multi-Class Classification of Phishing Text Messages" Journal of Cybersecurity and Privacy 5, no. 4: 102. https://doi.org/10.3390/jcp5040102

APA Style

Munoz, M. L., & Islam, M. F. (2025). Deep Learning Approaches for Multi-Class Classification of Phishing Text Messages. Journal of Cybersecurity and Privacy, 5(4), 102. https://doi.org/10.3390/jcp5040102

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop