Phishing Email Detection Using BERT and RoBERTa
Mariam Ibrahim, Ruba Elhafiz
German Jordanian University
Key points
From the paper's conclusion- The results show that RoBERTa has more general performance and fewer false negatives than BERT and is therefore a better candidate for deployment on security-critical tasks.
Abstract
One of the most harmful and deceptive forms of cybercrime is phishing, which targets users with malicious emails and websites. In this paper, we focus on the use of natural language processing (NLP) techniques and transformer models for phishing email detection. The Nazario Phishing Corpus is preprocessed and blended with real emails from the Enron dataset to create a robustly balanced dataset. Urgency, deceptive phrasing, and structural anomalies were some of the neglected features and sociolinguistic traits of the text, which underwent tokenization, lemmatization, and noise filtration. We fine-tuned two transformer models, Bidirectional Encoder Representations from Transformers (BERT) and the Robustly Optimized BERT Pretraining Approach (RoBERTa), for binary classification. The models were evaluated on the standard metrics of accuracy, precision, recall, and F1-score. Given the context of phishing, emphasis was placed on recall to reduce the number of phishing attacks that went unnoticed. The results show that RoBERTa has more general performance and fewer false negatives than BERT and is therefore a better candidate for deployment on security-critical tasks.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- An explainable transformer-based model for phishing email detection: A large language model approachComputer Networks · 2026
- Reassessing Machine Learning for Phishing Email Detection: Data Leakage, Cross-Dataset Performance, and False PositivesFuture Internet · 2026
- Hybrid Transformer Architecture for Context-Aware Spam Email ClassificationFuture Internet · 2026
- EdgeGuard: Source-aware robustness and edge-feasibility evaluation of lightweight email phishing detectors under cross-LLM generated attacksJournal of King Saud University Computer and Information Sciences · 2026
- Improving phishing email detection performance through deep learning with adaptive optimizationScientific Reports · 2025
- Cross-model evaluation of phishing detectors against LLM-generated emails.Frontiers in big data · 2026